/*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.Web = (function() {

    /**
     * Namespace Web.
     * @exports Web
     * @namespace
     */
    var Web = {};

    Web.QuarantinedMessage = (function() {

        /**
         * Properties of a QuarantinedMessage.
         * @memberof Web
         * @interface IQuarantinedMessage
         * @property {Uint8Array|null} [originalData] QuarantinedMessage originalData
         * @property {string|null} [extractedText] QuarantinedMessage extractedText
         */

        /**
         * Constructs a new QuarantinedMessage.
         * @memberof Web
         * @classdesc Represents a QuarantinedMessage.
         * @implements IQuarantinedMessage
         * @constructor
         * @param {Web.IQuarantinedMessage=} [properties] Properties to set
         */
        function QuarantinedMessage(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]];
        }

        /**
         * QuarantinedMessage originalData.
         * @member {Uint8Array|null|undefined} originalData
         * @memberof Web.QuarantinedMessage
         * @instance
         */
        QuarantinedMessage.prototype.originalData = null;

        /**
         * QuarantinedMessage extractedText.
         * @member {string|null|undefined} extractedText
         * @memberof Web.QuarantinedMessage
         * @instance
         */
        QuarantinedMessage.prototype.extractedText = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * QuarantinedMessage _originalData.
         * @member {"originalData"|undefined} _originalData
         * @memberof Web.QuarantinedMessage
         * @instance
         */
        Object.defineProperty(QuarantinedMessage.prototype, "_originalData", {
            get: $util.oneOfGetter($oneOfFields = ["originalData"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * QuarantinedMessage _extractedText.
         * @member {"extractedText"|undefined} _extractedText
         * @memberof Web.QuarantinedMessage
         * @instance
         */
        Object.defineProperty(QuarantinedMessage.prototype, "_extractedText", {
            get: $util.oneOfGetter($oneOfFields = ["extractedText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new QuarantinedMessage instance using the specified properties.
         * @function create
         * @memberof Web.QuarantinedMessage
         * @static
         * @param {Web.IQuarantinedMessage=} [properties] Properties to set
         * @returns {Web.QuarantinedMessage} QuarantinedMessage instance
         */
        QuarantinedMessage.create = function create(properties) {
            return new QuarantinedMessage(properties);
        };

        /**
         * Encodes the specified QuarantinedMessage message. Does not implicitly {@link Web.QuarantinedMessage.verify|verify} messages.
         * @function encode
         * @memberof Web.QuarantinedMessage
         * @static
         * @param {Web.IQuarantinedMessage} message QuarantinedMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        QuarantinedMessage.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.originalData != null && Object.hasOwnProperty.call(message, "originalData"))
                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.originalData);
            if (message.extractedText != null && Object.hasOwnProperty.call(message, "extractedText"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.extractedText);
            return writer;
        };

        /**
         * Encodes the specified QuarantinedMessage message, length delimited. Does not implicitly {@link Web.QuarantinedMessage.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.QuarantinedMessage
         * @static
         * @param {Web.IQuarantinedMessage} message QuarantinedMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        QuarantinedMessage.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a QuarantinedMessage message from the specified reader or buffer.
         * @function decode
         * @memberof Web.QuarantinedMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.QuarantinedMessage} QuarantinedMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        QuarantinedMessage.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.Web.QuarantinedMessage();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.originalData = reader.bytes();
                        break;
                    }
                case 2: {
                        message.extractedText = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a QuarantinedMessage message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.QuarantinedMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.QuarantinedMessage} QuarantinedMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        QuarantinedMessage.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a QuarantinedMessage message.
         * @function verify
         * @memberof Web.QuarantinedMessage
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        QuarantinedMessage.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.originalData != null && message.hasOwnProperty("originalData")) {
                properties._originalData = 1;
                if (!(message.originalData && typeof message.originalData.length === "number" || $util.isString(message.originalData)))
                    return "originalData: buffer expected";
            }
            if (message.extractedText != null && message.hasOwnProperty("extractedText")) {
                properties._extractedText = 1;
                if (!$util.isString(message.extractedText))
                    return "extractedText: string expected";
            }
            return null;
        };

        /**
         * Creates a QuarantinedMessage message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.QuarantinedMessage
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.QuarantinedMessage} QuarantinedMessage
         */
        QuarantinedMessage.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.QuarantinedMessage)
                return object;
            var message = new $root.Web.QuarantinedMessage();
            if (object.originalData != null)
                if (typeof object.originalData === "string")
                    $util.base64.decode(object.originalData, message.originalData = $util.newBuffer($util.base64.length(object.originalData)), 0);
                else if (object.originalData.length >= 0)
                    message.originalData = object.originalData;
            if (object.extractedText != null)
                message.extractedText = String(object.extractedText);
            return message;
        };

        /**
         * Creates a plain object from a QuarantinedMessage message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.QuarantinedMessage
         * @static
         * @param {Web.QuarantinedMessage} message QuarantinedMessage
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        QuarantinedMessage.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.originalData != null && message.hasOwnProperty("originalData")) {
                object.originalData = options.bytes === String ? $util.base64.encode(message.originalData, 0, message.originalData.length) : options.bytes === Array ? Array.prototype.slice.call(message.originalData) : message.originalData;
                if (options.oneofs)
                    object._originalData = "originalData";
            }
            if (message.extractedText != null && message.hasOwnProperty("extractedText")) {
                object.extractedText = message.extractedText;
                if (options.oneofs)
                    object._extractedText = "extractedText";
            }
            return object;
        };

        /**
         * Converts this QuarantinedMessage to JSON.
         * @function toJSON
         * @memberof Web.QuarantinedMessage
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        QuarantinedMessage.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for QuarantinedMessage
         * @function getTypeUrl
         * @memberof Web.QuarantinedMessage
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        QuarantinedMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.QuarantinedMessage";
        };

        return QuarantinedMessage;
    })();

    Web.GroupHistoryBundleInfo = (function() {

        /**
         * Properties of a GroupHistoryBundleInfo.
         * @memberof Web
         * @interface IGroupHistoryBundleInfo
         * @property {E2E.Message.IMessageHistoryBundle|null} [deprecatedMessageHistoryBundle] GroupHistoryBundleInfo deprecatedMessageHistoryBundle
         * @property {Web.GroupHistoryBundleInfo.ProcessState|null} [processState] GroupHistoryBundleInfo processState
         */

        /**
         * Constructs a new GroupHistoryBundleInfo.
         * @memberof Web
         * @classdesc Represents a GroupHistoryBundleInfo.
         * @implements IGroupHistoryBundleInfo
         * @constructor
         * @param {Web.IGroupHistoryBundleInfo=} [properties] Properties to set
         */
        function GroupHistoryBundleInfo(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]];
        }

        /**
         * GroupHistoryBundleInfo deprecatedMessageHistoryBundle.
         * @member {E2E.Message.IMessageHistoryBundle|null|undefined} deprecatedMessageHistoryBundle
         * @memberof Web.GroupHistoryBundleInfo
         * @instance
         */
        GroupHistoryBundleInfo.prototype.deprecatedMessageHistoryBundle = null;

        /**
         * GroupHistoryBundleInfo processState.
         * @member {Web.GroupHistoryBundleInfo.ProcessState|null|undefined} processState
         * @memberof Web.GroupHistoryBundleInfo
         * @instance
         */
        GroupHistoryBundleInfo.prototype.processState = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * GroupHistoryBundleInfo _deprecatedMessageHistoryBundle.
         * @member {"deprecatedMessageHistoryBundle"|undefined} _deprecatedMessageHistoryBundle
         * @memberof Web.GroupHistoryBundleInfo
         * @instance
         */
        Object.defineProperty(GroupHistoryBundleInfo.prototype, "_deprecatedMessageHistoryBundle", {
            get: $util.oneOfGetter($oneOfFields = ["deprecatedMessageHistoryBundle"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * GroupHistoryBundleInfo _processState.
         * @member {"processState"|undefined} _processState
         * @memberof Web.GroupHistoryBundleInfo
         * @instance
         */
        Object.defineProperty(GroupHistoryBundleInfo.prototype, "_processState", {
            get: $util.oneOfGetter($oneOfFields = ["processState"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new GroupHistoryBundleInfo instance using the specified properties.
         * @function create
         * @memberof Web.GroupHistoryBundleInfo
         * @static
         * @param {Web.IGroupHistoryBundleInfo=} [properties] Properties to set
         * @returns {Web.GroupHistoryBundleInfo} GroupHistoryBundleInfo instance
         */
        GroupHistoryBundleInfo.create = function create(properties) {
            return new GroupHistoryBundleInfo(properties);
        };

        /**
         * Encodes the specified GroupHistoryBundleInfo message. Does not implicitly {@link Web.GroupHistoryBundleInfo.verify|verify} messages.
         * @function encode
         * @memberof Web.GroupHistoryBundleInfo
         * @static
         * @param {Web.IGroupHistoryBundleInfo} message GroupHistoryBundleInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        GroupHistoryBundleInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.deprecatedMessageHistoryBundle != null && Object.hasOwnProperty.call(message, "deprecatedMessageHistoryBundle"))
                $root.E2E.Message.MessageHistoryBundle.encode(message.deprecatedMessageHistoryBundle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.processState != null && Object.hasOwnProperty.call(message, "processState"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.processState);
            return writer;
        };

        /**
         * Encodes the specified GroupHistoryBundleInfo message, length delimited. Does not implicitly {@link Web.GroupHistoryBundleInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.GroupHistoryBundleInfo
         * @static
         * @param {Web.IGroupHistoryBundleInfo} message GroupHistoryBundleInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        GroupHistoryBundleInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a GroupHistoryBundleInfo message from the specified reader or buffer.
         * @function decode
         * @memberof Web.GroupHistoryBundleInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.GroupHistoryBundleInfo} GroupHistoryBundleInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        GroupHistoryBundleInfo.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.Web.GroupHistoryBundleInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.deprecatedMessageHistoryBundle = $root.E2E.Message.MessageHistoryBundle.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.processState = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a GroupHistoryBundleInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.GroupHistoryBundleInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.GroupHistoryBundleInfo} GroupHistoryBundleInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        GroupHistoryBundleInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a GroupHistoryBundleInfo message.
         * @function verify
         * @memberof Web.GroupHistoryBundleInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        GroupHistoryBundleInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.deprecatedMessageHistoryBundle != null && message.hasOwnProperty("deprecatedMessageHistoryBundle")) {
                properties._deprecatedMessageHistoryBundle = 1;
                {
                    var error = $root.E2E.Message.MessageHistoryBundle.verify(message.deprecatedMessageHistoryBundle);
                    if (error)
                        return "deprecatedMessageHistoryBundle." + error;
                }
            }
            if (message.processState != null && message.hasOwnProperty("processState")) {
                properties._processState = 1;
                switch (message.processState) {
                default:
                    return "processState: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a GroupHistoryBundleInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.GroupHistoryBundleInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.GroupHistoryBundleInfo} GroupHistoryBundleInfo
         */
        GroupHistoryBundleInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.GroupHistoryBundleInfo)
                return object;
            var message = new $root.Web.GroupHistoryBundleInfo();
            if (object.deprecatedMessageHistoryBundle != null) {
                if (typeof object.deprecatedMessageHistoryBundle !== "object")
                    throw TypeError(".Web.GroupHistoryBundleInfo.deprecatedMessageHistoryBundle: object expected");
                message.deprecatedMessageHistoryBundle = $root.E2E.Message.MessageHistoryBundle.fromObject(object.deprecatedMessageHistoryBundle);
            }
            switch (object.processState) {
            default:
                if (typeof object.processState === "number") {
                    message.processState = object.processState;
                    break;
                }
                break;
            case "NOT_INJECTED":
            case 0:
                message.processState = 0;
                break;
            case "INJECTED":
            case 1:
                message.processState = 1;
                break;
            case "INJECTED_PARTIAL":
            case 2:
                message.processState = 2;
                break;
            case "INJECTION_FAILED":
            case 3:
                message.processState = 3;
                break;
            case "INJECTION_FAILED_NO_RETRY":
            case 4:
                message.processState = 4;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a GroupHistoryBundleInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.GroupHistoryBundleInfo
         * @static
         * @param {Web.GroupHistoryBundleInfo} message GroupHistoryBundleInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        GroupHistoryBundleInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.deprecatedMessageHistoryBundle != null && message.hasOwnProperty("deprecatedMessageHistoryBundle")) {
                object.deprecatedMessageHistoryBundle = $root.E2E.Message.MessageHistoryBundle.toObject(message.deprecatedMessageHistoryBundle, options);
                if (options.oneofs)
                    object._deprecatedMessageHistoryBundle = "deprecatedMessageHistoryBundle";
            }
            if (message.processState != null && message.hasOwnProperty("processState")) {
                object.processState = options.enums === String ? $root.Web.GroupHistoryBundleInfo.ProcessState[message.processState] === undefined ? message.processState : $root.Web.GroupHistoryBundleInfo.ProcessState[message.processState] : message.processState;
                if (options.oneofs)
                    object._processState = "processState";
            }
            return object;
        };

        /**
         * Converts this GroupHistoryBundleInfo to JSON.
         * @function toJSON
         * @memberof Web.GroupHistoryBundleInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        GroupHistoryBundleInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for GroupHistoryBundleInfo
         * @function getTypeUrl
         * @memberof Web.GroupHistoryBundleInfo
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        GroupHistoryBundleInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.GroupHistoryBundleInfo";
        };

        /**
         * ProcessState enum.
         * @name Web.GroupHistoryBundleInfo.ProcessState
         * @enum {number}
         * @property {number} NOT_INJECTED=0 NOT_INJECTED value
         * @property {number} INJECTED=1 INJECTED value
         * @property {number} INJECTED_PARTIAL=2 INJECTED_PARTIAL value
         * @property {number} INJECTION_FAILED=3 INJECTION_FAILED value
         * @property {number} INJECTION_FAILED_NO_RETRY=4 INJECTION_FAILED_NO_RETRY value
         */
        GroupHistoryBundleInfo.ProcessState = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "NOT_INJECTED"] = 0;
            values[valuesById[1] = "INJECTED"] = 1;
            values[valuesById[2] = "INJECTED_PARTIAL"] = 2;
            values[valuesById[3] = "INJECTION_FAILED"] = 3;
            values[valuesById[4] = "INJECTION_FAILED_NO_RETRY"] = 4;
            return values;
        })();

        return GroupHistoryBundleInfo;
    })();

    Web.GroupHistoryIndividualMessageInfo = (function() {

        /**
         * Properties of a GroupHistoryIndividualMessageInfo.
         * @memberof Web
         * @interface IGroupHistoryIndividualMessageInfo
         * @property {Protocol.IMessageKey|null} [bundleMessageKey] GroupHistoryIndividualMessageInfo bundleMessageKey
         * @property {boolean|null} [editedAfterReceivedAsHistory] GroupHistoryIndividualMessageInfo editedAfterReceivedAsHistory
         */

        /**
         * Constructs a new GroupHistoryIndividualMessageInfo.
         * @memberof Web
         * @classdesc Represents a GroupHistoryIndividualMessageInfo.
         * @implements IGroupHistoryIndividualMessageInfo
         * @constructor
         * @param {Web.IGroupHistoryIndividualMessageInfo=} [properties] Properties to set
         */
        function GroupHistoryIndividualMessageInfo(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]];
        }

        /**
         * GroupHistoryIndividualMessageInfo bundleMessageKey.
         * @member {Protocol.IMessageKey|null|undefined} bundleMessageKey
         * @memberof Web.GroupHistoryIndividualMessageInfo
         * @instance
         */
        GroupHistoryIndividualMessageInfo.prototype.bundleMessageKey = null;

        /**
         * GroupHistoryIndividualMessageInfo editedAfterReceivedAsHistory.
         * @member {boolean|null|undefined} editedAfterReceivedAsHistory
         * @memberof Web.GroupHistoryIndividualMessageInfo
         * @instance
         */
        GroupHistoryIndividualMessageInfo.prototype.editedAfterReceivedAsHistory = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * GroupHistoryIndividualMessageInfo _bundleMessageKey.
         * @member {"bundleMessageKey"|undefined} _bundleMessageKey
         * @memberof Web.GroupHistoryIndividualMessageInfo
         * @instance
         */
        Object.defineProperty(GroupHistoryIndividualMessageInfo.prototype, "_bundleMessageKey", {
            get: $util.oneOfGetter($oneOfFields = ["bundleMessageKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * GroupHistoryIndividualMessageInfo _editedAfterReceivedAsHistory.
         * @member {"editedAfterReceivedAsHistory"|undefined} _editedAfterReceivedAsHistory
         * @memberof Web.GroupHistoryIndividualMessageInfo
         * @instance
         */
        Object.defineProperty(GroupHistoryIndividualMessageInfo.prototype, "_editedAfterReceivedAsHistory", {
            get: $util.oneOfGetter($oneOfFields = ["editedAfterReceivedAsHistory"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new GroupHistoryIndividualMessageInfo instance using the specified properties.
         * @function create
         * @memberof Web.GroupHistoryIndividualMessageInfo
         * @static
         * @param {Web.IGroupHistoryIndividualMessageInfo=} [properties] Properties to set
         * @returns {Web.GroupHistoryIndividualMessageInfo} GroupHistoryIndividualMessageInfo instance
         */
        GroupHistoryIndividualMessageInfo.create = function create(properties) {
            return new GroupHistoryIndividualMessageInfo(properties);
        };

        /**
         * Encodes the specified GroupHistoryIndividualMessageInfo message. Does not implicitly {@link Web.GroupHistoryIndividualMessageInfo.verify|verify} messages.
         * @function encode
         * @memberof Web.GroupHistoryIndividualMessageInfo
         * @static
         * @param {Web.IGroupHistoryIndividualMessageInfo} message GroupHistoryIndividualMessageInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        GroupHistoryIndividualMessageInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.bundleMessageKey != null && Object.hasOwnProperty.call(message, "bundleMessageKey"))
                $root.Protocol.MessageKey.encode(message.bundleMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.editedAfterReceivedAsHistory != null && Object.hasOwnProperty.call(message, "editedAfterReceivedAsHistory"))
                writer.uint32(/* id 2, wireType 0 =*/16).bool(message.editedAfterReceivedAsHistory);
            return writer;
        };

        /**
         * Encodes the specified GroupHistoryIndividualMessageInfo message, length delimited. Does not implicitly {@link Web.GroupHistoryIndividualMessageInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.GroupHistoryIndividualMessageInfo
         * @static
         * @param {Web.IGroupHistoryIndividualMessageInfo} message GroupHistoryIndividualMessageInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        GroupHistoryIndividualMessageInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a GroupHistoryIndividualMessageInfo message from the specified reader or buffer.
         * @function decode
         * @memberof Web.GroupHistoryIndividualMessageInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.GroupHistoryIndividualMessageInfo} GroupHistoryIndividualMessageInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        GroupHistoryIndividualMessageInfo.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.Web.GroupHistoryIndividualMessageInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.bundleMessageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.editedAfterReceivedAsHistory = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a GroupHistoryIndividualMessageInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.GroupHistoryIndividualMessageInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.GroupHistoryIndividualMessageInfo} GroupHistoryIndividualMessageInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        GroupHistoryIndividualMessageInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a GroupHistoryIndividualMessageInfo message.
         * @function verify
         * @memberof Web.GroupHistoryIndividualMessageInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        GroupHistoryIndividualMessageInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.bundleMessageKey != null && message.hasOwnProperty("bundleMessageKey")) {
                properties._bundleMessageKey = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.bundleMessageKey);
                    if (error)
                        return "bundleMessageKey." + error;
                }
            }
            if (message.editedAfterReceivedAsHistory != null && message.hasOwnProperty("editedAfterReceivedAsHistory")) {
                properties._editedAfterReceivedAsHistory = 1;
                if (typeof message.editedAfterReceivedAsHistory !== "boolean")
                    return "editedAfterReceivedAsHistory: boolean expected";
            }
            return null;
        };

        /**
         * Creates a GroupHistoryIndividualMessageInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.GroupHistoryIndividualMessageInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.GroupHistoryIndividualMessageInfo} GroupHistoryIndividualMessageInfo
         */
        GroupHistoryIndividualMessageInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.GroupHistoryIndividualMessageInfo)
                return object;
            var message = new $root.Web.GroupHistoryIndividualMessageInfo();
            if (object.bundleMessageKey != null) {
                if (typeof object.bundleMessageKey !== "object")
                    throw TypeError(".Web.GroupHistoryIndividualMessageInfo.bundleMessageKey: object expected");
                message.bundleMessageKey = $root.Protocol.MessageKey.fromObject(object.bundleMessageKey);
            }
            if (object.editedAfterReceivedAsHistory != null)
                message.editedAfterReceivedAsHistory = Boolean(object.editedAfterReceivedAsHistory);
            return message;
        };

        /**
         * Creates a plain object from a GroupHistoryIndividualMessageInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.GroupHistoryIndividualMessageInfo
         * @static
         * @param {Web.GroupHistoryIndividualMessageInfo} message GroupHistoryIndividualMessageInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        GroupHistoryIndividualMessageInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.bundleMessageKey != null && message.hasOwnProperty("bundleMessageKey")) {
                object.bundleMessageKey = $root.Protocol.MessageKey.toObject(message.bundleMessageKey, options);
                if (options.oneofs)
                    object._bundleMessageKey = "bundleMessageKey";
            }
            if (message.editedAfterReceivedAsHistory != null && message.hasOwnProperty("editedAfterReceivedAsHistory")) {
                object.editedAfterReceivedAsHistory = message.editedAfterReceivedAsHistory;
                if (options.oneofs)
                    object._editedAfterReceivedAsHistory = "editedAfterReceivedAsHistory";
            }
            return object;
        };

        /**
         * Converts this GroupHistoryIndividualMessageInfo to JSON.
         * @function toJSON
         * @memberof Web.GroupHistoryIndividualMessageInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        GroupHistoryIndividualMessageInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for GroupHistoryIndividualMessageInfo
         * @function getTypeUrl
         * @memberof Web.GroupHistoryIndividualMessageInfo
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        GroupHistoryIndividualMessageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.GroupHistoryIndividualMessageInfo";
        };

        return GroupHistoryIndividualMessageInfo;
    })();

    Web.Citation = (function() {

        /**
         * Properties of a Citation.
         * @memberof Web
         * @interface ICitation
         * @property {string|null} [title] Citation title
         * @property {string|null} [subtitle] Citation subtitle
         * @property {string|null} [cmsId] Citation cmsId
         * @property {string|null} [imageUrl] Citation imageUrl
         */

        /**
         * Constructs a new Citation.
         * @memberof Web
         * @classdesc Represents a Citation.
         * @implements ICitation
         * @constructor
         * @param {Web.ICitation=} [properties] Properties to set
         */
        function Citation(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]];
        }

        /**
         * Citation title.
         * @member {string|null|undefined} title
         * @memberof Web.Citation
         * @instance
         */
        Citation.prototype.title = null;

        /**
         * Citation subtitle.
         * @member {string|null|undefined} subtitle
         * @memberof Web.Citation
         * @instance
         */
        Citation.prototype.subtitle = null;

        /**
         * Citation cmsId.
         * @member {string|null|undefined} cmsId
         * @memberof Web.Citation
         * @instance
         */
        Citation.prototype.cmsId = null;

        /**
         * Citation imageUrl.
         * @member {string|null|undefined} imageUrl
         * @memberof Web.Citation
         * @instance
         */
        Citation.prototype.imageUrl = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * Citation _title.
         * @member {"title"|undefined} _title
         * @memberof Web.Citation
         * @instance
         */
        Object.defineProperty(Citation.prototype, "_title", {
            get: $util.oneOfGetter($oneOfFields = ["title"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Citation _subtitle.
         * @member {"subtitle"|undefined} _subtitle
         * @memberof Web.Citation
         * @instance
         */
        Object.defineProperty(Citation.prototype, "_subtitle", {
            get: $util.oneOfGetter($oneOfFields = ["subtitle"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Citation _cmsId.
         * @member {"cmsId"|undefined} _cmsId
         * @memberof Web.Citation
         * @instance
         */
        Object.defineProperty(Citation.prototype, "_cmsId", {
            get: $util.oneOfGetter($oneOfFields = ["cmsId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Citation _imageUrl.
         * @member {"imageUrl"|undefined} _imageUrl
         * @memberof Web.Citation
         * @instance
         */
        Object.defineProperty(Citation.prototype, "_imageUrl", {
            get: $util.oneOfGetter($oneOfFields = ["imageUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new Citation instance using the specified properties.
         * @function create
         * @memberof Web.Citation
         * @static
         * @param {Web.ICitation=} [properties] Properties to set
         * @returns {Web.Citation} Citation instance
         */
        Citation.create = function create(properties) {
            return new Citation(properties);
        };

        /**
         * Encodes the specified Citation message. Does not implicitly {@link Web.Citation.verify|verify} messages.
         * @function encode
         * @memberof Web.Citation
         * @static
         * @param {Web.ICitation} message Citation message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Citation.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.title);
            if (message.subtitle != null && Object.hasOwnProperty.call(message, "subtitle"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.subtitle);
            if (message.cmsId != null && Object.hasOwnProperty.call(message, "cmsId"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.cmsId);
            if (message.imageUrl != null && Object.hasOwnProperty.call(message, "imageUrl"))
                writer.uint32(/* id 4, wireType 2 =*/34).string(message.imageUrl);
            return writer;
        };

        /**
         * Encodes the specified Citation message, length delimited. Does not implicitly {@link Web.Citation.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.Citation
         * @static
         * @param {Web.ICitation} message Citation message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Citation.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Citation message from the specified reader or buffer.
         * @function decode
         * @memberof Web.Citation
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.Citation} Citation
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Citation.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.Web.Citation();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.title = reader.string();
                        break;
                    }
                case 2: {
                        message.subtitle = reader.string();
                        break;
                    }
                case 3: {
                        message.cmsId = reader.string();
                        break;
                    }
                case 4: {
                        message.imageUrl = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Citation message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.Citation
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.Citation} Citation
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Citation.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Citation message.
         * @function verify
         * @memberof Web.Citation
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Citation.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.title != null && message.hasOwnProperty("title")) {
                properties._title = 1;
                if (!$util.isString(message.title))
                    return "title: string expected";
            }
            if (message.subtitle != null && message.hasOwnProperty("subtitle")) {
                properties._subtitle = 1;
                if (!$util.isString(message.subtitle))
                    return "subtitle: string expected";
            }
            if (message.cmsId != null && message.hasOwnProperty("cmsId")) {
                properties._cmsId = 1;
                if (!$util.isString(message.cmsId))
                    return "cmsId: string expected";
            }
            if (message.imageUrl != null && message.hasOwnProperty("imageUrl")) {
                properties._imageUrl = 1;
                if (!$util.isString(message.imageUrl))
                    return "imageUrl: string expected";
            }
            return null;
        };

        /**
         * Creates a Citation message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.Citation
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.Citation} Citation
         */
        Citation.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.Citation)
                return object;
            var message = new $root.Web.Citation();
            if (object.title != null)
                message.title = String(object.title);
            if (object.subtitle != null)
                message.subtitle = String(object.subtitle);
            if (object.cmsId != null)
                message.cmsId = String(object.cmsId);
            if (object.imageUrl != null)
                message.imageUrl = String(object.imageUrl);
            return message;
        };

        /**
         * Creates a plain object from a Citation message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.Citation
         * @static
         * @param {Web.Citation} message Citation
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Citation.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.title != null && message.hasOwnProperty("title")) {
                object.title = message.title;
                if (options.oneofs)
                    object._title = "title";
            }
            if (message.subtitle != null && message.hasOwnProperty("subtitle")) {
                object.subtitle = message.subtitle;
                if (options.oneofs)
                    object._subtitle = "subtitle";
            }
            if (message.cmsId != null && message.hasOwnProperty("cmsId")) {
                object.cmsId = message.cmsId;
                if (options.oneofs)
                    object._cmsId = "cmsId";
            }
            if (message.imageUrl != null && message.hasOwnProperty("imageUrl")) {
                object.imageUrl = message.imageUrl;
                if (options.oneofs)
                    object._imageUrl = "imageUrl";
            }
            return object;
        };

        /**
         * Converts this Citation to JSON.
         * @function toJSON
         * @memberof Web.Citation
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Citation.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for Citation
         * @function getTypeUrl
         * @memberof Web.Citation
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        Citation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.Citation";
        };

        return Citation;
    })();

    Web.StatusMentionMessage = (function() {

        /**
         * Properties of a StatusMentionMessage.
         * @memberof Web
         * @interface IStatusMentionMessage
         * @property {E2E.IMessage|null} [quotedStatus] StatusMentionMessage quotedStatus
         */

        /**
         * Constructs a new StatusMentionMessage.
         * @memberof Web
         * @classdesc Represents a StatusMentionMessage.
         * @implements IStatusMentionMessage
         * @constructor
         * @param {Web.IStatusMentionMessage=} [properties] Properties to set
         */
        function StatusMentionMessage(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]];
        }

        /**
         * StatusMentionMessage quotedStatus.
         * @member {E2E.IMessage|null|undefined} quotedStatus
         * @memberof Web.StatusMentionMessage
         * @instance
         */
        StatusMentionMessage.prototype.quotedStatus = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * StatusMentionMessage _quotedStatus.
         * @member {"quotedStatus"|undefined} _quotedStatus
         * @memberof Web.StatusMentionMessage
         * @instance
         */
        Object.defineProperty(StatusMentionMessage.prototype, "_quotedStatus", {
            get: $util.oneOfGetter($oneOfFields = ["quotedStatus"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new StatusMentionMessage instance using the specified properties.
         * @function create
         * @memberof Web.StatusMentionMessage
         * @static
         * @param {Web.IStatusMentionMessage=} [properties] Properties to set
         * @returns {Web.StatusMentionMessage} StatusMentionMessage instance
         */
        StatusMentionMessage.create = function create(properties) {
            return new StatusMentionMessage(properties);
        };

        /**
         * Encodes the specified StatusMentionMessage message. Does not implicitly {@link Web.StatusMentionMessage.verify|verify} messages.
         * @function encode
         * @memberof Web.StatusMentionMessage
         * @static
         * @param {Web.IStatusMentionMessage} message StatusMentionMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        StatusMentionMessage.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.quotedStatus != null && Object.hasOwnProperty.call(message, "quotedStatus"))
                $root.E2E.Message.encode(message.quotedStatus, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified StatusMentionMessage message, length delimited. Does not implicitly {@link Web.StatusMentionMessage.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.StatusMentionMessage
         * @static
         * @param {Web.IStatusMentionMessage} message StatusMentionMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        StatusMentionMessage.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a StatusMentionMessage message from the specified reader or buffer.
         * @function decode
         * @memberof Web.StatusMentionMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.StatusMentionMessage} StatusMentionMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        StatusMentionMessage.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.Web.StatusMentionMessage();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.quotedStatus = $root.E2E.Message.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a StatusMentionMessage message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.StatusMentionMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.StatusMentionMessage} StatusMentionMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        StatusMentionMessage.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a StatusMentionMessage message.
         * @function verify
         * @memberof Web.StatusMentionMessage
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        StatusMentionMessage.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.quotedStatus != null && message.hasOwnProperty("quotedStatus")) {
                properties._quotedStatus = 1;
                {
                    var error = $root.E2E.Message.verify(message.quotedStatus);
                    if (error)
                        return "quotedStatus." + error;
                }
            }
            return null;
        };

        /**
         * Creates a StatusMentionMessage message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.StatusMentionMessage
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.StatusMentionMessage} StatusMentionMessage
         */
        StatusMentionMessage.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.StatusMentionMessage)
                return object;
            var message = new $root.Web.StatusMentionMessage();
            if (object.quotedStatus != null) {
                if (typeof object.quotedStatus !== "object")
                    throw TypeError(".Web.StatusMentionMessage.quotedStatus: object expected");
                message.quotedStatus = $root.E2E.Message.fromObject(object.quotedStatus);
            }
            return message;
        };

        /**
         * Creates a plain object from a StatusMentionMessage message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.StatusMentionMessage
         * @static
         * @param {Web.StatusMentionMessage} message StatusMentionMessage
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        StatusMentionMessage.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.quotedStatus != null && message.hasOwnProperty("quotedStatus")) {
                object.quotedStatus = $root.E2E.Message.toObject(message.quotedStatus, options);
                if (options.oneofs)
                    object._quotedStatus = "quotedStatus";
            }
            return object;
        };

        /**
         * Converts this StatusMentionMessage to JSON.
         * @function toJSON
         * @memberof Web.StatusMentionMessage
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        StatusMentionMessage.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for StatusMentionMessage
         * @function getTypeUrl
         * @memberof Web.StatusMentionMessage
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        StatusMentionMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.StatusMentionMessage";
        };

        return StatusMentionMessage;
    })();

    Web.MessageAddOn = (function() {

        /**
         * Properties of a MessageAddOn.
         * @memberof Web
         * @interface IMessageAddOn
         * @property {Web.MessageAddOn.MessageAddOnType|null} [messageAddOnType] MessageAddOn messageAddOnType
         * @property {E2E.IMessage|null} [messageAddOn] MessageAddOn messageAddOn
         * @property {number|Long|null} [senderTimestampMs] MessageAddOn senderTimestampMs
         * @property {number|Long|null} [serverTimestampMs] MessageAddOn serverTimestampMs
         * @property {Web.WebMessageInfo.Status|null} [status] MessageAddOn status
         * @property {Web.IMessageAddOnContextInfo|null} [addOnContextInfo] MessageAddOn addOnContextInfo
         * @property {Protocol.IMessageKey|null} [messageAddOnKey] MessageAddOn messageAddOnKey
         * @property {Web.ILegacyMessage|null} [legacyMessage] MessageAddOn legacyMessage
         */

        /**
         * Constructs a new MessageAddOn.
         * @memberof Web
         * @classdesc Represents a MessageAddOn.
         * @implements IMessageAddOn
         * @constructor
         * @param {Web.IMessageAddOn=} [properties] Properties to set
         */
        function MessageAddOn(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]];
        }

        /**
         * MessageAddOn messageAddOnType.
         * @member {Web.MessageAddOn.MessageAddOnType|null|undefined} messageAddOnType
         * @memberof Web.MessageAddOn
         * @instance
         */
        MessageAddOn.prototype.messageAddOnType = null;

        /**
         * MessageAddOn messageAddOn.
         * @member {E2E.IMessage|null|undefined} messageAddOn
         * @memberof Web.MessageAddOn
         * @instance
         */
        MessageAddOn.prototype.messageAddOn = null;

        /**
         * MessageAddOn senderTimestampMs.
         * @member {number|Long|null|undefined} senderTimestampMs
         * @memberof Web.MessageAddOn
         * @instance
         */
        MessageAddOn.prototype.senderTimestampMs = null;

        /**
         * MessageAddOn serverTimestampMs.
         * @member {number|Long|null|undefined} serverTimestampMs
         * @memberof Web.MessageAddOn
         * @instance
         */
        MessageAddOn.prototype.serverTimestampMs = null;

        /**
         * MessageAddOn status.
         * @member {Web.WebMessageInfo.Status|null|undefined} status
         * @memberof Web.MessageAddOn
         * @instance
         */
        MessageAddOn.prototype.status = null;

        /**
         * MessageAddOn addOnContextInfo.
         * @member {Web.IMessageAddOnContextInfo|null|undefined} addOnContextInfo
         * @memberof Web.MessageAddOn
         * @instance
         */
        MessageAddOn.prototype.addOnContextInfo = null;

        /**
         * MessageAddOn messageAddOnKey.
         * @member {Protocol.IMessageKey|null|undefined} messageAddOnKey
         * @memberof Web.MessageAddOn
         * @instance
         */
        MessageAddOn.prototype.messageAddOnKey = null;

        /**
         * MessageAddOn legacyMessage.
         * @member {Web.ILegacyMessage|null|undefined} legacyMessage
         * @memberof Web.MessageAddOn
         * @instance
         */
        MessageAddOn.prototype.legacyMessage = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * MessageAddOn _messageAddOnType.
         * @member {"messageAddOnType"|undefined} _messageAddOnType
         * @memberof Web.MessageAddOn
         * @instance
         */
        Object.defineProperty(MessageAddOn.prototype, "_messageAddOnType", {
            get: $util.oneOfGetter($oneOfFields = ["messageAddOnType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageAddOn _messageAddOn.
         * @member {"messageAddOn"|undefined} _messageAddOn
         * @memberof Web.MessageAddOn
         * @instance
         */
        Object.defineProperty(MessageAddOn.prototype, "_messageAddOn", {
            get: $util.oneOfGetter($oneOfFields = ["messageAddOn"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageAddOn _senderTimestampMs.
         * @member {"senderTimestampMs"|undefined} _senderTimestampMs
         * @memberof Web.MessageAddOn
         * @instance
         */
        Object.defineProperty(MessageAddOn.prototype, "_senderTimestampMs", {
            get: $util.oneOfGetter($oneOfFields = ["senderTimestampMs"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageAddOn _serverTimestampMs.
         * @member {"serverTimestampMs"|undefined} _serverTimestampMs
         * @memberof Web.MessageAddOn
         * @instance
         */
        Object.defineProperty(MessageAddOn.prototype, "_serverTimestampMs", {
            get: $util.oneOfGetter($oneOfFields = ["serverTimestampMs"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageAddOn _status.
         * @member {"status"|undefined} _status
         * @memberof Web.MessageAddOn
         * @instance
         */
        Object.defineProperty(MessageAddOn.prototype, "_status", {
            get: $util.oneOfGetter($oneOfFields = ["status"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageAddOn _addOnContextInfo.
         * @member {"addOnContextInfo"|undefined} _addOnContextInfo
         * @memberof Web.MessageAddOn
         * @instance
         */
        Object.defineProperty(MessageAddOn.prototype, "_addOnContextInfo", {
            get: $util.oneOfGetter($oneOfFields = ["addOnContextInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageAddOn _messageAddOnKey.
         * @member {"messageAddOnKey"|undefined} _messageAddOnKey
         * @memberof Web.MessageAddOn
         * @instance
         */
        Object.defineProperty(MessageAddOn.prototype, "_messageAddOnKey", {
            get: $util.oneOfGetter($oneOfFields = ["messageAddOnKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageAddOn _legacyMessage.
         * @member {"legacyMessage"|undefined} _legacyMessage
         * @memberof Web.MessageAddOn
         * @instance
         */
        Object.defineProperty(MessageAddOn.prototype, "_legacyMessage", {
            get: $util.oneOfGetter($oneOfFields = ["legacyMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new MessageAddOn instance using the specified properties.
         * @function create
         * @memberof Web.MessageAddOn
         * @static
         * @param {Web.IMessageAddOn=} [properties] Properties to set
         * @returns {Web.MessageAddOn} MessageAddOn instance
         */
        MessageAddOn.create = function create(properties) {
            return new MessageAddOn(properties);
        };

        /**
         * Encodes the specified MessageAddOn message. Does not implicitly {@link Web.MessageAddOn.verify|verify} messages.
         * @function encode
         * @memberof Web.MessageAddOn
         * @static
         * @param {Web.IMessageAddOn} message MessageAddOn message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MessageAddOn.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.messageAddOnType != null && Object.hasOwnProperty.call(message, "messageAddOnType"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.messageAddOnType);
            if (message.messageAddOn != null && Object.hasOwnProperty.call(message, "messageAddOn"))
                $root.E2E.Message.encode(message.messageAddOn, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.senderTimestampMs != null && Object.hasOwnProperty.call(message, "senderTimestampMs"))
                writer.uint32(/* id 3, wireType 0 =*/24).int64(message.senderTimestampMs);
            if (message.serverTimestampMs != null && Object.hasOwnProperty.call(message, "serverTimestampMs"))
                writer.uint32(/* id 4, wireType 0 =*/32).int64(message.serverTimestampMs);
            if (message.status != null && Object.hasOwnProperty.call(message, "status"))
                writer.uint32(/* id 5, wireType 0 =*/40).int32(message.status);
            if (message.addOnContextInfo != null && Object.hasOwnProperty.call(message, "addOnContextInfo"))
                $root.Web.MessageAddOnContextInfo.encode(message.addOnContextInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
            if (message.messageAddOnKey != null && Object.hasOwnProperty.call(message, "messageAddOnKey"))
                $root.Protocol.MessageKey.encode(message.messageAddOnKey, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
            if (message.legacyMessage != null && Object.hasOwnProperty.call(message, "legacyMessage"))
                $root.Web.LegacyMessage.encode(message.legacyMessage, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified MessageAddOn message, length delimited. Does not implicitly {@link Web.MessageAddOn.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.MessageAddOn
         * @static
         * @param {Web.IMessageAddOn} message MessageAddOn message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MessageAddOn.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a MessageAddOn message from the specified reader or buffer.
         * @function decode
         * @memberof Web.MessageAddOn
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.MessageAddOn} MessageAddOn
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MessageAddOn.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.Web.MessageAddOn();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.messageAddOnType = reader.int32();
                        break;
                    }
                case 2: {
                        message.messageAddOn = $root.E2E.Message.decode(reader, reader.uint32());
                        break;
                    }
                case 3: {
                        message.senderTimestampMs = reader.int64();
                        break;
                    }
                case 4: {
                        message.serverTimestampMs = reader.int64();
                        break;
                    }
                case 5: {
                        message.status = reader.int32();
                        break;
                    }
                case 6: {
                        message.addOnContextInfo = $root.Web.MessageAddOnContextInfo.decode(reader, reader.uint32());
                        break;
                    }
                case 7: {
                        message.messageAddOnKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 8: {
                        message.legacyMessage = $root.Web.LegacyMessage.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a MessageAddOn message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.MessageAddOn
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.MessageAddOn} MessageAddOn
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MessageAddOn.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a MessageAddOn message.
         * @function verify
         * @memberof Web.MessageAddOn
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        MessageAddOn.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.messageAddOnType != null && message.hasOwnProperty("messageAddOnType")) {
                properties._messageAddOnType = 1;
                switch (message.messageAddOnType) {
                default:
                    return "messageAddOnType: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                    break;
                }
            }
            if (message.messageAddOn != null && message.hasOwnProperty("messageAddOn")) {
                properties._messageAddOn = 1;
                {
                    var error = $root.E2E.Message.verify(message.messageAddOn);
                    if (error)
                        return "messageAddOn." + error;
                }
            }
            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.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) {
                properties._serverTimestampMs = 1;
                if (!$util.isInteger(message.serverTimestampMs) && !(message.serverTimestampMs && $util.isInteger(message.serverTimestampMs.low) && $util.isInteger(message.serverTimestampMs.high)))
                    return "serverTimestampMs: integer|Long expected";
            }
            if (message.status != null && message.hasOwnProperty("status")) {
                properties._status = 1;
                switch (message.status) {
                default:
                    return "status: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                    break;
                }
            }
            if (message.addOnContextInfo != null && message.hasOwnProperty("addOnContextInfo")) {
                properties._addOnContextInfo = 1;
                {
                    var error = $root.Web.MessageAddOnContextInfo.verify(message.addOnContextInfo);
                    if (error)
                        return "addOnContextInfo." + error;
                }
            }
            if (message.messageAddOnKey != null && message.hasOwnProperty("messageAddOnKey")) {
                properties._messageAddOnKey = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.messageAddOnKey);
                    if (error)
                        return "messageAddOnKey." + error;
                }
            }
            if (message.legacyMessage != null && message.hasOwnProperty("legacyMessage")) {
                properties._legacyMessage = 1;
                {
                    var error = $root.Web.LegacyMessage.verify(message.legacyMessage);
                    if (error)
                        return "legacyMessage." + error;
                }
            }
            return null;
        };

        /**
         * Creates a MessageAddOn message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.MessageAddOn
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.MessageAddOn} MessageAddOn
         */
        MessageAddOn.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.MessageAddOn)
                return object;
            var message = new $root.Web.MessageAddOn();
            switch (object.messageAddOnType) {
            default:
                if (typeof object.messageAddOnType === "number") {
                    message.messageAddOnType = object.messageAddOnType;
                    break;
                }
                break;
            case "UNDEFINED":
            case 0:
                message.messageAddOnType = 0;
                break;
            case "REACTION":
            case 1:
                message.messageAddOnType = 1;
                break;
            case "EVENT_RESPONSE":
            case 2:
                message.messageAddOnType = 2;
                break;
            case "POLL_UPDATE":
            case 3:
                message.messageAddOnType = 3;
                break;
            case "PIN_IN_CHAT":
            case 4:
                message.messageAddOnType = 4;
                break;
            }
            if (object.messageAddOn != null) {
                if (typeof object.messageAddOn !== "object")
                    throw TypeError(".Web.MessageAddOn.messageAddOn: object expected");
                message.messageAddOn = $root.E2E.Message.fromObject(object.messageAddOn);
            }
            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(object.senderTimestampMs.low >>> 0, object.senderTimestampMs.high >>> 0).toNumber();
            if (object.serverTimestampMs != null)
                if ($util.Long)
                    (message.serverTimestampMs = $util.Long.fromValue(object.serverTimestampMs)).unsigned = false;
                else if (typeof object.serverTimestampMs === "string")
                    message.serverTimestampMs = parseInt(object.serverTimestampMs, 10);
                else if (typeof object.serverTimestampMs === "number")
                    message.serverTimestampMs = object.serverTimestampMs;
                else if (typeof object.serverTimestampMs === "object")
                    message.serverTimestampMs = new $util.LongBits(object.serverTimestampMs.low >>> 0, object.serverTimestampMs.high >>> 0).toNumber();
            switch (object.status) {
            default:
                if (typeof object.status === "number") {
                    message.status = object.status;
                    break;
                }
                break;
            case "ERROR":
            case 0:
                message.status = 0;
                break;
            case "PENDING":
            case 1:
                message.status = 1;
                break;
            case "SERVER_ACK":
            case 2:
                message.status = 2;
                break;
            case "DELIVERY_ACK":
            case 3:
                message.status = 3;
                break;
            case "READ":
            case 4:
                message.status = 4;
                break;
            case "PLAYED":
            case 5:
                message.status = 5;
                break;
            }
            if (object.addOnContextInfo != null) {
                if (typeof object.addOnContextInfo !== "object")
                    throw TypeError(".Web.MessageAddOn.addOnContextInfo: object expected");
                message.addOnContextInfo = $root.Web.MessageAddOnContextInfo.fromObject(object.addOnContextInfo);
            }
            if (object.messageAddOnKey != null) {
                if (typeof object.messageAddOnKey !== "object")
                    throw TypeError(".Web.MessageAddOn.messageAddOnKey: object expected");
                message.messageAddOnKey = $root.Protocol.MessageKey.fromObject(object.messageAddOnKey);
            }
            if (object.legacyMessage != null) {
                if (typeof object.legacyMessage !== "object")
                    throw TypeError(".Web.MessageAddOn.legacyMessage: object expected");
                message.legacyMessage = $root.Web.LegacyMessage.fromObject(object.legacyMessage);
            }
            return message;
        };

        /**
         * Creates a plain object from a MessageAddOn message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.MessageAddOn
         * @static
         * @param {Web.MessageAddOn} message MessageAddOn
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        MessageAddOn.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.messageAddOnType != null && message.hasOwnProperty("messageAddOnType")) {
                object.messageAddOnType = options.enums === String ? $root.Web.MessageAddOn.MessageAddOnType[message.messageAddOnType] === undefined ? message.messageAddOnType : $root.Web.MessageAddOn.MessageAddOnType[message.messageAddOnType] : message.messageAddOnType;
                if (options.oneofs)
                    object._messageAddOnType = "messageAddOnType";
            }
            if (message.messageAddOn != null && message.hasOwnProperty("messageAddOn")) {
                object.messageAddOn = $root.E2E.Message.toObject(message.messageAddOn, options);
                if (options.oneofs)
                    object._messageAddOn = "messageAddOn";
            }
            if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) {
                if (typeof message.senderTimestampMs === "number")
                    object.senderTimestampMs = options.longs === String ? String(message.senderTimestampMs) : message.senderTimestampMs;
                else
                    object.senderTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.senderTimestampMs) : options.longs === Number ? new $util.LongBits(message.senderTimestampMs.low >>> 0, message.senderTimestampMs.high >>> 0).toNumber() : message.senderTimestampMs;
                if (options.oneofs)
                    object._senderTimestampMs = "senderTimestampMs";
            }
            if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) {
                if (typeof message.serverTimestampMs === "number")
                    object.serverTimestampMs = options.longs === String ? String(message.serverTimestampMs) : message.serverTimestampMs;
                else
                    object.serverTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.serverTimestampMs) : options.longs === Number ? new $util.LongBits(message.serverTimestampMs.low >>> 0, message.serverTimestampMs.high >>> 0).toNumber() : message.serverTimestampMs;
                if (options.oneofs)
                    object._serverTimestampMs = "serverTimestampMs";
            }
            if (message.status != null && message.hasOwnProperty("status")) {
                object.status = options.enums === String ? $root.Web.WebMessageInfo.Status[message.status] === undefined ? message.status : $root.Web.WebMessageInfo.Status[message.status] : message.status;
                if (options.oneofs)
                    object._status = "status";
            }
            if (message.addOnContextInfo != null && message.hasOwnProperty("addOnContextInfo")) {
                object.addOnContextInfo = $root.Web.MessageAddOnContextInfo.toObject(message.addOnContextInfo, options);
                if (options.oneofs)
                    object._addOnContextInfo = "addOnContextInfo";
            }
            if (message.messageAddOnKey != null && message.hasOwnProperty("messageAddOnKey")) {
                object.messageAddOnKey = $root.Protocol.MessageKey.toObject(message.messageAddOnKey, options);
                if (options.oneofs)
                    object._messageAddOnKey = "messageAddOnKey";
            }
            if (message.legacyMessage != null && message.hasOwnProperty("legacyMessage")) {
                object.legacyMessage = $root.Web.LegacyMessage.toObject(message.legacyMessage, options);
                if (options.oneofs)
                    object._legacyMessage = "legacyMessage";
            }
            return object;
        };

        /**
         * Converts this MessageAddOn to JSON.
         * @function toJSON
         * @memberof Web.MessageAddOn
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        MessageAddOn.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for MessageAddOn
         * @function getTypeUrl
         * @memberof Web.MessageAddOn
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        MessageAddOn.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.MessageAddOn";
        };

        /**
         * MessageAddOnType enum.
         * @name Web.MessageAddOn.MessageAddOnType
         * @enum {number}
         * @property {number} UNDEFINED=0 UNDEFINED value
         * @property {number} REACTION=1 REACTION value
         * @property {number} EVENT_RESPONSE=2 EVENT_RESPONSE value
         * @property {number} POLL_UPDATE=3 POLL_UPDATE value
         * @property {number} PIN_IN_CHAT=4 PIN_IN_CHAT value
         */
        MessageAddOn.MessageAddOnType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNDEFINED"] = 0;
            values[valuesById[1] = "REACTION"] = 1;
            values[valuesById[2] = "EVENT_RESPONSE"] = 2;
            values[valuesById[3] = "POLL_UPDATE"] = 3;
            values[valuesById[4] = "PIN_IN_CHAT"] = 4;
            return values;
        })();

        return MessageAddOn;
    })();

    Web.LegacyMessage = (function() {

        /**
         * Properties of a LegacyMessage.
         * @memberof Web
         * @interface ILegacyMessage
         * @property {E2E.Message.IEventResponseMessage|null} [eventResponseMessage] LegacyMessage eventResponseMessage
         * @property {E2E.Message.IPollVoteMessage|null} [pollVote] LegacyMessage pollVote
         */

        /**
         * Constructs a new LegacyMessage.
         * @memberof Web
         * @classdesc Represents a LegacyMessage.
         * @implements ILegacyMessage
         * @constructor
         * @param {Web.ILegacyMessage=} [properties] Properties to set
         */
        function LegacyMessage(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]];
        }

        /**
         * LegacyMessage eventResponseMessage.
         * @member {E2E.Message.IEventResponseMessage|null|undefined} eventResponseMessage
         * @memberof Web.LegacyMessage
         * @instance
         */
        LegacyMessage.prototype.eventResponseMessage = null;

        /**
         * LegacyMessage pollVote.
         * @member {E2E.Message.IPollVoteMessage|null|undefined} pollVote
         * @memberof Web.LegacyMessage
         * @instance
         */
        LegacyMessage.prototype.pollVote = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * LegacyMessage _eventResponseMessage.
         * @member {"eventResponseMessage"|undefined} _eventResponseMessage
         * @memberof Web.LegacyMessage
         * @instance
         */
        Object.defineProperty(LegacyMessage.prototype, "_eventResponseMessage", {
            get: $util.oneOfGetter($oneOfFields = ["eventResponseMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * LegacyMessage _pollVote.
         * @member {"pollVote"|undefined} _pollVote
         * @memberof Web.LegacyMessage
         * @instance
         */
        Object.defineProperty(LegacyMessage.prototype, "_pollVote", {
            get: $util.oneOfGetter($oneOfFields = ["pollVote"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new LegacyMessage instance using the specified properties.
         * @function create
         * @memberof Web.LegacyMessage
         * @static
         * @param {Web.ILegacyMessage=} [properties] Properties to set
         * @returns {Web.LegacyMessage} LegacyMessage instance
         */
        LegacyMessage.create = function create(properties) {
            return new LegacyMessage(properties);
        };

        /**
         * Encodes the specified LegacyMessage message. Does not implicitly {@link Web.LegacyMessage.verify|verify} messages.
         * @function encode
         * @memberof Web.LegacyMessage
         * @static
         * @param {Web.ILegacyMessage} message LegacyMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        LegacyMessage.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.eventResponseMessage != null && Object.hasOwnProperty.call(message, "eventResponseMessage"))
                $root.E2E.Message.EventResponseMessage.encode(message.eventResponseMessage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.pollVote != null && Object.hasOwnProperty.call(message, "pollVote"))
                $root.E2E.Message.PollVoteMessage.encode(message.pollVote, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified LegacyMessage message, length delimited. Does not implicitly {@link Web.LegacyMessage.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.LegacyMessage
         * @static
         * @param {Web.ILegacyMessage} message LegacyMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        LegacyMessage.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a LegacyMessage message from the specified reader or buffer.
         * @function decode
         * @memberof Web.LegacyMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.LegacyMessage} LegacyMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        LegacyMessage.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.Web.LegacyMessage();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.eventResponseMessage = $root.E2E.Message.EventResponseMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.pollVote = $root.E2E.Message.PollVoteMessage.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a LegacyMessage message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.LegacyMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.LegacyMessage} LegacyMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        LegacyMessage.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a LegacyMessage message.
         * @function verify
         * @memberof Web.LegacyMessage
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        LegacyMessage.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.eventResponseMessage != null && message.hasOwnProperty("eventResponseMessage")) {
                properties._eventResponseMessage = 1;
                {
                    var error = $root.E2E.Message.EventResponseMessage.verify(message.eventResponseMessage);
                    if (error)
                        return "eventResponseMessage." + error;
                }
            }
            if (message.pollVote != null && message.hasOwnProperty("pollVote")) {
                properties._pollVote = 1;
                {
                    var error = $root.E2E.Message.PollVoteMessage.verify(message.pollVote);
                    if (error)
                        return "pollVote." + error;
                }
            }
            return null;
        };

        /**
         * Creates a LegacyMessage message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.LegacyMessage
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.LegacyMessage} LegacyMessage
         */
        LegacyMessage.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.LegacyMessage)
                return object;
            var message = new $root.Web.LegacyMessage();
            if (object.eventResponseMessage != null) {
                if (typeof object.eventResponseMessage !== "object")
                    throw TypeError(".Web.LegacyMessage.eventResponseMessage: object expected");
                message.eventResponseMessage = $root.E2E.Message.EventResponseMessage.fromObject(object.eventResponseMessage);
            }
            if (object.pollVote != null) {
                if (typeof object.pollVote !== "object")
                    throw TypeError(".Web.LegacyMessage.pollVote: object expected");
                message.pollVote = $root.E2E.Message.PollVoteMessage.fromObject(object.pollVote);
            }
            return message;
        };

        /**
         * Creates a plain object from a LegacyMessage message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.LegacyMessage
         * @static
         * @param {Web.LegacyMessage} message LegacyMessage
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        LegacyMessage.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.eventResponseMessage != null && message.hasOwnProperty("eventResponseMessage")) {
                object.eventResponseMessage = $root.E2E.Message.EventResponseMessage.toObject(message.eventResponseMessage, options);
                if (options.oneofs)
                    object._eventResponseMessage = "eventResponseMessage";
            }
            if (message.pollVote != null && message.hasOwnProperty("pollVote")) {
                object.pollVote = $root.E2E.Message.PollVoteMessage.toObject(message.pollVote, options);
                if (options.oneofs)
                    object._pollVote = "pollVote";
            }
            return object;
        };

        /**
         * Converts this LegacyMessage to JSON.
         * @function toJSON
         * @memberof Web.LegacyMessage
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        LegacyMessage.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for LegacyMessage
         * @function getTypeUrl
         * @memberof Web.LegacyMessage
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        LegacyMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.LegacyMessage";
        };

        return LegacyMessage;
    })();

    Web.EventResponse = (function() {

        /**
         * Properties of an EventResponse.
         * @memberof Web
         * @interface IEventResponse
         * @property {Protocol.IMessageKey|null} [eventResponseMessageKey] EventResponse eventResponseMessageKey
         * @property {number|Long|null} [timestampMs] EventResponse timestampMs
         * @property {E2E.Message.IEventResponseMessage|null} [eventResponseMessage] EventResponse eventResponseMessage
         * @property {boolean|null} [unread] EventResponse unread
         */

        /**
         * Constructs a new EventResponse.
         * @memberof Web
         * @classdesc Represents an EventResponse.
         * @implements IEventResponse
         * @constructor
         * @param {Web.IEventResponse=} [properties] Properties to set
         */
        function EventResponse(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]];
        }

        /**
         * EventResponse eventResponseMessageKey.
         * @member {Protocol.IMessageKey|null|undefined} eventResponseMessageKey
         * @memberof Web.EventResponse
         * @instance
         */
        EventResponse.prototype.eventResponseMessageKey = null;

        /**
         * EventResponse timestampMs.
         * @member {number|Long|null|undefined} timestampMs
         * @memberof Web.EventResponse
         * @instance
         */
        EventResponse.prototype.timestampMs = null;

        /**
         * EventResponse eventResponseMessage.
         * @member {E2E.Message.IEventResponseMessage|null|undefined} eventResponseMessage
         * @memberof Web.EventResponse
         * @instance
         */
        EventResponse.prototype.eventResponseMessage = null;

        /**
         * EventResponse unread.
         * @member {boolean|null|undefined} unread
         * @memberof Web.EventResponse
         * @instance
         */
        EventResponse.prototype.unread = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * EventResponse _eventResponseMessageKey.
         * @member {"eventResponseMessageKey"|undefined} _eventResponseMessageKey
         * @memberof Web.EventResponse
         * @instance
         */
        Object.defineProperty(EventResponse.prototype, "_eventResponseMessageKey", {
            get: $util.oneOfGetter($oneOfFields = ["eventResponseMessageKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * EventResponse _timestampMs.
         * @member {"timestampMs"|undefined} _timestampMs
         * @memberof Web.EventResponse
         * @instance
         */
        Object.defineProperty(EventResponse.prototype, "_timestampMs", {
            get: $util.oneOfGetter($oneOfFields = ["timestampMs"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * EventResponse _eventResponseMessage.
         * @member {"eventResponseMessage"|undefined} _eventResponseMessage
         * @memberof Web.EventResponse
         * @instance
         */
        Object.defineProperty(EventResponse.prototype, "_eventResponseMessage", {
            get: $util.oneOfGetter($oneOfFields = ["eventResponseMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * EventResponse _unread.
         * @member {"unread"|undefined} _unread
         * @memberof Web.EventResponse
         * @instance
         */
        Object.defineProperty(EventResponse.prototype, "_unread", {
            get: $util.oneOfGetter($oneOfFields = ["unread"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new EventResponse instance using the specified properties.
         * @function create
         * @memberof Web.EventResponse
         * @static
         * @param {Web.IEventResponse=} [properties] Properties to set
         * @returns {Web.EventResponse} EventResponse instance
         */
        EventResponse.create = function create(properties) {
            return new EventResponse(properties);
        };

        /**
         * Encodes the specified EventResponse message. Does not implicitly {@link Web.EventResponse.verify|verify} messages.
         * @function encode
         * @memberof Web.EventResponse
         * @static
         * @param {Web.IEventResponse} message EventResponse message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        EventResponse.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.eventResponseMessageKey != null && Object.hasOwnProperty.call(message, "eventResponseMessageKey"))
                $root.Protocol.MessageKey.encode(message.eventResponseMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.timestampMs != null && Object.hasOwnProperty.call(message, "timestampMs"))
                writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestampMs);
            if (message.eventResponseMessage != null && Object.hasOwnProperty.call(message, "eventResponseMessage"))
                $root.E2E.Message.EventResponseMessage.encode(message.eventResponseMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.unread != null && Object.hasOwnProperty.call(message, "unread"))
                writer.uint32(/* id 4, wireType 0 =*/32).bool(message.unread);
            return writer;
        };

        /**
         * Encodes the specified EventResponse message, length delimited. Does not implicitly {@link Web.EventResponse.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.EventResponse
         * @static
         * @param {Web.IEventResponse} message EventResponse message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        EventResponse.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes an EventResponse message from the specified reader or buffer.
         * @function decode
         * @memberof Web.EventResponse
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.EventResponse} EventResponse
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        EventResponse.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.Web.EventResponse();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.eventResponseMessageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.timestampMs = reader.int64();
                        break;
                    }
                case 3: {
                        message.eventResponseMessage = $root.E2E.Message.EventResponseMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 4: {
                        message.unread = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes an EventResponse message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.EventResponse
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.EventResponse} EventResponse
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        EventResponse.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies an EventResponse message.
         * @function verify
         * @memberof Web.EventResponse
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        EventResponse.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.eventResponseMessageKey != null && message.hasOwnProperty("eventResponseMessageKey")) {
                properties._eventResponseMessageKey = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.eventResponseMessageKey);
                    if (error)
                        return "eventResponseMessageKey." + error;
                }
            }
            if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) {
                properties._timestampMs = 1;
                if (!$util.isInteger(message.timestampMs) && !(message.timestampMs && $util.isInteger(message.timestampMs.low) && $util.isInteger(message.timestampMs.high)))
                    return "timestampMs: integer|Long expected";
            }
            if (message.eventResponseMessage != null && message.hasOwnProperty("eventResponseMessage")) {
                properties._eventResponseMessage = 1;
                {
                    var error = $root.E2E.Message.EventResponseMessage.verify(message.eventResponseMessage);
                    if (error)
                        return "eventResponseMessage." + error;
                }
            }
            if (message.unread != null && message.hasOwnProperty("unread")) {
                properties._unread = 1;
                if (typeof message.unread !== "boolean")
                    return "unread: boolean expected";
            }
            return null;
        };

        /**
         * Creates an EventResponse message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.EventResponse
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.EventResponse} EventResponse
         */
        EventResponse.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.EventResponse)
                return object;
            var message = new $root.Web.EventResponse();
            if (object.eventResponseMessageKey != null) {
                if (typeof object.eventResponseMessageKey !== "object")
                    throw TypeError(".Web.EventResponse.eventResponseMessageKey: object expected");
                message.eventResponseMessageKey = $root.Protocol.MessageKey.fromObject(object.eventResponseMessageKey);
            }
            if (object.timestampMs != null)
                if ($util.Long)
                    (message.timestampMs = $util.Long.fromValue(object.timestampMs)).unsigned = false;
                else if (typeof object.timestampMs === "string")
                    message.timestampMs = parseInt(object.timestampMs, 10);
                else if (typeof object.timestampMs === "number")
                    message.timestampMs = object.timestampMs;
                else if (typeof object.timestampMs === "object")
                    message.timestampMs = new $util.LongBits(object.timestampMs.low >>> 0, object.timestampMs.high >>> 0).toNumber();
            if (object.eventResponseMessage != null) {
                if (typeof object.eventResponseMessage !== "object")
                    throw TypeError(".Web.EventResponse.eventResponseMessage: object expected");
                message.eventResponseMessage = $root.E2E.Message.EventResponseMessage.fromObject(object.eventResponseMessage);
            }
            if (object.unread != null)
                message.unread = Boolean(object.unread);
            return message;
        };

        /**
         * Creates a plain object from an EventResponse message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.EventResponse
         * @static
         * @param {Web.EventResponse} message EventResponse
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        EventResponse.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.eventResponseMessageKey != null && message.hasOwnProperty("eventResponseMessageKey")) {
                object.eventResponseMessageKey = $root.Protocol.MessageKey.toObject(message.eventResponseMessageKey, options);
                if (options.oneofs)
                    object._eventResponseMessageKey = "eventResponseMessageKey";
            }
            if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) {
                if (typeof message.timestampMs === "number")
                    object.timestampMs = options.longs === String ? String(message.timestampMs) : message.timestampMs;
                else
                    object.timestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.timestampMs) : options.longs === Number ? new $util.LongBits(message.timestampMs.low >>> 0, message.timestampMs.high >>> 0).toNumber() : message.timestampMs;
                if (options.oneofs)
                    object._timestampMs = "timestampMs";
            }
            if (message.eventResponseMessage != null && message.hasOwnProperty("eventResponseMessage")) {
                object.eventResponseMessage = $root.E2E.Message.EventResponseMessage.toObject(message.eventResponseMessage, options);
                if (options.oneofs)
                    object._eventResponseMessage = "eventResponseMessage";
            }
            if (message.unread != null && message.hasOwnProperty("unread")) {
                object.unread = message.unread;
                if (options.oneofs)
                    object._unread = "unread";
            }
            return object;
        };

        /**
         * Converts this EventResponse to JSON.
         * @function toJSON
         * @memberof Web.EventResponse
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        EventResponse.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for EventResponse
         * @function getTypeUrl
         * @memberof Web.EventResponse
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        EventResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.EventResponse";
        };

        return EventResponse;
    })();

    Web.PremiumMessageInfo = (function() {

        /**
         * Properties of a PremiumMessageInfo.
         * @memberof Web
         * @interface IPremiumMessageInfo
         * @property {string|null} [serverCampaignId] PremiumMessageInfo serverCampaignId
         */

        /**
         * Constructs a new PremiumMessageInfo.
         * @memberof Web
         * @classdesc Represents a PremiumMessageInfo.
         * @implements IPremiumMessageInfo
         * @constructor
         * @param {Web.IPremiumMessageInfo=} [properties] Properties to set
         */
        function PremiumMessageInfo(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]];
        }

        /**
         * PremiumMessageInfo serverCampaignId.
         * @member {string|null|undefined} serverCampaignId
         * @memberof Web.PremiumMessageInfo
         * @instance
         */
        PremiumMessageInfo.prototype.serverCampaignId = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * PremiumMessageInfo _serverCampaignId.
         * @member {"serverCampaignId"|undefined} _serverCampaignId
         * @memberof Web.PremiumMessageInfo
         * @instance
         */
        Object.defineProperty(PremiumMessageInfo.prototype, "_serverCampaignId", {
            get: $util.oneOfGetter($oneOfFields = ["serverCampaignId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new PremiumMessageInfo instance using the specified properties.
         * @function create
         * @memberof Web.PremiumMessageInfo
         * @static
         * @param {Web.IPremiumMessageInfo=} [properties] Properties to set
         * @returns {Web.PremiumMessageInfo} PremiumMessageInfo instance
         */
        PremiumMessageInfo.create = function create(properties) {
            return new PremiumMessageInfo(properties);
        };

        /**
         * Encodes the specified PremiumMessageInfo message. Does not implicitly {@link Web.PremiumMessageInfo.verify|verify} messages.
         * @function encode
         * @memberof Web.PremiumMessageInfo
         * @static
         * @param {Web.IPremiumMessageInfo} message PremiumMessageInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PremiumMessageInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.serverCampaignId != null && Object.hasOwnProperty.call(message, "serverCampaignId"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.serverCampaignId);
            return writer;
        };

        /**
         * Encodes the specified PremiumMessageInfo message, length delimited. Does not implicitly {@link Web.PremiumMessageInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.PremiumMessageInfo
         * @static
         * @param {Web.IPremiumMessageInfo} message PremiumMessageInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PremiumMessageInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a PremiumMessageInfo message from the specified reader or buffer.
         * @function decode
         * @memberof Web.PremiumMessageInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.PremiumMessageInfo} PremiumMessageInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PremiumMessageInfo.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.Web.PremiumMessageInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.serverCampaignId = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a PremiumMessageInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.PremiumMessageInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.PremiumMessageInfo} PremiumMessageInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PremiumMessageInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a PremiumMessageInfo message.
         * @function verify
         * @memberof Web.PremiumMessageInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        PremiumMessageInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.serverCampaignId != null && message.hasOwnProperty("serverCampaignId")) {
                properties._serverCampaignId = 1;
                if (!$util.isString(message.serverCampaignId))
                    return "serverCampaignId: string expected";
            }
            return null;
        };

        /**
         * Creates a PremiumMessageInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.PremiumMessageInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.PremiumMessageInfo} PremiumMessageInfo
         */
        PremiumMessageInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.PremiumMessageInfo)
                return object;
            var message = new $root.Web.PremiumMessageInfo();
            if (object.serverCampaignId != null)
                message.serverCampaignId = String(object.serverCampaignId);
            return message;
        };

        /**
         * Creates a plain object from a PremiumMessageInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.PremiumMessageInfo
         * @static
         * @param {Web.PremiumMessageInfo} message PremiumMessageInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        PremiumMessageInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.serverCampaignId != null && message.hasOwnProperty("serverCampaignId")) {
                object.serverCampaignId = message.serverCampaignId;
                if (options.oneofs)
                    object._serverCampaignId = "serverCampaignId";
            }
            return object;
        };

        /**
         * Converts this PremiumMessageInfo to JSON.
         * @function toJSON
         * @memberof Web.PremiumMessageInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        PremiumMessageInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for PremiumMessageInfo
         * @function getTypeUrl
         * @memberof Web.PremiumMessageInfo
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        PremiumMessageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.PremiumMessageInfo";
        };

        return PremiumMessageInfo;
    })();

    Web.MessageAddOnContextInfo = (function() {

        /**
         * Properties of a MessageAddOnContextInfo.
         * @memberof Web
         * @interface IMessageAddOnContextInfo
         * @property {number|null} [messageAddOnDurationInSecs] MessageAddOnContextInfo messageAddOnDurationInSecs
         * @property {E2E.MessageContextInfo.MessageAddonExpiryType|null} [messageAddOnExpiryType] MessageAddOnContextInfo messageAddOnExpiryType
         */

        /**
         * Constructs a new MessageAddOnContextInfo.
         * @memberof Web
         * @classdesc Represents a MessageAddOnContextInfo.
         * @implements IMessageAddOnContextInfo
         * @constructor
         * @param {Web.IMessageAddOnContextInfo=} [properties] Properties to set
         */
        function MessageAddOnContextInfo(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]];
        }

        /**
         * MessageAddOnContextInfo messageAddOnDurationInSecs.
         * @member {number|null|undefined} messageAddOnDurationInSecs
         * @memberof Web.MessageAddOnContextInfo
         * @instance
         */
        MessageAddOnContextInfo.prototype.messageAddOnDurationInSecs = null;

        /**
         * MessageAddOnContextInfo messageAddOnExpiryType.
         * @member {E2E.MessageContextInfo.MessageAddonExpiryType|null|undefined} messageAddOnExpiryType
         * @memberof Web.MessageAddOnContextInfo
         * @instance
         */
        MessageAddOnContextInfo.prototype.messageAddOnExpiryType = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * MessageAddOnContextInfo _messageAddOnDurationInSecs.
         * @member {"messageAddOnDurationInSecs"|undefined} _messageAddOnDurationInSecs
         * @memberof Web.MessageAddOnContextInfo
         * @instance
         */
        Object.defineProperty(MessageAddOnContextInfo.prototype, "_messageAddOnDurationInSecs", {
            get: $util.oneOfGetter($oneOfFields = ["messageAddOnDurationInSecs"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageAddOnContextInfo _messageAddOnExpiryType.
         * @member {"messageAddOnExpiryType"|undefined} _messageAddOnExpiryType
         * @memberof Web.MessageAddOnContextInfo
         * @instance
         */
        Object.defineProperty(MessageAddOnContextInfo.prototype, "_messageAddOnExpiryType", {
            get: $util.oneOfGetter($oneOfFields = ["messageAddOnExpiryType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new MessageAddOnContextInfo instance using the specified properties.
         * @function create
         * @memberof Web.MessageAddOnContextInfo
         * @static
         * @param {Web.IMessageAddOnContextInfo=} [properties] Properties to set
         * @returns {Web.MessageAddOnContextInfo} MessageAddOnContextInfo instance
         */
        MessageAddOnContextInfo.create = function create(properties) {
            return new MessageAddOnContextInfo(properties);
        };

        /**
         * Encodes the specified MessageAddOnContextInfo message. Does not implicitly {@link Web.MessageAddOnContextInfo.verify|verify} messages.
         * @function encode
         * @memberof Web.MessageAddOnContextInfo
         * @static
         * @param {Web.IMessageAddOnContextInfo} message MessageAddOnContextInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MessageAddOnContextInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.messageAddOnDurationInSecs != null && Object.hasOwnProperty.call(message, "messageAddOnDurationInSecs"))
                writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.messageAddOnDurationInSecs);
            if (message.messageAddOnExpiryType != null && Object.hasOwnProperty.call(message, "messageAddOnExpiryType"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.messageAddOnExpiryType);
            return writer;
        };

        /**
         * Encodes the specified MessageAddOnContextInfo message, length delimited. Does not implicitly {@link Web.MessageAddOnContextInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.MessageAddOnContextInfo
         * @static
         * @param {Web.IMessageAddOnContextInfo} message MessageAddOnContextInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MessageAddOnContextInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a MessageAddOnContextInfo message from the specified reader or buffer.
         * @function decode
         * @memberof Web.MessageAddOnContextInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.MessageAddOnContextInfo} MessageAddOnContextInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MessageAddOnContextInfo.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.Web.MessageAddOnContextInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.messageAddOnDurationInSecs = reader.uint32();
                        break;
                    }
                case 2: {
                        message.messageAddOnExpiryType = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a MessageAddOnContextInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.MessageAddOnContextInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.MessageAddOnContextInfo} MessageAddOnContextInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MessageAddOnContextInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a MessageAddOnContextInfo message.
         * @function verify
         * @memberof Web.MessageAddOnContextInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        MessageAddOnContextInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.messageAddOnDurationInSecs != null && message.hasOwnProperty("messageAddOnDurationInSecs")) {
                properties._messageAddOnDurationInSecs = 1;
                if (!$util.isInteger(message.messageAddOnDurationInSecs))
                    return "messageAddOnDurationInSecs: integer expected";
            }
            if (message.messageAddOnExpiryType != null && message.hasOwnProperty("messageAddOnExpiryType")) {
                properties._messageAddOnExpiryType = 1;
                switch (message.messageAddOnExpiryType) {
                default:
                    return "messageAddOnExpiryType: enum value expected";
                case 1:
                case 2:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a MessageAddOnContextInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.MessageAddOnContextInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.MessageAddOnContextInfo} MessageAddOnContextInfo
         */
        MessageAddOnContextInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.MessageAddOnContextInfo)
                return object;
            var message = new $root.Web.MessageAddOnContextInfo();
            if (object.messageAddOnDurationInSecs != null)
                message.messageAddOnDurationInSecs = object.messageAddOnDurationInSecs >>> 0;
            switch (object.messageAddOnExpiryType) {
            default:
                if (typeof object.messageAddOnExpiryType === "number") {
                    message.messageAddOnExpiryType = object.messageAddOnExpiryType;
                    break;
                }
                break;
            case "STATIC":
            case 1:
                message.messageAddOnExpiryType = 1;
                break;
            case "DEPENDENT_ON_PARENT":
            case 2:
                message.messageAddOnExpiryType = 2;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a MessageAddOnContextInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.MessageAddOnContextInfo
         * @static
         * @param {Web.MessageAddOnContextInfo} message MessageAddOnContextInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        MessageAddOnContextInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.messageAddOnDurationInSecs != null && message.hasOwnProperty("messageAddOnDurationInSecs")) {
                object.messageAddOnDurationInSecs = message.messageAddOnDurationInSecs;
                if (options.oneofs)
                    object._messageAddOnDurationInSecs = "messageAddOnDurationInSecs";
            }
            if (message.messageAddOnExpiryType != null && message.hasOwnProperty("messageAddOnExpiryType")) {
                object.messageAddOnExpiryType = options.enums === String ? $root.E2E.MessageContextInfo.MessageAddonExpiryType[message.messageAddOnExpiryType] === undefined ? message.messageAddOnExpiryType : $root.E2E.MessageContextInfo.MessageAddonExpiryType[message.messageAddOnExpiryType] : message.messageAddOnExpiryType;
                if (options.oneofs)
                    object._messageAddOnExpiryType = "messageAddOnExpiryType";
            }
            return object;
        };

        /**
         * Converts this MessageAddOnContextInfo to JSON.
         * @function toJSON
         * @memberof Web.MessageAddOnContextInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        MessageAddOnContextInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for MessageAddOnContextInfo
         * @function getTypeUrl
         * @memberof Web.MessageAddOnContextInfo
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        MessageAddOnContextInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.MessageAddOnContextInfo";
        };

        return MessageAddOnContextInfo;
    })();

    Web.PinInChat = (function() {

        /**
         * Properties of a PinInChat.
         * @memberof Web
         * @interface IPinInChat
         * @property {Web.PinInChat.Type|null} [type] PinInChat type
         * @property {Protocol.IMessageKey|null} [key] PinInChat key
         * @property {number|Long|null} [senderTimestampMs] PinInChat senderTimestampMs
         * @property {number|Long|null} [serverTimestampMs] PinInChat serverTimestampMs
         * @property {Web.IMessageAddOnContextInfo|null} [messageAddOnContextInfo] PinInChat messageAddOnContextInfo
         */

        /**
         * Constructs a new PinInChat.
         * @memberof Web
         * @classdesc Represents a PinInChat.
         * @implements IPinInChat
         * @constructor
         * @param {Web.IPinInChat=} [properties] Properties to set
         */
        function PinInChat(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]];
        }

        /**
         * PinInChat type.
         * @member {Web.PinInChat.Type|null|undefined} type
         * @memberof Web.PinInChat
         * @instance
         */
        PinInChat.prototype.type = null;

        /**
         * PinInChat key.
         * @member {Protocol.IMessageKey|null|undefined} key
         * @memberof Web.PinInChat
         * @instance
         */
        PinInChat.prototype.key = null;

        /**
         * PinInChat senderTimestampMs.
         * @member {number|Long|null|undefined} senderTimestampMs
         * @memberof Web.PinInChat
         * @instance
         */
        PinInChat.prototype.senderTimestampMs = null;

        /**
         * PinInChat serverTimestampMs.
         * @member {number|Long|null|undefined} serverTimestampMs
         * @memberof Web.PinInChat
         * @instance
         */
        PinInChat.prototype.serverTimestampMs = null;

        /**
         * PinInChat messageAddOnContextInfo.
         * @member {Web.IMessageAddOnContextInfo|null|undefined} messageAddOnContextInfo
         * @memberof Web.PinInChat
         * @instance
         */
        PinInChat.prototype.messageAddOnContextInfo = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * PinInChat _type.
         * @member {"type"|undefined} _type
         * @memberof Web.PinInChat
         * @instance
         */
        Object.defineProperty(PinInChat.prototype, "_type", {
            get: $util.oneOfGetter($oneOfFields = ["type"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PinInChat _key.
         * @member {"key"|undefined} _key
         * @memberof Web.PinInChat
         * @instance
         */
        Object.defineProperty(PinInChat.prototype, "_key", {
            get: $util.oneOfGetter($oneOfFields = ["key"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PinInChat _senderTimestampMs.
         * @member {"senderTimestampMs"|undefined} _senderTimestampMs
         * @memberof Web.PinInChat
         * @instance
         */
        Object.defineProperty(PinInChat.prototype, "_senderTimestampMs", {
            get: $util.oneOfGetter($oneOfFields = ["senderTimestampMs"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PinInChat _serverTimestampMs.
         * @member {"serverTimestampMs"|undefined} _serverTimestampMs
         * @memberof Web.PinInChat
         * @instance
         */
        Object.defineProperty(PinInChat.prototype, "_serverTimestampMs", {
            get: $util.oneOfGetter($oneOfFields = ["serverTimestampMs"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PinInChat _messageAddOnContextInfo.
         * @member {"messageAddOnContextInfo"|undefined} _messageAddOnContextInfo
         * @memberof Web.PinInChat
         * @instance
         */
        Object.defineProperty(PinInChat.prototype, "_messageAddOnContextInfo", {
            get: $util.oneOfGetter($oneOfFields = ["messageAddOnContextInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new PinInChat instance using the specified properties.
         * @function create
         * @memberof Web.PinInChat
         * @static
         * @param {Web.IPinInChat=} [properties] Properties to set
         * @returns {Web.PinInChat} PinInChat instance
         */
        PinInChat.create = function create(properties) {
            return new PinInChat(properties);
        };

        /**
         * Encodes the specified PinInChat message. Does not implicitly {@link Web.PinInChat.verify|verify} messages.
         * @function encode
         * @memberof Web.PinInChat
         * @static
         * @param {Web.IPinInChat} message PinInChat message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PinInChat.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
            if (message.key != null && Object.hasOwnProperty.call(message, "key"))
                $root.Protocol.MessageKey.encode(message.key, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.senderTimestampMs != null && Object.hasOwnProperty.call(message, "senderTimestampMs"))
                writer.uint32(/* id 3, wireType 0 =*/24).int64(message.senderTimestampMs);
            if (message.serverTimestampMs != null && Object.hasOwnProperty.call(message, "serverTimestampMs"))
                writer.uint32(/* id 4, wireType 0 =*/32).int64(message.serverTimestampMs);
            if (message.messageAddOnContextInfo != null && Object.hasOwnProperty.call(message, "messageAddOnContextInfo"))
                $root.Web.MessageAddOnContextInfo.encode(message.messageAddOnContextInfo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified PinInChat message, length delimited. Does not implicitly {@link Web.PinInChat.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.PinInChat
         * @static
         * @param {Web.IPinInChat} message PinInChat message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PinInChat.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a PinInChat message from the specified reader or buffer.
         * @function decode
         * @memberof Web.PinInChat
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.PinInChat} PinInChat
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PinInChat.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.Web.PinInChat();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.type = reader.int32();
                        break;
                    }
                case 2: {
                        message.key = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 3: {
                        message.senderTimestampMs = reader.int64();
                        break;
                    }
                case 4: {
                        message.serverTimestampMs = reader.int64();
                        break;
                    }
                case 5: {
                        message.messageAddOnContextInfo = $root.Web.MessageAddOnContextInfo.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a PinInChat message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.PinInChat
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.PinInChat} PinInChat
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PinInChat.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a PinInChat message.
         * @function verify
         * @memberof Web.PinInChat
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        PinInChat.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.type != null && message.hasOwnProperty("type")) {
                properties._type = 1;
                switch (message.type) {
                default:
                    return "type: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            }
            if (message.key != null && message.hasOwnProperty("key")) {
                properties._key = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.key);
                    if (error)
                        return "key." + error;
                }
            }
            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.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) {
                properties._serverTimestampMs = 1;
                if (!$util.isInteger(message.serverTimestampMs) && !(message.serverTimestampMs && $util.isInteger(message.serverTimestampMs.low) && $util.isInteger(message.serverTimestampMs.high)))
                    return "serverTimestampMs: integer|Long expected";
            }
            if (message.messageAddOnContextInfo != null && message.hasOwnProperty("messageAddOnContextInfo")) {
                properties._messageAddOnContextInfo = 1;
                {
                    var error = $root.Web.MessageAddOnContextInfo.verify(message.messageAddOnContextInfo);
                    if (error)
                        return "messageAddOnContextInfo." + error;
                }
            }
            return null;
        };

        /**
         * Creates a PinInChat message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.PinInChat
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.PinInChat} PinInChat
         */
        PinInChat.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.PinInChat)
                return object;
            var message = new $root.Web.PinInChat();
            switch (object.type) {
            default:
                if (typeof object.type === "number") {
                    message.type = object.type;
                    break;
                }
                break;
            case "UNKNOWN_TYPE":
            case 0:
                message.type = 0;
                break;
            case "PIN_FOR_ALL":
            case 1:
                message.type = 1;
                break;
            case "UNPIN_FOR_ALL":
            case 2:
                message.type = 2;
                break;
            }
            if (object.key != null) {
                if (typeof object.key !== "object")
                    throw TypeError(".Web.PinInChat.key: object expected");
                message.key = $root.Protocol.MessageKey.fromObject(object.key);
            }
            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(object.senderTimestampMs.low >>> 0, object.senderTimestampMs.high >>> 0).toNumber();
            if (object.serverTimestampMs != null)
                if ($util.Long)
                    (message.serverTimestampMs = $util.Long.fromValue(object.serverTimestampMs)).unsigned = false;
                else if (typeof object.serverTimestampMs === "string")
                    message.serverTimestampMs = parseInt(object.serverTimestampMs, 10);
                else if (typeof object.serverTimestampMs === "number")
                    message.serverTimestampMs = object.serverTimestampMs;
                else if (typeof object.serverTimestampMs === "object")
                    message.serverTimestampMs = new $util.LongBits(object.serverTimestampMs.low >>> 0, object.serverTimestampMs.high >>> 0).toNumber();
            if (object.messageAddOnContextInfo != null) {
                if (typeof object.messageAddOnContextInfo !== "object")
                    throw TypeError(".Web.PinInChat.messageAddOnContextInfo: object expected");
                message.messageAddOnContextInfo = $root.Web.MessageAddOnContextInfo.fromObject(object.messageAddOnContextInfo);
            }
            return message;
        };

        /**
         * Creates a plain object from a PinInChat message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.PinInChat
         * @static
         * @param {Web.PinInChat} message PinInChat
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        PinInChat.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.type != null && message.hasOwnProperty("type")) {
                object.type = options.enums === String ? $root.Web.PinInChat.Type[message.type] === undefined ? message.type : $root.Web.PinInChat.Type[message.type] : message.type;
                if (options.oneofs)
                    object._type = "type";
            }
            if (message.key != null && message.hasOwnProperty("key")) {
                object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                if (options.oneofs)
                    object._key = "key";
            }
            if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) {
                if (typeof message.senderTimestampMs === "number")
                    object.senderTimestampMs = options.longs === String ? String(message.senderTimestampMs) : message.senderTimestampMs;
                else
                    object.senderTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.senderTimestampMs) : options.longs === Number ? new $util.LongBits(message.senderTimestampMs.low >>> 0, message.senderTimestampMs.high >>> 0).toNumber() : message.senderTimestampMs;
                if (options.oneofs)
                    object._senderTimestampMs = "senderTimestampMs";
            }
            if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) {
                if (typeof message.serverTimestampMs === "number")
                    object.serverTimestampMs = options.longs === String ? String(message.serverTimestampMs) : message.serverTimestampMs;
                else
                    object.serverTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.serverTimestampMs) : options.longs === Number ? new $util.LongBits(message.serverTimestampMs.low >>> 0, message.serverTimestampMs.high >>> 0).toNumber() : message.serverTimestampMs;
                if (options.oneofs)
                    object._serverTimestampMs = "serverTimestampMs";
            }
            if (message.messageAddOnContextInfo != null && message.hasOwnProperty("messageAddOnContextInfo")) {
                object.messageAddOnContextInfo = $root.Web.MessageAddOnContextInfo.toObject(message.messageAddOnContextInfo, options);
                if (options.oneofs)
                    object._messageAddOnContextInfo = "messageAddOnContextInfo";
            }
            return object;
        };

        /**
         * Converts this PinInChat to JSON.
         * @function toJSON
         * @memberof Web.PinInChat
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        PinInChat.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for PinInChat
         * @function getTypeUrl
         * @memberof Web.PinInChat
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        PinInChat.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.PinInChat";
        };

        /**
         * Type enum.
         * @name Web.PinInChat.Type
         * @enum {number}
         * @property {number} UNKNOWN_TYPE=0 UNKNOWN_TYPE value
         * @property {number} PIN_FOR_ALL=1 PIN_FOR_ALL value
         * @property {number} UNPIN_FOR_ALL=2 UNPIN_FOR_ALL value
         */
        PinInChat.Type = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN_TYPE"] = 0;
            values[valuesById[1] = "PIN_FOR_ALL"] = 1;
            values[valuesById[2] = "UNPIN_FOR_ALL"] = 2;
            return values;
        })();

        return PinInChat;
    })();

    Web.KeepInChat = (function() {

        /**
         * Properties of a KeepInChat.
         * @memberof Web
         * @interface IKeepInChat
         * @property {E2E.KeepType|null} [keepType] KeepInChat keepType
         * @property {number|Long|null} [serverTimestamp] KeepInChat serverTimestamp
         * @property {Protocol.IMessageKey|null} [key] KeepInChat key
         * @property {string|null} [deviceJid] KeepInChat deviceJid
         * @property {number|Long|null} [clientTimestampMs] KeepInChat clientTimestampMs
         * @property {number|Long|null} [serverTimestampMs] KeepInChat serverTimestampMs
         */

        /**
         * Constructs a new KeepInChat.
         * @memberof Web
         * @classdesc Represents a KeepInChat.
         * @implements IKeepInChat
         * @constructor
         * @param {Web.IKeepInChat=} [properties] Properties to set
         */
        function KeepInChat(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]];
        }

        /**
         * KeepInChat keepType.
         * @member {E2E.KeepType|null|undefined} keepType
         * @memberof Web.KeepInChat
         * @instance
         */
        KeepInChat.prototype.keepType = null;

        /**
         * KeepInChat serverTimestamp.
         * @member {number|Long|null|undefined} serverTimestamp
         * @memberof Web.KeepInChat
         * @instance
         */
        KeepInChat.prototype.serverTimestamp = null;

        /**
         * KeepInChat key.
         * @member {Protocol.IMessageKey|null|undefined} key
         * @memberof Web.KeepInChat
         * @instance
         */
        KeepInChat.prototype.key = null;

        /**
         * KeepInChat deviceJid.
         * @member {string|null|undefined} deviceJid
         * @memberof Web.KeepInChat
         * @instance
         */
        KeepInChat.prototype.deviceJid = null;

        /**
         * KeepInChat clientTimestampMs.
         * @member {number|Long|null|undefined} clientTimestampMs
         * @memberof Web.KeepInChat
         * @instance
         */
        KeepInChat.prototype.clientTimestampMs = null;

        /**
         * KeepInChat serverTimestampMs.
         * @member {number|Long|null|undefined} serverTimestampMs
         * @memberof Web.KeepInChat
         * @instance
         */
        KeepInChat.prototype.serverTimestampMs = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * KeepInChat _keepType.
         * @member {"keepType"|undefined} _keepType
         * @memberof Web.KeepInChat
         * @instance
         */
        Object.defineProperty(KeepInChat.prototype, "_keepType", {
            get: $util.oneOfGetter($oneOfFields = ["keepType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * KeepInChat _serverTimestamp.
         * @member {"serverTimestamp"|undefined} _serverTimestamp
         * @memberof Web.KeepInChat
         * @instance
         */
        Object.defineProperty(KeepInChat.prototype, "_serverTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["serverTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * KeepInChat _key.
         * @member {"key"|undefined} _key
         * @memberof Web.KeepInChat
         * @instance
         */
        Object.defineProperty(KeepInChat.prototype, "_key", {
            get: $util.oneOfGetter($oneOfFields = ["key"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * KeepInChat _deviceJid.
         * @member {"deviceJid"|undefined} _deviceJid
         * @memberof Web.KeepInChat
         * @instance
         */
        Object.defineProperty(KeepInChat.prototype, "_deviceJid", {
            get: $util.oneOfGetter($oneOfFields = ["deviceJid"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * KeepInChat _clientTimestampMs.
         * @member {"clientTimestampMs"|undefined} _clientTimestampMs
         * @memberof Web.KeepInChat
         * @instance
         */
        Object.defineProperty(KeepInChat.prototype, "_clientTimestampMs", {
            get: $util.oneOfGetter($oneOfFields = ["clientTimestampMs"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * KeepInChat _serverTimestampMs.
         * @member {"serverTimestampMs"|undefined} _serverTimestampMs
         * @memberof Web.KeepInChat
         * @instance
         */
        Object.defineProperty(KeepInChat.prototype, "_serverTimestampMs", {
            get: $util.oneOfGetter($oneOfFields = ["serverTimestampMs"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new KeepInChat instance using the specified properties.
         * @function create
         * @memberof Web.KeepInChat
         * @static
         * @param {Web.IKeepInChat=} [properties] Properties to set
         * @returns {Web.KeepInChat} KeepInChat instance
         */
        KeepInChat.create = function create(properties) {
            return new KeepInChat(properties);
        };

        /**
         * Encodes the specified KeepInChat message. Does not implicitly {@link Web.KeepInChat.verify|verify} messages.
         * @function encode
         * @memberof Web.KeepInChat
         * @static
         * @param {Web.IKeepInChat} message KeepInChat message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        KeepInChat.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.keepType != null && Object.hasOwnProperty.call(message, "keepType"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.keepType);
            if (message.serverTimestamp != null && Object.hasOwnProperty.call(message, "serverTimestamp"))
                writer.uint32(/* id 2, wireType 0 =*/16).int64(message.serverTimestamp);
            if (message.key != null && Object.hasOwnProperty.call(message, "key"))
                $root.Protocol.MessageKey.encode(message.key, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.deviceJid != null && Object.hasOwnProperty.call(message, "deviceJid"))
                writer.uint32(/* id 4, wireType 2 =*/34).string(message.deviceJid);
            if (message.clientTimestampMs != null && Object.hasOwnProperty.call(message, "clientTimestampMs"))
                writer.uint32(/* id 5, wireType 0 =*/40).int64(message.clientTimestampMs);
            if (message.serverTimestampMs != null && Object.hasOwnProperty.call(message, "serverTimestampMs"))
                writer.uint32(/* id 6, wireType 0 =*/48).int64(message.serverTimestampMs);
            return writer;
        };

        /**
         * Encodes the specified KeepInChat message, length delimited. Does not implicitly {@link Web.KeepInChat.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.KeepInChat
         * @static
         * @param {Web.IKeepInChat} message KeepInChat message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        KeepInChat.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a KeepInChat message from the specified reader or buffer.
         * @function decode
         * @memberof Web.KeepInChat
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.KeepInChat} KeepInChat
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        KeepInChat.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.Web.KeepInChat();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.keepType = reader.int32();
                        break;
                    }
                case 2: {
                        message.serverTimestamp = reader.int64();
                        break;
                    }
                case 3: {
                        message.key = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 4: {
                        message.deviceJid = reader.string();
                        break;
                    }
                case 5: {
                        message.clientTimestampMs = reader.int64();
                        break;
                    }
                case 6: {
                        message.serverTimestampMs = reader.int64();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a KeepInChat message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.KeepInChat
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.KeepInChat} KeepInChat
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        KeepInChat.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a KeepInChat message.
         * @function verify
         * @memberof Web.KeepInChat
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        KeepInChat.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.keepType != null && message.hasOwnProperty("keepType")) {
                properties._keepType = 1;
                switch (message.keepType) {
                default:
                    return "keepType: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            }
            if (message.serverTimestamp != null && message.hasOwnProperty("serverTimestamp")) {
                properties._serverTimestamp = 1;
                if (!$util.isInteger(message.serverTimestamp) && !(message.serverTimestamp && $util.isInteger(message.serverTimestamp.low) && $util.isInteger(message.serverTimestamp.high)))
                    return "serverTimestamp: integer|Long expected";
            }
            if (message.key != null && message.hasOwnProperty("key")) {
                properties._key = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.key);
                    if (error)
                        return "key." + error;
                }
            }
            if (message.deviceJid != null && message.hasOwnProperty("deviceJid")) {
                properties._deviceJid = 1;
                if (!$util.isString(message.deviceJid))
                    return "deviceJid: string expected";
            }
            if (message.clientTimestampMs != null && message.hasOwnProperty("clientTimestampMs")) {
                properties._clientTimestampMs = 1;
                if (!$util.isInteger(message.clientTimestampMs) && !(message.clientTimestampMs && $util.isInteger(message.clientTimestampMs.low) && $util.isInteger(message.clientTimestampMs.high)))
                    return "clientTimestampMs: integer|Long expected";
            }
            if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) {
                properties._serverTimestampMs = 1;
                if (!$util.isInteger(message.serverTimestampMs) && !(message.serverTimestampMs && $util.isInteger(message.serverTimestampMs.low) && $util.isInteger(message.serverTimestampMs.high)))
                    return "serverTimestampMs: integer|Long expected";
            }
            return null;
        };

        /**
         * Creates a KeepInChat message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.KeepInChat
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.KeepInChat} KeepInChat
         */
        KeepInChat.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.KeepInChat)
                return object;
            var message = new $root.Web.KeepInChat();
            switch (object.keepType) {
            default:
                if (typeof object.keepType === "number") {
                    message.keepType = object.keepType;
                    break;
                }
                break;
            case "UNKNOWN":
            case 0:
                message.keepType = 0;
                break;
            case "KEEP_FOR_ALL":
            case 1:
                message.keepType = 1;
                break;
            case "UNDO_KEEP_FOR_ALL":
            case 2:
                message.keepType = 2;
                break;
            }
            if (object.serverTimestamp != null)
                if ($util.Long)
                    (message.serverTimestamp = $util.Long.fromValue(object.serverTimestamp)).unsigned = false;
                else if (typeof object.serverTimestamp === "string")
                    message.serverTimestamp = parseInt(object.serverTimestamp, 10);
                else if (typeof object.serverTimestamp === "number")
                    message.serverTimestamp = object.serverTimestamp;
                else if (typeof object.serverTimestamp === "object")
                    message.serverTimestamp = new $util.LongBits(object.serverTimestamp.low >>> 0, object.serverTimestamp.high >>> 0).toNumber();
            if (object.key != null) {
                if (typeof object.key !== "object")
                    throw TypeError(".Web.KeepInChat.key: object expected");
                message.key = $root.Protocol.MessageKey.fromObject(object.key);
            }
            if (object.deviceJid != null)
                message.deviceJid = String(object.deviceJid);
            if (object.clientTimestampMs != null)
                if ($util.Long)
                    (message.clientTimestampMs = $util.Long.fromValue(object.clientTimestampMs)).unsigned = false;
                else if (typeof object.clientTimestampMs === "string")
                    message.clientTimestampMs = parseInt(object.clientTimestampMs, 10);
                else if (typeof object.clientTimestampMs === "number")
                    message.clientTimestampMs = object.clientTimestampMs;
                else if (typeof object.clientTimestampMs === "object")
                    message.clientTimestampMs = new $util.LongBits(object.clientTimestampMs.low >>> 0, object.clientTimestampMs.high >>> 0).toNumber();
            if (object.serverTimestampMs != null)
                if ($util.Long)
                    (message.serverTimestampMs = $util.Long.fromValue(object.serverTimestampMs)).unsigned = false;
                else if (typeof object.serverTimestampMs === "string")
                    message.serverTimestampMs = parseInt(object.serverTimestampMs, 10);
                else if (typeof object.serverTimestampMs === "number")
                    message.serverTimestampMs = object.serverTimestampMs;
                else if (typeof object.serverTimestampMs === "object")
                    message.serverTimestampMs = new $util.LongBits(object.serverTimestampMs.low >>> 0, object.serverTimestampMs.high >>> 0).toNumber();
            return message;
        };

        /**
         * Creates a plain object from a KeepInChat message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.KeepInChat
         * @static
         * @param {Web.KeepInChat} message KeepInChat
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        KeepInChat.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.keepType != null && message.hasOwnProperty("keepType")) {
                object.keepType = options.enums === String ? $root.E2E.KeepType[message.keepType] === undefined ? message.keepType : $root.E2E.KeepType[message.keepType] : message.keepType;
                if (options.oneofs)
                    object._keepType = "keepType";
            }
            if (message.serverTimestamp != null && message.hasOwnProperty("serverTimestamp")) {
                if (typeof message.serverTimestamp === "number")
                    object.serverTimestamp = options.longs === String ? String(message.serverTimestamp) : message.serverTimestamp;
                else
                    object.serverTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.serverTimestamp) : options.longs === Number ? new $util.LongBits(message.serverTimestamp.low >>> 0, message.serverTimestamp.high >>> 0).toNumber() : message.serverTimestamp;
                if (options.oneofs)
                    object._serverTimestamp = "serverTimestamp";
            }
            if (message.key != null && message.hasOwnProperty("key")) {
                object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                if (options.oneofs)
                    object._key = "key";
            }
            if (message.deviceJid != null && message.hasOwnProperty("deviceJid")) {
                object.deviceJid = message.deviceJid;
                if (options.oneofs)
                    object._deviceJid = "deviceJid";
            }
            if (message.clientTimestampMs != null && message.hasOwnProperty("clientTimestampMs")) {
                if (typeof message.clientTimestampMs === "number")
                    object.clientTimestampMs = options.longs === String ? String(message.clientTimestampMs) : message.clientTimestampMs;
                else
                    object.clientTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.clientTimestampMs) : options.longs === Number ? new $util.LongBits(message.clientTimestampMs.low >>> 0, message.clientTimestampMs.high >>> 0).toNumber() : message.clientTimestampMs;
                if (options.oneofs)
                    object._clientTimestampMs = "clientTimestampMs";
            }
            if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) {
                if (typeof message.serverTimestampMs === "number")
                    object.serverTimestampMs = options.longs === String ? String(message.serverTimestampMs) : message.serverTimestampMs;
                else
                    object.serverTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.serverTimestampMs) : options.longs === Number ? new $util.LongBits(message.serverTimestampMs.low >>> 0, message.serverTimestampMs.high >>> 0).toNumber() : message.serverTimestampMs;
                if (options.oneofs)
                    object._serverTimestampMs = "serverTimestampMs";
            }
            return object;
        };

        /**
         * Converts this KeepInChat to JSON.
         * @function toJSON
         * @memberof Web.KeepInChat
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        KeepInChat.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for KeepInChat
         * @function getTypeUrl
         * @memberof Web.KeepInChat
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        KeepInChat.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.KeepInChat";
        };

        return KeepInChat;
    })();

    Web.EventAdditionalMetadata = (function() {

        /**
         * Properties of an EventAdditionalMetadata.
         * @memberof Web
         * @interface IEventAdditionalMetadata
         * @property {boolean|null} [isStale] EventAdditionalMetadata isStale
         */

        /**
         * Constructs a new EventAdditionalMetadata.
         * @memberof Web
         * @classdesc Represents an EventAdditionalMetadata.
         * @implements IEventAdditionalMetadata
         * @constructor
         * @param {Web.IEventAdditionalMetadata=} [properties] Properties to set
         */
        function EventAdditionalMetadata(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]];
        }

        /**
         * EventAdditionalMetadata isStale.
         * @member {boolean|null|undefined} isStale
         * @memberof Web.EventAdditionalMetadata
         * @instance
         */
        EventAdditionalMetadata.prototype.isStale = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * EventAdditionalMetadata _isStale.
         * @member {"isStale"|undefined} _isStale
         * @memberof Web.EventAdditionalMetadata
         * @instance
         */
        Object.defineProperty(EventAdditionalMetadata.prototype, "_isStale", {
            get: $util.oneOfGetter($oneOfFields = ["isStale"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new EventAdditionalMetadata instance using the specified properties.
         * @function create
         * @memberof Web.EventAdditionalMetadata
         * @static
         * @param {Web.IEventAdditionalMetadata=} [properties] Properties to set
         * @returns {Web.EventAdditionalMetadata} EventAdditionalMetadata instance
         */
        EventAdditionalMetadata.create = function create(properties) {
            return new EventAdditionalMetadata(properties);
        };

        /**
         * Encodes the specified EventAdditionalMetadata message. Does not implicitly {@link Web.EventAdditionalMetadata.verify|verify} messages.
         * @function encode
         * @memberof Web.EventAdditionalMetadata
         * @static
         * @param {Web.IEventAdditionalMetadata} message EventAdditionalMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        EventAdditionalMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.isStale != null && Object.hasOwnProperty.call(message, "isStale"))
                writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isStale);
            return writer;
        };

        /**
         * Encodes the specified EventAdditionalMetadata message, length delimited. Does not implicitly {@link Web.EventAdditionalMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.EventAdditionalMetadata
         * @static
         * @param {Web.IEventAdditionalMetadata} message EventAdditionalMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        EventAdditionalMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes an EventAdditionalMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof Web.EventAdditionalMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.EventAdditionalMetadata} EventAdditionalMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        EventAdditionalMetadata.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.Web.EventAdditionalMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.isStale = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes an EventAdditionalMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.EventAdditionalMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.EventAdditionalMetadata} EventAdditionalMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        EventAdditionalMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies an EventAdditionalMetadata message.
         * @function verify
         * @memberof Web.EventAdditionalMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        EventAdditionalMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.isStale != null && message.hasOwnProperty("isStale")) {
                properties._isStale = 1;
                if (typeof message.isStale !== "boolean")
                    return "isStale: boolean expected";
            }
            return null;
        };

        /**
         * Creates an EventAdditionalMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.EventAdditionalMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.EventAdditionalMetadata} EventAdditionalMetadata
         */
        EventAdditionalMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.EventAdditionalMetadata)
                return object;
            var message = new $root.Web.EventAdditionalMetadata();
            if (object.isStale != null)
                message.isStale = Boolean(object.isStale);
            return message;
        };

        /**
         * Creates a plain object from an EventAdditionalMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.EventAdditionalMetadata
         * @static
         * @param {Web.EventAdditionalMetadata} message EventAdditionalMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        EventAdditionalMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.isStale != null && message.hasOwnProperty("isStale")) {
                object.isStale = message.isStale;
                if (options.oneofs)
                    object._isStale = "isStale";
            }
            return object;
        };

        /**
         * Converts this EventAdditionalMetadata to JSON.
         * @function toJSON
         * @memberof Web.EventAdditionalMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        EventAdditionalMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for EventAdditionalMetadata
         * @function getTypeUrl
         * @memberof Web.EventAdditionalMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        EventAdditionalMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.EventAdditionalMetadata";
        };

        return EventAdditionalMetadata;
    })();

    Web.InteractiveMessageAdditionalMetadata = (function() {

        /**
         * Properties of an InteractiveMessageAdditionalMetadata.
         * @memberof Web
         * @interface IInteractiveMessageAdditionalMetadata
         * @property {boolean|null} [isGalaxyFlowCompleted] InteractiveMessageAdditionalMetadata isGalaxyFlowCompleted
         */

        /**
         * Constructs a new InteractiveMessageAdditionalMetadata.
         * @memberof Web
         * @classdesc Represents an InteractiveMessageAdditionalMetadata.
         * @implements IInteractiveMessageAdditionalMetadata
         * @constructor
         * @param {Web.IInteractiveMessageAdditionalMetadata=} [properties] Properties to set
         */
        function InteractiveMessageAdditionalMetadata(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]];
        }

        /**
         * InteractiveMessageAdditionalMetadata isGalaxyFlowCompleted.
         * @member {boolean|null|undefined} isGalaxyFlowCompleted
         * @memberof Web.InteractiveMessageAdditionalMetadata
         * @instance
         */
        InteractiveMessageAdditionalMetadata.prototype.isGalaxyFlowCompleted = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * InteractiveMessageAdditionalMetadata _isGalaxyFlowCompleted.
         * @member {"isGalaxyFlowCompleted"|undefined} _isGalaxyFlowCompleted
         * @memberof Web.InteractiveMessageAdditionalMetadata
         * @instance
         */
        Object.defineProperty(InteractiveMessageAdditionalMetadata.prototype, "_isGalaxyFlowCompleted", {
            get: $util.oneOfGetter($oneOfFields = ["isGalaxyFlowCompleted"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new InteractiveMessageAdditionalMetadata instance using the specified properties.
         * @function create
         * @memberof Web.InteractiveMessageAdditionalMetadata
         * @static
         * @param {Web.IInteractiveMessageAdditionalMetadata=} [properties] Properties to set
         * @returns {Web.InteractiveMessageAdditionalMetadata} InteractiveMessageAdditionalMetadata instance
         */
        InteractiveMessageAdditionalMetadata.create = function create(properties) {
            return new InteractiveMessageAdditionalMetadata(properties);
        };

        /**
         * Encodes the specified InteractiveMessageAdditionalMetadata message. Does not implicitly {@link Web.InteractiveMessageAdditionalMetadata.verify|verify} messages.
         * @function encode
         * @memberof Web.InteractiveMessageAdditionalMetadata
         * @static
         * @param {Web.IInteractiveMessageAdditionalMetadata} message InteractiveMessageAdditionalMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        InteractiveMessageAdditionalMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.isGalaxyFlowCompleted != null && Object.hasOwnProperty.call(message, "isGalaxyFlowCompleted"))
                writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isGalaxyFlowCompleted);
            return writer;
        };

        /**
         * Encodes the specified InteractiveMessageAdditionalMetadata message, length delimited. Does not implicitly {@link Web.InteractiveMessageAdditionalMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.InteractiveMessageAdditionalMetadata
         * @static
         * @param {Web.IInteractiveMessageAdditionalMetadata} message InteractiveMessageAdditionalMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        InteractiveMessageAdditionalMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes an InteractiveMessageAdditionalMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof Web.InteractiveMessageAdditionalMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.InteractiveMessageAdditionalMetadata} InteractiveMessageAdditionalMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        InteractiveMessageAdditionalMetadata.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.Web.InteractiveMessageAdditionalMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.isGalaxyFlowCompleted = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes an InteractiveMessageAdditionalMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.InteractiveMessageAdditionalMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.InteractiveMessageAdditionalMetadata} InteractiveMessageAdditionalMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        InteractiveMessageAdditionalMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies an InteractiveMessageAdditionalMetadata message.
         * @function verify
         * @memberof Web.InteractiveMessageAdditionalMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        InteractiveMessageAdditionalMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.isGalaxyFlowCompleted != null && message.hasOwnProperty("isGalaxyFlowCompleted")) {
                properties._isGalaxyFlowCompleted = 1;
                if (typeof message.isGalaxyFlowCompleted !== "boolean")
                    return "isGalaxyFlowCompleted: boolean expected";
            }
            return null;
        };

        /**
         * Creates an InteractiveMessageAdditionalMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.InteractiveMessageAdditionalMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.InteractiveMessageAdditionalMetadata} InteractiveMessageAdditionalMetadata
         */
        InteractiveMessageAdditionalMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.InteractiveMessageAdditionalMetadata)
                return object;
            var message = new $root.Web.InteractiveMessageAdditionalMetadata();
            if (object.isGalaxyFlowCompleted != null)
                message.isGalaxyFlowCompleted = Boolean(object.isGalaxyFlowCompleted);
            return message;
        };

        /**
         * Creates a plain object from an InteractiveMessageAdditionalMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.InteractiveMessageAdditionalMetadata
         * @static
         * @param {Web.InteractiveMessageAdditionalMetadata} message InteractiveMessageAdditionalMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        InteractiveMessageAdditionalMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.isGalaxyFlowCompleted != null && message.hasOwnProperty("isGalaxyFlowCompleted")) {
                object.isGalaxyFlowCompleted = message.isGalaxyFlowCompleted;
                if (options.oneofs)
                    object._isGalaxyFlowCompleted = "isGalaxyFlowCompleted";
            }
            return object;
        };

        /**
         * Converts this InteractiveMessageAdditionalMetadata to JSON.
         * @function toJSON
         * @memberof Web.InteractiveMessageAdditionalMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        InteractiveMessageAdditionalMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for InteractiveMessageAdditionalMetadata
         * @function getTypeUrl
         * @memberof Web.InteractiveMessageAdditionalMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        InteractiveMessageAdditionalMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.InteractiveMessageAdditionalMetadata";
        };

        return InteractiveMessageAdditionalMetadata;
    })();

    Web.PollAdditionalMetadata = (function() {

        /**
         * Properties of a PollAdditionalMetadata.
         * @memberof Web
         * @interface IPollAdditionalMetadata
         * @property {boolean|null} [pollInvalidated] PollAdditionalMetadata pollInvalidated
         */

        /**
         * Constructs a new PollAdditionalMetadata.
         * @memberof Web
         * @classdesc Represents a PollAdditionalMetadata.
         * @implements IPollAdditionalMetadata
         * @constructor
         * @param {Web.IPollAdditionalMetadata=} [properties] Properties to set
         */
        function PollAdditionalMetadata(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]];
        }

        /**
         * PollAdditionalMetadata pollInvalidated.
         * @member {boolean|null|undefined} pollInvalidated
         * @memberof Web.PollAdditionalMetadata
         * @instance
         */
        PollAdditionalMetadata.prototype.pollInvalidated = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * PollAdditionalMetadata _pollInvalidated.
         * @member {"pollInvalidated"|undefined} _pollInvalidated
         * @memberof Web.PollAdditionalMetadata
         * @instance
         */
        Object.defineProperty(PollAdditionalMetadata.prototype, "_pollInvalidated", {
            get: $util.oneOfGetter($oneOfFields = ["pollInvalidated"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new PollAdditionalMetadata instance using the specified properties.
         * @function create
         * @memberof Web.PollAdditionalMetadata
         * @static
         * @param {Web.IPollAdditionalMetadata=} [properties] Properties to set
         * @returns {Web.PollAdditionalMetadata} PollAdditionalMetadata instance
         */
        PollAdditionalMetadata.create = function create(properties) {
            return new PollAdditionalMetadata(properties);
        };

        /**
         * Encodes the specified PollAdditionalMetadata message. Does not implicitly {@link Web.PollAdditionalMetadata.verify|verify} messages.
         * @function encode
         * @memberof Web.PollAdditionalMetadata
         * @static
         * @param {Web.IPollAdditionalMetadata} message PollAdditionalMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PollAdditionalMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.pollInvalidated != null && Object.hasOwnProperty.call(message, "pollInvalidated"))
                writer.uint32(/* id 1, wireType 0 =*/8).bool(message.pollInvalidated);
            return writer;
        };

        /**
         * Encodes the specified PollAdditionalMetadata message, length delimited. Does not implicitly {@link Web.PollAdditionalMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.PollAdditionalMetadata
         * @static
         * @param {Web.IPollAdditionalMetadata} message PollAdditionalMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PollAdditionalMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a PollAdditionalMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof Web.PollAdditionalMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.PollAdditionalMetadata} PollAdditionalMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PollAdditionalMetadata.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.Web.PollAdditionalMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.pollInvalidated = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a PollAdditionalMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.PollAdditionalMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.PollAdditionalMetadata} PollAdditionalMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PollAdditionalMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a PollAdditionalMetadata message.
         * @function verify
         * @memberof Web.PollAdditionalMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        PollAdditionalMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.pollInvalidated != null && message.hasOwnProperty("pollInvalidated")) {
                properties._pollInvalidated = 1;
                if (typeof message.pollInvalidated !== "boolean")
                    return "pollInvalidated: boolean expected";
            }
            return null;
        };

        /**
         * Creates a PollAdditionalMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.PollAdditionalMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.PollAdditionalMetadata} PollAdditionalMetadata
         */
        PollAdditionalMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.PollAdditionalMetadata)
                return object;
            var message = new $root.Web.PollAdditionalMetadata();
            if (object.pollInvalidated != null)
                message.pollInvalidated = Boolean(object.pollInvalidated);
            return message;
        };

        /**
         * Creates a plain object from a PollAdditionalMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.PollAdditionalMetadata
         * @static
         * @param {Web.PollAdditionalMetadata} message PollAdditionalMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        PollAdditionalMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.pollInvalidated != null && message.hasOwnProperty("pollInvalidated")) {
                object.pollInvalidated = message.pollInvalidated;
                if (options.oneofs)
                    object._pollInvalidated = "pollInvalidated";
            }
            return object;
        };

        /**
         * Converts this PollAdditionalMetadata to JSON.
         * @function toJSON
         * @memberof Web.PollAdditionalMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        PollAdditionalMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for PollAdditionalMetadata
         * @function getTypeUrl
         * @memberof Web.PollAdditionalMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        PollAdditionalMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.PollAdditionalMetadata";
        };

        return PollAdditionalMetadata;
    })();

    Web.PollUpdate = (function() {

        /**
         * Properties of a PollUpdate.
         * @memberof Web
         * @interface IPollUpdate
         * @property {Protocol.IMessageKey|null} [pollUpdateMessageKey] PollUpdate pollUpdateMessageKey
         * @property {E2E.Message.IPollVoteMessage|null} [vote] PollUpdate vote
         * @property {number|Long|null} [senderTimestampMs] PollUpdate senderTimestampMs
         * @property {number|Long|null} [serverTimestampMs] PollUpdate serverTimestampMs
         * @property {boolean|null} [unread] PollUpdate unread
         */

        /**
         * Constructs a new PollUpdate.
         * @memberof Web
         * @classdesc Represents a PollUpdate.
         * @implements IPollUpdate
         * @constructor
         * @param {Web.IPollUpdate=} [properties] Properties to set
         */
        function PollUpdate(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]];
        }

        /**
         * PollUpdate pollUpdateMessageKey.
         * @member {Protocol.IMessageKey|null|undefined} pollUpdateMessageKey
         * @memberof Web.PollUpdate
         * @instance
         */
        PollUpdate.prototype.pollUpdateMessageKey = null;

        /**
         * PollUpdate vote.
         * @member {E2E.Message.IPollVoteMessage|null|undefined} vote
         * @memberof Web.PollUpdate
         * @instance
         */
        PollUpdate.prototype.vote = null;

        /**
         * PollUpdate senderTimestampMs.
         * @member {number|Long|null|undefined} senderTimestampMs
         * @memberof Web.PollUpdate
         * @instance
         */
        PollUpdate.prototype.senderTimestampMs = null;

        /**
         * PollUpdate serverTimestampMs.
         * @member {number|Long|null|undefined} serverTimestampMs
         * @memberof Web.PollUpdate
         * @instance
         */
        PollUpdate.prototype.serverTimestampMs = null;

        /**
         * PollUpdate unread.
         * @member {boolean|null|undefined} unread
         * @memberof Web.PollUpdate
         * @instance
         */
        PollUpdate.prototype.unread = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * PollUpdate _pollUpdateMessageKey.
         * @member {"pollUpdateMessageKey"|undefined} _pollUpdateMessageKey
         * @memberof Web.PollUpdate
         * @instance
         */
        Object.defineProperty(PollUpdate.prototype, "_pollUpdateMessageKey", {
            get: $util.oneOfGetter($oneOfFields = ["pollUpdateMessageKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PollUpdate _vote.
         * @member {"vote"|undefined} _vote
         * @memberof Web.PollUpdate
         * @instance
         */
        Object.defineProperty(PollUpdate.prototype, "_vote", {
            get: $util.oneOfGetter($oneOfFields = ["vote"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PollUpdate _senderTimestampMs.
         * @member {"senderTimestampMs"|undefined} _senderTimestampMs
         * @memberof Web.PollUpdate
         * @instance
         */
        Object.defineProperty(PollUpdate.prototype, "_senderTimestampMs", {
            get: $util.oneOfGetter($oneOfFields = ["senderTimestampMs"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PollUpdate _serverTimestampMs.
         * @member {"serverTimestampMs"|undefined} _serverTimestampMs
         * @memberof Web.PollUpdate
         * @instance
         */
        Object.defineProperty(PollUpdate.prototype, "_serverTimestampMs", {
            get: $util.oneOfGetter($oneOfFields = ["serverTimestampMs"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PollUpdate _unread.
         * @member {"unread"|undefined} _unread
         * @memberof Web.PollUpdate
         * @instance
         */
        Object.defineProperty(PollUpdate.prototype, "_unread", {
            get: $util.oneOfGetter($oneOfFields = ["unread"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new PollUpdate instance using the specified properties.
         * @function create
         * @memberof Web.PollUpdate
         * @static
         * @param {Web.IPollUpdate=} [properties] Properties to set
         * @returns {Web.PollUpdate} PollUpdate instance
         */
        PollUpdate.create = function create(properties) {
            return new PollUpdate(properties);
        };

        /**
         * Encodes the specified PollUpdate message. Does not implicitly {@link Web.PollUpdate.verify|verify} messages.
         * @function encode
         * @memberof Web.PollUpdate
         * @static
         * @param {Web.IPollUpdate} message PollUpdate message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PollUpdate.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.pollUpdateMessageKey != null && Object.hasOwnProperty.call(message, "pollUpdateMessageKey"))
                $root.Protocol.MessageKey.encode(message.pollUpdateMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.vote != null && Object.hasOwnProperty.call(message, "vote"))
                $root.E2E.Message.PollVoteMessage.encode(message.vote, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.senderTimestampMs != null && Object.hasOwnProperty.call(message, "senderTimestampMs"))
                writer.uint32(/* id 3, wireType 0 =*/24).int64(message.senderTimestampMs);
            if (message.serverTimestampMs != null && Object.hasOwnProperty.call(message, "serverTimestampMs"))
                writer.uint32(/* id 4, wireType 0 =*/32).int64(message.serverTimestampMs);
            if (message.unread != null && Object.hasOwnProperty.call(message, "unread"))
                writer.uint32(/* id 5, wireType 0 =*/40).bool(message.unread);
            return writer;
        };

        /**
         * Encodes the specified PollUpdate message, length delimited. Does not implicitly {@link Web.PollUpdate.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.PollUpdate
         * @static
         * @param {Web.IPollUpdate} message PollUpdate message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PollUpdate.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a PollUpdate message from the specified reader or buffer.
         * @function decode
         * @memberof Web.PollUpdate
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.PollUpdate} PollUpdate
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PollUpdate.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.Web.PollUpdate();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.pollUpdateMessageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.vote = $root.E2E.Message.PollVoteMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 3: {
                        message.senderTimestampMs = reader.int64();
                        break;
                    }
                case 4: {
                        message.serverTimestampMs = reader.int64();
                        break;
                    }
                case 5: {
                        message.unread = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a PollUpdate message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.PollUpdate
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.PollUpdate} PollUpdate
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PollUpdate.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a PollUpdate message.
         * @function verify
         * @memberof Web.PollUpdate
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        PollUpdate.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.pollUpdateMessageKey != null && message.hasOwnProperty("pollUpdateMessageKey")) {
                properties._pollUpdateMessageKey = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.pollUpdateMessageKey);
                    if (error)
                        return "pollUpdateMessageKey." + error;
                }
            }
            if (message.vote != null && message.hasOwnProperty("vote")) {
                properties._vote = 1;
                {
                    var error = $root.E2E.Message.PollVoteMessage.verify(message.vote);
                    if (error)
                        return "vote." + error;
                }
            }
            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.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) {
                properties._serverTimestampMs = 1;
                if (!$util.isInteger(message.serverTimestampMs) && !(message.serverTimestampMs && $util.isInteger(message.serverTimestampMs.low) && $util.isInteger(message.serverTimestampMs.high)))
                    return "serverTimestampMs: integer|Long expected";
            }
            if (message.unread != null && message.hasOwnProperty("unread")) {
                properties._unread = 1;
                if (typeof message.unread !== "boolean")
                    return "unread: boolean expected";
            }
            return null;
        };

        /**
         * Creates a PollUpdate message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.PollUpdate
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.PollUpdate} PollUpdate
         */
        PollUpdate.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.PollUpdate)
                return object;
            var message = new $root.Web.PollUpdate();
            if (object.pollUpdateMessageKey != null) {
                if (typeof object.pollUpdateMessageKey !== "object")
                    throw TypeError(".Web.PollUpdate.pollUpdateMessageKey: object expected");
                message.pollUpdateMessageKey = $root.Protocol.MessageKey.fromObject(object.pollUpdateMessageKey);
            }
            if (object.vote != null) {
                if (typeof object.vote !== "object")
                    throw TypeError(".Web.PollUpdate.vote: object expected");
                message.vote = $root.E2E.Message.PollVoteMessage.fromObject(object.vote);
            }
            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(object.senderTimestampMs.low >>> 0, object.senderTimestampMs.high >>> 0).toNumber();
            if (object.serverTimestampMs != null)
                if ($util.Long)
                    (message.serverTimestampMs = $util.Long.fromValue(object.serverTimestampMs)).unsigned = false;
                else if (typeof object.serverTimestampMs === "string")
                    message.serverTimestampMs = parseInt(object.serverTimestampMs, 10);
                else if (typeof object.serverTimestampMs === "number")
                    message.serverTimestampMs = object.serverTimestampMs;
                else if (typeof object.serverTimestampMs === "object")
                    message.serverTimestampMs = new $util.LongBits(object.serverTimestampMs.low >>> 0, object.serverTimestampMs.high >>> 0).toNumber();
            if (object.unread != null)
                message.unread = Boolean(object.unread);
            return message;
        };

        /**
         * Creates a plain object from a PollUpdate message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.PollUpdate
         * @static
         * @param {Web.PollUpdate} message PollUpdate
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        PollUpdate.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.pollUpdateMessageKey != null && message.hasOwnProperty("pollUpdateMessageKey")) {
                object.pollUpdateMessageKey = $root.Protocol.MessageKey.toObject(message.pollUpdateMessageKey, options);
                if (options.oneofs)
                    object._pollUpdateMessageKey = "pollUpdateMessageKey";
            }
            if (message.vote != null && message.hasOwnProperty("vote")) {
                object.vote = $root.E2E.Message.PollVoteMessage.toObject(message.vote, options);
                if (options.oneofs)
                    object._vote = "vote";
            }
            if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) {
                if (typeof message.senderTimestampMs === "number")
                    object.senderTimestampMs = options.longs === String ? String(message.senderTimestampMs) : message.senderTimestampMs;
                else
                    object.senderTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.senderTimestampMs) : options.longs === Number ? new $util.LongBits(message.senderTimestampMs.low >>> 0, message.senderTimestampMs.high >>> 0).toNumber() : message.senderTimestampMs;
                if (options.oneofs)
                    object._senderTimestampMs = "senderTimestampMs";
            }
            if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) {
                if (typeof message.serverTimestampMs === "number")
                    object.serverTimestampMs = options.longs === String ? String(message.serverTimestampMs) : message.serverTimestampMs;
                else
                    object.serverTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.serverTimestampMs) : options.longs === Number ? new $util.LongBits(message.serverTimestampMs.low >>> 0, message.serverTimestampMs.high >>> 0).toNumber() : message.serverTimestampMs;
                if (options.oneofs)
                    object._serverTimestampMs = "serverTimestampMs";
            }
            if (message.unread != null && message.hasOwnProperty("unread")) {
                object.unread = message.unread;
                if (options.oneofs)
                    object._unread = "unread";
            }
            return object;
        };

        /**
         * Converts this PollUpdate to JSON.
         * @function toJSON
         * @memberof Web.PollUpdate
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        PollUpdate.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for PollUpdate
         * @function getTypeUrl
         * @memberof Web.PollUpdate
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        PollUpdate.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.PollUpdate";
        };

        return PollUpdate;
    })();

    Web.Reaction = (function() {

        /**
         * Properties of a Reaction.
         * @memberof Web
         * @interface IReaction
         * @property {Protocol.IMessageKey|null} [key] Reaction key
         * @property {string|null} [text] Reaction text
         * @property {string|null} [groupingKey] Reaction groupingKey
         * @property {number|Long|null} [senderTimestampMs] Reaction senderTimestampMs
         * @property {boolean|null} [unread] Reaction unread
         */

        /**
         * Constructs a new Reaction.
         * @memberof Web
         * @classdesc Represents a Reaction.
         * @implements IReaction
         * @constructor
         * @param {Web.IReaction=} [properties] Properties to set
         */
        function Reaction(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]];
        }

        /**
         * Reaction key.
         * @member {Protocol.IMessageKey|null|undefined} key
         * @memberof Web.Reaction
         * @instance
         */
        Reaction.prototype.key = null;

        /**
         * Reaction text.
         * @member {string|null|undefined} text
         * @memberof Web.Reaction
         * @instance
         */
        Reaction.prototype.text = null;

        /**
         * Reaction groupingKey.
         * @member {string|null|undefined} groupingKey
         * @memberof Web.Reaction
         * @instance
         */
        Reaction.prototype.groupingKey = null;

        /**
         * Reaction senderTimestampMs.
         * @member {number|Long|null|undefined} senderTimestampMs
         * @memberof Web.Reaction
         * @instance
         */
        Reaction.prototype.senderTimestampMs = null;

        /**
         * Reaction unread.
         * @member {boolean|null|undefined} unread
         * @memberof Web.Reaction
         * @instance
         */
        Reaction.prototype.unread = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * Reaction _key.
         * @member {"key"|undefined} _key
         * @memberof Web.Reaction
         * @instance
         */
        Object.defineProperty(Reaction.prototype, "_key", {
            get: $util.oneOfGetter($oneOfFields = ["key"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Reaction _text.
         * @member {"text"|undefined} _text
         * @memberof Web.Reaction
         * @instance
         */
        Object.defineProperty(Reaction.prototype, "_text", {
            get: $util.oneOfGetter($oneOfFields = ["text"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Reaction _groupingKey.
         * @member {"groupingKey"|undefined} _groupingKey
         * @memberof Web.Reaction
         * @instance
         */
        Object.defineProperty(Reaction.prototype, "_groupingKey", {
            get: $util.oneOfGetter($oneOfFields = ["groupingKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Reaction _senderTimestampMs.
         * @member {"senderTimestampMs"|undefined} _senderTimestampMs
         * @memberof Web.Reaction
         * @instance
         */
        Object.defineProperty(Reaction.prototype, "_senderTimestampMs", {
            get: $util.oneOfGetter($oneOfFields = ["senderTimestampMs"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Reaction _unread.
         * @member {"unread"|undefined} _unread
         * @memberof Web.Reaction
         * @instance
         */
        Object.defineProperty(Reaction.prototype, "_unread", {
            get: $util.oneOfGetter($oneOfFields = ["unread"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new Reaction instance using the specified properties.
         * @function create
         * @memberof Web.Reaction
         * @static
         * @param {Web.IReaction=} [properties] Properties to set
         * @returns {Web.Reaction} Reaction instance
         */
        Reaction.create = function create(properties) {
            return new Reaction(properties);
        };

        /**
         * Encodes the specified Reaction message. Does not implicitly {@link Web.Reaction.verify|verify} messages.
         * @function encode
         * @memberof Web.Reaction
         * @static
         * @param {Web.IReaction} message Reaction message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Reaction.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.key != null && Object.hasOwnProperty.call(message, "key"))
                $root.Protocol.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.text);
            if (message.groupingKey != null && Object.hasOwnProperty.call(message, "groupingKey"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.groupingKey);
            if (message.senderTimestampMs != null && Object.hasOwnProperty.call(message, "senderTimestampMs"))
                writer.uint32(/* id 4, wireType 0 =*/32).int64(message.senderTimestampMs);
            if (message.unread != null && Object.hasOwnProperty.call(message, "unread"))
                writer.uint32(/* id 5, wireType 0 =*/40).bool(message.unread);
            return writer;
        };

        /**
         * Encodes the specified Reaction message, length delimited. Does not implicitly {@link Web.Reaction.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.Reaction
         * @static
         * @param {Web.IReaction} message Reaction message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Reaction.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Reaction message from the specified reader or buffer.
         * @function decode
         * @memberof Web.Reaction
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.Reaction} Reaction
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Reaction.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.Web.Reaction();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.key = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.text = reader.string();
                        break;
                    }
                case 3: {
                        message.groupingKey = reader.string();
                        break;
                    }
                case 4: {
                        message.senderTimestampMs = reader.int64();
                        break;
                    }
                case 5: {
                        message.unread = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Reaction message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.Reaction
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.Reaction} Reaction
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Reaction.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Reaction message.
         * @function verify
         * @memberof Web.Reaction
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Reaction.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.key != null && message.hasOwnProperty("key")) {
                properties._key = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.key);
                    if (error)
                        return "key." + error;
                }
            }
            if (message.text != null && message.hasOwnProperty("text")) {
                properties._text = 1;
                if (!$util.isString(message.text))
                    return "text: string expected";
            }
            if (message.groupingKey != null && message.hasOwnProperty("groupingKey")) {
                properties._groupingKey = 1;
                if (!$util.isString(message.groupingKey))
                    return "groupingKey: 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.unread != null && message.hasOwnProperty("unread")) {
                properties._unread = 1;
                if (typeof message.unread !== "boolean")
                    return "unread: boolean expected";
            }
            return null;
        };

        /**
         * Creates a Reaction message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.Reaction
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.Reaction} Reaction
         */
        Reaction.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.Reaction)
                return object;
            var message = new $root.Web.Reaction();
            if (object.key != null) {
                if (typeof object.key !== "object")
                    throw TypeError(".Web.Reaction.key: object expected");
                message.key = $root.Protocol.MessageKey.fromObject(object.key);
            }
            if (object.text != null)
                message.text = String(object.text);
            if (object.groupingKey != null)
                message.groupingKey = String(object.groupingKey);
            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(object.senderTimestampMs.low >>> 0, object.senderTimestampMs.high >>> 0).toNumber();
            if (object.unread != null)
                message.unread = Boolean(object.unread);
            return message;
        };

        /**
         * Creates a plain object from a Reaction message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.Reaction
         * @static
         * @param {Web.Reaction} message Reaction
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Reaction.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.key != null && message.hasOwnProperty("key")) {
                object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                if (options.oneofs)
                    object._key = "key";
            }
            if (message.text != null && message.hasOwnProperty("text")) {
                object.text = message.text;
                if (options.oneofs)
                    object._text = "text";
            }
            if (message.groupingKey != null && message.hasOwnProperty("groupingKey")) {
                object.groupingKey = message.groupingKey;
                if (options.oneofs)
                    object._groupingKey = "groupingKey";
            }
            if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) {
                if (typeof message.senderTimestampMs === "number")
                    object.senderTimestampMs = options.longs === String ? String(message.senderTimestampMs) : message.senderTimestampMs;
                else
                    object.senderTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.senderTimestampMs) : options.longs === Number ? new $util.LongBits(message.senderTimestampMs.low >>> 0, message.senderTimestampMs.high >>> 0).toNumber() : message.senderTimestampMs;
                if (options.oneofs)
                    object._senderTimestampMs = "senderTimestampMs";
            }
            if (message.unread != null && message.hasOwnProperty("unread")) {
                object.unread = message.unread;
                if (options.oneofs)
                    object._unread = "unread";
            }
            return object;
        };

        /**
         * Converts this Reaction to JSON.
         * @function toJSON
         * @memberof Web.Reaction
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Reaction.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for Reaction
         * @function getTypeUrl
         * @memberof Web.Reaction
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        Reaction.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.Reaction";
        };

        return Reaction;
    })();

    Web.UserReceipt = (function() {

        /**
         * Properties of a UserReceipt.
         * @memberof Web
         * @interface IUserReceipt
         * @property {string|null} [userJid] UserReceipt userJid
         * @property {number|Long|null} [receiptTimestamp] UserReceipt receiptTimestamp
         * @property {number|Long|null} [readTimestamp] UserReceipt readTimestamp
         * @property {number|Long|null} [playedTimestamp] UserReceipt playedTimestamp
         * @property {Array.<string>|null} [pendingDeviceJid] UserReceipt pendingDeviceJid
         * @property {Array.<string>|null} [deliveredDeviceJid] UserReceipt deliveredDeviceJid
         */

        /**
         * Constructs a new UserReceipt.
         * @memberof Web
         * @classdesc Represents a UserReceipt.
         * @implements IUserReceipt
         * @constructor
         * @param {Web.IUserReceipt=} [properties] Properties to set
         */
        function UserReceipt(properties) {
            this.pendingDeviceJid = [];
            this.deliveredDeviceJid = [];
            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]];
        }

        /**
         * UserReceipt userJid.
         * @member {string|null|undefined} userJid
         * @memberof Web.UserReceipt
         * @instance
         */
        UserReceipt.prototype.userJid = null;

        /**
         * UserReceipt receiptTimestamp.
         * @member {number|Long|null|undefined} receiptTimestamp
         * @memberof Web.UserReceipt
         * @instance
         */
        UserReceipt.prototype.receiptTimestamp = null;

        /**
         * UserReceipt readTimestamp.
         * @member {number|Long|null|undefined} readTimestamp
         * @memberof Web.UserReceipt
         * @instance
         */
        UserReceipt.prototype.readTimestamp = null;

        /**
         * UserReceipt playedTimestamp.
         * @member {number|Long|null|undefined} playedTimestamp
         * @memberof Web.UserReceipt
         * @instance
         */
        UserReceipt.prototype.playedTimestamp = null;

        /**
         * UserReceipt pendingDeviceJid.
         * @member {Array.<string>} pendingDeviceJid
         * @memberof Web.UserReceipt
         * @instance
         */
        UserReceipt.prototype.pendingDeviceJid = $util.emptyArray;

        /**
         * UserReceipt deliveredDeviceJid.
         * @member {Array.<string>} deliveredDeviceJid
         * @memberof Web.UserReceipt
         * @instance
         */
        UserReceipt.prototype.deliveredDeviceJid = $util.emptyArray;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * UserReceipt _userJid.
         * @member {"userJid"|undefined} _userJid
         * @memberof Web.UserReceipt
         * @instance
         */
        Object.defineProperty(UserReceipt.prototype, "_userJid", {
            get: $util.oneOfGetter($oneOfFields = ["userJid"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * UserReceipt _receiptTimestamp.
         * @member {"receiptTimestamp"|undefined} _receiptTimestamp
         * @memberof Web.UserReceipt
         * @instance
         */
        Object.defineProperty(UserReceipt.prototype, "_receiptTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["receiptTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * UserReceipt _readTimestamp.
         * @member {"readTimestamp"|undefined} _readTimestamp
         * @memberof Web.UserReceipt
         * @instance
         */
        Object.defineProperty(UserReceipt.prototype, "_readTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["readTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * UserReceipt _playedTimestamp.
         * @member {"playedTimestamp"|undefined} _playedTimestamp
         * @memberof Web.UserReceipt
         * @instance
         */
        Object.defineProperty(UserReceipt.prototype, "_playedTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["playedTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new UserReceipt instance using the specified properties.
         * @function create
         * @memberof Web.UserReceipt
         * @static
         * @param {Web.IUserReceipt=} [properties] Properties to set
         * @returns {Web.UserReceipt} UserReceipt instance
         */
        UserReceipt.create = function create(properties) {
            return new UserReceipt(properties);
        };

        /**
         * Encodes the specified UserReceipt message. Does not implicitly {@link Web.UserReceipt.verify|verify} messages.
         * @function encode
         * @memberof Web.UserReceipt
         * @static
         * @param {Web.IUserReceipt} message UserReceipt message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UserReceipt.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.userJid != null && Object.hasOwnProperty.call(message, "userJid"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.userJid);
            if (message.receiptTimestamp != null && Object.hasOwnProperty.call(message, "receiptTimestamp"))
                writer.uint32(/* id 2, wireType 0 =*/16).int64(message.receiptTimestamp);
            if (message.readTimestamp != null && Object.hasOwnProperty.call(message, "readTimestamp"))
                writer.uint32(/* id 3, wireType 0 =*/24).int64(message.readTimestamp);
            if (message.playedTimestamp != null && Object.hasOwnProperty.call(message, "playedTimestamp"))
                writer.uint32(/* id 4, wireType 0 =*/32).int64(message.playedTimestamp);
            if (message.pendingDeviceJid != null && message.pendingDeviceJid.length)
                for (var i = 0; i < message.pendingDeviceJid.length; ++i)
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.pendingDeviceJid[i]);
            if (message.deliveredDeviceJid != null && message.deliveredDeviceJid.length)
                for (var i = 0; i < message.deliveredDeviceJid.length; ++i)
                    writer.uint32(/* id 6, wireType 2 =*/50).string(message.deliveredDeviceJid[i]);
            return writer;
        };

        /**
         * Encodes the specified UserReceipt message, length delimited. Does not implicitly {@link Web.UserReceipt.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.UserReceipt
         * @static
         * @param {Web.IUserReceipt} message UserReceipt message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UserReceipt.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a UserReceipt message from the specified reader or buffer.
         * @function decode
         * @memberof Web.UserReceipt
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.UserReceipt} UserReceipt
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UserReceipt.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.Web.UserReceipt();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.userJid = reader.string();
                        break;
                    }
                case 2: {
                        message.receiptTimestamp = reader.int64();
                        break;
                    }
                case 3: {
                        message.readTimestamp = reader.int64();
                        break;
                    }
                case 4: {
                        message.playedTimestamp = reader.int64();
                        break;
                    }
                case 5: {
                        if (!(message.pendingDeviceJid && message.pendingDeviceJid.length))
                            message.pendingDeviceJid = [];
                        message.pendingDeviceJid.push(reader.string());
                        break;
                    }
                case 6: {
                        if (!(message.deliveredDeviceJid && message.deliveredDeviceJid.length))
                            message.deliveredDeviceJid = [];
                        message.deliveredDeviceJid.push(reader.string());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a UserReceipt message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.UserReceipt
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.UserReceipt} UserReceipt
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UserReceipt.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a UserReceipt message.
         * @function verify
         * @memberof Web.UserReceipt
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        UserReceipt.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.userJid != null && message.hasOwnProperty("userJid")) {
                properties._userJid = 1;
                if (!$util.isString(message.userJid))
                    return "userJid: string expected";
            }
            if (message.receiptTimestamp != null && message.hasOwnProperty("receiptTimestamp")) {
                properties._receiptTimestamp = 1;
                if (!$util.isInteger(message.receiptTimestamp) && !(message.receiptTimestamp && $util.isInteger(message.receiptTimestamp.low) && $util.isInteger(message.receiptTimestamp.high)))
                    return "receiptTimestamp: integer|Long expected";
            }
            if (message.readTimestamp != null && message.hasOwnProperty("readTimestamp")) {
                properties._readTimestamp = 1;
                if (!$util.isInteger(message.readTimestamp) && !(message.readTimestamp && $util.isInteger(message.readTimestamp.low) && $util.isInteger(message.readTimestamp.high)))
                    return "readTimestamp: integer|Long expected";
            }
            if (message.playedTimestamp != null && message.hasOwnProperty("playedTimestamp")) {
                properties._playedTimestamp = 1;
                if (!$util.isInteger(message.playedTimestamp) && !(message.playedTimestamp && $util.isInteger(message.playedTimestamp.low) && $util.isInteger(message.playedTimestamp.high)))
                    return "playedTimestamp: integer|Long expected";
            }
            if (message.pendingDeviceJid != null && message.hasOwnProperty("pendingDeviceJid")) {
                if (!Array.isArray(message.pendingDeviceJid))
                    return "pendingDeviceJid: array expected";
                for (var i = 0; i < message.pendingDeviceJid.length; ++i)
                    if (!$util.isString(message.pendingDeviceJid[i]))
                        return "pendingDeviceJid: string[] expected";
            }
            if (message.deliveredDeviceJid != null && message.hasOwnProperty("deliveredDeviceJid")) {
                if (!Array.isArray(message.deliveredDeviceJid))
                    return "deliveredDeviceJid: array expected";
                for (var i = 0; i < message.deliveredDeviceJid.length; ++i)
                    if (!$util.isString(message.deliveredDeviceJid[i]))
                        return "deliveredDeviceJid: string[] expected";
            }
            return null;
        };

        /**
         * Creates a UserReceipt message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.UserReceipt
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.UserReceipt} UserReceipt
         */
        UserReceipt.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.UserReceipt)
                return object;
            var message = new $root.Web.UserReceipt();
            if (object.userJid != null)
                message.userJid = String(object.userJid);
            if (object.receiptTimestamp != null)
                if ($util.Long)
                    (message.receiptTimestamp = $util.Long.fromValue(object.receiptTimestamp)).unsigned = false;
                else if (typeof object.receiptTimestamp === "string")
                    message.receiptTimestamp = parseInt(object.receiptTimestamp, 10);
                else if (typeof object.receiptTimestamp === "number")
                    message.receiptTimestamp = object.receiptTimestamp;
                else if (typeof object.receiptTimestamp === "object")
                    message.receiptTimestamp = new $util.LongBits(object.receiptTimestamp.low >>> 0, object.receiptTimestamp.high >>> 0).toNumber();
            if (object.readTimestamp != null)
                if ($util.Long)
                    (message.readTimestamp = $util.Long.fromValue(object.readTimestamp)).unsigned = false;
                else if (typeof object.readTimestamp === "string")
                    message.readTimestamp = parseInt(object.readTimestamp, 10);
                else if (typeof object.readTimestamp === "number")
                    message.readTimestamp = object.readTimestamp;
                else if (typeof object.readTimestamp === "object")
                    message.readTimestamp = new $util.LongBits(object.readTimestamp.low >>> 0, object.readTimestamp.high >>> 0).toNumber();
            if (object.playedTimestamp != null)
                if ($util.Long)
                    (message.playedTimestamp = $util.Long.fromValue(object.playedTimestamp)).unsigned = false;
                else if (typeof object.playedTimestamp === "string")
                    message.playedTimestamp = parseInt(object.playedTimestamp, 10);
                else if (typeof object.playedTimestamp === "number")
                    message.playedTimestamp = object.playedTimestamp;
                else if (typeof object.playedTimestamp === "object")
                    message.playedTimestamp = new $util.LongBits(object.playedTimestamp.low >>> 0, object.playedTimestamp.high >>> 0).toNumber();
            if (object.pendingDeviceJid) {
                if (!Array.isArray(object.pendingDeviceJid))
                    throw TypeError(".Web.UserReceipt.pendingDeviceJid: array expected");
                message.pendingDeviceJid = [];
                for (var i = 0; i < object.pendingDeviceJid.length; ++i)
                    message.pendingDeviceJid[i] = String(object.pendingDeviceJid[i]);
            }
            if (object.deliveredDeviceJid) {
                if (!Array.isArray(object.deliveredDeviceJid))
                    throw TypeError(".Web.UserReceipt.deliveredDeviceJid: array expected");
                message.deliveredDeviceJid = [];
                for (var i = 0; i < object.deliveredDeviceJid.length; ++i)
                    message.deliveredDeviceJid[i] = String(object.deliveredDeviceJid[i]);
            }
            return message;
        };

        /**
         * Creates a plain object from a UserReceipt message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.UserReceipt
         * @static
         * @param {Web.UserReceipt} message UserReceipt
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        UserReceipt.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults) {
                object.pendingDeviceJid = [];
                object.deliveredDeviceJid = [];
            }
            if (message.userJid != null && message.hasOwnProperty("userJid")) {
                object.userJid = message.userJid;
                if (options.oneofs)
                    object._userJid = "userJid";
            }
            if (message.receiptTimestamp != null && message.hasOwnProperty("receiptTimestamp")) {
                if (typeof message.receiptTimestamp === "number")
                    object.receiptTimestamp = options.longs === String ? String(message.receiptTimestamp) : message.receiptTimestamp;
                else
                    object.receiptTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.receiptTimestamp) : options.longs === Number ? new $util.LongBits(message.receiptTimestamp.low >>> 0, message.receiptTimestamp.high >>> 0).toNumber() : message.receiptTimestamp;
                if (options.oneofs)
                    object._receiptTimestamp = "receiptTimestamp";
            }
            if (message.readTimestamp != null && message.hasOwnProperty("readTimestamp")) {
                if (typeof message.readTimestamp === "number")
                    object.readTimestamp = options.longs === String ? String(message.readTimestamp) : message.readTimestamp;
                else
                    object.readTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.readTimestamp) : options.longs === Number ? new $util.LongBits(message.readTimestamp.low >>> 0, message.readTimestamp.high >>> 0).toNumber() : message.readTimestamp;
                if (options.oneofs)
                    object._readTimestamp = "readTimestamp";
            }
            if (message.playedTimestamp != null && message.hasOwnProperty("playedTimestamp")) {
                if (typeof message.playedTimestamp === "number")
                    object.playedTimestamp = options.longs === String ? String(message.playedTimestamp) : message.playedTimestamp;
                else
                    object.playedTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.playedTimestamp) : options.longs === Number ? new $util.LongBits(message.playedTimestamp.low >>> 0, message.playedTimestamp.high >>> 0).toNumber() : message.playedTimestamp;
                if (options.oneofs)
                    object._playedTimestamp = "playedTimestamp";
            }
            if (message.pendingDeviceJid && message.pendingDeviceJid.length) {
                object.pendingDeviceJid = [];
                for (var j = 0; j < message.pendingDeviceJid.length; ++j)
                    object.pendingDeviceJid[j] = message.pendingDeviceJid[j];
            }
            if (message.deliveredDeviceJid && message.deliveredDeviceJid.length) {
                object.deliveredDeviceJid = [];
                for (var j = 0; j < message.deliveredDeviceJid.length; ++j)
                    object.deliveredDeviceJid[j] = message.deliveredDeviceJid[j];
            }
            return object;
        };

        /**
         * Converts this UserReceipt to JSON.
         * @function toJSON
         * @memberof Web.UserReceipt
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        UserReceipt.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for UserReceipt
         * @function getTypeUrl
         * @memberof Web.UserReceipt
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        UserReceipt.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.UserReceipt";
        };

        return UserReceipt;
    })();

    Web.StatusPSA = (function() {

        /**
         * Properties of a StatusPSA.
         * @memberof Web
         * @interface IStatusPSA
         * @property {number|Long|null} [campaignId] StatusPSA campaignId
         * @property {number|Long|null} [campaignExpirationTimestamp] StatusPSA campaignExpirationTimestamp
         */

        /**
         * Constructs a new StatusPSA.
         * @memberof Web
         * @classdesc Represents a StatusPSA.
         * @implements IStatusPSA
         * @constructor
         * @param {Web.IStatusPSA=} [properties] Properties to set
         */
        function StatusPSA(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]];
        }

        /**
         * StatusPSA campaignId.
         * @member {number|Long|null|undefined} campaignId
         * @memberof Web.StatusPSA
         * @instance
         */
        StatusPSA.prototype.campaignId = null;

        /**
         * StatusPSA campaignExpirationTimestamp.
         * @member {number|Long|null|undefined} campaignExpirationTimestamp
         * @memberof Web.StatusPSA
         * @instance
         */
        StatusPSA.prototype.campaignExpirationTimestamp = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * StatusPSA _campaignId.
         * @member {"campaignId"|undefined} _campaignId
         * @memberof Web.StatusPSA
         * @instance
         */
        Object.defineProperty(StatusPSA.prototype, "_campaignId", {
            get: $util.oneOfGetter($oneOfFields = ["campaignId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * StatusPSA _campaignExpirationTimestamp.
         * @member {"campaignExpirationTimestamp"|undefined} _campaignExpirationTimestamp
         * @memberof Web.StatusPSA
         * @instance
         */
        Object.defineProperty(StatusPSA.prototype, "_campaignExpirationTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["campaignExpirationTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new StatusPSA instance using the specified properties.
         * @function create
         * @memberof Web.StatusPSA
         * @static
         * @param {Web.IStatusPSA=} [properties] Properties to set
         * @returns {Web.StatusPSA} StatusPSA instance
         */
        StatusPSA.create = function create(properties) {
            return new StatusPSA(properties);
        };

        /**
         * Encodes the specified StatusPSA message. Does not implicitly {@link Web.StatusPSA.verify|verify} messages.
         * @function encode
         * @memberof Web.StatusPSA
         * @static
         * @param {Web.IStatusPSA} message StatusPSA message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        StatusPSA.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.campaignId != null && Object.hasOwnProperty.call(message, "campaignId"))
                writer.uint32(/* id 44, wireType 0 =*/352).uint64(message.campaignId);
            if (message.campaignExpirationTimestamp != null && Object.hasOwnProperty.call(message, "campaignExpirationTimestamp"))
                writer.uint32(/* id 45, wireType 0 =*/360).uint64(message.campaignExpirationTimestamp);
            return writer;
        };

        /**
         * Encodes the specified StatusPSA message, length delimited. Does not implicitly {@link Web.StatusPSA.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.StatusPSA
         * @static
         * @param {Web.IStatusPSA} message StatusPSA message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        StatusPSA.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a StatusPSA message from the specified reader or buffer.
         * @function decode
         * @memberof Web.StatusPSA
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.StatusPSA} StatusPSA
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        StatusPSA.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.Web.StatusPSA();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 44: {
                        message.campaignId = reader.uint64();
                        break;
                    }
                case 45: {
                        message.campaignExpirationTimestamp = reader.uint64();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a StatusPSA message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.StatusPSA
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.StatusPSA} StatusPSA
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        StatusPSA.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a StatusPSA message.
         * @function verify
         * @memberof Web.StatusPSA
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        StatusPSA.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.campaignId != null && message.hasOwnProperty("campaignId")) {
                properties._campaignId = 1;
                if (!$util.isInteger(message.campaignId) && !(message.campaignId && $util.isInteger(message.campaignId.low) && $util.isInteger(message.campaignId.high)))
                    return "campaignId: integer|Long expected";
            }
            if (message.campaignExpirationTimestamp != null && message.hasOwnProperty("campaignExpirationTimestamp")) {
                properties._campaignExpirationTimestamp = 1;
                if (!$util.isInteger(message.campaignExpirationTimestamp) && !(message.campaignExpirationTimestamp && $util.isInteger(message.campaignExpirationTimestamp.low) && $util.isInteger(message.campaignExpirationTimestamp.high)))
                    return "campaignExpirationTimestamp: integer|Long expected";
            }
            return null;
        };

        /**
         * Creates a StatusPSA message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.StatusPSA
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.StatusPSA} StatusPSA
         */
        StatusPSA.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.StatusPSA)
                return object;
            var message = new $root.Web.StatusPSA();
            if (object.campaignId != null)
                if ($util.Long)
                    (message.campaignId = $util.Long.fromValue(object.campaignId)).unsigned = true;
                else if (typeof object.campaignId === "string")
                    message.campaignId = parseInt(object.campaignId, 10);
                else if (typeof object.campaignId === "number")
                    message.campaignId = object.campaignId;
                else if (typeof object.campaignId === "object")
                    message.campaignId = new $util.LongBits(object.campaignId.low >>> 0, object.campaignId.high >>> 0).toNumber(true);
            if (object.campaignExpirationTimestamp != null)
                if ($util.Long)
                    (message.campaignExpirationTimestamp = $util.Long.fromValue(object.campaignExpirationTimestamp)).unsigned = true;
                else if (typeof object.campaignExpirationTimestamp === "string")
                    message.campaignExpirationTimestamp = parseInt(object.campaignExpirationTimestamp, 10);
                else if (typeof object.campaignExpirationTimestamp === "number")
                    message.campaignExpirationTimestamp = object.campaignExpirationTimestamp;
                else if (typeof object.campaignExpirationTimestamp === "object")
                    message.campaignExpirationTimestamp = new $util.LongBits(object.campaignExpirationTimestamp.low >>> 0, object.campaignExpirationTimestamp.high >>> 0).toNumber(true);
            return message;
        };

        /**
         * Creates a plain object from a StatusPSA message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.StatusPSA
         * @static
         * @param {Web.StatusPSA} message StatusPSA
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        StatusPSA.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.campaignId != null && message.hasOwnProperty("campaignId")) {
                if (typeof message.campaignId === "number")
                    object.campaignId = options.longs === String ? String(message.campaignId) : message.campaignId;
                else
                    object.campaignId = options.longs === String ? $util.Long.prototype.toString.call(message.campaignId) : options.longs === Number ? new $util.LongBits(message.campaignId.low >>> 0, message.campaignId.high >>> 0).toNumber(true) : message.campaignId;
                if (options.oneofs)
                    object._campaignId = "campaignId";
            }
            if (message.campaignExpirationTimestamp != null && message.hasOwnProperty("campaignExpirationTimestamp")) {
                if (typeof message.campaignExpirationTimestamp === "number")
                    object.campaignExpirationTimestamp = options.longs === String ? String(message.campaignExpirationTimestamp) : message.campaignExpirationTimestamp;
                else
                    object.campaignExpirationTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.campaignExpirationTimestamp) : options.longs === Number ? new $util.LongBits(message.campaignExpirationTimestamp.low >>> 0, message.campaignExpirationTimestamp.high >>> 0).toNumber(true) : message.campaignExpirationTimestamp;
                if (options.oneofs)
                    object._campaignExpirationTimestamp = "campaignExpirationTimestamp";
            }
            return object;
        };

        /**
         * Converts this StatusPSA to JSON.
         * @function toJSON
         * @memberof Web.StatusPSA
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        StatusPSA.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for StatusPSA
         * @function getTypeUrl
         * @memberof Web.StatusPSA
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        StatusPSA.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.StatusPSA";
        };

        return StatusPSA;
    })();

    Web.PhotoChange = (function() {

        /**
         * Properties of a PhotoChange.
         * @memberof Web
         * @interface IPhotoChange
         * @property {Uint8Array|null} [oldPhoto] PhotoChange oldPhoto
         * @property {Uint8Array|null} [newPhoto] PhotoChange newPhoto
         * @property {number|null} [newPhotoId] PhotoChange newPhotoId
         */

        /**
         * Constructs a new PhotoChange.
         * @memberof Web
         * @classdesc Represents a PhotoChange.
         * @implements IPhotoChange
         * @constructor
         * @param {Web.IPhotoChange=} [properties] Properties to set
         */
        function PhotoChange(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]];
        }

        /**
         * PhotoChange oldPhoto.
         * @member {Uint8Array|null|undefined} oldPhoto
         * @memberof Web.PhotoChange
         * @instance
         */
        PhotoChange.prototype.oldPhoto = null;

        /**
         * PhotoChange newPhoto.
         * @member {Uint8Array|null|undefined} newPhoto
         * @memberof Web.PhotoChange
         * @instance
         */
        PhotoChange.prototype.newPhoto = null;

        /**
         * PhotoChange newPhotoId.
         * @member {number|null|undefined} newPhotoId
         * @memberof Web.PhotoChange
         * @instance
         */
        PhotoChange.prototype.newPhotoId = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * PhotoChange _oldPhoto.
         * @member {"oldPhoto"|undefined} _oldPhoto
         * @memberof Web.PhotoChange
         * @instance
         */
        Object.defineProperty(PhotoChange.prototype, "_oldPhoto", {
            get: $util.oneOfGetter($oneOfFields = ["oldPhoto"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PhotoChange _newPhoto.
         * @member {"newPhoto"|undefined} _newPhoto
         * @memberof Web.PhotoChange
         * @instance
         */
        Object.defineProperty(PhotoChange.prototype, "_newPhoto", {
            get: $util.oneOfGetter($oneOfFields = ["newPhoto"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PhotoChange _newPhotoId.
         * @member {"newPhotoId"|undefined} _newPhotoId
         * @memberof Web.PhotoChange
         * @instance
         */
        Object.defineProperty(PhotoChange.prototype, "_newPhotoId", {
            get: $util.oneOfGetter($oneOfFields = ["newPhotoId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new PhotoChange instance using the specified properties.
         * @function create
         * @memberof Web.PhotoChange
         * @static
         * @param {Web.IPhotoChange=} [properties] Properties to set
         * @returns {Web.PhotoChange} PhotoChange instance
         */
        PhotoChange.create = function create(properties) {
            return new PhotoChange(properties);
        };

        /**
         * Encodes the specified PhotoChange message. Does not implicitly {@link Web.PhotoChange.verify|verify} messages.
         * @function encode
         * @memberof Web.PhotoChange
         * @static
         * @param {Web.IPhotoChange} message PhotoChange message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PhotoChange.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.oldPhoto != null && Object.hasOwnProperty.call(message, "oldPhoto"))
                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.oldPhoto);
            if (message.newPhoto != null && Object.hasOwnProperty.call(message, "newPhoto"))
                writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.newPhoto);
            if (message.newPhotoId != null && Object.hasOwnProperty.call(message, "newPhotoId"))
                writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.newPhotoId);
            return writer;
        };

        /**
         * Encodes the specified PhotoChange message, length delimited. Does not implicitly {@link Web.PhotoChange.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.PhotoChange
         * @static
         * @param {Web.IPhotoChange} message PhotoChange message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PhotoChange.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a PhotoChange message from the specified reader or buffer.
         * @function decode
         * @memberof Web.PhotoChange
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.PhotoChange} PhotoChange
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PhotoChange.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.Web.PhotoChange();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.oldPhoto = reader.bytes();
                        break;
                    }
                case 2: {
                        message.newPhoto = reader.bytes();
                        break;
                    }
                case 3: {
                        message.newPhotoId = reader.uint32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a PhotoChange message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.PhotoChange
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.PhotoChange} PhotoChange
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PhotoChange.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a PhotoChange message.
         * @function verify
         * @memberof Web.PhotoChange
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        PhotoChange.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.oldPhoto != null && message.hasOwnProperty("oldPhoto")) {
                properties._oldPhoto = 1;
                if (!(message.oldPhoto && typeof message.oldPhoto.length === "number" || $util.isString(message.oldPhoto)))
                    return "oldPhoto: buffer expected";
            }
            if (message.newPhoto != null && message.hasOwnProperty("newPhoto")) {
                properties._newPhoto = 1;
                if (!(message.newPhoto && typeof message.newPhoto.length === "number" || $util.isString(message.newPhoto)))
                    return "newPhoto: buffer expected";
            }
            if (message.newPhotoId != null && message.hasOwnProperty("newPhotoId")) {
                properties._newPhotoId = 1;
                if (!$util.isInteger(message.newPhotoId))
                    return "newPhotoId: integer expected";
            }
            return null;
        };

        /**
         * Creates a PhotoChange message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.PhotoChange
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.PhotoChange} PhotoChange
         */
        PhotoChange.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.PhotoChange)
                return object;
            var message = new $root.Web.PhotoChange();
            if (object.oldPhoto != null)
                if (typeof object.oldPhoto === "string")
                    $util.base64.decode(object.oldPhoto, message.oldPhoto = $util.newBuffer($util.base64.length(object.oldPhoto)), 0);
                else if (object.oldPhoto.length >= 0)
                    message.oldPhoto = object.oldPhoto;
            if (object.newPhoto != null)
                if (typeof object.newPhoto === "string")
                    $util.base64.decode(object.newPhoto, message.newPhoto = $util.newBuffer($util.base64.length(object.newPhoto)), 0);
                else if (object.newPhoto.length >= 0)
                    message.newPhoto = object.newPhoto;
            if (object.newPhotoId != null)
                message.newPhotoId = object.newPhotoId >>> 0;
            return message;
        };

        /**
         * Creates a plain object from a PhotoChange message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.PhotoChange
         * @static
         * @param {Web.PhotoChange} message PhotoChange
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        PhotoChange.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.oldPhoto != null && message.hasOwnProperty("oldPhoto")) {
                object.oldPhoto = options.bytes === String ? $util.base64.encode(message.oldPhoto, 0, message.oldPhoto.length) : options.bytes === Array ? Array.prototype.slice.call(message.oldPhoto) : message.oldPhoto;
                if (options.oneofs)
                    object._oldPhoto = "oldPhoto";
            }
            if (message.newPhoto != null && message.hasOwnProperty("newPhoto")) {
                object.newPhoto = options.bytes === String ? $util.base64.encode(message.newPhoto, 0, message.newPhoto.length) : options.bytes === Array ? Array.prototype.slice.call(message.newPhoto) : message.newPhoto;
                if (options.oneofs)
                    object._newPhoto = "newPhoto";
            }
            if (message.newPhotoId != null && message.hasOwnProperty("newPhotoId")) {
                object.newPhotoId = message.newPhotoId;
                if (options.oneofs)
                    object._newPhotoId = "newPhotoId";
            }
            return object;
        };

        /**
         * Converts this PhotoChange to JSON.
         * @function toJSON
         * @memberof Web.PhotoChange
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        PhotoChange.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for PhotoChange
         * @function getTypeUrl
         * @memberof Web.PhotoChange
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        PhotoChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.PhotoChange";
        };

        return PhotoChange;
    })();

    Web.MediaData = (function() {

        /**
         * Properties of a MediaData.
         * @memberof Web
         * @interface IMediaData
         * @property {string|null} [localPath] MediaData localPath
         */

        /**
         * Constructs a new MediaData.
         * @memberof Web
         * @classdesc Represents a MediaData.
         * @implements IMediaData
         * @constructor
         * @param {Web.IMediaData=} [properties] Properties to set
         */
        function MediaData(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]];
        }

        /**
         * MediaData localPath.
         * @member {string|null|undefined} localPath
         * @memberof Web.MediaData
         * @instance
         */
        MediaData.prototype.localPath = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * MediaData _localPath.
         * @member {"localPath"|undefined} _localPath
         * @memberof Web.MediaData
         * @instance
         */
        Object.defineProperty(MediaData.prototype, "_localPath", {
            get: $util.oneOfGetter($oneOfFields = ["localPath"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new MediaData instance using the specified properties.
         * @function create
         * @memberof Web.MediaData
         * @static
         * @param {Web.IMediaData=} [properties] Properties to set
         * @returns {Web.MediaData} MediaData instance
         */
        MediaData.create = function create(properties) {
            return new MediaData(properties);
        };

        /**
         * Encodes the specified MediaData message. Does not implicitly {@link Web.MediaData.verify|verify} messages.
         * @function encode
         * @memberof Web.MediaData
         * @static
         * @param {Web.IMediaData} message MediaData message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MediaData.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.localPath != null && Object.hasOwnProperty.call(message, "localPath"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.localPath);
            return writer;
        };

        /**
         * Encodes the specified MediaData message, length delimited. Does not implicitly {@link Web.MediaData.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.MediaData
         * @static
         * @param {Web.IMediaData} message MediaData message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MediaData.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a MediaData message from the specified reader or buffer.
         * @function decode
         * @memberof Web.MediaData
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.MediaData} MediaData
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MediaData.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.Web.MediaData();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.localPath = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a MediaData message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.MediaData
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.MediaData} MediaData
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MediaData.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a MediaData message.
         * @function verify
         * @memberof Web.MediaData
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        MediaData.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.localPath != null && message.hasOwnProperty("localPath")) {
                properties._localPath = 1;
                if (!$util.isString(message.localPath))
                    return "localPath: string expected";
            }
            return null;
        };

        /**
         * Creates a MediaData message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.MediaData
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.MediaData} MediaData
         */
        MediaData.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.MediaData)
                return object;
            var message = new $root.Web.MediaData();
            if (object.localPath != null)
                message.localPath = String(object.localPath);
            return message;
        };

        /**
         * Creates a plain object from a MediaData message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.MediaData
         * @static
         * @param {Web.MediaData} message MediaData
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        MediaData.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.localPath != null && message.hasOwnProperty("localPath")) {
                object.localPath = message.localPath;
                if (options.oneofs)
                    object._localPath = "localPath";
            }
            return object;
        };

        /**
         * Converts this MediaData to JSON.
         * @function toJSON
         * @memberof Web.MediaData
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        MediaData.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for MediaData
         * @function getTypeUrl
         * @memberof Web.MediaData
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        MediaData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.MediaData";
        };

        return MediaData;
    })();

    Web.ReportingTokenInfo = (function() {

        /**
         * Properties of a ReportingTokenInfo.
         * @memberof Web
         * @interface IReportingTokenInfo
         * @property {Uint8Array|null} [reportingTag] ReportingTokenInfo reportingTag
         */

        /**
         * Constructs a new ReportingTokenInfo.
         * @memberof Web
         * @classdesc Represents a ReportingTokenInfo.
         * @implements IReportingTokenInfo
         * @constructor
         * @param {Web.IReportingTokenInfo=} [properties] Properties to set
         */
        function ReportingTokenInfo(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]];
        }

        /**
         * ReportingTokenInfo reportingTag.
         * @member {Uint8Array|null|undefined} reportingTag
         * @memberof Web.ReportingTokenInfo
         * @instance
         */
        ReportingTokenInfo.prototype.reportingTag = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * ReportingTokenInfo _reportingTag.
         * @member {"reportingTag"|undefined} _reportingTag
         * @memberof Web.ReportingTokenInfo
         * @instance
         */
        Object.defineProperty(ReportingTokenInfo.prototype, "_reportingTag", {
            get: $util.oneOfGetter($oneOfFields = ["reportingTag"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new ReportingTokenInfo instance using the specified properties.
         * @function create
         * @memberof Web.ReportingTokenInfo
         * @static
         * @param {Web.IReportingTokenInfo=} [properties] Properties to set
         * @returns {Web.ReportingTokenInfo} ReportingTokenInfo instance
         */
        ReportingTokenInfo.create = function create(properties) {
            return new ReportingTokenInfo(properties);
        };

        /**
         * Encodes the specified ReportingTokenInfo message. Does not implicitly {@link Web.ReportingTokenInfo.verify|verify} messages.
         * @function encode
         * @memberof Web.ReportingTokenInfo
         * @static
         * @param {Web.IReportingTokenInfo} message ReportingTokenInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ReportingTokenInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.reportingTag != null && Object.hasOwnProperty.call(message, "reportingTag"))
                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.reportingTag);
            return writer;
        };

        /**
         * Encodes the specified ReportingTokenInfo message, length delimited. Does not implicitly {@link Web.ReportingTokenInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.ReportingTokenInfo
         * @static
         * @param {Web.IReportingTokenInfo} message ReportingTokenInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ReportingTokenInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ReportingTokenInfo message from the specified reader or buffer.
         * @function decode
         * @memberof Web.ReportingTokenInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.ReportingTokenInfo} ReportingTokenInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ReportingTokenInfo.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.Web.ReportingTokenInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.reportingTag = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ReportingTokenInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.ReportingTokenInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.ReportingTokenInfo} ReportingTokenInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ReportingTokenInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ReportingTokenInfo message.
         * @function verify
         * @memberof Web.ReportingTokenInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ReportingTokenInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.reportingTag != null && message.hasOwnProperty("reportingTag")) {
                properties._reportingTag = 1;
                if (!(message.reportingTag && typeof message.reportingTag.length === "number" || $util.isString(message.reportingTag)))
                    return "reportingTag: buffer expected";
            }
            return null;
        };

        /**
         * Creates a ReportingTokenInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.ReportingTokenInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.ReportingTokenInfo} ReportingTokenInfo
         */
        ReportingTokenInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.ReportingTokenInfo)
                return object;
            var message = new $root.Web.ReportingTokenInfo();
            if (object.reportingTag != null)
                if (typeof object.reportingTag === "string")
                    $util.base64.decode(object.reportingTag, message.reportingTag = $util.newBuffer($util.base64.length(object.reportingTag)), 0);
                else if (object.reportingTag.length >= 0)
                    message.reportingTag = object.reportingTag;
            return message;
        };

        /**
         * Creates a plain object from a ReportingTokenInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.ReportingTokenInfo
         * @static
         * @param {Web.ReportingTokenInfo} message ReportingTokenInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        ReportingTokenInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.reportingTag != null && message.hasOwnProperty("reportingTag")) {
                object.reportingTag = options.bytes === String ? $util.base64.encode(message.reportingTag, 0, message.reportingTag.length) : options.bytes === Array ? Array.prototype.slice.call(message.reportingTag) : message.reportingTag;
                if (options.oneofs)
                    object._reportingTag = "reportingTag";
            }
            return object;
        };

        /**
         * Converts this ReportingTokenInfo to JSON.
         * @function toJSON
         * @memberof Web.ReportingTokenInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        ReportingTokenInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for ReportingTokenInfo
         * @function getTypeUrl
         * @memberof Web.ReportingTokenInfo
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        ReportingTokenInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.ReportingTokenInfo";
        };

        return ReportingTokenInfo;
    })();

    Web.WebFeatures = (function() {

        /**
         * Properties of a WebFeatures.
         * @memberof Web
         * @interface IWebFeatures
         * @property {Web.WebFeatures.Flag|null} [labelsDisplay] WebFeatures labelsDisplay
         * @property {Web.WebFeatures.Flag|null} [voipIndividualOutgoing] WebFeatures voipIndividualOutgoing
         * @property {Web.WebFeatures.Flag|null} [groupsV3] WebFeatures groupsV3
         * @property {Web.WebFeatures.Flag|null} [groupsV3Create] WebFeatures groupsV3Create
         * @property {Web.WebFeatures.Flag|null} [changeNumberV2] WebFeatures changeNumberV2
         * @property {Web.WebFeatures.Flag|null} [queryStatusV3Thumbnail] WebFeatures queryStatusV3Thumbnail
         * @property {Web.WebFeatures.Flag|null} [liveLocations] WebFeatures liveLocations
         * @property {Web.WebFeatures.Flag|null} [queryVname] WebFeatures queryVname
         * @property {Web.WebFeatures.Flag|null} [voipIndividualIncoming] WebFeatures voipIndividualIncoming
         * @property {Web.WebFeatures.Flag|null} [quickRepliesQuery] WebFeatures quickRepliesQuery
         * @property {Web.WebFeatures.Flag|null} [payments] WebFeatures payments
         * @property {Web.WebFeatures.Flag|null} [stickerPackQuery] WebFeatures stickerPackQuery
         * @property {Web.WebFeatures.Flag|null} [liveLocationsFinal] WebFeatures liveLocationsFinal
         * @property {Web.WebFeatures.Flag|null} [labelsEdit] WebFeatures labelsEdit
         * @property {Web.WebFeatures.Flag|null} [mediaUpload] WebFeatures mediaUpload
         * @property {Web.WebFeatures.Flag|null} [mediaUploadRichQuickReplies] WebFeatures mediaUploadRichQuickReplies
         * @property {Web.WebFeatures.Flag|null} [vnameV2] WebFeatures vnameV2
         * @property {Web.WebFeatures.Flag|null} [videoPlaybackUrl] WebFeatures videoPlaybackUrl
         * @property {Web.WebFeatures.Flag|null} [statusRanking] WebFeatures statusRanking
         * @property {Web.WebFeatures.Flag|null} [voipIndividualVideo] WebFeatures voipIndividualVideo
         * @property {Web.WebFeatures.Flag|null} [thirdPartyStickers] WebFeatures thirdPartyStickers
         * @property {Web.WebFeatures.Flag|null} [frequentlyForwardedSetting] WebFeatures frequentlyForwardedSetting
         * @property {Web.WebFeatures.Flag|null} [groupsV4JoinPermission] WebFeatures groupsV4JoinPermission
         * @property {Web.WebFeatures.Flag|null} [recentStickers] WebFeatures recentStickers
         * @property {Web.WebFeatures.Flag|null} [catalog] WebFeatures catalog
         * @property {Web.WebFeatures.Flag|null} [starredStickers] WebFeatures starredStickers
         * @property {Web.WebFeatures.Flag|null} [voipGroupCall] WebFeatures voipGroupCall
         * @property {Web.WebFeatures.Flag|null} [templateMessage] WebFeatures templateMessage
         * @property {Web.WebFeatures.Flag|null} [templateMessageInteractivity] WebFeatures templateMessageInteractivity
         * @property {Web.WebFeatures.Flag|null} [ephemeralMessages] WebFeatures ephemeralMessages
         * @property {Web.WebFeatures.Flag|null} [e2ENotificationSync] WebFeatures e2ENotificationSync
         * @property {Web.WebFeatures.Flag|null} [recentStickersV2] WebFeatures recentStickersV2
         * @property {Web.WebFeatures.Flag|null} [recentStickersV3] WebFeatures recentStickersV3
         * @property {Web.WebFeatures.Flag|null} [userNotice] WebFeatures userNotice
         * @property {Web.WebFeatures.Flag|null} [support] WebFeatures support
         * @property {Web.WebFeatures.Flag|null} [groupUiiCleanup] WebFeatures groupUiiCleanup
         * @property {Web.WebFeatures.Flag|null} [groupDogfoodingInternalOnly] WebFeatures groupDogfoodingInternalOnly
         * @property {Web.WebFeatures.Flag|null} [settingsSync] WebFeatures settingsSync
         * @property {Web.WebFeatures.Flag|null} [archiveV2] WebFeatures archiveV2
         * @property {Web.WebFeatures.Flag|null} [ephemeralAllowGroupMembers] WebFeatures ephemeralAllowGroupMembers
         * @property {Web.WebFeatures.Flag|null} [ephemeral24HDuration] WebFeatures ephemeral24HDuration
         * @property {Web.WebFeatures.Flag|null} [mdForceUpgrade] WebFeatures mdForceUpgrade
         * @property {Web.WebFeatures.Flag|null} [disappearingMode] WebFeatures disappearingMode
         * @property {Web.WebFeatures.Flag|null} [externalMdOptInAvailable] WebFeatures externalMdOptInAvailable
         * @property {Web.WebFeatures.Flag|null} [noDeleteMessageTimeLimit] WebFeatures noDeleteMessageTimeLimit
         */

        /**
         * Constructs a new WebFeatures.
         * @memberof Web
         * @classdesc Represents a WebFeatures.
         * @implements IWebFeatures
         * @constructor
         * @param {Web.IWebFeatures=} [properties] Properties to set
         */
        function WebFeatures(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]];
        }

        /**
         * WebFeatures labelsDisplay.
         * @member {Web.WebFeatures.Flag|null|undefined} labelsDisplay
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.labelsDisplay = null;

        /**
         * WebFeatures voipIndividualOutgoing.
         * @member {Web.WebFeatures.Flag|null|undefined} voipIndividualOutgoing
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.voipIndividualOutgoing = null;

        /**
         * WebFeatures groupsV3.
         * @member {Web.WebFeatures.Flag|null|undefined} groupsV3
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.groupsV3 = null;

        /**
         * WebFeatures groupsV3Create.
         * @member {Web.WebFeatures.Flag|null|undefined} groupsV3Create
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.groupsV3Create = null;

        /**
         * WebFeatures changeNumberV2.
         * @member {Web.WebFeatures.Flag|null|undefined} changeNumberV2
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.changeNumberV2 = null;

        /**
         * WebFeatures queryStatusV3Thumbnail.
         * @member {Web.WebFeatures.Flag|null|undefined} queryStatusV3Thumbnail
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.queryStatusV3Thumbnail = null;

        /**
         * WebFeatures liveLocations.
         * @member {Web.WebFeatures.Flag|null|undefined} liveLocations
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.liveLocations = null;

        /**
         * WebFeatures queryVname.
         * @member {Web.WebFeatures.Flag|null|undefined} queryVname
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.queryVname = null;

        /**
         * WebFeatures voipIndividualIncoming.
         * @member {Web.WebFeatures.Flag|null|undefined} voipIndividualIncoming
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.voipIndividualIncoming = null;

        /**
         * WebFeatures quickRepliesQuery.
         * @member {Web.WebFeatures.Flag|null|undefined} quickRepliesQuery
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.quickRepliesQuery = null;

        /**
         * WebFeatures payments.
         * @member {Web.WebFeatures.Flag|null|undefined} payments
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.payments = null;

        /**
         * WebFeatures stickerPackQuery.
         * @member {Web.WebFeatures.Flag|null|undefined} stickerPackQuery
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.stickerPackQuery = null;

        /**
         * WebFeatures liveLocationsFinal.
         * @member {Web.WebFeatures.Flag|null|undefined} liveLocationsFinal
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.liveLocationsFinal = null;

        /**
         * WebFeatures labelsEdit.
         * @member {Web.WebFeatures.Flag|null|undefined} labelsEdit
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.labelsEdit = null;

        /**
         * WebFeatures mediaUpload.
         * @member {Web.WebFeatures.Flag|null|undefined} mediaUpload
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.mediaUpload = null;

        /**
         * WebFeatures mediaUploadRichQuickReplies.
         * @member {Web.WebFeatures.Flag|null|undefined} mediaUploadRichQuickReplies
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.mediaUploadRichQuickReplies = null;

        /**
         * WebFeatures vnameV2.
         * @member {Web.WebFeatures.Flag|null|undefined} vnameV2
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.vnameV2 = null;

        /**
         * WebFeatures videoPlaybackUrl.
         * @member {Web.WebFeatures.Flag|null|undefined} videoPlaybackUrl
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.videoPlaybackUrl = null;

        /**
         * WebFeatures statusRanking.
         * @member {Web.WebFeatures.Flag|null|undefined} statusRanking
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.statusRanking = null;

        /**
         * WebFeatures voipIndividualVideo.
         * @member {Web.WebFeatures.Flag|null|undefined} voipIndividualVideo
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.voipIndividualVideo = null;

        /**
         * WebFeatures thirdPartyStickers.
         * @member {Web.WebFeatures.Flag|null|undefined} thirdPartyStickers
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.thirdPartyStickers = null;

        /**
         * WebFeatures frequentlyForwardedSetting.
         * @member {Web.WebFeatures.Flag|null|undefined} frequentlyForwardedSetting
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.frequentlyForwardedSetting = null;

        /**
         * WebFeatures groupsV4JoinPermission.
         * @member {Web.WebFeatures.Flag|null|undefined} groupsV4JoinPermission
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.groupsV4JoinPermission = null;

        /**
         * WebFeatures recentStickers.
         * @member {Web.WebFeatures.Flag|null|undefined} recentStickers
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.recentStickers = null;

        /**
         * WebFeatures catalog.
         * @member {Web.WebFeatures.Flag|null|undefined} catalog
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.catalog = null;

        /**
         * WebFeatures starredStickers.
         * @member {Web.WebFeatures.Flag|null|undefined} starredStickers
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.starredStickers = null;

        /**
         * WebFeatures voipGroupCall.
         * @member {Web.WebFeatures.Flag|null|undefined} voipGroupCall
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.voipGroupCall = null;

        /**
         * WebFeatures templateMessage.
         * @member {Web.WebFeatures.Flag|null|undefined} templateMessage
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.templateMessage = null;

        /**
         * WebFeatures templateMessageInteractivity.
         * @member {Web.WebFeatures.Flag|null|undefined} templateMessageInteractivity
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.templateMessageInteractivity = null;

        /**
         * WebFeatures ephemeralMessages.
         * @member {Web.WebFeatures.Flag|null|undefined} ephemeralMessages
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.ephemeralMessages = null;

        /**
         * WebFeatures e2ENotificationSync.
         * @member {Web.WebFeatures.Flag|null|undefined} e2ENotificationSync
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.e2ENotificationSync = null;

        /**
         * WebFeatures recentStickersV2.
         * @member {Web.WebFeatures.Flag|null|undefined} recentStickersV2
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.recentStickersV2 = null;

        /**
         * WebFeatures recentStickersV3.
         * @member {Web.WebFeatures.Flag|null|undefined} recentStickersV3
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.recentStickersV3 = null;

        /**
         * WebFeatures userNotice.
         * @member {Web.WebFeatures.Flag|null|undefined} userNotice
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.userNotice = null;

        /**
         * WebFeatures support.
         * @member {Web.WebFeatures.Flag|null|undefined} support
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.support = null;

        /**
         * WebFeatures groupUiiCleanup.
         * @member {Web.WebFeatures.Flag|null|undefined} groupUiiCleanup
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.groupUiiCleanup = null;

        /**
         * WebFeatures groupDogfoodingInternalOnly.
         * @member {Web.WebFeatures.Flag|null|undefined} groupDogfoodingInternalOnly
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.groupDogfoodingInternalOnly = null;

        /**
         * WebFeatures settingsSync.
         * @member {Web.WebFeatures.Flag|null|undefined} settingsSync
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.settingsSync = null;

        /**
         * WebFeatures archiveV2.
         * @member {Web.WebFeatures.Flag|null|undefined} archiveV2
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.archiveV2 = null;

        /**
         * WebFeatures ephemeralAllowGroupMembers.
         * @member {Web.WebFeatures.Flag|null|undefined} ephemeralAllowGroupMembers
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.ephemeralAllowGroupMembers = null;

        /**
         * WebFeatures ephemeral24HDuration.
         * @member {Web.WebFeatures.Flag|null|undefined} ephemeral24HDuration
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.ephemeral24HDuration = null;

        /**
         * WebFeatures mdForceUpgrade.
         * @member {Web.WebFeatures.Flag|null|undefined} mdForceUpgrade
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.mdForceUpgrade = null;

        /**
         * WebFeatures disappearingMode.
         * @member {Web.WebFeatures.Flag|null|undefined} disappearingMode
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.disappearingMode = null;

        /**
         * WebFeatures externalMdOptInAvailable.
         * @member {Web.WebFeatures.Flag|null|undefined} externalMdOptInAvailable
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.externalMdOptInAvailable = null;

        /**
         * WebFeatures noDeleteMessageTimeLimit.
         * @member {Web.WebFeatures.Flag|null|undefined} noDeleteMessageTimeLimit
         * @memberof Web.WebFeatures
         * @instance
         */
        WebFeatures.prototype.noDeleteMessageTimeLimit = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * WebFeatures _labelsDisplay.
         * @member {"labelsDisplay"|undefined} _labelsDisplay
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_labelsDisplay", {
            get: $util.oneOfGetter($oneOfFields = ["labelsDisplay"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _voipIndividualOutgoing.
         * @member {"voipIndividualOutgoing"|undefined} _voipIndividualOutgoing
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_voipIndividualOutgoing", {
            get: $util.oneOfGetter($oneOfFields = ["voipIndividualOutgoing"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _groupsV3.
         * @member {"groupsV3"|undefined} _groupsV3
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_groupsV3", {
            get: $util.oneOfGetter($oneOfFields = ["groupsV3"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _groupsV3Create.
         * @member {"groupsV3Create"|undefined} _groupsV3Create
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_groupsV3Create", {
            get: $util.oneOfGetter($oneOfFields = ["groupsV3Create"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _changeNumberV2.
         * @member {"changeNumberV2"|undefined} _changeNumberV2
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_changeNumberV2", {
            get: $util.oneOfGetter($oneOfFields = ["changeNumberV2"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _queryStatusV3Thumbnail.
         * @member {"queryStatusV3Thumbnail"|undefined} _queryStatusV3Thumbnail
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_queryStatusV3Thumbnail", {
            get: $util.oneOfGetter($oneOfFields = ["queryStatusV3Thumbnail"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _liveLocations.
         * @member {"liveLocations"|undefined} _liveLocations
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_liveLocations", {
            get: $util.oneOfGetter($oneOfFields = ["liveLocations"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _queryVname.
         * @member {"queryVname"|undefined} _queryVname
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_queryVname", {
            get: $util.oneOfGetter($oneOfFields = ["queryVname"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _voipIndividualIncoming.
         * @member {"voipIndividualIncoming"|undefined} _voipIndividualIncoming
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_voipIndividualIncoming", {
            get: $util.oneOfGetter($oneOfFields = ["voipIndividualIncoming"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _quickRepliesQuery.
         * @member {"quickRepliesQuery"|undefined} _quickRepliesQuery
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_quickRepliesQuery", {
            get: $util.oneOfGetter($oneOfFields = ["quickRepliesQuery"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _payments.
         * @member {"payments"|undefined} _payments
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_payments", {
            get: $util.oneOfGetter($oneOfFields = ["payments"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _stickerPackQuery.
         * @member {"stickerPackQuery"|undefined} _stickerPackQuery
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_stickerPackQuery", {
            get: $util.oneOfGetter($oneOfFields = ["stickerPackQuery"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _liveLocationsFinal.
         * @member {"liveLocationsFinal"|undefined} _liveLocationsFinal
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_liveLocationsFinal", {
            get: $util.oneOfGetter($oneOfFields = ["liveLocationsFinal"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _labelsEdit.
         * @member {"labelsEdit"|undefined} _labelsEdit
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_labelsEdit", {
            get: $util.oneOfGetter($oneOfFields = ["labelsEdit"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _mediaUpload.
         * @member {"mediaUpload"|undefined} _mediaUpload
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_mediaUpload", {
            get: $util.oneOfGetter($oneOfFields = ["mediaUpload"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _mediaUploadRichQuickReplies.
         * @member {"mediaUploadRichQuickReplies"|undefined} _mediaUploadRichQuickReplies
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_mediaUploadRichQuickReplies", {
            get: $util.oneOfGetter($oneOfFields = ["mediaUploadRichQuickReplies"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _vnameV2.
         * @member {"vnameV2"|undefined} _vnameV2
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_vnameV2", {
            get: $util.oneOfGetter($oneOfFields = ["vnameV2"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _videoPlaybackUrl.
         * @member {"videoPlaybackUrl"|undefined} _videoPlaybackUrl
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_videoPlaybackUrl", {
            get: $util.oneOfGetter($oneOfFields = ["videoPlaybackUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _statusRanking.
         * @member {"statusRanking"|undefined} _statusRanking
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_statusRanking", {
            get: $util.oneOfGetter($oneOfFields = ["statusRanking"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _voipIndividualVideo.
         * @member {"voipIndividualVideo"|undefined} _voipIndividualVideo
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_voipIndividualVideo", {
            get: $util.oneOfGetter($oneOfFields = ["voipIndividualVideo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _thirdPartyStickers.
         * @member {"thirdPartyStickers"|undefined} _thirdPartyStickers
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_thirdPartyStickers", {
            get: $util.oneOfGetter($oneOfFields = ["thirdPartyStickers"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _frequentlyForwardedSetting.
         * @member {"frequentlyForwardedSetting"|undefined} _frequentlyForwardedSetting
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_frequentlyForwardedSetting", {
            get: $util.oneOfGetter($oneOfFields = ["frequentlyForwardedSetting"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _groupsV4JoinPermission.
         * @member {"groupsV4JoinPermission"|undefined} _groupsV4JoinPermission
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_groupsV4JoinPermission", {
            get: $util.oneOfGetter($oneOfFields = ["groupsV4JoinPermission"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _recentStickers.
         * @member {"recentStickers"|undefined} _recentStickers
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_recentStickers", {
            get: $util.oneOfGetter($oneOfFields = ["recentStickers"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _catalog.
         * @member {"catalog"|undefined} _catalog
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_catalog", {
            get: $util.oneOfGetter($oneOfFields = ["catalog"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _starredStickers.
         * @member {"starredStickers"|undefined} _starredStickers
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_starredStickers", {
            get: $util.oneOfGetter($oneOfFields = ["starredStickers"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _voipGroupCall.
         * @member {"voipGroupCall"|undefined} _voipGroupCall
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_voipGroupCall", {
            get: $util.oneOfGetter($oneOfFields = ["voipGroupCall"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _templateMessage.
         * @member {"templateMessage"|undefined} _templateMessage
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_templateMessage", {
            get: $util.oneOfGetter($oneOfFields = ["templateMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _templateMessageInteractivity.
         * @member {"templateMessageInteractivity"|undefined} _templateMessageInteractivity
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_templateMessageInteractivity", {
            get: $util.oneOfGetter($oneOfFields = ["templateMessageInteractivity"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _ephemeralMessages.
         * @member {"ephemeralMessages"|undefined} _ephemeralMessages
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_ephemeralMessages", {
            get: $util.oneOfGetter($oneOfFields = ["ephemeralMessages"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _e2ENotificationSync.
         * @member {"e2ENotificationSync"|undefined} _e2ENotificationSync
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_e2ENotificationSync", {
            get: $util.oneOfGetter($oneOfFields = ["e2ENotificationSync"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _recentStickersV2.
         * @member {"recentStickersV2"|undefined} _recentStickersV2
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_recentStickersV2", {
            get: $util.oneOfGetter($oneOfFields = ["recentStickersV2"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _recentStickersV3.
         * @member {"recentStickersV3"|undefined} _recentStickersV3
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_recentStickersV3", {
            get: $util.oneOfGetter($oneOfFields = ["recentStickersV3"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _userNotice.
         * @member {"userNotice"|undefined} _userNotice
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_userNotice", {
            get: $util.oneOfGetter($oneOfFields = ["userNotice"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _support.
         * @member {"support"|undefined} _support
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_support", {
            get: $util.oneOfGetter($oneOfFields = ["support"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _groupUiiCleanup.
         * @member {"groupUiiCleanup"|undefined} _groupUiiCleanup
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_groupUiiCleanup", {
            get: $util.oneOfGetter($oneOfFields = ["groupUiiCleanup"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _groupDogfoodingInternalOnly.
         * @member {"groupDogfoodingInternalOnly"|undefined} _groupDogfoodingInternalOnly
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_groupDogfoodingInternalOnly", {
            get: $util.oneOfGetter($oneOfFields = ["groupDogfoodingInternalOnly"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _settingsSync.
         * @member {"settingsSync"|undefined} _settingsSync
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_settingsSync", {
            get: $util.oneOfGetter($oneOfFields = ["settingsSync"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _archiveV2.
         * @member {"archiveV2"|undefined} _archiveV2
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_archiveV2", {
            get: $util.oneOfGetter($oneOfFields = ["archiveV2"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _ephemeralAllowGroupMembers.
         * @member {"ephemeralAllowGroupMembers"|undefined} _ephemeralAllowGroupMembers
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_ephemeralAllowGroupMembers", {
            get: $util.oneOfGetter($oneOfFields = ["ephemeralAllowGroupMembers"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _ephemeral24HDuration.
         * @member {"ephemeral24HDuration"|undefined} _ephemeral24HDuration
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_ephemeral24HDuration", {
            get: $util.oneOfGetter($oneOfFields = ["ephemeral24HDuration"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _mdForceUpgrade.
         * @member {"mdForceUpgrade"|undefined} _mdForceUpgrade
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_mdForceUpgrade", {
            get: $util.oneOfGetter($oneOfFields = ["mdForceUpgrade"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _disappearingMode.
         * @member {"disappearingMode"|undefined} _disappearingMode
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_disappearingMode", {
            get: $util.oneOfGetter($oneOfFields = ["disappearingMode"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _externalMdOptInAvailable.
         * @member {"externalMdOptInAvailable"|undefined} _externalMdOptInAvailable
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_externalMdOptInAvailable", {
            get: $util.oneOfGetter($oneOfFields = ["externalMdOptInAvailable"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebFeatures _noDeleteMessageTimeLimit.
         * @member {"noDeleteMessageTimeLimit"|undefined} _noDeleteMessageTimeLimit
         * @memberof Web.WebFeatures
         * @instance
         */
        Object.defineProperty(WebFeatures.prototype, "_noDeleteMessageTimeLimit", {
            get: $util.oneOfGetter($oneOfFields = ["noDeleteMessageTimeLimit"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new WebFeatures instance using the specified properties.
         * @function create
         * @memberof Web.WebFeatures
         * @static
         * @param {Web.IWebFeatures=} [properties] Properties to set
         * @returns {Web.WebFeatures} WebFeatures instance
         */
        WebFeatures.create = function create(properties) {
            return new WebFeatures(properties);
        };

        /**
         * Encodes the specified WebFeatures message. Does not implicitly {@link Web.WebFeatures.verify|verify} messages.
         * @function encode
         * @memberof Web.WebFeatures
         * @static
         * @param {Web.IWebFeatures} message WebFeatures message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        WebFeatures.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.labelsDisplay != null && Object.hasOwnProperty.call(message, "labelsDisplay"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.labelsDisplay);
            if (message.voipIndividualOutgoing != null && Object.hasOwnProperty.call(message, "voipIndividualOutgoing"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.voipIndividualOutgoing);
            if (message.groupsV3 != null && Object.hasOwnProperty.call(message, "groupsV3"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.groupsV3);
            if (message.groupsV3Create != null && Object.hasOwnProperty.call(message, "groupsV3Create"))
                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.groupsV3Create);
            if (message.changeNumberV2 != null && Object.hasOwnProperty.call(message, "changeNumberV2"))
                writer.uint32(/* id 5, wireType 0 =*/40).int32(message.changeNumberV2);
            if (message.queryStatusV3Thumbnail != null && Object.hasOwnProperty.call(message, "queryStatusV3Thumbnail"))
                writer.uint32(/* id 6, wireType 0 =*/48).int32(message.queryStatusV3Thumbnail);
            if (message.liveLocations != null && Object.hasOwnProperty.call(message, "liveLocations"))
                writer.uint32(/* id 7, wireType 0 =*/56).int32(message.liveLocations);
            if (message.queryVname != null && Object.hasOwnProperty.call(message, "queryVname"))
                writer.uint32(/* id 8, wireType 0 =*/64).int32(message.queryVname);
            if (message.voipIndividualIncoming != null && Object.hasOwnProperty.call(message, "voipIndividualIncoming"))
                writer.uint32(/* id 9, wireType 0 =*/72).int32(message.voipIndividualIncoming);
            if (message.quickRepliesQuery != null && Object.hasOwnProperty.call(message, "quickRepliesQuery"))
                writer.uint32(/* id 10, wireType 0 =*/80).int32(message.quickRepliesQuery);
            if (message.payments != null && Object.hasOwnProperty.call(message, "payments"))
                writer.uint32(/* id 11, wireType 0 =*/88).int32(message.payments);
            if (message.stickerPackQuery != null && Object.hasOwnProperty.call(message, "stickerPackQuery"))
                writer.uint32(/* id 12, wireType 0 =*/96).int32(message.stickerPackQuery);
            if (message.liveLocationsFinal != null && Object.hasOwnProperty.call(message, "liveLocationsFinal"))
                writer.uint32(/* id 13, wireType 0 =*/104).int32(message.liveLocationsFinal);
            if (message.labelsEdit != null && Object.hasOwnProperty.call(message, "labelsEdit"))
                writer.uint32(/* id 14, wireType 0 =*/112).int32(message.labelsEdit);
            if (message.mediaUpload != null && Object.hasOwnProperty.call(message, "mediaUpload"))
                writer.uint32(/* id 15, wireType 0 =*/120).int32(message.mediaUpload);
            if (message.mediaUploadRichQuickReplies != null && Object.hasOwnProperty.call(message, "mediaUploadRichQuickReplies"))
                writer.uint32(/* id 18, wireType 0 =*/144).int32(message.mediaUploadRichQuickReplies);
            if (message.vnameV2 != null && Object.hasOwnProperty.call(message, "vnameV2"))
                writer.uint32(/* id 19, wireType 0 =*/152).int32(message.vnameV2);
            if (message.videoPlaybackUrl != null && Object.hasOwnProperty.call(message, "videoPlaybackUrl"))
                writer.uint32(/* id 20, wireType 0 =*/160).int32(message.videoPlaybackUrl);
            if (message.statusRanking != null && Object.hasOwnProperty.call(message, "statusRanking"))
                writer.uint32(/* id 21, wireType 0 =*/168).int32(message.statusRanking);
            if (message.voipIndividualVideo != null && Object.hasOwnProperty.call(message, "voipIndividualVideo"))
                writer.uint32(/* id 22, wireType 0 =*/176).int32(message.voipIndividualVideo);
            if (message.thirdPartyStickers != null && Object.hasOwnProperty.call(message, "thirdPartyStickers"))
                writer.uint32(/* id 23, wireType 0 =*/184).int32(message.thirdPartyStickers);
            if (message.frequentlyForwardedSetting != null && Object.hasOwnProperty.call(message, "frequentlyForwardedSetting"))
                writer.uint32(/* id 24, wireType 0 =*/192).int32(message.frequentlyForwardedSetting);
            if (message.groupsV4JoinPermission != null && Object.hasOwnProperty.call(message, "groupsV4JoinPermission"))
                writer.uint32(/* id 25, wireType 0 =*/200).int32(message.groupsV4JoinPermission);
            if (message.recentStickers != null && Object.hasOwnProperty.call(message, "recentStickers"))
                writer.uint32(/* id 26, wireType 0 =*/208).int32(message.recentStickers);
            if (message.catalog != null && Object.hasOwnProperty.call(message, "catalog"))
                writer.uint32(/* id 27, wireType 0 =*/216).int32(message.catalog);
            if (message.starredStickers != null && Object.hasOwnProperty.call(message, "starredStickers"))
                writer.uint32(/* id 28, wireType 0 =*/224).int32(message.starredStickers);
            if (message.voipGroupCall != null && Object.hasOwnProperty.call(message, "voipGroupCall"))
                writer.uint32(/* id 29, wireType 0 =*/232).int32(message.voipGroupCall);
            if (message.templateMessage != null && Object.hasOwnProperty.call(message, "templateMessage"))
                writer.uint32(/* id 30, wireType 0 =*/240).int32(message.templateMessage);
            if (message.templateMessageInteractivity != null && Object.hasOwnProperty.call(message, "templateMessageInteractivity"))
                writer.uint32(/* id 31, wireType 0 =*/248).int32(message.templateMessageInteractivity);
            if (message.ephemeralMessages != null && Object.hasOwnProperty.call(message, "ephemeralMessages"))
                writer.uint32(/* id 32, wireType 0 =*/256).int32(message.ephemeralMessages);
            if (message.e2ENotificationSync != null && Object.hasOwnProperty.call(message, "e2ENotificationSync"))
                writer.uint32(/* id 33, wireType 0 =*/264).int32(message.e2ENotificationSync);
            if (message.recentStickersV2 != null && Object.hasOwnProperty.call(message, "recentStickersV2"))
                writer.uint32(/* id 34, wireType 0 =*/272).int32(message.recentStickersV2);
            if (message.recentStickersV3 != null && Object.hasOwnProperty.call(message, "recentStickersV3"))
                writer.uint32(/* id 36, wireType 0 =*/288).int32(message.recentStickersV3);
            if (message.userNotice != null && Object.hasOwnProperty.call(message, "userNotice"))
                writer.uint32(/* id 37, wireType 0 =*/296).int32(message.userNotice);
            if (message.support != null && Object.hasOwnProperty.call(message, "support"))
                writer.uint32(/* id 39, wireType 0 =*/312).int32(message.support);
            if (message.groupUiiCleanup != null && Object.hasOwnProperty.call(message, "groupUiiCleanup"))
                writer.uint32(/* id 40, wireType 0 =*/320).int32(message.groupUiiCleanup);
            if (message.groupDogfoodingInternalOnly != null && Object.hasOwnProperty.call(message, "groupDogfoodingInternalOnly"))
                writer.uint32(/* id 41, wireType 0 =*/328).int32(message.groupDogfoodingInternalOnly);
            if (message.settingsSync != null && Object.hasOwnProperty.call(message, "settingsSync"))
                writer.uint32(/* id 42, wireType 0 =*/336).int32(message.settingsSync);
            if (message.archiveV2 != null && Object.hasOwnProperty.call(message, "archiveV2"))
                writer.uint32(/* id 43, wireType 0 =*/344).int32(message.archiveV2);
            if (message.ephemeralAllowGroupMembers != null && Object.hasOwnProperty.call(message, "ephemeralAllowGroupMembers"))
                writer.uint32(/* id 44, wireType 0 =*/352).int32(message.ephemeralAllowGroupMembers);
            if (message.ephemeral24HDuration != null && Object.hasOwnProperty.call(message, "ephemeral24HDuration"))
                writer.uint32(/* id 45, wireType 0 =*/360).int32(message.ephemeral24HDuration);
            if (message.mdForceUpgrade != null && Object.hasOwnProperty.call(message, "mdForceUpgrade"))
                writer.uint32(/* id 46, wireType 0 =*/368).int32(message.mdForceUpgrade);
            if (message.disappearingMode != null && Object.hasOwnProperty.call(message, "disappearingMode"))
                writer.uint32(/* id 47, wireType 0 =*/376).int32(message.disappearingMode);
            if (message.externalMdOptInAvailable != null && Object.hasOwnProperty.call(message, "externalMdOptInAvailable"))
                writer.uint32(/* id 48, wireType 0 =*/384).int32(message.externalMdOptInAvailable);
            if (message.noDeleteMessageTimeLimit != null && Object.hasOwnProperty.call(message, "noDeleteMessageTimeLimit"))
                writer.uint32(/* id 49, wireType 0 =*/392).int32(message.noDeleteMessageTimeLimit);
            return writer;
        };

        /**
         * Encodes the specified WebFeatures message, length delimited. Does not implicitly {@link Web.WebFeatures.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.WebFeatures
         * @static
         * @param {Web.IWebFeatures} message WebFeatures message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        WebFeatures.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a WebFeatures message from the specified reader or buffer.
         * @function decode
         * @memberof Web.WebFeatures
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.WebFeatures} WebFeatures
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        WebFeatures.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.Web.WebFeatures();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.labelsDisplay = reader.int32();
                        break;
                    }
                case 2: {
                        message.voipIndividualOutgoing = reader.int32();
                        break;
                    }
                case 3: {
                        message.groupsV3 = reader.int32();
                        break;
                    }
                case 4: {
                        message.groupsV3Create = reader.int32();
                        break;
                    }
                case 5: {
                        message.changeNumberV2 = reader.int32();
                        break;
                    }
                case 6: {
                        message.queryStatusV3Thumbnail = reader.int32();
                        break;
                    }
                case 7: {
                        message.liveLocations = reader.int32();
                        break;
                    }
                case 8: {
                        message.queryVname = reader.int32();
                        break;
                    }
                case 9: {
                        message.voipIndividualIncoming = reader.int32();
                        break;
                    }
                case 10: {
                        message.quickRepliesQuery = reader.int32();
                        break;
                    }
                case 11: {
                        message.payments = reader.int32();
                        break;
                    }
                case 12: {
                        message.stickerPackQuery = reader.int32();
                        break;
                    }
                case 13: {
                        message.liveLocationsFinal = reader.int32();
                        break;
                    }
                case 14: {
                        message.labelsEdit = reader.int32();
                        break;
                    }
                case 15: {
                        message.mediaUpload = reader.int32();
                        break;
                    }
                case 18: {
                        message.mediaUploadRichQuickReplies = reader.int32();
                        break;
                    }
                case 19: {
                        message.vnameV2 = reader.int32();
                        break;
                    }
                case 20: {
                        message.videoPlaybackUrl = reader.int32();
                        break;
                    }
                case 21: {
                        message.statusRanking = reader.int32();
                        break;
                    }
                case 22: {
                        message.voipIndividualVideo = reader.int32();
                        break;
                    }
                case 23: {
                        message.thirdPartyStickers = reader.int32();
                        break;
                    }
                case 24: {
                        message.frequentlyForwardedSetting = reader.int32();
                        break;
                    }
                case 25: {
                        message.groupsV4JoinPermission = reader.int32();
                        break;
                    }
                case 26: {
                        message.recentStickers = reader.int32();
                        break;
                    }
                case 27: {
                        message.catalog = reader.int32();
                        break;
                    }
                case 28: {
                        message.starredStickers = reader.int32();
                        break;
                    }
                case 29: {
                        message.voipGroupCall = reader.int32();
                        break;
                    }
                case 30: {
                        message.templateMessage = reader.int32();
                        break;
                    }
                case 31: {
                        message.templateMessageInteractivity = reader.int32();
                        break;
                    }
                case 32: {
                        message.ephemeralMessages = reader.int32();
                        break;
                    }
                case 33: {
                        message.e2ENotificationSync = reader.int32();
                        break;
                    }
                case 34: {
                        message.recentStickersV2 = reader.int32();
                        break;
                    }
                case 36: {
                        message.recentStickersV3 = reader.int32();
                        break;
                    }
                case 37: {
                        message.userNotice = reader.int32();
                        break;
                    }
                case 39: {
                        message.support = reader.int32();
                        break;
                    }
                case 40: {
                        message.groupUiiCleanup = reader.int32();
                        break;
                    }
                case 41: {
                        message.groupDogfoodingInternalOnly = reader.int32();
                        break;
                    }
                case 42: {
                        message.settingsSync = reader.int32();
                        break;
                    }
                case 43: {
                        message.archiveV2 = reader.int32();
                        break;
                    }
                case 44: {
                        message.ephemeralAllowGroupMembers = reader.int32();
                        break;
                    }
                case 45: {
                        message.ephemeral24HDuration = reader.int32();
                        break;
                    }
                case 46: {
                        message.mdForceUpgrade = reader.int32();
                        break;
                    }
                case 47: {
                        message.disappearingMode = reader.int32();
                        break;
                    }
                case 48: {
                        message.externalMdOptInAvailable = reader.int32();
                        break;
                    }
                case 49: {
                        message.noDeleteMessageTimeLimit = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a WebFeatures message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.WebFeatures
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.WebFeatures} WebFeatures
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        WebFeatures.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a WebFeatures message.
         * @function verify
         * @memberof Web.WebFeatures
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        WebFeatures.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.labelsDisplay != null && message.hasOwnProperty("labelsDisplay")) {
                properties._labelsDisplay = 1;
                switch (message.labelsDisplay) {
                default:
                    return "labelsDisplay: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.voipIndividualOutgoing != null && message.hasOwnProperty("voipIndividualOutgoing")) {
                properties._voipIndividualOutgoing = 1;
                switch (message.voipIndividualOutgoing) {
                default:
                    return "voipIndividualOutgoing: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.groupsV3 != null && message.hasOwnProperty("groupsV3")) {
                properties._groupsV3 = 1;
                switch (message.groupsV3) {
                default:
                    return "groupsV3: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.groupsV3Create != null && message.hasOwnProperty("groupsV3Create")) {
                properties._groupsV3Create = 1;
                switch (message.groupsV3Create) {
                default:
                    return "groupsV3Create: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.changeNumberV2 != null && message.hasOwnProperty("changeNumberV2")) {
                properties._changeNumberV2 = 1;
                switch (message.changeNumberV2) {
                default:
                    return "changeNumberV2: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.queryStatusV3Thumbnail != null && message.hasOwnProperty("queryStatusV3Thumbnail")) {
                properties._queryStatusV3Thumbnail = 1;
                switch (message.queryStatusV3Thumbnail) {
                default:
                    return "queryStatusV3Thumbnail: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.liveLocations != null && message.hasOwnProperty("liveLocations")) {
                properties._liveLocations = 1;
                switch (message.liveLocations) {
                default:
                    return "liveLocations: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.queryVname != null && message.hasOwnProperty("queryVname")) {
                properties._queryVname = 1;
                switch (message.queryVname) {
                default:
                    return "queryVname: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.voipIndividualIncoming != null && message.hasOwnProperty("voipIndividualIncoming")) {
                properties._voipIndividualIncoming = 1;
                switch (message.voipIndividualIncoming) {
                default:
                    return "voipIndividualIncoming: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.quickRepliesQuery != null && message.hasOwnProperty("quickRepliesQuery")) {
                properties._quickRepliesQuery = 1;
                switch (message.quickRepliesQuery) {
                default:
                    return "quickRepliesQuery: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.payments != null && message.hasOwnProperty("payments")) {
                properties._payments = 1;
                switch (message.payments) {
                default:
                    return "payments: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.stickerPackQuery != null && message.hasOwnProperty("stickerPackQuery")) {
                properties._stickerPackQuery = 1;
                switch (message.stickerPackQuery) {
                default:
                    return "stickerPackQuery: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.liveLocationsFinal != null && message.hasOwnProperty("liveLocationsFinal")) {
                properties._liveLocationsFinal = 1;
                switch (message.liveLocationsFinal) {
                default:
                    return "liveLocationsFinal: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.labelsEdit != null && message.hasOwnProperty("labelsEdit")) {
                properties._labelsEdit = 1;
                switch (message.labelsEdit) {
                default:
                    return "labelsEdit: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.mediaUpload != null && message.hasOwnProperty("mediaUpload")) {
                properties._mediaUpload = 1;
                switch (message.mediaUpload) {
                default:
                    return "mediaUpload: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.mediaUploadRichQuickReplies != null && message.hasOwnProperty("mediaUploadRichQuickReplies")) {
                properties._mediaUploadRichQuickReplies = 1;
                switch (message.mediaUploadRichQuickReplies) {
                default:
                    return "mediaUploadRichQuickReplies: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.vnameV2 != null && message.hasOwnProperty("vnameV2")) {
                properties._vnameV2 = 1;
                switch (message.vnameV2) {
                default:
                    return "vnameV2: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.videoPlaybackUrl != null && message.hasOwnProperty("videoPlaybackUrl")) {
                properties._videoPlaybackUrl = 1;
                switch (message.videoPlaybackUrl) {
                default:
                    return "videoPlaybackUrl: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.statusRanking != null && message.hasOwnProperty("statusRanking")) {
                properties._statusRanking = 1;
                switch (message.statusRanking) {
                default:
                    return "statusRanking: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.voipIndividualVideo != null && message.hasOwnProperty("voipIndividualVideo")) {
                properties._voipIndividualVideo = 1;
                switch (message.voipIndividualVideo) {
                default:
                    return "voipIndividualVideo: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.thirdPartyStickers != null && message.hasOwnProperty("thirdPartyStickers")) {
                properties._thirdPartyStickers = 1;
                switch (message.thirdPartyStickers) {
                default:
                    return "thirdPartyStickers: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.frequentlyForwardedSetting != null && message.hasOwnProperty("frequentlyForwardedSetting")) {
                properties._frequentlyForwardedSetting = 1;
                switch (message.frequentlyForwardedSetting) {
                default:
                    return "frequentlyForwardedSetting: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.groupsV4JoinPermission != null && message.hasOwnProperty("groupsV4JoinPermission")) {
                properties._groupsV4JoinPermission = 1;
                switch (message.groupsV4JoinPermission) {
                default:
                    return "groupsV4JoinPermission: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.recentStickers != null && message.hasOwnProperty("recentStickers")) {
                properties._recentStickers = 1;
                switch (message.recentStickers) {
                default:
                    return "recentStickers: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.catalog != null && message.hasOwnProperty("catalog")) {
                properties._catalog = 1;
                switch (message.catalog) {
                default:
                    return "catalog: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.starredStickers != null && message.hasOwnProperty("starredStickers")) {
                properties._starredStickers = 1;
                switch (message.starredStickers) {
                default:
                    return "starredStickers: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.voipGroupCall != null && message.hasOwnProperty("voipGroupCall")) {
                properties._voipGroupCall = 1;
                switch (message.voipGroupCall) {
                default:
                    return "voipGroupCall: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) {
                properties._templateMessage = 1;
                switch (message.templateMessage) {
                default:
                    return "templateMessage: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.templateMessageInteractivity != null && message.hasOwnProperty("templateMessageInteractivity")) {
                properties._templateMessageInteractivity = 1;
                switch (message.templateMessageInteractivity) {
                default:
                    return "templateMessageInteractivity: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.ephemeralMessages != null && message.hasOwnProperty("ephemeralMessages")) {
                properties._ephemeralMessages = 1;
                switch (message.ephemeralMessages) {
                default:
                    return "ephemeralMessages: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.e2ENotificationSync != null && message.hasOwnProperty("e2ENotificationSync")) {
                properties._e2ENotificationSync = 1;
                switch (message.e2ENotificationSync) {
                default:
                    return "e2ENotificationSync: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.recentStickersV2 != null && message.hasOwnProperty("recentStickersV2")) {
                properties._recentStickersV2 = 1;
                switch (message.recentStickersV2) {
                default:
                    return "recentStickersV2: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.recentStickersV3 != null && message.hasOwnProperty("recentStickersV3")) {
                properties._recentStickersV3 = 1;
                switch (message.recentStickersV3) {
                default:
                    return "recentStickersV3: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.userNotice != null && message.hasOwnProperty("userNotice")) {
                properties._userNotice = 1;
                switch (message.userNotice) {
                default:
                    return "userNotice: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.support != null && message.hasOwnProperty("support")) {
                properties._support = 1;
                switch (message.support) {
                default:
                    return "support: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.groupUiiCleanup != null && message.hasOwnProperty("groupUiiCleanup")) {
                properties._groupUiiCleanup = 1;
                switch (message.groupUiiCleanup) {
                default:
                    return "groupUiiCleanup: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.groupDogfoodingInternalOnly != null && message.hasOwnProperty("groupDogfoodingInternalOnly")) {
                properties._groupDogfoodingInternalOnly = 1;
                switch (message.groupDogfoodingInternalOnly) {
                default:
                    return "groupDogfoodingInternalOnly: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.settingsSync != null && message.hasOwnProperty("settingsSync")) {
                properties._settingsSync = 1;
                switch (message.settingsSync) {
                default:
                    return "settingsSync: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.archiveV2 != null && message.hasOwnProperty("archiveV2")) {
                properties._archiveV2 = 1;
                switch (message.archiveV2) {
                default:
                    return "archiveV2: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.ephemeralAllowGroupMembers != null && message.hasOwnProperty("ephemeralAllowGroupMembers")) {
                properties._ephemeralAllowGroupMembers = 1;
                switch (message.ephemeralAllowGroupMembers) {
                default:
                    return "ephemeralAllowGroupMembers: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.ephemeral24HDuration != null && message.hasOwnProperty("ephemeral24HDuration")) {
                properties._ephemeral24HDuration = 1;
                switch (message.ephemeral24HDuration) {
                default:
                    return "ephemeral24HDuration: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.mdForceUpgrade != null && message.hasOwnProperty("mdForceUpgrade")) {
                properties._mdForceUpgrade = 1;
                switch (message.mdForceUpgrade) {
                default:
                    return "mdForceUpgrade: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) {
                properties._disappearingMode = 1;
                switch (message.disappearingMode) {
                default:
                    return "disappearingMode: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.externalMdOptInAvailable != null && message.hasOwnProperty("externalMdOptInAvailable")) {
                properties._externalMdOptInAvailable = 1;
                switch (message.externalMdOptInAvailable) {
                default:
                    return "externalMdOptInAvailable: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.noDeleteMessageTimeLimit != null && message.hasOwnProperty("noDeleteMessageTimeLimit")) {
                properties._noDeleteMessageTimeLimit = 1;
                switch (message.noDeleteMessageTimeLimit) {
                default:
                    return "noDeleteMessageTimeLimit: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a WebFeatures message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.WebFeatures
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.WebFeatures} WebFeatures
         */
        WebFeatures.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.WebFeatures)
                return object;
            var message = new $root.Web.WebFeatures();
            switch (object.labelsDisplay) {
            default:
                if (typeof object.labelsDisplay === "number") {
                    message.labelsDisplay = object.labelsDisplay;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.labelsDisplay = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.labelsDisplay = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.labelsDisplay = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.labelsDisplay = 3;
                break;
            }
            switch (object.voipIndividualOutgoing) {
            default:
                if (typeof object.voipIndividualOutgoing === "number") {
                    message.voipIndividualOutgoing = object.voipIndividualOutgoing;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.voipIndividualOutgoing = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.voipIndividualOutgoing = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.voipIndividualOutgoing = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.voipIndividualOutgoing = 3;
                break;
            }
            switch (object.groupsV3) {
            default:
                if (typeof object.groupsV3 === "number") {
                    message.groupsV3 = object.groupsV3;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.groupsV3 = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.groupsV3 = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.groupsV3 = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.groupsV3 = 3;
                break;
            }
            switch (object.groupsV3Create) {
            default:
                if (typeof object.groupsV3Create === "number") {
                    message.groupsV3Create = object.groupsV3Create;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.groupsV3Create = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.groupsV3Create = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.groupsV3Create = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.groupsV3Create = 3;
                break;
            }
            switch (object.changeNumberV2) {
            default:
                if (typeof object.changeNumberV2 === "number") {
                    message.changeNumberV2 = object.changeNumberV2;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.changeNumberV2 = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.changeNumberV2 = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.changeNumberV2 = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.changeNumberV2 = 3;
                break;
            }
            switch (object.queryStatusV3Thumbnail) {
            default:
                if (typeof object.queryStatusV3Thumbnail === "number") {
                    message.queryStatusV3Thumbnail = object.queryStatusV3Thumbnail;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.queryStatusV3Thumbnail = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.queryStatusV3Thumbnail = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.queryStatusV3Thumbnail = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.queryStatusV3Thumbnail = 3;
                break;
            }
            switch (object.liveLocations) {
            default:
                if (typeof object.liveLocations === "number") {
                    message.liveLocations = object.liveLocations;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.liveLocations = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.liveLocations = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.liveLocations = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.liveLocations = 3;
                break;
            }
            switch (object.queryVname) {
            default:
                if (typeof object.queryVname === "number") {
                    message.queryVname = object.queryVname;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.queryVname = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.queryVname = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.queryVname = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.queryVname = 3;
                break;
            }
            switch (object.voipIndividualIncoming) {
            default:
                if (typeof object.voipIndividualIncoming === "number") {
                    message.voipIndividualIncoming = object.voipIndividualIncoming;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.voipIndividualIncoming = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.voipIndividualIncoming = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.voipIndividualIncoming = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.voipIndividualIncoming = 3;
                break;
            }
            switch (object.quickRepliesQuery) {
            default:
                if (typeof object.quickRepliesQuery === "number") {
                    message.quickRepliesQuery = object.quickRepliesQuery;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.quickRepliesQuery = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.quickRepliesQuery = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.quickRepliesQuery = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.quickRepliesQuery = 3;
                break;
            }
            switch (object.payments) {
            default:
                if (typeof object.payments === "number") {
                    message.payments = object.payments;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.payments = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.payments = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.payments = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.payments = 3;
                break;
            }
            switch (object.stickerPackQuery) {
            default:
                if (typeof object.stickerPackQuery === "number") {
                    message.stickerPackQuery = object.stickerPackQuery;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.stickerPackQuery = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.stickerPackQuery = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.stickerPackQuery = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.stickerPackQuery = 3;
                break;
            }
            switch (object.liveLocationsFinal) {
            default:
                if (typeof object.liveLocationsFinal === "number") {
                    message.liveLocationsFinal = object.liveLocationsFinal;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.liveLocationsFinal = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.liveLocationsFinal = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.liveLocationsFinal = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.liveLocationsFinal = 3;
                break;
            }
            switch (object.labelsEdit) {
            default:
                if (typeof object.labelsEdit === "number") {
                    message.labelsEdit = object.labelsEdit;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.labelsEdit = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.labelsEdit = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.labelsEdit = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.labelsEdit = 3;
                break;
            }
            switch (object.mediaUpload) {
            default:
                if (typeof object.mediaUpload === "number") {
                    message.mediaUpload = object.mediaUpload;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.mediaUpload = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.mediaUpload = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.mediaUpload = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.mediaUpload = 3;
                break;
            }
            switch (object.mediaUploadRichQuickReplies) {
            default:
                if (typeof object.mediaUploadRichQuickReplies === "number") {
                    message.mediaUploadRichQuickReplies = object.mediaUploadRichQuickReplies;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.mediaUploadRichQuickReplies = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.mediaUploadRichQuickReplies = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.mediaUploadRichQuickReplies = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.mediaUploadRichQuickReplies = 3;
                break;
            }
            switch (object.vnameV2) {
            default:
                if (typeof object.vnameV2 === "number") {
                    message.vnameV2 = object.vnameV2;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.vnameV2 = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.vnameV2 = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.vnameV2 = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.vnameV2 = 3;
                break;
            }
            switch (object.videoPlaybackUrl) {
            default:
                if (typeof object.videoPlaybackUrl === "number") {
                    message.videoPlaybackUrl = object.videoPlaybackUrl;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.videoPlaybackUrl = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.videoPlaybackUrl = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.videoPlaybackUrl = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.videoPlaybackUrl = 3;
                break;
            }
            switch (object.statusRanking) {
            default:
                if (typeof object.statusRanking === "number") {
                    message.statusRanking = object.statusRanking;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.statusRanking = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.statusRanking = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.statusRanking = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.statusRanking = 3;
                break;
            }
            switch (object.voipIndividualVideo) {
            default:
                if (typeof object.voipIndividualVideo === "number") {
                    message.voipIndividualVideo = object.voipIndividualVideo;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.voipIndividualVideo = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.voipIndividualVideo = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.voipIndividualVideo = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.voipIndividualVideo = 3;
                break;
            }
            switch (object.thirdPartyStickers) {
            default:
                if (typeof object.thirdPartyStickers === "number") {
                    message.thirdPartyStickers = object.thirdPartyStickers;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.thirdPartyStickers = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.thirdPartyStickers = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.thirdPartyStickers = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.thirdPartyStickers = 3;
                break;
            }
            switch (object.frequentlyForwardedSetting) {
            default:
                if (typeof object.frequentlyForwardedSetting === "number") {
                    message.frequentlyForwardedSetting = object.frequentlyForwardedSetting;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.frequentlyForwardedSetting = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.frequentlyForwardedSetting = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.frequentlyForwardedSetting = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.frequentlyForwardedSetting = 3;
                break;
            }
            switch (object.groupsV4JoinPermission) {
            default:
                if (typeof object.groupsV4JoinPermission === "number") {
                    message.groupsV4JoinPermission = object.groupsV4JoinPermission;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.groupsV4JoinPermission = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.groupsV4JoinPermission = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.groupsV4JoinPermission = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.groupsV4JoinPermission = 3;
                break;
            }
            switch (object.recentStickers) {
            default:
                if (typeof object.recentStickers === "number") {
                    message.recentStickers = object.recentStickers;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.recentStickers = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.recentStickers = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.recentStickers = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.recentStickers = 3;
                break;
            }
            switch (object.catalog) {
            default:
                if (typeof object.catalog === "number") {
                    message.catalog = object.catalog;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.catalog = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.catalog = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.catalog = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.catalog = 3;
                break;
            }
            switch (object.starredStickers) {
            default:
                if (typeof object.starredStickers === "number") {
                    message.starredStickers = object.starredStickers;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.starredStickers = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.starredStickers = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.starredStickers = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.starredStickers = 3;
                break;
            }
            switch (object.voipGroupCall) {
            default:
                if (typeof object.voipGroupCall === "number") {
                    message.voipGroupCall = object.voipGroupCall;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.voipGroupCall = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.voipGroupCall = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.voipGroupCall = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.voipGroupCall = 3;
                break;
            }
            switch (object.templateMessage) {
            default:
                if (typeof object.templateMessage === "number") {
                    message.templateMessage = object.templateMessage;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.templateMessage = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.templateMessage = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.templateMessage = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.templateMessage = 3;
                break;
            }
            switch (object.templateMessageInteractivity) {
            default:
                if (typeof object.templateMessageInteractivity === "number") {
                    message.templateMessageInteractivity = object.templateMessageInteractivity;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.templateMessageInteractivity = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.templateMessageInteractivity = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.templateMessageInteractivity = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.templateMessageInteractivity = 3;
                break;
            }
            switch (object.ephemeralMessages) {
            default:
                if (typeof object.ephemeralMessages === "number") {
                    message.ephemeralMessages = object.ephemeralMessages;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.ephemeralMessages = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.ephemeralMessages = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.ephemeralMessages = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.ephemeralMessages = 3;
                break;
            }
            switch (object.e2ENotificationSync) {
            default:
                if (typeof object.e2ENotificationSync === "number") {
                    message.e2ENotificationSync = object.e2ENotificationSync;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.e2ENotificationSync = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.e2ENotificationSync = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.e2ENotificationSync = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.e2ENotificationSync = 3;
                break;
            }
            switch (object.recentStickersV2) {
            default:
                if (typeof object.recentStickersV2 === "number") {
                    message.recentStickersV2 = object.recentStickersV2;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.recentStickersV2 = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.recentStickersV2 = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.recentStickersV2 = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.recentStickersV2 = 3;
                break;
            }
            switch (object.recentStickersV3) {
            default:
                if (typeof object.recentStickersV3 === "number") {
                    message.recentStickersV3 = object.recentStickersV3;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.recentStickersV3 = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.recentStickersV3 = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.recentStickersV3 = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.recentStickersV3 = 3;
                break;
            }
            switch (object.userNotice) {
            default:
                if (typeof object.userNotice === "number") {
                    message.userNotice = object.userNotice;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.userNotice = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.userNotice = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.userNotice = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.userNotice = 3;
                break;
            }
            switch (object.support) {
            default:
                if (typeof object.support === "number") {
                    message.support = object.support;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.support = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.support = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.support = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.support = 3;
                break;
            }
            switch (object.groupUiiCleanup) {
            default:
                if (typeof object.groupUiiCleanup === "number") {
                    message.groupUiiCleanup = object.groupUiiCleanup;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.groupUiiCleanup = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.groupUiiCleanup = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.groupUiiCleanup = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.groupUiiCleanup = 3;
                break;
            }
            switch (object.groupDogfoodingInternalOnly) {
            default:
                if (typeof object.groupDogfoodingInternalOnly === "number") {
                    message.groupDogfoodingInternalOnly = object.groupDogfoodingInternalOnly;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.groupDogfoodingInternalOnly = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.groupDogfoodingInternalOnly = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.groupDogfoodingInternalOnly = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.groupDogfoodingInternalOnly = 3;
                break;
            }
            switch (object.settingsSync) {
            default:
                if (typeof object.settingsSync === "number") {
                    message.settingsSync = object.settingsSync;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.settingsSync = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.settingsSync = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.settingsSync = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.settingsSync = 3;
                break;
            }
            switch (object.archiveV2) {
            default:
                if (typeof object.archiveV2 === "number") {
                    message.archiveV2 = object.archiveV2;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.archiveV2 = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.archiveV2 = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.archiveV2 = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.archiveV2 = 3;
                break;
            }
            switch (object.ephemeralAllowGroupMembers) {
            default:
                if (typeof object.ephemeralAllowGroupMembers === "number") {
                    message.ephemeralAllowGroupMembers = object.ephemeralAllowGroupMembers;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.ephemeralAllowGroupMembers = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.ephemeralAllowGroupMembers = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.ephemeralAllowGroupMembers = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.ephemeralAllowGroupMembers = 3;
                break;
            }
            switch (object.ephemeral24HDuration) {
            default:
                if (typeof object.ephemeral24HDuration === "number") {
                    message.ephemeral24HDuration = object.ephemeral24HDuration;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.ephemeral24HDuration = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.ephemeral24HDuration = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.ephemeral24HDuration = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.ephemeral24HDuration = 3;
                break;
            }
            switch (object.mdForceUpgrade) {
            default:
                if (typeof object.mdForceUpgrade === "number") {
                    message.mdForceUpgrade = object.mdForceUpgrade;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.mdForceUpgrade = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.mdForceUpgrade = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.mdForceUpgrade = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.mdForceUpgrade = 3;
                break;
            }
            switch (object.disappearingMode) {
            default:
                if (typeof object.disappearingMode === "number") {
                    message.disappearingMode = object.disappearingMode;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.disappearingMode = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.disappearingMode = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.disappearingMode = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.disappearingMode = 3;
                break;
            }
            switch (object.externalMdOptInAvailable) {
            default:
                if (typeof object.externalMdOptInAvailable === "number") {
                    message.externalMdOptInAvailable = object.externalMdOptInAvailable;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.externalMdOptInAvailable = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.externalMdOptInAvailable = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.externalMdOptInAvailable = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.externalMdOptInAvailable = 3;
                break;
            }
            switch (object.noDeleteMessageTimeLimit) {
            default:
                if (typeof object.noDeleteMessageTimeLimit === "number") {
                    message.noDeleteMessageTimeLimit = object.noDeleteMessageTimeLimit;
                    break;
                }
                break;
            case "NOT_STARTED":
            case 0:
                message.noDeleteMessageTimeLimit = 0;
                break;
            case "FORCE_UPGRADE":
            case 1:
                message.noDeleteMessageTimeLimit = 1;
                break;
            case "DEVELOPMENT":
            case 2:
                message.noDeleteMessageTimeLimit = 2;
                break;
            case "PRODUCTION":
            case 3:
                message.noDeleteMessageTimeLimit = 3;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a WebFeatures message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.WebFeatures
         * @static
         * @param {Web.WebFeatures} message WebFeatures
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        WebFeatures.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.labelsDisplay != null && message.hasOwnProperty("labelsDisplay")) {
                object.labelsDisplay = options.enums === String ? $root.Web.WebFeatures.Flag[message.labelsDisplay] === undefined ? message.labelsDisplay : $root.Web.WebFeatures.Flag[message.labelsDisplay] : message.labelsDisplay;
                if (options.oneofs)
                    object._labelsDisplay = "labelsDisplay";
            }
            if (message.voipIndividualOutgoing != null && message.hasOwnProperty("voipIndividualOutgoing")) {
                object.voipIndividualOutgoing = options.enums === String ? $root.Web.WebFeatures.Flag[message.voipIndividualOutgoing] === undefined ? message.voipIndividualOutgoing : $root.Web.WebFeatures.Flag[message.voipIndividualOutgoing] : message.voipIndividualOutgoing;
                if (options.oneofs)
                    object._voipIndividualOutgoing = "voipIndividualOutgoing";
            }
            if (message.groupsV3 != null && message.hasOwnProperty("groupsV3")) {
                object.groupsV3 = options.enums === String ? $root.Web.WebFeatures.Flag[message.groupsV3] === undefined ? message.groupsV3 : $root.Web.WebFeatures.Flag[message.groupsV3] : message.groupsV3;
                if (options.oneofs)
                    object._groupsV3 = "groupsV3";
            }
            if (message.groupsV3Create != null && message.hasOwnProperty("groupsV3Create")) {
                object.groupsV3Create = options.enums === String ? $root.Web.WebFeatures.Flag[message.groupsV3Create] === undefined ? message.groupsV3Create : $root.Web.WebFeatures.Flag[message.groupsV3Create] : message.groupsV3Create;
                if (options.oneofs)
                    object._groupsV3Create = "groupsV3Create";
            }
            if (message.changeNumberV2 != null && message.hasOwnProperty("changeNumberV2")) {
                object.changeNumberV2 = options.enums === String ? $root.Web.WebFeatures.Flag[message.changeNumberV2] === undefined ? message.changeNumberV2 : $root.Web.WebFeatures.Flag[message.changeNumberV2] : message.changeNumberV2;
                if (options.oneofs)
                    object._changeNumberV2 = "changeNumberV2";
            }
            if (message.queryStatusV3Thumbnail != null && message.hasOwnProperty("queryStatusV3Thumbnail")) {
                object.queryStatusV3Thumbnail = options.enums === String ? $root.Web.WebFeatures.Flag[message.queryStatusV3Thumbnail] === undefined ? message.queryStatusV3Thumbnail : $root.Web.WebFeatures.Flag[message.queryStatusV3Thumbnail] : message.queryStatusV3Thumbnail;
                if (options.oneofs)
                    object._queryStatusV3Thumbnail = "queryStatusV3Thumbnail";
            }
            if (message.liveLocations != null && message.hasOwnProperty("liveLocations")) {
                object.liveLocations = options.enums === String ? $root.Web.WebFeatures.Flag[message.liveLocations] === undefined ? message.liveLocations : $root.Web.WebFeatures.Flag[message.liveLocations] : message.liveLocations;
                if (options.oneofs)
                    object._liveLocations = "liveLocations";
            }
            if (message.queryVname != null && message.hasOwnProperty("queryVname")) {
                object.queryVname = options.enums === String ? $root.Web.WebFeatures.Flag[message.queryVname] === undefined ? message.queryVname : $root.Web.WebFeatures.Flag[message.queryVname] : message.queryVname;
                if (options.oneofs)
                    object._queryVname = "queryVname";
            }
            if (message.voipIndividualIncoming != null && message.hasOwnProperty("voipIndividualIncoming")) {
                object.voipIndividualIncoming = options.enums === String ? $root.Web.WebFeatures.Flag[message.voipIndividualIncoming] === undefined ? message.voipIndividualIncoming : $root.Web.WebFeatures.Flag[message.voipIndividualIncoming] : message.voipIndividualIncoming;
                if (options.oneofs)
                    object._voipIndividualIncoming = "voipIndividualIncoming";
            }
            if (message.quickRepliesQuery != null && message.hasOwnProperty("quickRepliesQuery")) {
                object.quickRepliesQuery = options.enums === String ? $root.Web.WebFeatures.Flag[message.quickRepliesQuery] === undefined ? message.quickRepliesQuery : $root.Web.WebFeatures.Flag[message.quickRepliesQuery] : message.quickRepliesQuery;
                if (options.oneofs)
                    object._quickRepliesQuery = "quickRepliesQuery";
            }
            if (message.payments != null && message.hasOwnProperty("payments")) {
                object.payments = options.enums === String ? $root.Web.WebFeatures.Flag[message.payments] === undefined ? message.payments : $root.Web.WebFeatures.Flag[message.payments] : message.payments;
                if (options.oneofs)
                    object._payments = "payments";
            }
            if (message.stickerPackQuery != null && message.hasOwnProperty("stickerPackQuery")) {
                object.stickerPackQuery = options.enums === String ? $root.Web.WebFeatures.Flag[message.stickerPackQuery] === undefined ? message.stickerPackQuery : $root.Web.WebFeatures.Flag[message.stickerPackQuery] : message.stickerPackQuery;
                if (options.oneofs)
                    object._stickerPackQuery = "stickerPackQuery";
            }
            if (message.liveLocationsFinal != null && message.hasOwnProperty("liveLocationsFinal")) {
                object.liveLocationsFinal = options.enums === String ? $root.Web.WebFeatures.Flag[message.liveLocationsFinal] === undefined ? message.liveLocationsFinal : $root.Web.WebFeatures.Flag[message.liveLocationsFinal] : message.liveLocationsFinal;
                if (options.oneofs)
                    object._liveLocationsFinal = "liveLocationsFinal";
            }
            if (message.labelsEdit != null && message.hasOwnProperty("labelsEdit")) {
                object.labelsEdit = options.enums === String ? $root.Web.WebFeatures.Flag[message.labelsEdit] === undefined ? message.labelsEdit : $root.Web.WebFeatures.Flag[message.labelsEdit] : message.labelsEdit;
                if (options.oneofs)
                    object._labelsEdit = "labelsEdit";
            }
            if (message.mediaUpload != null && message.hasOwnProperty("mediaUpload")) {
                object.mediaUpload = options.enums === String ? $root.Web.WebFeatures.Flag[message.mediaUpload] === undefined ? message.mediaUpload : $root.Web.WebFeatures.Flag[message.mediaUpload] : message.mediaUpload;
                if (options.oneofs)
                    object._mediaUpload = "mediaUpload";
            }
            if (message.mediaUploadRichQuickReplies != null && message.hasOwnProperty("mediaUploadRichQuickReplies")) {
                object.mediaUploadRichQuickReplies = options.enums === String ? $root.Web.WebFeatures.Flag[message.mediaUploadRichQuickReplies] === undefined ? message.mediaUploadRichQuickReplies : $root.Web.WebFeatures.Flag[message.mediaUploadRichQuickReplies] : message.mediaUploadRichQuickReplies;
                if (options.oneofs)
                    object._mediaUploadRichQuickReplies = "mediaUploadRichQuickReplies";
            }
            if (message.vnameV2 != null && message.hasOwnProperty("vnameV2")) {
                object.vnameV2 = options.enums === String ? $root.Web.WebFeatures.Flag[message.vnameV2] === undefined ? message.vnameV2 : $root.Web.WebFeatures.Flag[message.vnameV2] : message.vnameV2;
                if (options.oneofs)
                    object._vnameV2 = "vnameV2";
            }
            if (message.videoPlaybackUrl != null && message.hasOwnProperty("videoPlaybackUrl")) {
                object.videoPlaybackUrl = options.enums === String ? $root.Web.WebFeatures.Flag[message.videoPlaybackUrl] === undefined ? message.videoPlaybackUrl : $root.Web.WebFeatures.Flag[message.videoPlaybackUrl] : message.videoPlaybackUrl;
                if (options.oneofs)
                    object._videoPlaybackUrl = "videoPlaybackUrl";
            }
            if (message.statusRanking != null && message.hasOwnProperty("statusRanking")) {
                object.statusRanking = options.enums === String ? $root.Web.WebFeatures.Flag[message.statusRanking] === undefined ? message.statusRanking : $root.Web.WebFeatures.Flag[message.statusRanking] : message.statusRanking;
                if (options.oneofs)
                    object._statusRanking = "statusRanking";
            }
            if (message.voipIndividualVideo != null && message.hasOwnProperty("voipIndividualVideo")) {
                object.voipIndividualVideo = options.enums === String ? $root.Web.WebFeatures.Flag[message.voipIndividualVideo] === undefined ? message.voipIndividualVideo : $root.Web.WebFeatures.Flag[message.voipIndividualVideo] : message.voipIndividualVideo;
                if (options.oneofs)
                    object._voipIndividualVideo = "voipIndividualVideo";
            }
            if (message.thirdPartyStickers != null && message.hasOwnProperty("thirdPartyStickers")) {
                object.thirdPartyStickers = options.enums === String ? $root.Web.WebFeatures.Flag[message.thirdPartyStickers] === undefined ? message.thirdPartyStickers : $root.Web.WebFeatures.Flag[message.thirdPartyStickers] : message.thirdPartyStickers;
                if (options.oneofs)
                    object._thirdPartyStickers = "thirdPartyStickers";
            }
            if (message.frequentlyForwardedSetting != null && message.hasOwnProperty("frequentlyForwardedSetting")) {
                object.frequentlyForwardedSetting = options.enums === String ? $root.Web.WebFeatures.Flag[message.frequentlyForwardedSetting] === undefined ? message.frequentlyForwardedSetting : $root.Web.WebFeatures.Flag[message.frequentlyForwardedSetting] : message.frequentlyForwardedSetting;
                if (options.oneofs)
                    object._frequentlyForwardedSetting = "frequentlyForwardedSetting";
            }
            if (message.groupsV4JoinPermission != null && message.hasOwnProperty("groupsV4JoinPermission")) {
                object.groupsV4JoinPermission = options.enums === String ? $root.Web.WebFeatures.Flag[message.groupsV4JoinPermission] === undefined ? message.groupsV4JoinPermission : $root.Web.WebFeatures.Flag[message.groupsV4JoinPermission] : message.groupsV4JoinPermission;
                if (options.oneofs)
                    object._groupsV4JoinPermission = "groupsV4JoinPermission";
            }
            if (message.recentStickers != null && message.hasOwnProperty("recentStickers")) {
                object.recentStickers = options.enums === String ? $root.Web.WebFeatures.Flag[message.recentStickers] === undefined ? message.recentStickers : $root.Web.WebFeatures.Flag[message.recentStickers] : message.recentStickers;
                if (options.oneofs)
                    object._recentStickers = "recentStickers";
            }
            if (message.catalog != null && message.hasOwnProperty("catalog")) {
                object.catalog = options.enums === String ? $root.Web.WebFeatures.Flag[message.catalog] === undefined ? message.catalog : $root.Web.WebFeatures.Flag[message.catalog] : message.catalog;
                if (options.oneofs)
                    object._catalog = "catalog";
            }
            if (message.starredStickers != null && message.hasOwnProperty("starredStickers")) {
                object.starredStickers = options.enums === String ? $root.Web.WebFeatures.Flag[message.starredStickers] === undefined ? message.starredStickers : $root.Web.WebFeatures.Flag[message.starredStickers] : message.starredStickers;
                if (options.oneofs)
                    object._starredStickers = "starredStickers";
            }
            if (message.voipGroupCall != null && message.hasOwnProperty("voipGroupCall")) {
                object.voipGroupCall = options.enums === String ? $root.Web.WebFeatures.Flag[message.voipGroupCall] === undefined ? message.voipGroupCall : $root.Web.WebFeatures.Flag[message.voipGroupCall] : message.voipGroupCall;
                if (options.oneofs)
                    object._voipGroupCall = "voipGroupCall";
            }
            if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) {
                object.templateMessage = options.enums === String ? $root.Web.WebFeatures.Flag[message.templateMessage] === undefined ? message.templateMessage : $root.Web.WebFeatures.Flag[message.templateMessage] : message.templateMessage;
                if (options.oneofs)
                    object._templateMessage = "templateMessage";
            }
            if (message.templateMessageInteractivity != null && message.hasOwnProperty("templateMessageInteractivity")) {
                object.templateMessageInteractivity = options.enums === String ? $root.Web.WebFeatures.Flag[message.templateMessageInteractivity] === undefined ? message.templateMessageInteractivity : $root.Web.WebFeatures.Flag[message.templateMessageInteractivity] : message.templateMessageInteractivity;
                if (options.oneofs)
                    object._templateMessageInteractivity = "templateMessageInteractivity";
            }
            if (message.ephemeralMessages != null && message.hasOwnProperty("ephemeralMessages")) {
                object.ephemeralMessages = options.enums === String ? $root.Web.WebFeatures.Flag[message.ephemeralMessages] === undefined ? message.ephemeralMessages : $root.Web.WebFeatures.Flag[message.ephemeralMessages] : message.ephemeralMessages;
                if (options.oneofs)
                    object._ephemeralMessages = "ephemeralMessages";
            }
            if (message.e2ENotificationSync != null && message.hasOwnProperty("e2ENotificationSync")) {
                object.e2ENotificationSync = options.enums === String ? $root.Web.WebFeatures.Flag[message.e2ENotificationSync] === undefined ? message.e2ENotificationSync : $root.Web.WebFeatures.Flag[message.e2ENotificationSync] : message.e2ENotificationSync;
                if (options.oneofs)
                    object._e2ENotificationSync = "e2ENotificationSync";
            }
            if (message.recentStickersV2 != null && message.hasOwnProperty("recentStickersV2")) {
                object.recentStickersV2 = options.enums === String ? $root.Web.WebFeatures.Flag[message.recentStickersV2] === undefined ? message.recentStickersV2 : $root.Web.WebFeatures.Flag[message.recentStickersV2] : message.recentStickersV2;
                if (options.oneofs)
                    object._recentStickersV2 = "recentStickersV2";
            }
            if (message.recentStickersV3 != null && message.hasOwnProperty("recentStickersV3")) {
                object.recentStickersV3 = options.enums === String ? $root.Web.WebFeatures.Flag[message.recentStickersV3] === undefined ? message.recentStickersV3 : $root.Web.WebFeatures.Flag[message.recentStickersV3] : message.recentStickersV3;
                if (options.oneofs)
                    object._recentStickersV3 = "recentStickersV3";
            }
            if (message.userNotice != null && message.hasOwnProperty("userNotice")) {
                object.userNotice = options.enums === String ? $root.Web.WebFeatures.Flag[message.userNotice] === undefined ? message.userNotice : $root.Web.WebFeatures.Flag[message.userNotice] : message.userNotice;
                if (options.oneofs)
                    object._userNotice = "userNotice";
            }
            if (message.support != null && message.hasOwnProperty("support")) {
                object.support = options.enums === String ? $root.Web.WebFeatures.Flag[message.support] === undefined ? message.support : $root.Web.WebFeatures.Flag[message.support] : message.support;
                if (options.oneofs)
                    object._support = "support";
            }
            if (message.groupUiiCleanup != null && message.hasOwnProperty("groupUiiCleanup")) {
                object.groupUiiCleanup = options.enums === String ? $root.Web.WebFeatures.Flag[message.groupUiiCleanup] === undefined ? message.groupUiiCleanup : $root.Web.WebFeatures.Flag[message.groupUiiCleanup] : message.groupUiiCleanup;
                if (options.oneofs)
                    object._groupUiiCleanup = "groupUiiCleanup";
            }
            if (message.groupDogfoodingInternalOnly != null && message.hasOwnProperty("groupDogfoodingInternalOnly")) {
                object.groupDogfoodingInternalOnly = options.enums === String ? $root.Web.WebFeatures.Flag[message.groupDogfoodingInternalOnly] === undefined ? message.groupDogfoodingInternalOnly : $root.Web.WebFeatures.Flag[message.groupDogfoodingInternalOnly] : message.groupDogfoodingInternalOnly;
                if (options.oneofs)
                    object._groupDogfoodingInternalOnly = "groupDogfoodingInternalOnly";
            }
            if (message.settingsSync != null && message.hasOwnProperty("settingsSync")) {
                object.settingsSync = options.enums === String ? $root.Web.WebFeatures.Flag[message.settingsSync] === undefined ? message.settingsSync : $root.Web.WebFeatures.Flag[message.settingsSync] : message.settingsSync;
                if (options.oneofs)
                    object._settingsSync = "settingsSync";
            }
            if (message.archiveV2 != null && message.hasOwnProperty("archiveV2")) {
                object.archiveV2 = options.enums === String ? $root.Web.WebFeatures.Flag[message.archiveV2] === undefined ? message.archiveV2 : $root.Web.WebFeatures.Flag[message.archiveV2] : message.archiveV2;
                if (options.oneofs)
                    object._archiveV2 = "archiveV2";
            }
            if (message.ephemeralAllowGroupMembers != null && message.hasOwnProperty("ephemeralAllowGroupMembers")) {
                object.ephemeralAllowGroupMembers = options.enums === String ? $root.Web.WebFeatures.Flag[message.ephemeralAllowGroupMembers] === undefined ? message.ephemeralAllowGroupMembers : $root.Web.WebFeatures.Flag[message.ephemeralAllowGroupMembers] : message.ephemeralAllowGroupMembers;
                if (options.oneofs)
                    object._ephemeralAllowGroupMembers = "ephemeralAllowGroupMembers";
            }
            if (message.ephemeral24HDuration != null && message.hasOwnProperty("ephemeral24HDuration")) {
                object.ephemeral24HDuration = options.enums === String ? $root.Web.WebFeatures.Flag[message.ephemeral24HDuration] === undefined ? message.ephemeral24HDuration : $root.Web.WebFeatures.Flag[message.ephemeral24HDuration] : message.ephemeral24HDuration;
                if (options.oneofs)
                    object._ephemeral24HDuration = "ephemeral24HDuration";
            }
            if (message.mdForceUpgrade != null && message.hasOwnProperty("mdForceUpgrade")) {
                object.mdForceUpgrade = options.enums === String ? $root.Web.WebFeatures.Flag[message.mdForceUpgrade] === undefined ? message.mdForceUpgrade : $root.Web.WebFeatures.Flag[message.mdForceUpgrade] : message.mdForceUpgrade;
                if (options.oneofs)
                    object._mdForceUpgrade = "mdForceUpgrade";
            }
            if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) {
                object.disappearingMode = options.enums === String ? $root.Web.WebFeatures.Flag[message.disappearingMode] === undefined ? message.disappearingMode : $root.Web.WebFeatures.Flag[message.disappearingMode] : message.disappearingMode;
                if (options.oneofs)
                    object._disappearingMode = "disappearingMode";
            }
            if (message.externalMdOptInAvailable != null && message.hasOwnProperty("externalMdOptInAvailable")) {
                object.externalMdOptInAvailable = options.enums === String ? $root.Web.WebFeatures.Flag[message.externalMdOptInAvailable] === undefined ? message.externalMdOptInAvailable : $root.Web.WebFeatures.Flag[message.externalMdOptInAvailable] : message.externalMdOptInAvailable;
                if (options.oneofs)
                    object._externalMdOptInAvailable = "externalMdOptInAvailable";
            }
            if (message.noDeleteMessageTimeLimit != null && message.hasOwnProperty("noDeleteMessageTimeLimit")) {
                object.noDeleteMessageTimeLimit = options.enums === String ? $root.Web.WebFeatures.Flag[message.noDeleteMessageTimeLimit] === undefined ? message.noDeleteMessageTimeLimit : $root.Web.WebFeatures.Flag[message.noDeleteMessageTimeLimit] : message.noDeleteMessageTimeLimit;
                if (options.oneofs)
                    object._noDeleteMessageTimeLimit = "noDeleteMessageTimeLimit";
            }
            return object;
        };

        /**
         * Converts this WebFeatures to JSON.
         * @function toJSON
         * @memberof Web.WebFeatures
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        WebFeatures.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for WebFeatures
         * @function getTypeUrl
         * @memberof Web.WebFeatures
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        WebFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.WebFeatures";
        };

        /**
         * Flag enum.
         * @name Web.WebFeatures.Flag
         * @enum {number}
         * @property {number} NOT_STARTED=0 NOT_STARTED value
         * @property {number} FORCE_UPGRADE=1 FORCE_UPGRADE value
         * @property {number} DEVELOPMENT=2 DEVELOPMENT value
         * @property {number} PRODUCTION=3 PRODUCTION value
         */
        WebFeatures.Flag = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "NOT_STARTED"] = 0;
            values[valuesById[1] = "FORCE_UPGRADE"] = 1;
            values[valuesById[2] = "DEVELOPMENT"] = 2;
            values[valuesById[3] = "PRODUCTION"] = 3;
            return values;
        })();

        return WebFeatures;
    })();

    Web.NotificationMessageInfo = (function() {

        /**
         * Properties of a NotificationMessageInfo.
         * @memberof Web
         * @interface INotificationMessageInfo
         * @property {Protocol.IMessageKey|null} [key] NotificationMessageInfo key
         * @property {E2E.IMessage|null} [message] NotificationMessageInfo message
         * @property {number|Long|null} [messageTimestamp] NotificationMessageInfo messageTimestamp
         * @property {string|null} [participant] NotificationMessageInfo participant
         */

        /**
         * Constructs a new NotificationMessageInfo.
         * @memberof Web
         * @classdesc Represents a NotificationMessageInfo.
         * @implements INotificationMessageInfo
         * @constructor
         * @param {Web.INotificationMessageInfo=} [properties] Properties to set
         */
        function NotificationMessageInfo(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]];
        }

        /**
         * NotificationMessageInfo key.
         * @member {Protocol.IMessageKey|null|undefined} key
         * @memberof Web.NotificationMessageInfo
         * @instance
         */
        NotificationMessageInfo.prototype.key = null;

        /**
         * NotificationMessageInfo message.
         * @member {E2E.IMessage|null|undefined} message
         * @memberof Web.NotificationMessageInfo
         * @instance
         */
        NotificationMessageInfo.prototype.message = null;

        /**
         * NotificationMessageInfo messageTimestamp.
         * @member {number|Long|null|undefined} messageTimestamp
         * @memberof Web.NotificationMessageInfo
         * @instance
         */
        NotificationMessageInfo.prototype.messageTimestamp = null;

        /**
         * NotificationMessageInfo participant.
         * @member {string|null|undefined} participant
         * @memberof Web.NotificationMessageInfo
         * @instance
         */
        NotificationMessageInfo.prototype.participant = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * NotificationMessageInfo _key.
         * @member {"key"|undefined} _key
         * @memberof Web.NotificationMessageInfo
         * @instance
         */
        Object.defineProperty(NotificationMessageInfo.prototype, "_key", {
            get: $util.oneOfGetter($oneOfFields = ["key"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * NotificationMessageInfo _message.
         * @member {"message"|undefined} _message
         * @memberof Web.NotificationMessageInfo
         * @instance
         */
        Object.defineProperty(NotificationMessageInfo.prototype, "_message", {
            get: $util.oneOfGetter($oneOfFields = ["message"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * NotificationMessageInfo _messageTimestamp.
         * @member {"messageTimestamp"|undefined} _messageTimestamp
         * @memberof Web.NotificationMessageInfo
         * @instance
         */
        Object.defineProperty(NotificationMessageInfo.prototype, "_messageTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["messageTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * NotificationMessageInfo _participant.
         * @member {"participant"|undefined} _participant
         * @memberof Web.NotificationMessageInfo
         * @instance
         */
        Object.defineProperty(NotificationMessageInfo.prototype, "_participant", {
            get: $util.oneOfGetter($oneOfFields = ["participant"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new NotificationMessageInfo instance using the specified properties.
         * @function create
         * @memberof Web.NotificationMessageInfo
         * @static
         * @param {Web.INotificationMessageInfo=} [properties] Properties to set
         * @returns {Web.NotificationMessageInfo} NotificationMessageInfo instance
         */
        NotificationMessageInfo.create = function create(properties) {
            return new NotificationMessageInfo(properties);
        };

        /**
         * Encodes the specified NotificationMessageInfo message. Does not implicitly {@link Web.NotificationMessageInfo.verify|verify} messages.
         * @function encode
         * @memberof Web.NotificationMessageInfo
         * @static
         * @param {Web.INotificationMessageInfo} message NotificationMessageInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        NotificationMessageInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.key != null && Object.hasOwnProperty.call(message, "key"))
                $root.Protocol.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.message != null && Object.hasOwnProperty.call(message, "message"))
                $root.E2E.Message.encode(message.message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.messageTimestamp != null && Object.hasOwnProperty.call(message, "messageTimestamp"))
                writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.messageTimestamp);
            if (message.participant != null && Object.hasOwnProperty.call(message, "participant"))
                writer.uint32(/* id 4, wireType 2 =*/34).string(message.participant);
            return writer;
        };

        /**
         * Encodes the specified NotificationMessageInfo message, length delimited. Does not implicitly {@link Web.NotificationMessageInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.NotificationMessageInfo
         * @static
         * @param {Web.INotificationMessageInfo} message NotificationMessageInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        NotificationMessageInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a NotificationMessageInfo message from the specified reader or buffer.
         * @function decode
         * @memberof Web.NotificationMessageInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.NotificationMessageInfo} NotificationMessageInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        NotificationMessageInfo.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.Web.NotificationMessageInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.key = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.message = $root.E2E.Message.decode(reader, reader.uint32());
                        break;
                    }
                case 3: {
                        message.messageTimestamp = reader.uint64();
                        break;
                    }
                case 4: {
                        message.participant = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a NotificationMessageInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.NotificationMessageInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.NotificationMessageInfo} NotificationMessageInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        NotificationMessageInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a NotificationMessageInfo message.
         * @function verify
         * @memberof Web.NotificationMessageInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        NotificationMessageInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.key != null && message.hasOwnProperty("key")) {
                properties._key = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.key);
                    if (error)
                        return "key." + error;
                }
            }
            if (message.message != null && message.hasOwnProperty("message")) {
                properties._message = 1;
                {
                    var error = $root.E2E.Message.verify(message.message);
                    if (error)
                        return "message." + error;
                }
            }
            if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) {
                properties._messageTimestamp = 1;
                if (!$util.isInteger(message.messageTimestamp) && !(message.messageTimestamp && $util.isInteger(message.messageTimestamp.low) && $util.isInteger(message.messageTimestamp.high)))
                    return "messageTimestamp: integer|Long expected";
            }
            if (message.participant != null && message.hasOwnProperty("participant")) {
                properties._participant = 1;
                if (!$util.isString(message.participant))
                    return "participant: string expected";
            }
            return null;
        };

        /**
         * Creates a NotificationMessageInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.NotificationMessageInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.NotificationMessageInfo} NotificationMessageInfo
         */
        NotificationMessageInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.NotificationMessageInfo)
                return object;
            var message = new $root.Web.NotificationMessageInfo();
            if (object.key != null) {
                if (typeof object.key !== "object")
                    throw TypeError(".Web.NotificationMessageInfo.key: object expected");
                message.key = $root.Protocol.MessageKey.fromObject(object.key);
            }
            if (object.message != null) {
                if (typeof object.message !== "object")
                    throw TypeError(".Web.NotificationMessageInfo.message: object expected");
                message.message = $root.E2E.Message.fromObject(object.message);
            }
            if (object.messageTimestamp != null)
                if ($util.Long)
                    (message.messageTimestamp = $util.Long.fromValue(object.messageTimestamp)).unsigned = true;
                else if (typeof object.messageTimestamp === "string")
                    message.messageTimestamp = parseInt(object.messageTimestamp, 10);
                else if (typeof object.messageTimestamp === "number")
                    message.messageTimestamp = object.messageTimestamp;
                else if (typeof object.messageTimestamp === "object")
                    message.messageTimestamp = new $util.LongBits(object.messageTimestamp.low >>> 0, object.messageTimestamp.high >>> 0).toNumber(true);
            if (object.participant != null)
                message.participant = String(object.participant);
            return message;
        };

        /**
         * Creates a plain object from a NotificationMessageInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.NotificationMessageInfo
         * @static
         * @param {Web.NotificationMessageInfo} message NotificationMessageInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        NotificationMessageInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.key != null && message.hasOwnProperty("key")) {
                object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                if (options.oneofs)
                    object._key = "key";
            }
            if (message.message != null && message.hasOwnProperty("message")) {
                object.message = $root.E2E.Message.toObject(message.message, options);
                if (options.oneofs)
                    object._message = "message";
            }
            if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) {
                if (typeof message.messageTimestamp === "number")
                    object.messageTimestamp = options.longs === String ? String(message.messageTimestamp) : message.messageTimestamp;
                else
                    object.messageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.messageTimestamp) : options.longs === Number ? new $util.LongBits(message.messageTimestamp.low >>> 0, message.messageTimestamp.high >>> 0).toNumber(true) : message.messageTimestamp;
                if (options.oneofs)
                    object._messageTimestamp = "messageTimestamp";
            }
            if (message.participant != null && message.hasOwnProperty("participant")) {
                object.participant = message.participant;
                if (options.oneofs)
                    object._participant = "participant";
            }
            return object;
        };

        /**
         * Converts this NotificationMessageInfo to JSON.
         * @function toJSON
         * @memberof Web.NotificationMessageInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        NotificationMessageInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for NotificationMessageInfo
         * @function getTypeUrl
         * @memberof Web.NotificationMessageInfo
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        NotificationMessageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.NotificationMessageInfo";
        };

        return NotificationMessageInfo;
    })();

    Web.WebNotificationsInfo = (function() {

        /**
         * Properties of a WebNotificationsInfo.
         * @memberof Web
         * @interface IWebNotificationsInfo
         * @property {number|Long|null} [timestamp] WebNotificationsInfo timestamp
         * @property {number|null} [unreadChats] WebNotificationsInfo unreadChats
         * @property {number|null} [notifyMessageCount] WebNotificationsInfo notifyMessageCount
         * @property {Array.<Web.IWebMessageInfo>|null} [notifyMessages] WebNotificationsInfo notifyMessages
         */

        /**
         * Constructs a new WebNotificationsInfo.
         * @memberof Web
         * @classdesc Represents a WebNotificationsInfo.
         * @implements IWebNotificationsInfo
         * @constructor
         * @param {Web.IWebNotificationsInfo=} [properties] Properties to set
         */
        function WebNotificationsInfo(properties) {
            this.notifyMessages = [];
            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]];
        }

        /**
         * WebNotificationsInfo timestamp.
         * @member {number|Long|null|undefined} timestamp
         * @memberof Web.WebNotificationsInfo
         * @instance
         */
        WebNotificationsInfo.prototype.timestamp = null;

        /**
         * WebNotificationsInfo unreadChats.
         * @member {number|null|undefined} unreadChats
         * @memberof Web.WebNotificationsInfo
         * @instance
         */
        WebNotificationsInfo.prototype.unreadChats = null;

        /**
         * WebNotificationsInfo notifyMessageCount.
         * @member {number|null|undefined} notifyMessageCount
         * @memberof Web.WebNotificationsInfo
         * @instance
         */
        WebNotificationsInfo.prototype.notifyMessageCount = null;

        /**
         * WebNotificationsInfo notifyMessages.
         * @member {Array.<Web.IWebMessageInfo>} notifyMessages
         * @memberof Web.WebNotificationsInfo
         * @instance
         */
        WebNotificationsInfo.prototype.notifyMessages = $util.emptyArray;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * WebNotificationsInfo _timestamp.
         * @member {"timestamp"|undefined} _timestamp
         * @memberof Web.WebNotificationsInfo
         * @instance
         */
        Object.defineProperty(WebNotificationsInfo.prototype, "_timestamp", {
            get: $util.oneOfGetter($oneOfFields = ["timestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebNotificationsInfo _unreadChats.
         * @member {"unreadChats"|undefined} _unreadChats
         * @memberof Web.WebNotificationsInfo
         * @instance
         */
        Object.defineProperty(WebNotificationsInfo.prototype, "_unreadChats", {
            get: $util.oneOfGetter($oneOfFields = ["unreadChats"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebNotificationsInfo _notifyMessageCount.
         * @member {"notifyMessageCount"|undefined} _notifyMessageCount
         * @memberof Web.WebNotificationsInfo
         * @instance
         */
        Object.defineProperty(WebNotificationsInfo.prototype, "_notifyMessageCount", {
            get: $util.oneOfGetter($oneOfFields = ["notifyMessageCount"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new WebNotificationsInfo instance using the specified properties.
         * @function create
         * @memberof Web.WebNotificationsInfo
         * @static
         * @param {Web.IWebNotificationsInfo=} [properties] Properties to set
         * @returns {Web.WebNotificationsInfo} WebNotificationsInfo instance
         */
        WebNotificationsInfo.create = function create(properties) {
            return new WebNotificationsInfo(properties);
        };

        /**
         * Encodes the specified WebNotificationsInfo message. Does not implicitly {@link Web.WebNotificationsInfo.verify|verify} messages.
         * @function encode
         * @memberof Web.WebNotificationsInfo
         * @static
         * @param {Web.IWebNotificationsInfo} message WebNotificationsInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        WebNotificationsInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
                writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp);
            if (message.unreadChats != null && Object.hasOwnProperty.call(message, "unreadChats"))
                writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.unreadChats);
            if (message.notifyMessageCount != null && Object.hasOwnProperty.call(message, "notifyMessageCount"))
                writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.notifyMessageCount);
            if (message.notifyMessages != null && message.notifyMessages.length)
                for (var i = 0; i < message.notifyMessages.length; ++i)
                    $root.Web.WebMessageInfo.encode(message.notifyMessages[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified WebNotificationsInfo message, length delimited. Does not implicitly {@link Web.WebNotificationsInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.WebNotificationsInfo
         * @static
         * @param {Web.IWebNotificationsInfo} message WebNotificationsInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        WebNotificationsInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a WebNotificationsInfo message from the specified reader or buffer.
         * @function decode
         * @memberof Web.WebNotificationsInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.WebNotificationsInfo} WebNotificationsInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        WebNotificationsInfo.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.Web.WebNotificationsInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 2: {
                        message.timestamp = reader.uint64();
                        break;
                    }
                case 3: {
                        message.unreadChats = reader.uint32();
                        break;
                    }
                case 4: {
                        message.notifyMessageCount = reader.uint32();
                        break;
                    }
                case 5: {
                        if (!(message.notifyMessages && message.notifyMessages.length))
                            message.notifyMessages = [];
                        message.notifyMessages.push($root.Web.WebMessageInfo.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a WebNotificationsInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.WebNotificationsInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.WebNotificationsInfo} WebNotificationsInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        WebNotificationsInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a WebNotificationsInfo message.
         * @function verify
         * @memberof Web.WebNotificationsInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        WebNotificationsInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
                properties._timestamp = 1;
                if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
                    return "timestamp: integer|Long expected";
            }
            if (message.unreadChats != null && message.hasOwnProperty("unreadChats")) {
                properties._unreadChats = 1;
                if (!$util.isInteger(message.unreadChats))
                    return "unreadChats: integer expected";
            }
            if (message.notifyMessageCount != null && message.hasOwnProperty("notifyMessageCount")) {
                properties._notifyMessageCount = 1;
                if (!$util.isInteger(message.notifyMessageCount))
                    return "notifyMessageCount: integer expected";
            }
            if (message.notifyMessages != null && message.hasOwnProperty("notifyMessages")) {
                if (!Array.isArray(message.notifyMessages))
                    return "notifyMessages: array expected";
                for (var i = 0; i < message.notifyMessages.length; ++i) {
                    var error = $root.Web.WebMessageInfo.verify(message.notifyMessages[i]);
                    if (error)
                        return "notifyMessages." + error;
                }
            }
            return null;
        };

        /**
         * Creates a WebNotificationsInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.WebNotificationsInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.WebNotificationsInfo} WebNotificationsInfo
         */
        WebNotificationsInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.WebNotificationsInfo)
                return object;
            var message = new $root.Web.WebNotificationsInfo();
            if (object.timestamp != null)
                if ($util.Long)
                    (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
                else if (typeof object.timestamp === "string")
                    message.timestamp = parseInt(object.timestamp, 10);
                else if (typeof object.timestamp === "number")
                    message.timestamp = object.timestamp;
                else if (typeof object.timestamp === "object")
                    message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
            if (object.unreadChats != null)
                message.unreadChats = object.unreadChats >>> 0;
            if (object.notifyMessageCount != null)
                message.notifyMessageCount = object.notifyMessageCount >>> 0;
            if (object.notifyMessages) {
                if (!Array.isArray(object.notifyMessages))
                    throw TypeError(".Web.WebNotificationsInfo.notifyMessages: array expected");
                message.notifyMessages = [];
                for (var i = 0; i < object.notifyMessages.length; ++i) {
                    if (typeof object.notifyMessages[i] !== "object")
                        throw TypeError(".Web.WebNotificationsInfo.notifyMessages: object expected");
                    message.notifyMessages[i] = $root.Web.WebMessageInfo.fromObject(object.notifyMessages[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a WebNotificationsInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.WebNotificationsInfo
         * @static
         * @param {Web.WebNotificationsInfo} message WebNotificationsInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        WebNotificationsInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.notifyMessages = [];
            if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
                if (typeof message.timestamp === "number")
                    object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
                else
                    object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp;
                if (options.oneofs)
                    object._timestamp = "timestamp";
            }
            if (message.unreadChats != null && message.hasOwnProperty("unreadChats")) {
                object.unreadChats = message.unreadChats;
                if (options.oneofs)
                    object._unreadChats = "unreadChats";
            }
            if (message.notifyMessageCount != null && message.hasOwnProperty("notifyMessageCount")) {
                object.notifyMessageCount = message.notifyMessageCount;
                if (options.oneofs)
                    object._notifyMessageCount = "notifyMessageCount";
            }
            if (message.notifyMessages && message.notifyMessages.length) {
                object.notifyMessages = [];
                for (var j = 0; j < message.notifyMessages.length; ++j)
                    object.notifyMessages[j] = $root.Web.WebMessageInfo.toObject(message.notifyMessages[j], options);
            }
            return object;
        };

        /**
         * Converts this WebNotificationsInfo to JSON.
         * @function toJSON
         * @memberof Web.WebNotificationsInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        WebNotificationsInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for WebNotificationsInfo
         * @function getTypeUrl
         * @memberof Web.WebNotificationsInfo
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        WebNotificationsInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.WebNotificationsInfo";
        };

        return WebNotificationsInfo;
    })();

    Web.PaymentInfo = (function() {

        /**
         * Properties of a PaymentInfo.
         * @memberof Web
         * @interface IPaymentInfo
         * @property {Web.PaymentInfo.Currency|null} [currencyDeprecated] PaymentInfo currencyDeprecated
         * @property {number|Long|null} [amount1000] PaymentInfo amount1000
         * @property {string|null} [receiverJid] PaymentInfo receiverJid
         * @property {Web.PaymentInfo.Status|null} [status] PaymentInfo status
         * @property {number|Long|null} [transactionTimestamp] PaymentInfo transactionTimestamp
         * @property {Protocol.IMessageKey|null} [requestMessageKey] PaymentInfo requestMessageKey
         * @property {number|Long|null} [expiryTimestamp] PaymentInfo expiryTimestamp
         * @property {boolean|null} [futureproofed] PaymentInfo futureproofed
         * @property {string|null} [currency] PaymentInfo currency
         * @property {Web.PaymentInfo.TxnStatus|null} [txnStatus] PaymentInfo txnStatus
         * @property {boolean|null} [useNoviFiatFormat] PaymentInfo useNoviFiatFormat
         * @property {E2E.IMoney|null} [primaryAmount] PaymentInfo primaryAmount
         * @property {E2E.IMoney|null} [exchangeAmount] PaymentInfo exchangeAmount
         */

        /**
         * Constructs a new PaymentInfo.
         * @memberof Web
         * @classdesc Represents a PaymentInfo.
         * @implements IPaymentInfo
         * @constructor
         * @param {Web.IPaymentInfo=} [properties] Properties to set
         */
        function PaymentInfo(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]];
        }

        /**
         * PaymentInfo currencyDeprecated.
         * @member {Web.PaymentInfo.Currency|null|undefined} currencyDeprecated
         * @memberof Web.PaymentInfo
         * @instance
         */
        PaymentInfo.prototype.currencyDeprecated = null;

        /**
         * PaymentInfo amount1000.
         * @member {number|Long|null|undefined} amount1000
         * @memberof Web.PaymentInfo
         * @instance
         */
        PaymentInfo.prototype.amount1000 = null;

        /**
         * PaymentInfo receiverJid.
         * @member {string|null|undefined} receiverJid
         * @memberof Web.PaymentInfo
         * @instance
         */
        PaymentInfo.prototype.receiverJid = null;

        /**
         * PaymentInfo status.
         * @member {Web.PaymentInfo.Status|null|undefined} status
         * @memberof Web.PaymentInfo
         * @instance
         */
        PaymentInfo.prototype.status = null;

        /**
         * PaymentInfo transactionTimestamp.
         * @member {number|Long|null|undefined} transactionTimestamp
         * @memberof Web.PaymentInfo
         * @instance
         */
        PaymentInfo.prototype.transactionTimestamp = null;

        /**
         * PaymentInfo requestMessageKey.
         * @member {Protocol.IMessageKey|null|undefined} requestMessageKey
         * @memberof Web.PaymentInfo
         * @instance
         */
        PaymentInfo.prototype.requestMessageKey = null;

        /**
         * PaymentInfo expiryTimestamp.
         * @member {number|Long|null|undefined} expiryTimestamp
         * @memberof Web.PaymentInfo
         * @instance
         */
        PaymentInfo.prototype.expiryTimestamp = null;

        /**
         * PaymentInfo futureproofed.
         * @member {boolean|null|undefined} futureproofed
         * @memberof Web.PaymentInfo
         * @instance
         */
        PaymentInfo.prototype.futureproofed = null;

        /**
         * PaymentInfo currency.
         * @member {string|null|undefined} currency
         * @memberof Web.PaymentInfo
         * @instance
         */
        PaymentInfo.prototype.currency = null;

        /**
         * PaymentInfo txnStatus.
         * @member {Web.PaymentInfo.TxnStatus|null|undefined} txnStatus
         * @memberof Web.PaymentInfo
         * @instance
         */
        PaymentInfo.prototype.txnStatus = null;

        /**
         * PaymentInfo useNoviFiatFormat.
         * @member {boolean|null|undefined} useNoviFiatFormat
         * @memberof Web.PaymentInfo
         * @instance
         */
        PaymentInfo.prototype.useNoviFiatFormat = null;

        /**
         * PaymentInfo primaryAmount.
         * @member {E2E.IMoney|null|undefined} primaryAmount
         * @memberof Web.PaymentInfo
         * @instance
         */
        PaymentInfo.prototype.primaryAmount = null;

        /**
         * PaymentInfo exchangeAmount.
         * @member {E2E.IMoney|null|undefined} exchangeAmount
         * @memberof Web.PaymentInfo
         * @instance
         */
        PaymentInfo.prototype.exchangeAmount = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * PaymentInfo _currencyDeprecated.
         * @member {"currencyDeprecated"|undefined} _currencyDeprecated
         * @memberof Web.PaymentInfo
         * @instance
         */
        Object.defineProperty(PaymentInfo.prototype, "_currencyDeprecated", {
            get: $util.oneOfGetter($oneOfFields = ["currencyDeprecated"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentInfo _amount1000.
         * @member {"amount1000"|undefined} _amount1000
         * @memberof Web.PaymentInfo
         * @instance
         */
        Object.defineProperty(PaymentInfo.prototype, "_amount1000", {
            get: $util.oneOfGetter($oneOfFields = ["amount1000"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentInfo _receiverJid.
         * @member {"receiverJid"|undefined} _receiverJid
         * @memberof Web.PaymentInfo
         * @instance
         */
        Object.defineProperty(PaymentInfo.prototype, "_receiverJid", {
            get: $util.oneOfGetter($oneOfFields = ["receiverJid"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentInfo _status.
         * @member {"status"|undefined} _status
         * @memberof Web.PaymentInfo
         * @instance
         */
        Object.defineProperty(PaymentInfo.prototype, "_status", {
            get: $util.oneOfGetter($oneOfFields = ["status"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentInfo _transactionTimestamp.
         * @member {"transactionTimestamp"|undefined} _transactionTimestamp
         * @memberof Web.PaymentInfo
         * @instance
         */
        Object.defineProperty(PaymentInfo.prototype, "_transactionTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["transactionTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentInfo _requestMessageKey.
         * @member {"requestMessageKey"|undefined} _requestMessageKey
         * @memberof Web.PaymentInfo
         * @instance
         */
        Object.defineProperty(PaymentInfo.prototype, "_requestMessageKey", {
            get: $util.oneOfGetter($oneOfFields = ["requestMessageKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentInfo _expiryTimestamp.
         * @member {"expiryTimestamp"|undefined} _expiryTimestamp
         * @memberof Web.PaymentInfo
         * @instance
         */
        Object.defineProperty(PaymentInfo.prototype, "_expiryTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["expiryTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentInfo _futureproofed.
         * @member {"futureproofed"|undefined} _futureproofed
         * @memberof Web.PaymentInfo
         * @instance
         */
        Object.defineProperty(PaymentInfo.prototype, "_futureproofed", {
            get: $util.oneOfGetter($oneOfFields = ["futureproofed"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentInfo _currency.
         * @member {"currency"|undefined} _currency
         * @memberof Web.PaymentInfo
         * @instance
         */
        Object.defineProperty(PaymentInfo.prototype, "_currency", {
            get: $util.oneOfGetter($oneOfFields = ["currency"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentInfo _txnStatus.
         * @member {"txnStatus"|undefined} _txnStatus
         * @memberof Web.PaymentInfo
         * @instance
         */
        Object.defineProperty(PaymentInfo.prototype, "_txnStatus", {
            get: $util.oneOfGetter($oneOfFields = ["txnStatus"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentInfo _useNoviFiatFormat.
         * @member {"useNoviFiatFormat"|undefined} _useNoviFiatFormat
         * @memberof Web.PaymentInfo
         * @instance
         */
        Object.defineProperty(PaymentInfo.prototype, "_useNoviFiatFormat", {
            get: $util.oneOfGetter($oneOfFields = ["useNoviFiatFormat"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentInfo _primaryAmount.
         * @member {"primaryAmount"|undefined} _primaryAmount
         * @memberof Web.PaymentInfo
         * @instance
         */
        Object.defineProperty(PaymentInfo.prototype, "_primaryAmount", {
            get: $util.oneOfGetter($oneOfFields = ["primaryAmount"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentInfo _exchangeAmount.
         * @member {"exchangeAmount"|undefined} _exchangeAmount
         * @memberof Web.PaymentInfo
         * @instance
         */
        Object.defineProperty(PaymentInfo.prototype, "_exchangeAmount", {
            get: $util.oneOfGetter($oneOfFields = ["exchangeAmount"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new PaymentInfo instance using the specified properties.
         * @function create
         * @memberof Web.PaymentInfo
         * @static
         * @param {Web.IPaymentInfo=} [properties] Properties to set
         * @returns {Web.PaymentInfo} PaymentInfo instance
         */
        PaymentInfo.create = function create(properties) {
            return new PaymentInfo(properties);
        };

        /**
         * Encodes the specified PaymentInfo message. Does not implicitly {@link Web.PaymentInfo.verify|verify} messages.
         * @function encode
         * @memberof Web.PaymentInfo
         * @static
         * @param {Web.IPaymentInfo} message PaymentInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PaymentInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.currencyDeprecated != null && Object.hasOwnProperty.call(message, "currencyDeprecated"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.currencyDeprecated);
            if (message.amount1000 != null && Object.hasOwnProperty.call(message, "amount1000"))
                writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.amount1000);
            if (message.receiverJid != null && Object.hasOwnProperty.call(message, "receiverJid"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.receiverJid);
            if (message.status != null && Object.hasOwnProperty.call(message, "status"))
                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status);
            if (message.transactionTimestamp != null && Object.hasOwnProperty.call(message, "transactionTimestamp"))
                writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.transactionTimestamp);
            if (message.requestMessageKey != null && Object.hasOwnProperty.call(message, "requestMessageKey"))
                $root.Protocol.MessageKey.encode(message.requestMessageKey, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
            if (message.expiryTimestamp != null && Object.hasOwnProperty.call(message, "expiryTimestamp"))
                writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.expiryTimestamp);
            if (message.futureproofed != null && Object.hasOwnProperty.call(message, "futureproofed"))
                writer.uint32(/* id 8, wireType 0 =*/64).bool(message.futureproofed);
            if (message.currency != null && Object.hasOwnProperty.call(message, "currency"))
                writer.uint32(/* id 9, wireType 2 =*/74).string(message.currency);
            if (message.txnStatus != null && Object.hasOwnProperty.call(message, "txnStatus"))
                writer.uint32(/* id 10, wireType 0 =*/80).int32(message.txnStatus);
            if (message.useNoviFiatFormat != null && Object.hasOwnProperty.call(message, "useNoviFiatFormat"))
                writer.uint32(/* id 11, wireType 0 =*/88).bool(message.useNoviFiatFormat);
            if (message.primaryAmount != null && Object.hasOwnProperty.call(message, "primaryAmount"))
                $root.E2E.Money.encode(message.primaryAmount, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
            if (message.exchangeAmount != null && Object.hasOwnProperty.call(message, "exchangeAmount"))
                $root.E2E.Money.encode(message.exchangeAmount, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified PaymentInfo message, length delimited. Does not implicitly {@link Web.PaymentInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.PaymentInfo
         * @static
         * @param {Web.IPaymentInfo} message PaymentInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PaymentInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a PaymentInfo message from the specified reader or buffer.
         * @function decode
         * @memberof Web.PaymentInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.PaymentInfo} PaymentInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PaymentInfo.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.Web.PaymentInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.currencyDeprecated = reader.int32();
                        break;
                    }
                case 2: {
                        message.amount1000 = reader.uint64();
                        break;
                    }
                case 3: {
                        message.receiverJid = reader.string();
                        break;
                    }
                case 4: {
                        message.status = reader.int32();
                        break;
                    }
                case 5: {
                        message.transactionTimestamp = reader.uint64();
                        break;
                    }
                case 6: {
                        message.requestMessageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 7: {
                        message.expiryTimestamp = reader.uint64();
                        break;
                    }
                case 8: {
                        message.futureproofed = reader.bool();
                        break;
                    }
                case 9: {
                        message.currency = reader.string();
                        break;
                    }
                case 10: {
                        message.txnStatus = reader.int32();
                        break;
                    }
                case 11: {
                        message.useNoviFiatFormat = reader.bool();
                        break;
                    }
                case 12: {
                        message.primaryAmount = $root.E2E.Money.decode(reader, reader.uint32());
                        break;
                    }
                case 13: {
                        message.exchangeAmount = $root.E2E.Money.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a PaymentInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.PaymentInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.PaymentInfo} PaymentInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PaymentInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a PaymentInfo message.
         * @function verify
         * @memberof Web.PaymentInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        PaymentInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.currencyDeprecated != null && message.hasOwnProperty("currencyDeprecated")) {
                properties._currencyDeprecated = 1;
                switch (message.currencyDeprecated) {
                default:
                    return "currencyDeprecated: enum value expected";
                case 0:
                case 1:
                    break;
                }
            }
            if (message.amount1000 != null && message.hasOwnProperty("amount1000")) {
                properties._amount1000 = 1;
                if (!$util.isInteger(message.amount1000) && !(message.amount1000 && $util.isInteger(message.amount1000.low) && $util.isInteger(message.amount1000.high)))
                    return "amount1000: integer|Long expected";
            }
            if (message.receiverJid != null && message.hasOwnProperty("receiverJid")) {
                properties._receiverJid = 1;
                if (!$util.isString(message.receiverJid))
                    return "receiverJid: string expected";
            }
            if (message.status != null && message.hasOwnProperty("status")) {
                properties._status = 1;
                switch (message.status) {
                default:
                    return "status: 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:
                case 11:
                    break;
                }
            }
            if (message.transactionTimestamp != null && message.hasOwnProperty("transactionTimestamp")) {
                properties._transactionTimestamp = 1;
                if (!$util.isInteger(message.transactionTimestamp) && !(message.transactionTimestamp && $util.isInteger(message.transactionTimestamp.low) && $util.isInteger(message.transactionTimestamp.high)))
                    return "transactionTimestamp: integer|Long expected";
            }
            if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) {
                properties._requestMessageKey = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.requestMessageKey);
                    if (error)
                        return "requestMessageKey." + error;
                }
            }
            if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) {
                properties._expiryTimestamp = 1;
                if (!$util.isInteger(message.expiryTimestamp) && !(message.expiryTimestamp && $util.isInteger(message.expiryTimestamp.low) && $util.isInteger(message.expiryTimestamp.high)))
                    return "expiryTimestamp: integer|Long expected";
            }
            if (message.futureproofed != null && message.hasOwnProperty("futureproofed")) {
                properties._futureproofed = 1;
                if (typeof message.futureproofed !== "boolean")
                    return "futureproofed: boolean expected";
            }
            if (message.currency != null && message.hasOwnProperty("currency")) {
                properties._currency = 1;
                if (!$util.isString(message.currency))
                    return "currency: string expected";
            }
            if (message.txnStatus != null && message.hasOwnProperty("txnStatus")) {
                properties._txnStatus = 1;
                switch (message.txnStatus) {
                default:
                    return "txnStatus: 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:
                case 11:
                case 12:
                case 13:
                case 14:
                case 15:
                case 16:
                case 17:
                case 18:
                case 19:
                case 20:
                case 21:
                case 22:
                case 23:
                case 24:
                case 25:
                case 26:
                case 27:
                case 28:
                case 29:
                case 30:
                case 31:
                    break;
                }
            }
            if (message.useNoviFiatFormat != null && message.hasOwnProperty("useNoviFiatFormat")) {
                properties._useNoviFiatFormat = 1;
                if (typeof message.useNoviFiatFormat !== "boolean")
                    return "useNoviFiatFormat: boolean expected";
            }
            if (message.primaryAmount != null && message.hasOwnProperty("primaryAmount")) {
                properties._primaryAmount = 1;
                {
                    var error = $root.E2E.Money.verify(message.primaryAmount);
                    if (error)
                        return "primaryAmount." + error;
                }
            }
            if (message.exchangeAmount != null && message.hasOwnProperty("exchangeAmount")) {
                properties._exchangeAmount = 1;
                {
                    var error = $root.E2E.Money.verify(message.exchangeAmount);
                    if (error)
                        return "exchangeAmount." + error;
                }
            }
            return null;
        };

        /**
         * Creates a PaymentInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.PaymentInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.PaymentInfo} PaymentInfo
         */
        PaymentInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.PaymentInfo)
                return object;
            var message = new $root.Web.PaymentInfo();
            switch (object.currencyDeprecated) {
            default:
                if (typeof object.currencyDeprecated === "number") {
                    message.currencyDeprecated = object.currencyDeprecated;
                    break;
                }
                break;
            case "UNKNOWN_CURRENCY":
            case 0:
                message.currencyDeprecated = 0;
                break;
            case "INR":
            case 1:
                message.currencyDeprecated = 1;
                break;
            }
            if (object.amount1000 != null)
                if ($util.Long)
                    (message.amount1000 = $util.Long.fromValue(object.amount1000)).unsigned = true;
                else if (typeof object.amount1000 === "string")
                    message.amount1000 = parseInt(object.amount1000, 10);
                else if (typeof object.amount1000 === "number")
                    message.amount1000 = object.amount1000;
                else if (typeof object.amount1000 === "object")
                    message.amount1000 = new $util.LongBits(object.amount1000.low >>> 0, object.amount1000.high >>> 0).toNumber(true);
            if (object.receiverJid != null)
                message.receiverJid = String(object.receiverJid);
            switch (object.status) {
            default:
                if (typeof object.status === "number") {
                    message.status = object.status;
                    break;
                }
                break;
            case "UNKNOWN_STATUS":
            case 0:
                message.status = 0;
                break;
            case "PROCESSING":
            case 1:
                message.status = 1;
                break;
            case "SENT":
            case 2:
                message.status = 2;
                break;
            case "NEED_TO_ACCEPT":
            case 3:
                message.status = 3;
                break;
            case "COMPLETE":
            case 4:
                message.status = 4;
                break;
            case "COULD_NOT_COMPLETE":
            case 5:
                message.status = 5;
                break;
            case "REFUNDED":
            case 6:
                message.status = 6;
                break;
            case "EXPIRED":
            case 7:
                message.status = 7;
                break;
            case "REJECTED":
            case 8:
                message.status = 8;
                break;
            case "CANCELLED":
            case 9:
                message.status = 9;
                break;
            case "WAITING_FOR_PAYER":
            case 10:
                message.status = 10;
                break;
            case "WAITING":
            case 11:
                message.status = 11;
                break;
            }
            if (object.transactionTimestamp != null)
                if ($util.Long)
                    (message.transactionTimestamp = $util.Long.fromValue(object.transactionTimestamp)).unsigned = true;
                else if (typeof object.transactionTimestamp === "string")
                    message.transactionTimestamp = parseInt(object.transactionTimestamp, 10);
                else if (typeof object.transactionTimestamp === "number")
                    message.transactionTimestamp = object.transactionTimestamp;
                else if (typeof object.transactionTimestamp === "object")
                    message.transactionTimestamp = new $util.LongBits(object.transactionTimestamp.low >>> 0, object.transactionTimestamp.high >>> 0).toNumber(true);
            if (object.requestMessageKey != null) {
                if (typeof object.requestMessageKey !== "object")
                    throw TypeError(".Web.PaymentInfo.requestMessageKey: object expected");
                message.requestMessageKey = $root.Protocol.MessageKey.fromObject(object.requestMessageKey);
            }
            if (object.expiryTimestamp != null)
                if ($util.Long)
                    (message.expiryTimestamp = $util.Long.fromValue(object.expiryTimestamp)).unsigned = true;
                else if (typeof object.expiryTimestamp === "string")
                    message.expiryTimestamp = parseInt(object.expiryTimestamp, 10);
                else if (typeof object.expiryTimestamp === "number")
                    message.expiryTimestamp = object.expiryTimestamp;
                else if (typeof object.expiryTimestamp === "object")
                    message.expiryTimestamp = new $util.LongBits(object.expiryTimestamp.low >>> 0, object.expiryTimestamp.high >>> 0).toNumber(true);
            if (object.futureproofed != null)
                message.futureproofed = Boolean(object.futureproofed);
            if (object.currency != null)
                message.currency = String(object.currency);
            switch (object.txnStatus) {
            default:
                if (typeof object.txnStatus === "number") {
                    message.txnStatus = object.txnStatus;
                    break;
                }
                break;
            case "UNKNOWN":
            case 0:
                message.txnStatus = 0;
                break;
            case "PENDING_SETUP":
            case 1:
                message.txnStatus = 1;
                break;
            case "PENDING_RECEIVER_SETUP":
            case 2:
                message.txnStatus = 2;
                break;
            case "INIT":
            case 3:
                message.txnStatus = 3;
                break;
            case "SUCCESS":
            case 4:
                message.txnStatus = 4;
                break;
            case "COMPLETED":
            case 5:
                message.txnStatus = 5;
                break;
            case "FAILED":
            case 6:
                message.txnStatus = 6;
                break;
            case "FAILED_RISK":
            case 7:
                message.txnStatus = 7;
                break;
            case "FAILED_PROCESSING":
            case 8:
                message.txnStatus = 8;
                break;
            case "FAILED_RECEIVER_PROCESSING":
            case 9:
                message.txnStatus = 9;
                break;
            case "FAILED_DA":
            case 10:
                message.txnStatus = 10;
                break;
            case "FAILED_DA_FINAL":
            case 11:
                message.txnStatus = 11;
                break;
            case "REFUNDED_TXN":
            case 12:
                message.txnStatus = 12;
                break;
            case "REFUND_FAILED":
            case 13:
                message.txnStatus = 13;
                break;
            case "REFUND_FAILED_PROCESSING":
            case 14:
                message.txnStatus = 14;
                break;
            case "REFUND_FAILED_DA":
            case 15:
                message.txnStatus = 15;
                break;
            case "EXPIRED_TXN":
            case 16:
                message.txnStatus = 16;
                break;
            case "AUTH_CANCELED":
            case 17:
                message.txnStatus = 17;
                break;
            case "AUTH_CANCEL_FAILED_PROCESSING":
            case 18:
                message.txnStatus = 18;
                break;
            case "AUTH_CANCEL_FAILED":
            case 19:
                message.txnStatus = 19;
                break;
            case "COLLECT_INIT":
            case 20:
                message.txnStatus = 20;
                break;
            case "COLLECT_SUCCESS":
            case 21:
                message.txnStatus = 21;
                break;
            case "COLLECT_FAILED":
            case 22:
                message.txnStatus = 22;
                break;
            case "COLLECT_FAILED_RISK":
            case 23:
                message.txnStatus = 23;
                break;
            case "COLLECT_REJECTED":
            case 24:
                message.txnStatus = 24;
                break;
            case "COLLECT_EXPIRED":
            case 25:
                message.txnStatus = 25;
                break;
            case "COLLECT_CANCELED":
            case 26:
                message.txnStatus = 26;
                break;
            case "COLLECT_CANCELLING":
            case 27:
                message.txnStatus = 27;
                break;
            case "IN_REVIEW":
            case 28:
                message.txnStatus = 28;
                break;
            case "REVERSAL_SUCCESS":
            case 29:
                message.txnStatus = 29;
                break;
            case "REVERSAL_PENDING":
            case 30:
                message.txnStatus = 30;
                break;
            case "REFUND_PENDING":
            case 31:
                message.txnStatus = 31;
                break;
            }
            if (object.useNoviFiatFormat != null)
                message.useNoviFiatFormat = Boolean(object.useNoviFiatFormat);
            if (object.primaryAmount != null) {
                if (typeof object.primaryAmount !== "object")
                    throw TypeError(".Web.PaymentInfo.primaryAmount: object expected");
                message.primaryAmount = $root.E2E.Money.fromObject(object.primaryAmount);
            }
            if (object.exchangeAmount != null) {
                if (typeof object.exchangeAmount !== "object")
                    throw TypeError(".Web.PaymentInfo.exchangeAmount: object expected");
                message.exchangeAmount = $root.E2E.Money.fromObject(object.exchangeAmount);
            }
            return message;
        };

        /**
         * Creates a plain object from a PaymentInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.PaymentInfo
         * @static
         * @param {Web.PaymentInfo} message PaymentInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        PaymentInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.currencyDeprecated != null && message.hasOwnProperty("currencyDeprecated")) {
                object.currencyDeprecated = options.enums === String ? $root.Web.PaymentInfo.Currency[message.currencyDeprecated] === undefined ? message.currencyDeprecated : $root.Web.PaymentInfo.Currency[message.currencyDeprecated] : message.currencyDeprecated;
                if (options.oneofs)
                    object._currencyDeprecated = "currencyDeprecated";
            }
            if (message.amount1000 != null && message.hasOwnProperty("amount1000")) {
                if (typeof message.amount1000 === "number")
                    object.amount1000 = options.longs === String ? String(message.amount1000) : message.amount1000;
                else
                    object.amount1000 = options.longs === String ? $util.Long.prototype.toString.call(message.amount1000) : options.longs === Number ? new $util.LongBits(message.amount1000.low >>> 0, message.amount1000.high >>> 0).toNumber(true) : message.amount1000;
                if (options.oneofs)
                    object._amount1000 = "amount1000";
            }
            if (message.receiverJid != null && message.hasOwnProperty("receiverJid")) {
                object.receiverJid = message.receiverJid;
                if (options.oneofs)
                    object._receiverJid = "receiverJid";
            }
            if (message.status != null && message.hasOwnProperty("status")) {
                object.status = options.enums === String ? $root.Web.PaymentInfo.Status[message.status] === undefined ? message.status : $root.Web.PaymentInfo.Status[message.status] : message.status;
                if (options.oneofs)
                    object._status = "status";
            }
            if (message.transactionTimestamp != null && message.hasOwnProperty("transactionTimestamp")) {
                if (typeof message.transactionTimestamp === "number")
                    object.transactionTimestamp = options.longs === String ? String(message.transactionTimestamp) : message.transactionTimestamp;
                else
                    object.transactionTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.transactionTimestamp) : options.longs === Number ? new $util.LongBits(message.transactionTimestamp.low >>> 0, message.transactionTimestamp.high >>> 0).toNumber(true) : message.transactionTimestamp;
                if (options.oneofs)
                    object._transactionTimestamp = "transactionTimestamp";
            }
            if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) {
                object.requestMessageKey = $root.Protocol.MessageKey.toObject(message.requestMessageKey, options);
                if (options.oneofs)
                    object._requestMessageKey = "requestMessageKey";
            }
            if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) {
                if (typeof message.expiryTimestamp === "number")
                    object.expiryTimestamp = options.longs === String ? String(message.expiryTimestamp) : message.expiryTimestamp;
                else
                    object.expiryTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.expiryTimestamp) : options.longs === Number ? new $util.LongBits(message.expiryTimestamp.low >>> 0, message.expiryTimestamp.high >>> 0).toNumber(true) : message.expiryTimestamp;
                if (options.oneofs)
                    object._expiryTimestamp = "expiryTimestamp";
            }
            if (message.futureproofed != null && message.hasOwnProperty("futureproofed")) {
                object.futureproofed = message.futureproofed;
                if (options.oneofs)
                    object._futureproofed = "futureproofed";
            }
            if (message.currency != null && message.hasOwnProperty("currency")) {
                object.currency = message.currency;
                if (options.oneofs)
                    object._currency = "currency";
            }
            if (message.txnStatus != null && message.hasOwnProperty("txnStatus")) {
                object.txnStatus = options.enums === String ? $root.Web.PaymentInfo.TxnStatus[message.txnStatus] === undefined ? message.txnStatus : $root.Web.PaymentInfo.TxnStatus[message.txnStatus] : message.txnStatus;
                if (options.oneofs)
                    object._txnStatus = "txnStatus";
            }
            if (message.useNoviFiatFormat != null && message.hasOwnProperty("useNoviFiatFormat")) {
                object.useNoviFiatFormat = message.useNoviFiatFormat;
                if (options.oneofs)
                    object._useNoviFiatFormat = "useNoviFiatFormat";
            }
            if (message.primaryAmount != null && message.hasOwnProperty("primaryAmount")) {
                object.primaryAmount = $root.E2E.Money.toObject(message.primaryAmount, options);
                if (options.oneofs)
                    object._primaryAmount = "primaryAmount";
            }
            if (message.exchangeAmount != null && message.hasOwnProperty("exchangeAmount")) {
                object.exchangeAmount = $root.E2E.Money.toObject(message.exchangeAmount, options);
                if (options.oneofs)
                    object._exchangeAmount = "exchangeAmount";
            }
            return object;
        };

        /**
         * Converts this PaymentInfo to JSON.
         * @function toJSON
         * @memberof Web.PaymentInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        PaymentInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for PaymentInfo
         * @function getTypeUrl
         * @memberof Web.PaymentInfo
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        PaymentInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.PaymentInfo";
        };

        /**
         * Currency enum.
         * @name Web.PaymentInfo.Currency
         * @enum {number}
         * @property {number} UNKNOWN_CURRENCY=0 UNKNOWN_CURRENCY value
         * @property {number} INR=1 INR value
         */
        PaymentInfo.Currency = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN_CURRENCY"] = 0;
            values[valuesById[1] = "INR"] = 1;
            return values;
        })();

        /**
         * Status enum.
         * @name Web.PaymentInfo.Status
         * @enum {number}
         * @property {number} UNKNOWN_STATUS=0 UNKNOWN_STATUS value
         * @property {number} PROCESSING=1 PROCESSING value
         * @property {number} SENT=2 SENT value
         * @property {number} NEED_TO_ACCEPT=3 NEED_TO_ACCEPT value
         * @property {number} COMPLETE=4 COMPLETE value
         * @property {number} COULD_NOT_COMPLETE=5 COULD_NOT_COMPLETE value
         * @property {number} REFUNDED=6 REFUNDED value
         * @property {number} EXPIRED=7 EXPIRED value
         * @property {number} REJECTED=8 REJECTED value
         * @property {number} CANCELLED=9 CANCELLED value
         * @property {number} WAITING_FOR_PAYER=10 WAITING_FOR_PAYER value
         * @property {number} WAITING=11 WAITING value
         */
        PaymentInfo.Status = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN_STATUS"] = 0;
            values[valuesById[1] = "PROCESSING"] = 1;
            values[valuesById[2] = "SENT"] = 2;
            values[valuesById[3] = "NEED_TO_ACCEPT"] = 3;
            values[valuesById[4] = "COMPLETE"] = 4;
            values[valuesById[5] = "COULD_NOT_COMPLETE"] = 5;
            values[valuesById[6] = "REFUNDED"] = 6;
            values[valuesById[7] = "EXPIRED"] = 7;
            values[valuesById[8] = "REJECTED"] = 8;
            values[valuesById[9] = "CANCELLED"] = 9;
            values[valuesById[10] = "WAITING_FOR_PAYER"] = 10;
            values[valuesById[11] = "WAITING"] = 11;
            return values;
        })();

        /**
         * TxnStatus enum.
         * @name Web.PaymentInfo.TxnStatus
         * @enum {number}
         * @property {number} UNKNOWN=0 UNKNOWN value
         * @property {number} PENDING_SETUP=1 PENDING_SETUP value
         * @property {number} PENDING_RECEIVER_SETUP=2 PENDING_RECEIVER_SETUP value
         * @property {number} INIT=3 INIT value
         * @property {number} SUCCESS=4 SUCCESS value
         * @property {number} COMPLETED=5 COMPLETED value
         * @property {number} FAILED=6 FAILED value
         * @property {number} FAILED_RISK=7 FAILED_RISK value
         * @property {number} FAILED_PROCESSING=8 FAILED_PROCESSING value
         * @property {number} FAILED_RECEIVER_PROCESSING=9 FAILED_RECEIVER_PROCESSING value
         * @property {number} FAILED_DA=10 FAILED_DA value
         * @property {number} FAILED_DA_FINAL=11 FAILED_DA_FINAL value
         * @property {number} REFUNDED_TXN=12 REFUNDED_TXN value
         * @property {number} REFUND_FAILED=13 REFUND_FAILED value
         * @property {number} REFUND_FAILED_PROCESSING=14 REFUND_FAILED_PROCESSING value
         * @property {number} REFUND_FAILED_DA=15 REFUND_FAILED_DA value
         * @property {number} EXPIRED_TXN=16 EXPIRED_TXN value
         * @property {number} AUTH_CANCELED=17 AUTH_CANCELED value
         * @property {number} AUTH_CANCEL_FAILED_PROCESSING=18 AUTH_CANCEL_FAILED_PROCESSING value
         * @property {number} AUTH_CANCEL_FAILED=19 AUTH_CANCEL_FAILED value
         * @property {number} COLLECT_INIT=20 COLLECT_INIT value
         * @property {number} COLLECT_SUCCESS=21 COLLECT_SUCCESS value
         * @property {number} COLLECT_FAILED=22 COLLECT_FAILED value
         * @property {number} COLLECT_FAILED_RISK=23 COLLECT_FAILED_RISK value
         * @property {number} COLLECT_REJECTED=24 COLLECT_REJECTED value
         * @property {number} COLLECT_EXPIRED=25 COLLECT_EXPIRED value
         * @property {number} COLLECT_CANCELED=26 COLLECT_CANCELED value
         * @property {number} COLLECT_CANCELLING=27 COLLECT_CANCELLING value
         * @property {number} IN_REVIEW=28 IN_REVIEW value
         * @property {number} REVERSAL_SUCCESS=29 REVERSAL_SUCCESS value
         * @property {number} REVERSAL_PENDING=30 REVERSAL_PENDING value
         * @property {number} REFUND_PENDING=31 REFUND_PENDING value
         */
        PaymentInfo.TxnStatus = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "PENDING_SETUP"] = 1;
            values[valuesById[2] = "PENDING_RECEIVER_SETUP"] = 2;
            values[valuesById[3] = "INIT"] = 3;
            values[valuesById[4] = "SUCCESS"] = 4;
            values[valuesById[5] = "COMPLETED"] = 5;
            values[valuesById[6] = "FAILED"] = 6;
            values[valuesById[7] = "FAILED_RISK"] = 7;
            values[valuesById[8] = "FAILED_PROCESSING"] = 8;
            values[valuesById[9] = "FAILED_RECEIVER_PROCESSING"] = 9;
            values[valuesById[10] = "FAILED_DA"] = 10;
            values[valuesById[11] = "FAILED_DA_FINAL"] = 11;
            values[valuesById[12] = "REFUNDED_TXN"] = 12;
            values[valuesById[13] = "REFUND_FAILED"] = 13;
            values[valuesById[14] = "REFUND_FAILED_PROCESSING"] = 14;
            values[valuesById[15] = "REFUND_FAILED_DA"] = 15;
            values[valuesById[16] = "EXPIRED_TXN"] = 16;
            values[valuesById[17] = "AUTH_CANCELED"] = 17;
            values[valuesById[18] = "AUTH_CANCEL_FAILED_PROCESSING"] = 18;
            values[valuesById[19] = "AUTH_CANCEL_FAILED"] = 19;
            values[valuesById[20] = "COLLECT_INIT"] = 20;
            values[valuesById[21] = "COLLECT_SUCCESS"] = 21;
            values[valuesById[22] = "COLLECT_FAILED"] = 22;
            values[valuesById[23] = "COLLECT_FAILED_RISK"] = 23;
            values[valuesById[24] = "COLLECT_REJECTED"] = 24;
            values[valuesById[25] = "COLLECT_EXPIRED"] = 25;
            values[valuesById[26] = "COLLECT_CANCELED"] = 26;
            values[valuesById[27] = "COLLECT_CANCELLING"] = 27;
            values[valuesById[28] = "IN_REVIEW"] = 28;
            values[valuesById[29] = "REVERSAL_SUCCESS"] = 29;
            values[valuesById[30] = "REVERSAL_PENDING"] = 30;
            values[valuesById[31] = "REFUND_PENDING"] = 31;
            return values;
        })();

        return PaymentInfo;
    })();

    Web.CommentMetadata = (function() {

        /**
         * Properties of a CommentMetadata.
         * @memberof Web
         * @interface ICommentMetadata
         * @property {Protocol.IMessageKey|null} [commentParentKey] CommentMetadata commentParentKey
         * @property {number|null} [replyCount] CommentMetadata replyCount
         */

        /**
         * Constructs a new CommentMetadata.
         * @memberof Web
         * @classdesc Represents a CommentMetadata.
         * @implements ICommentMetadata
         * @constructor
         * @param {Web.ICommentMetadata=} [properties] Properties to set
         */
        function CommentMetadata(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]];
        }

        /**
         * CommentMetadata commentParentKey.
         * @member {Protocol.IMessageKey|null|undefined} commentParentKey
         * @memberof Web.CommentMetadata
         * @instance
         */
        CommentMetadata.prototype.commentParentKey = null;

        /**
         * CommentMetadata replyCount.
         * @member {number|null|undefined} replyCount
         * @memberof Web.CommentMetadata
         * @instance
         */
        CommentMetadata.prototype.replyCount = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * CommentMetadata _commentParentKey.
         * @member {"commentParentKey"|undefined} _commentParentKey
         * @memberof Web.CommentMetadata
         * @instance
         */
        Object.defineProperty(CommentMetadata.prototype, "_commentParentKey", {
            get: $util.oneOfGetter($oneOfFields = ["commentParentKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * CommentMetadata _replyCount.
         * @member {"replyCount"|undefined} _replyCount
         * @memberof Web.CommentMetadata
         * @instance
         */
        Object.defineProperty(CommentMetadata.prototype, "_replyCount", {
            get: $util.oneOfGetter($oneOfFields = ["replyCount"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new CommentMetadata instance using the specified properties.
         * @function create
         * @memberof Web.CommentMetadata
         * @static
         * @param {Web.ICommentMetadata=} [properties] Properties to set
         * @returns {Web.CommentMetadata} CommentMetadata instance
         */
        CommentMetadata.create = function create(properties) {
            return new CommentMetadata(properties);
        };

        /**
         * Encodes the specified CommentMetadata message. Does not implicitly {@link Web.CommentMetadata.verify|verify} messages.
         * @function encode
         * @memberof Web.CommentMetadata
         * @static
         * @param {Web.ICommentMetadata} message CommentMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CommentMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.commentParentKey != null && Object.hasOwnProperty.call(message, "commentParentKey"))
                $root.Protocol.MessageKey.encode(message.commentParentKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.replyCount != null && Object.hasOwnProperty.call(message, "replyCount"))
                writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.replyCount);
            return writer;
        };

        /**
         * Encodes the specified CommentMetadata message, length delimited. Does not implicitly {@link Web.CommentMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.CommentMetadata
         * @static
         * @param {Web.ICommentMetadata} message CommentMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CommentMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a CommentMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof Web.CommentMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.CommentMetadata} CommentMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CommentMetadata.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.Web.CommentMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.commentParentKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.replyCount = reader.uint32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a CommentMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.CommentMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.CommentMetadata} CommentMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CommentMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a CommentMetadata message.
         * @function verify
         * @memberof Web.CommentMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        CommentMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.commentParentKey != null && message.hasOwnProperty("commentParentKey")) {
                properties._commentParentKey = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.commentParentKey);
                    if (error)
                        return "commentParentKey." + error;
                }
            }
            if (message.replyCount != null && message.hasOwnProperty("replyCount")) {
                properties._replyCount = 1;
                if (!$util.isInteger(message.replyCount))
                    return "replyCount: integer expected";
            }
            return null;
        };

        /**
         * Creates a CommentMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.CommentMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.CommentMetadata} CommentMetadata
         */
        CommentMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.CommentMetadata)
                return object;
            var message = new $root.Web.CommentMetadata();
            if (object.commentParentKey != null) {
                if (typeof object.commentParentKey !== "object")
                    throw TypeError(".Web.CommentMetadata.commentParentKey: object expected");
                message.commentParentKey = $root.Protocol.MessageKey.fromObject(object.commentParentKey);
            }
            if (object.replyCount != null)
                message.replyCount = object.replyCount >>> 0;
            return message;
        };

        /**
         * Creates a plain object from a CommentMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.CommentMetadata
         * @static
         * @param {Web.CommentMetadata} message CommentMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        CommentMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.commentParentKey != null && message.hasOwnProperty("commentParentKey")) {
                object.commentParentKey = $root.Protocol.MessageKey.toObject(message.commentParentKey, options);
                if (options.oneofs)
                    object._commentParentKey = "commentParentKey";
            }
            if (message.replyCount != null && message.hasOwnProperty("replyCount")) {
                object.replyCount = message.replyCount;
                if (options.oneofs)
                    object._replyCount = "replyCount";
            }
            return object;
        };

        /**
         * Converts this CommentMetadata to JSON.
         * @function toJSON
         * @memberof Web.CommentMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        CommentMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for CommentMetadata
         * @function getTypeUrl
         * @memberof Web.CommentMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        CommentMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.CommentMetadata";
        };

        return CommentMetadata;
    })();

    Web.WebMessageInfo = (function() {

        /**
         * Properties of a WebMessageInfo.
         * @memberof Web
         * @interface IWebMessageInfo
         * @property {Protocol.IMessageKey|null} [key] WebMessageInfo key
         * @property {E2E.IMessage|null} [message] WebMessageInfo message
         * @property {number|Long|null} [messageTimestamp] WebMessageInfo messageTimestamp
         * @property {Web.WebMessageInfo.Status|null} [status] WebMessageInfo status
         * @property {string|null} [participant] WebMessageInfo participant
         * @property {number|Long|null} [messageC2STimestamp] WebMessageInfo messageC2STimestamp
         * @property {boolean|null} [ignore] WebMessageInfo ignore
         * @property {boolean|null} [starred] WebMessageInfo starred
         * @property {boolean|null} [broadcast] WebMessageInfo broadcast
         * @property {string|null} [pushName] WebMessageInfo pushName
         * @property {Uint8Array|null} [mediaCiphertextSha256] WebMessageInfo mediaCiphertextSha256
         * @property {boolean|null} [multicast] WebMessageInfo multicast
         * @property {boolean|null} [urlText] WebMessageInfo urlText
         * @property {boolean|null} [urlNumber] WebMessageInfo urlNumber
         * @property {Web.WebMessageInfo.StubType|null} [messageStubType] WebMessageInfo messageStubType
         * @property {boolean|null} [clearMedia] WebMessageInfo clearMedia
         * @property {Array.<string>|null} [messageStubParameters] WebMessageInfo messageStubParameters
         * @property {number|null} [duration] WebMessageInfo duration
         * @property {Array.<string>|null} [labels] WebMessageInfo labels
         * @property {Web.IPaymentInfo|null} [paymentInfo] WebMessageInfo paymentInfo
         * @property {E2E.Message.ILiveLocationMessage|null} [finalLiveLocation] WebMessageInfo finalLiveLocation
         * @property {Web.IPaymentInfo|null} [quotedPaymentInfo] WebMessageInfo quotedPaymentInfo
         * @property {number|Long|null} [ephemeralStartTimestamp] WebMessageInfo ephemeralStartTimestamp
         * @property {number|null} [ephemeralDuration] WebMessageInfo ephemeralDuration
         * @property {boolean|null} [ephemeralOffToOn] WebMessageInfo ephemeralOffToOn
         * @property {boolean|null} [ephemeralOutOfSync] WebMessageInfo ephemeralOutOfSync
         * @property {Web.WebMessageInfo.BizPrivacyStatus|null} [bizPrivacyStatus] WebMessageInfo bizPrivacyStatus
         * @property {string|null} [verifiedBizName] WebMessageInfo verifiedBizName
         * @property {E2E.PaymentBackground.IMediaData|null} [mediaData] WebMessageInfo mediaData
         * @property {Web.IPhotoChange|null} [photoChange] WebMessageInfo photoChange
         * @property {Array.<Web.IUserReceipt>|null} [userReceipt] WebMessageInfo userReceipt
         * @property {Array.<Web.IReaction>|null} [reactions] WebMessageInfo reactions
         * @property {E2E.PaymentBackground.IMediaData|null} [quotedStickerData] WebMessageInfo quotedStickerData
         * @property {Uint8Array|null} [futureproofData] WebMessageInfo futureproofData
         * @property {Web.IStatusPSA|null} [statusPsa] WebMessageInfo statusPsa
         * @property {Array.<Web.IPollUpdate>|null} [pollUpdates] WebMessageInfo pollUpdates
         * @property {Web.IPollAdditionalMetadata|null} [pollAdditionalMetadata] WebMessageInfo pollAdditionalMetadata
         * @property {string|null} [agentId] WebMessageInfo agentId
         * @property {boolean|null} [statusAlreadyViewed] WebMessageInfo statusAlreadyViewed
         * @property {Uint8Array|null} [messageSecret] WebMessageInfo messageSecret
         * @property {Web.IKeepInChat|null} [keepInChat] WebMessageInfo keepInChat
         * @property {string|null} [originalSelfAuthorUserJidString] WebMessageInfo originalSelfAuthorUserJidString
         * @property {number|Long|null} [revokeMessageTimestamp] WebMessageInfo revokeMessageTimestamp
         * @property {Web.IPinInChat|null} [pinInChat] WebMessageInfo pinInChat
         * @property {Web.IPremiumMessageInfo|null} [premiumMessageInfo] WebMessageInfo premiumMessageInfo
         * @property {boolean|null} [is1PBizBotMessage] WebMessageInfo is1PBizBotMessage
         * @property {boolean|null} [isGroupHistoryMessage] WebMessageInfo isGroupHistoryMessage
         * @property {string|null} [botMessageInvokerJid] WebMessageInfo botMessageInvokerJid
         * @property {Web.ICommentMetadata|null} [commentMetadata] WebMessageInfo commentMetadata
         * @property {Array.<Web.IEventResponse>|null} [eventResponses] WebMessageInfo eventResponses
         * @property {Web.IReportingTokenInfo|null} [reportingTokenInfo] WebMessageInfo reportingTokenInfo
         * @property {number|Long|null} [newsletterServerId] WebMessageInfo newsletterServerId
         * @property {Web.IEventAdditionalMetadata|null} [eventAdditionalMetadata] WebMessageInfo eventAdditionalMetadata
         * @property {boolean|null} [isMentionedInStatus] WebMessageInfo isMentionedInStatus
         * @property {Array.<string>|null} [statusMentions] WebMessageInfo statusMentions
         * @property {Protocol.IMessageKey|null} [targetMessageId] WebMessageInfo targetMessageId
         * @property {Array.<Web.IMessageAddOn>|null} [messageAddOns] WebMessageInfo messageAddOns
         * @property {Web.IStatusMentionMessage|null} [statusMentionMessageInfo] WebMessageInfo statusMentionMessageInfo
         * @property {boolean|null} [isSupportAiMessage] WebMessageInfo isSupportAiMessage
         * @property {Array.<string>|null} [statusMentionSources] WebMessageInfo statusMentionSources
         * @property {Array.<Web.ICitation>|null} [supportAiCitations] WebMessageInfo supportAiCitations
         * @property {string|null} [botTargetId] WebMessageInfo botTargetId
         * @property {Web.IGroupHistoryIndividualMessageInfo|null} [groupHistoryIndividualMessageInfo] WebMessageInfo groupHistoryIndividualMessageInfo
         * @property {Web.IGroupHistoryBundleInfo|null} [groupHistoryBundleInfo] WebMessageInfo groupHistoryBundleInfo
         * @property {Web.IInteractiveMessageAdditionalMetadata|null} [interactiveMessageAdditionalMetadata] WebMessageInfo interactiveMessageAdditionalMetadata
         * @property {Web.IQuarantinedMessage|null} [quarantinedMessage] WebMessageInfo quarantinedMessage
         */

        /**
         * Constructs a new WebMessageInfo.
         * @memberof Web
         * @classdesc Represents a WebMessageInfo.
         * @implements IWebMessageInfo
         * @constructor
         * @param {Web.IWebMessageInfo=} [properties] Properties to set
         */
        function WebMessageInfo(properties) {
            this.messageStubParameters = [];
            this.labels = [];
            this.userReceipt = [];
            this.reactions = [];
            this.pollUpdates = [];
            this.eventResponses = [];
            this.statusMentions = [];
            this.messageAddOns = [];
            this.statusMentionSources = [];
            this.supportAiCitations = [];
            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]];
        }

        /**
         * WebMessageInfo key.
         * @member {Protocol.IMessageKey|null|undefined} key
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.key = null;

        /**
         * WebMessageInfo message.
         * @member {E2E.IMessage|null|undefined} message
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.message = null;

        /**
         * WebMessageInfo messageTimestamp.
         * @member {number|Long|null|undefined} messageTimestamp
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.messageTimestamp = null;

        /**
         * WebMessageInfo status.
         * @member {Web.WebMessageInfo.Status|null|undefined} status
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.status = null;

        /**
         * WebMessageInfo participant.
         * @member {string|null|undefined} participant
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.participant = null;

        /**
         * WebMessageInfo messageC2STimestamp.
         * @member {number|Long|null|undefined} messageC2STimestamp
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.messageC2STimestamp = null;

        /**
         * WebMessageInfo ignore.
         * @member {boolean|null|undefined} ignore
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.ignore = null;

        /**
         * WebMessageInfo starred.
         * @member {boolean|null|undefined} starred
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.starred = null;

        /**
         * WebMessageInfo broadcast.
         * @member {boolean|null|undefined} broadcast
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.broadcast = null;

        /**
         * WebMessageInfo pushName.
         * @member {string|null|undefined} pushName
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.pushName = null;

        /**
         * WebMessageInfo mediaCiphertextSha256.
         * @member {Uint8Array|null|undefined} mediaCiphertextSha256
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.mediaCiphertextSha256 = null;

        /**
         * WebMessageInfo multicast.
         * @member {boolean|null|undefined} multicast
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.multicast = null;

        /**
         * WebMessageInfo urlText.
         * @member {boolean|null|undefined} urlText
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.urlText = null;

        /**
         * WebMessageInfo urlNumber.
         * @member {boolean|null|undefined} urlNumber
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.urlNumber = null;

        /**
         * WebMessageInfo messageStubType.
         * @member {Web.WebMessageInfo.StubType|null|undefined} messageStubType
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.messageStubType = null;

        /**
         * WebMessageInfo clearMedia.
         * @member {boolean|null|undefined} clearMedia
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.clearMedia = null;

        /**
         * WebMessageInfo messageStubParameters.
         * @member {Array.<string>} messageStubParameters
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.messageStubParameters = $util.emptyArray;

        /**
         * WebMessageInfo duration.
         * @member {number|null|undefined} duration
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.duration = null;

        /**
         * WebMessageInfo labels.
         * @member {Array.<string>} labels
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.labels = $util.emptyArray;

        /**
         * WebMessageInfo paymentInfo.
         * @member {Web.IPaymentInfo|null|undefined} paymentInfo
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.paymentInfo = null;

        /**
         * WebMessageInfo finalLiveLocation.
         * @member {E2E.Message.ILiveLocationMessage|null|undefined} finalLiveLocation
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.finalLiveLocation = null;

        /**
         * WebMessageInfo quotedPaymentInfo.
         * @member {Web.IPaymentInfo|null|undefined} quotedPaymentInfo
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.quotedPaymentInfo = null;

        /**
         * WebMessageInfo ephemeralStartTimestamp.
         * @member {number|Long|null|undefined} ephemeralStartTimestamp
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.ephemeralStartTimestamp = null;

        /**
         * WebMessageInfo ephemeralDuration.
         * @member {number|null|undefined} ephemeralDuration
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.ephemeralDuration = null;

        /**
         * WebMessageInfo ephemeralOffToOn.
         * @member {boolean|null|undefined} ephemeralOffToOn
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.ephemeralOffToOn = null;

        /**
         * WebMessageInfo ephemeralOutOfSync.
         * @member {boolean|null|undefined} ephemeralOutOfSync
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.ephemeralOutOfSync = null;

        /**
         * WebMessageInfo bizPrivacyStatus.
         * @member {Web.WebMessageInfo.BizPrivacyStatus|null|undefined} bizPrivacyStatus
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.bizPrivacyStatus = null;

        /**
         * WebMessageInfo verifiedBizName.
         * @member {string|null|undefined} verifiedBizName
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.verifiedBizName = null;

        /**
         * WebMessageInfo mediaData.
         * @member {E2E.PaymentBackground.IMediaData|null|undefined} mediaData
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.mediaData = null;

        /**
         * WebMessageInfo photoChange.
         * @member {Web.IPhotoChange|null|undefined} photoChange
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.photoChange = null;

        /**
         * WebMessageInfo userReceipt.
         * @member {Array.<Web.IUserReceipt>} userReceipt
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.userReceipt = $util.emptyArray;

        /**
         * WebMessageInfo reactions.
         * @member {Array.<Web.IReaction>} reactions
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.reactions = $util.emptyArray;

        /**
         * WebMessageInfo quotedStickerData.
         * @member {E2E.PaymentBackground.IMediaData|null|undefined} quotedStickerData
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.quotedStickerData = null;

        /**
         * WebMessageInfo futureproofData.
         * @member {Uint8Array|null|undefined} futureproofData
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.futureproofData = null;

        /**
         * WebMessageInfo statusPsa.
         * @member {Web.IStatusPSA|null|undefined} statusPsa
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.statusPsa = null;

        /**
         * WebMessageInfo pollUpdates.
         * @member {Array.<Web.IPollUpdate>} pollUpdates
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.pollUpdates = $util.emptyArray;

        /**
         * WebMessageInfo pollAdditionalMetadata.
         * @member {Web.IPollAdditionalMetadata|null|undefined} pollAdditionalMetadata
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.pollAdditionalMetadata = null;

        /**
         * WebMessageInfo agentId.
         * @member {string|null|undefined} agentId
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.agentId = null;

        /**
         * WebMessageInfo statusAlreadyViewed.
         * @member {boolean|null|undefined} statusAlreadyViewed
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.statusAlreadyViewed = null;

        /**
         * WebMessageInfo messageSecret.
         * @member {Uint8Array|null|undefined} messageSecret
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.messageSecret = null;

        /**
         * WebMessageInfo keepInChat.
         * @member {Web.IKeepInChat|null|undefined} keepInChat
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.keepInChat = null;

        /**
         * WebMessageInfo originalSelfAuthorUserJidString.
         * @member {string|null|undefined} originalSelfAuthorUserJidString
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.originalSelfAuthorUserJidString = null;

        /**
         * WebMessageInfo revokeMessageTimestamp.
         * @member {number|Long|null|undefined} revokeMessageTimestamp
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.revokeMessageTimestamp = null;

        /**
         * WebMessageInfo pinInChat.
         * @member {Web.IPinInChat|null|undefined} pinInChat
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.pinInChat = null;

        /**
         * WebMessageInfo premiumMessageInfo.
         * @member {Web.IPremiumMessageInfo|null|undefined} premiumMessageInfo
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.premiumMessageInfo = null;

        /**
         * WebMessageInfo is1PBizBotMessage.
         * @member {boolean|null|undefined} is1PBizBotMessage
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.is1PBizBotMessage = null;

        /**
         * WebMessageInfo isGroupHistoryMessage.
         * @member {boolean|null|undefined} isGroupHistoryMessage
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.isGroupHistoryMessage = null;

        /**
         * WebMessageInfo botMessageInvokerJid.
         * @member {string|null|undefined} botMessageInvokerJid
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.botMessageInvokerJid = null;

        /**
         * WebMessageInfo commentMetadata.
         * @member {Web.ICommentMetadata|null|undefined} commentMetadata
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.commentMetadata = null;

        /**
         * WebMessageInfo eventResponses.
         * @member {Array.<Web.IEventResponse>} eventResponses
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.eventResponses = $util.emptyArray;

        /**
         * WebMessageInfo reportingTokenInfo.
         * @member {Web.IReportingTokenInfo|null|undefined} reportingTokenInfo
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.reportingTokenInfo = null;

        /**
         * WebMessageInfo newsletterServerId.
         * @member {number|Long|null|undefined} newsletterServerId
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.newsletterServerId = null;

        /**
         * WebMessageInfo eventAdditionalMetadata.
         * @member {Web.IEventAdditionalMetadata|null|undefined} eventAdditionalMetadata
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.eventAdditionalMetadata = null;

        /**
         * WebMessageInfo isMentionedInStatus.
         * @member {boolean|null|undefined} isMentionedInStatus
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.isMentionedInStatus = null;

        /**
         * WebMessageInfo statusMentions.
         * @member {Array.<string>} statusMentions
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.statusMentions = $util.emptyArray;

        /**
         * WebMessageInfo targetMessageId.
         * @member {Protocol.IMessageKey|null|undefined} targetMessageId
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.targetMessageId = null;

        /**
         * WebMessageInfo messageAddOns.
         * @member {Array.<Web.IMessageAddOn>} messageAddOns
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.messageAddOns = $util.emptyArray;

        /**
         * WebMessageInfo statusMentionMessageInfo.
         * @member {Web.IStatusMentionMessage|null|undefined} statusMentionMessageInfo
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.statusMentionMessageInfo = null;

        /**
         * WebMessageInfo isSupportAiMessage.
         * @member {boolean|null|undefined} isSupportAiMessage
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.isSupportAiMessage = null;

        /**
         * WebMessageInfo statusMentionSources.
         * @member {Array.<string>} statusMentionSources
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.statusMentionSources = $util.emptyArray;

        /**
         * WebMessageInfo supportAiCitations.
         * @member {Array.<Web.ICitation>} supportAiCitations
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.supportAiCitations = $util.emptyArray;

        /**
         * WebMessageInfo botTargetId.
         * @member {string|null|undefined} botTargetId
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.botTargetId = null;

        /**
         * WebMessageInfo groupHistoryIndividualMessageInfo.
         * @member {Web.IGroupHistoryIndividualMessageInfo|null|undefined} groupHistoryIndividualMessageInfo
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.groupHistoryIndividualMessageInfo = null;

        /**
         * WebMessageInfo groupHistoryBundleInfo.
         * @member {Web.IGroupHistoryBundleInfo|null|undefined} groupHistoryBundleInfo
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.groupHistoryBundleInfo = null;

        /**
         * WebMessageInfo interactiveMessageAdditionalMetadata.
         * @member {Web.IInteractiveMessageAdditionalMetadata|null|undefined} interactiveMessageAdditionalMetadata
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.interactiveMessageAdditionalMetadata = null;

        /**
         * WebMessageInfo quarantinedMessage.
         * @member {Web.IQuarantinedMessage|null|undefined} quarantinedMessage
         * @memberof Web.WebMessageInfo
         * @instance
         */
        WebMessageInfo.prototype.quarantinedMessage = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * WebMessageInfo _key.
         * @member {"key"|undefined} _key
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_key", {
            get: $util.oneOfGetter($oneOfFields = ["key"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _message.
         * @member {"message"|undefined} _message
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_message", {
            get: $util.oneOfGetter($oneOfFields = ["message"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _messageTimestamp.
         * @member {"messageTimestamp"|undefined} _messageTimestamp
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_messageTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["messageTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _status.
         * @member {"status"|undefined} _status
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_status", {
            get: $util.oneOfGetter($oneOfFields = ["status"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _participant.
         * @member {"participant"|undefined} _participant
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_participant", {
            get: $util.oneOfGetter($oneOfFields = ["participant"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _messageC2STimestamp.
         * @member {"messageC2STimestamp"|undefined} _messageC2STimestamp
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_messageC2STimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["messageC2STimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _ignore.
         * @member {"ignore"|undefined} _ignore
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_ignore", {
            get: $util.oneOfGetter($oneOfFields = ["ignore"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _starred.
         * @member {"starred"|undefined} _starred
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_starred", {
            get: $util.oneOfGetter($oneOfFields = ["starred"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _broadcast.
         * @member {"broadcast"|undefined} _broadcast
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_broadcast", {
            get: $util.oneOfGetter($oneOfFields = ["broadcast"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _pushName.
         * @member {"pushName"|undefined} _pushName
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_pushName", {
            get: $util.oneOfGetter($oneOfFields = ["pushName"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _mediaCiphertextSha256.
         * @member {"mediaCiphertextSha256"|undefined} _mediaCiphertextSha256
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_mediaCiphertextSha256", {
            get: $util.oneOfGetter($oneOfFields = ["mediaCiphertextSha256"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _multicast.
         * @member {"multicast"|undefined} _multicast
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_multicast", {
            get: $util.oneOfGetter($oneOfFields = ["multicast"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _urlText.
         * @member {"urlText"|undefined} _urlText
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_urlText", {
            get: $util.oneOfGetter($oneOfFields = ["urlText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _urlNumber.
         * @member {"urlNumber"|undefined} _urlNumber
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_urlNumber", {
            get: $util.oneOfGetter($oneOfFields = ["urlNumber"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _messageStubType.
         * @member {"messageStubType"|undefined} _messageStubType
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_messageStubType", {
            get: $util.oneOfGetter($oneOfFields = ["messageStubType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _clearMedia.
         * @member {"clearMedia"|undefined} _clearMedia
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_clearMedia", {
            get: $util.oneOfGetter($oneOfFields = ["clearMedia"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _duration.
         * @member {"duration"|undefined} _duration
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_duration", {
            get: $util.oneOfGetter($oneOfFields = ["duration"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _paymentInfo.
         * @member {"paymentInfo"|undefined} _paymentInfo
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_paymentInfo", {
            get: $util.oneOfGetter($oneOfFields = ["paymentInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _finalLiveLocation.
         * @member {"finalLiveLocation"|undefined} _finalLiveLocation
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_finalLiveLocation", {
            get: $util.oneOfGetter($oneOfFields = ["finalLiveLocation"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _quotedPaymentInfo.
         * @member {"quotedPaymentInfo"|undefined} _quotedPaymentInfo
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_quotedPaymentInfo", {
            get: $util.oneOfGetter($oneOfFields = ["quotedPaymentInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _ephemeralStartTimestamp.
         * @member {"ephemeralStartTimestamp"|undefined} _ephemeralStartTimestamp
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_ephemeralStartTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["ephemeralStartTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _ephemeralDuration.
         * @member {"ephemeralDuration"|undefined} _ephemeralDuration
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_ephemeralDuration", {
            get: $util.oneOfGetter($oneOfFields = ["ephemeralDuration"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _ephemeralOffToOn.
         * @member {"ephemeralOffToOn"|undefined} _ephemeralOffToOn
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_ephemeralOffToOn", {
            get: $util.oneOfGetter($oneOfFields = ["ephemeralOffToOn"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _ephemeralOutOfSync.
         * @member {"ephemeralOutOfSync"|undefined} _ephemeralOutOfSync
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_ephemeralOutOfSync", {
            get: $util.oneOfGetter($oneOfFields = ["ephemeralOutOfSync"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _bizPrivacyStatus.
         * @member {"bizPrivacyStatus"|undefined} _bizPrivacyStatus
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_bizPrivacyStatus", {
            get: $util.oneOfGetter($oneOfFields = ["bizPrivacyStatus"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _verifiedBizName.
         * @member {"verifiedBizName"|undefined} _verifiedBizName
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_verifiedBizName", {
            get: $util.oneOfGetter($oneOfFields = ["verifiedBizName"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _mediaData.
         * @member {"mediaData"|undefined} _mediaData
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_mediaData", {
            get: $util.oneOfGetter($oneOfFields = ["mediaData"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _photoChange.
         * @member {"photoChange"|undefined} _photoChange
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_photoChange", {
            get: $util.oneOfGetter($oneOfFields = ["photoChange"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _quotedStickerData.
         * @member {"quotedStickerData"|undefined} _quotedStickerData
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_quotedStickerData", {
            get: $util.oneOfGetter($oneOfFields = ["quotedStickerData"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _futureproofData.
         * @member {"futureproofData"|undefined} _futureproofData
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_futureproofData", {
            get: $util.oneOfGetter($oneOfFields = ["futureproofData"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _statusPsa.
         * @member {"statusPsa"|undefined} _statusPsa
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_statusPsa", {
            get: $util.oneOfGetter($oneOfFields = ["statusPsa"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _pollAdditionalMetadata.
         * @member {"pollAdditionalMetadata"|undefined} _pollAdditionalMetadata
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_pollAdditionalMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["pollAdditionalMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _agentId.
         * @member {"agentId"|undefined} _agentId
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_agentId", {
            get: $util.oneOfGetter($oneOfFields = ["agentId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _statusAlreadyViewed.
         * @member {"statusAlreadyViewed"|undefined} _statusAlreadyViewed
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_statusAlreadyViewed", {
            get: $util.oneOfGetter($oneOfFields = ["statusAlreadyViewed"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _messageSecret.
         * @member {"messageSecret"|undefined} _messageSecret
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_messageSecret", {
            get: $util.oneOfGetter($oneOfFields = ["messageSecret"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _keepInChat.
         * @member {"keepInChat"|undefined} _keepInChat
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_keepInChat", {
            get: $util.oneOfGetter($oneOfFields = ["keepInChat"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _originalSelfAuthorUserJidString.
         * @member {"originalSelfAuthorUserJidString"|undefined} _originalSelfAuthorUserJidString
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_originalSelfAuthorUserJidString", {
            get: $util.oneOfGetter($oneOfFields = ["originalSelfAuthorUserJidString"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _revokeMessageTimestamp.
         * @member {"revokeMessageTimestamp"|undefined} _revokeMessageTimestamp
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_revokeMessageTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["revokeMessageTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _pinInChat.
         * @member {"pinInChat"|undefined} _pinInChat
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_pinInChat", {
            get: $util.oneOfGetter($oneOfFields = ["pinInChat"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _premiumMessageInfo.
         * @member {"premiumMessageInfo"|undefined} _premiumMessageInfo
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_premiumMessageInfo", {
            get: $util.oneOfGetter($oneOfFields = ["premiumMessageInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _is1PBizBotMessage.
         * @member {"is1PBizBotMessage"|undefined} _is1PBizBotMessage
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_is1PBizBotMessage", {
            get: $util.oneOfGetter($oneOfFields = ["is1PBizBotMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _isGroupHistoryMessage.
         * @member {"isGroupHistoryMessage"|undefined} _isGroupHistoryMessage
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_isGroupHistoryMessage", {
            get: $util.oneOfGetter($oneOfFields = ["isGroupHistoryMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _botMessageInvokerJid.
         * @member {"botMessageInvokerJid"|undefined} _botMessageInvokerJid
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_botMessageInvokerJid", {
            get: $util.oneOfGetter($oneOfFields = ["botMessageInvokerJid"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _commentMetadata.
         * @member {"commentMetadata"|undefined} _commentMetadata
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_commentMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["commentMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _reportingTokenInfo.
         * @member {"reportingTokenInfo"|undefined} _reportingTokenInfo
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_reportingTokenInfo", {
            get: $util.oneOfGetter($oneOfFields = ["reportingTokenInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _newsletterServerId.
         * @member {"newsletterServerId"|undefined} _newsletterServerId
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_newsletterServerId", {
            get: $util.oneOfGetter($oneOfFields = ["newsletterServerId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _eventAdditionalMetadata.
         * @member {"eventAdditionalMetadata"|undefined} _eventAdditionalMetadata
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_eventAdditionalMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["eventAdditionalMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _isMentionedInStatus.
         * @member {"isMentionedInStatus"|undefined} _isMentionedInStatus
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_isMentionedInStatus", {
            get: $util.oneOfGetter($oneOfFields = ["isMentionedInStatus"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _targetMessageId.
         * @member {"targetMessageId"|undefined} _targetMessageId
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_targetMessageId", {
            get: $util.oneOfGetter($oneOfFields = ["targetMessageId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _statusMentionMessageInfo.
         * @member {"statusMentionMessageInfo"|undefined} _statusMentionMessageInfo
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_statusMentionMessageInfo", {
            get: $util.oneOfGetter($oneOfFields = ["statusMentionMessageInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _isSupportAiMessage.
         * @member {"isSupportAiMessage"|undefined} _isSupportAiMessage
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_isSupportAiMessage", {
            get: $util.oneOfGetter($oneOfFields = ["isSupportAiMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _botTargetId.
         * @member {"botTargetId"|undefined} _botTargetId
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_botTargetId", {
            get: $util.oneOfGetter($oneOfFields = ["botTargetId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _groupHistoryIndividualMessageInfo.
         * @member {"groupHistoryIndividualMessageInfo"|undefined} _groupHistoryIndividualMessageInfo
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_groupHistoryIndividualMessageInfo", {
            get: $util.oneOfGetter($oneOfFields = ["groupHistoryIndividualMessageInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _groupHistoryBundleInfo.
         * @member {"groupHistoryBundleInfo"|undefined} _groupHistoryBundleInfo
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_groupHistoryBundleInfo", {
            get: $util.oneOfGetter($oneOfFields = ["groupHistoryBundleInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _interactiveMessageAdditionalMetadata.
         * @member {"interactiveMessageAdditionalMetadata"|undefined} _interactiveMessageAdditionalMetadata
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_interactiveMessageAdditionalMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["interactiveMessageAdditionalMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * WebMessageInfo _quarantinedMessage.
         * @member {"quarantinedMessage"|undefined} _quarantinedMessage
         * @memberof Web.WebMessageInfo
         * @instance
         */
        Object.defineProperty(WebMessageInfo.prototype, "_quarantinedMessage", {
            get: $util.oneOfGetter($oneOfFields = ["quarantinedMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new WebMessageInfo instance using the specified properties.
         * @function create
         * @memberof Web.WebMessageInfo
         * @static
         * @param {Web.IWebMessageInfo=} [properties] Properties to set
         * @returns {Web.WebMessageInfo} WebMessageInfo instance
         */
        WebMessageInfo.create = function create(properties) {
            return new WebMessageInfo(properties);
        };

        /**
         * Encodes the specified WebMessageInfo message. Does not implicitly {@link Web.WebMessageInfo.verify|verify} messages.
         * @function encode
         * @memberof Web.WebMessageInfo
         * @static
         * @param {Web.IWebMessageInfo} message WebMessageInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        WebMessageInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.key != null && Object.hasOwnProperty.call(message, "key"))
                $root.Protocol.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.message != null && Object.hasOwnProperty.call(message, "message"))
                $root.E2E.Message.encode(message.message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.messageTimestamp != null && Object.hasOwnProperty.call(message, "messageTimestamp"))
                writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.messageTimestamp);
            if (message.status != null && Object.hasOwnProperty.call(message, "status"))
                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status);
            if (message.participant != null && Object.hasOwnProperty.call(message, "participant"))
                writer.uint32(/* id 5, wireType 2 =*/42).string(message.participant);
            if (message.messageC2STimestamp != null && Object.hasOwnProperty.call(message, "messageC2STimestamp"))
                writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.messageC2STimestamp);
            if (message.ignore != null && Object.hasOwnProperty.call(message, "ignore"))
                writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ignore);
            if (message.starred != null && Object.hasOwnProperty.call(message, "starred"))
                writer.uint32(/* id 17, wireType 0 =*/136).bool(message.starred);
            if (message.broadcast != null && Object.hasOwnProperty.call(message, "broadcast"))
                writer.uint32(/* id 18, wireType 0 =*/144).bool(message.broadcast);
            if (message.pushName != null && Object.hasOwnProperty.call(message, "pushName"))
                writer.uint32(/* id 19, wireType 2 =*/154).string(message.pushName);
            if (message.mediaCiphertextSha256 != null && Object.hasOwnProperty.call(message, "mediaCiphertextSha256"))
                writer.uint32(/* id 20, wireType 2 =*/162).bytes(message.mediaCiphertextSha256);
            if (message.multicast != null && Object.hasOwnProperty.call(message, "multicast"))
                writer.uint32(/* id 21, wireType 0 =*/168).bool(message.multicast);
            if (message.urlText != null && Object.hasOwnProperty.call(message, "urlText"))
                writer.uint32(/* id 22, wireType 0 =*/176).bool(message.urlText);
            if (message.urlNumber != null && Object.hasOwnProperty.call(message, "urlNumber"))
                writer.uint32(/* id 23, wireType 0 =*/184).bool(message.urlNumber);
            if (message.messageStubType != null && Object.hasOwnProperty.call(message, "messageStubType"))
                writer.uint32(/* id 24, wireType 0 =*/192).int32(message.messageStubType);
            if (message.clearMedia != null && Object.hasOwnProperty.call(message, "clearMedia"))
                writer.uint32(/* id 25, wireType 0 =*/200).bool(message.clearMedia);
            if (message.messageStubParameters != null && message.messageStubParameters.length)
                for (var i = 0; i < message.messageStubParameters.length; ++i)
                    writer.uint32(/* id 26, wireType 2 =*/210).string(message.messageStubParameters[i]);
            if (message.duration != null && Object.hasOwnProperty.call(message, "duration"))
                writer.uint32(/* id 27, wireType 0 =*/216).uint32(message.duration);
            if (message.labels != null && message.labels.length)
                for (var i = 0; i < message.labels.length; ++i)
                    writer.uint32(/* id 28, wireType 2 =*/226).string(message.labels[i]);
            if (message.paymentInfo != null && Object.hasOwnProperty.call(message, "paymentInfo"))
                $root.Web.PaymentInfo.encode(message.paymentInfo, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim();
            if (message.finalLiveLocation != null && Object.hasOwnProperty.call(message, "finalLiveLocation"))
                $root.E2E.Message.LiveLocationMessage.encode(message.finalLiveLocation, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim();
            if (message.quotedPaymentInfo != null && Object.hasOwnProperty.call(message, "quotedPaymentInfo"))
                $root.Web.PaymentInfo.encode(message.quotedPaymentInfo, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim();
            if (message.ephemeralStartTimestamp != null && Object.hasOwnProperty.call(message, "ephemeralStartTimestamp"))
                writer.uint32(/* id 32, wireType 0 =*/256).uint64(message.ephemeralStartTimestamp);
            if (message.ephemeralDuration != null && Object.hasOwnProperty.call(message, "ephemeralDuration"))
                writer.uint32(/* id 33, wireType 0 =*/264).uint32(message.ephemeralDuration);
            if (message.ephemeralOffToOn != null && Object.hasOwnProperty.call(message, "ephemeralOffToOn"))
                writer.uint32(/* id 34, wireType 0 =*/272).bool(message.ephemeralOffToOn);
            if (message.ephemeralOutOfSync != null && Object.hasOwnProperty.call(message, "ephemeralOutOfSync"))
                writer.uint32(/* id 35, wireType 0 =*/280).bool(message.ephemeralOutOfSync);
            if (message.bizPrivacyStatus != null && Object.hasOwnProperty.call(message, "bizPrivacyStatus"))
                writer.uint32(/* id 36, wireType 0 =*/288).int32(message.bizPrivacyStatus);
            if (message.verifiedBizName != null && Object.hasOwnProperty.call(message, "verifiedBizName"))
                writer.uint32(/* id 37, wireType 2 =*/298).string(message.verifiedBizName);
            if (message.mediaData != null && Object.hasOwnProperty.call(message, "mediaData"))
                $root.E2E.PaymentBackground.MediaData.encode(message.mediaData, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim();
            if (message.photoChange != null && Object.hasOwnProperty.call(message, "photoChange"))
                $root.Web.PhotoChange.encode(message.photoChange, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim();
            if (message.userReceipt != null && message.userReceipt.length)
                for (var i = 0; i < message.userReceipt.length; ++i)
                    $root.Web.UserReceipt.encode(message.userReceipt[i], writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim();
            if (message.reactions != null && message.reactions.length)
                for (var i = 0; i < message.reactions.length; ++i)
                    $root.Web.Reaction.encode(message.reactions[i], writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim();
            if (message.quotedStickerData != null && Object.hasOwnProperty.call(message, "quotedStickerData"))
                $root.E2E.PaymentBackground.MediaData.encode(message.quotedStickerData, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim();
            if (message.futureproofData != null && Object.hasOwnProperty.call(message, "futureproofData"))
                writer.uint32(/* id 43, wireType 2 =*/346).bytes(message.futureproofData);
            if (message.statusPsa != null && Object.hasOwnProperty.call(message, "statusPsa"))
                $root.Web.StatusPSA.encode(message.statusPsa, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim();
            if (message.pollUpdates != null && message.pollUpdates.length)
                for (var i = 0; i < message.pollUpdates.length; ++i)
                    $root.Web.PollUpdate.encode(message.pollUpdates[i], writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim();
            if (message.pollAdditionalMetadata != null && Object.hasOwnProperty.call(message, "pollAdditionalMetadata"))
                $root.Web.PollAdditionalMetadata.encode(message.pollAdditionalMetadata, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim();
            if (message.agentId != null && Object.hasOwnProperty.call(message, "agentId"))
                writer.uint32(/* id 47, wireType 2 =*/378).string(message.agentId);
            if (message.statusAlreadyViewed != null && Object.hasOwnProperty.call(message, "statusAlreadyViewed"))
                writer.uint32(/* id 48, wireType 0 =*/384).bool(message.statusAlreadyViewed);
            if (message.messageSecret != null && Object.hasOwnProperty.call(message, "messageSecret"))
                writer.uint32(/* id 49, wireType 2 =*/394).bytes(message.messageSecret);
            if (message.keepInChat != null && Object.hasOwnProperty.call(message, "keepInChat"))
                $root.Web.KeepInChat.encode(message.keepInChat, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim();
            if (message.originalSelfAuthorUserJidString != null && Object.hasOwnProperty.call(message, "originalSelfAuthorUserJidString"))
                writer.uint32(/* id 51, wireType 2 =*/410).string(message.originalSelfAuthorUserJidString);
            if (message.revokeMessageTimestamp != null && Object.hasOwnProperty.call(message, "revokeMessageTimestamp"))
                writer.uint32(/* id 52, wireType 0 =*/416).uint64(message.revokeMessageTimestamp);
            if (message.pinInChat != null && Object.hasOwnProperty.call(message, "pinInChat"))
                $root.Web.PinInChat.encode(message.pinInChat, writer.uint32(/* id 54, wireType 2 =*/434).fork()).ldelim();
            if (message.premiumMessageInfo != null && Object.hasOwnProperty.call(message, "premiumMessageInfo"))
                $root.Web.PremiumMessageInfo.encode(message.premiumMessageInfo, writer.uint32(/* id 55, wireType 2 =*/442).fork()).ldelim();
            if (message.is1PBizBotMessage != null && Object.hasOwnProperty.call(message, "is1PBizBotMessage"))
                writer.uint32(/* id 56, wireType 0 =*/448).bool(message.is1PBizBotMessage);
            if (message.isGroupHistoryMessage != null && Object.hasOwnProperty.call(message, "isGroupHistoryMessage"))
                writer.uint32(/* id 57, wireType 0 =*/456).bool(message.isGroupHistoryMessage);
            if (message.botMessageInvokerJid != null && Object.hasOwnProperty.call(message, "botMessageInvokerJid"))
                writer.uint32(/* id 58, wireType 2 =*/466).string(message.botMessageInvokerJid);
            if (message.commentMetadata != null && Object.hasOwnProperty.call(message, "commentMetadata"))
                $root.Web.CommentMetadata.encode(message.commentMetadata, writer.uint32(/* id 59, wireType 2 =*/474).fork()).ldelim();
            if (message.eventResponses != null && message.eventResponses.length)
                for (var i = 0; i < message.eventResponses.length; ++i)
                    $root.Web.EventResponse.encode(message.eventResponses[i], writer.uint32(/* id 61, wireType 2 =*/490).fork()).ldelim();
            if (message.reportingTokenInfo != null && Object.hasOwnProperty.call(message, "reportingTokenInfo"))
                $root.Web.ReportingTokenInfo.encode(message.reportingTokenInfo, writer.uint32(/* id 62, wireType 2 =*/498).fork()).ldelim();
            if (message.newsletterServerId != null && Object.hasOwnProperty.call(message, "newsletterServerId"))
                writer.uint32(/* id 63, wireType 0 =*/504).uint64(message.newsletterServerId);
            if (message.eventAdditionalMetadata != null && Object.hasOwnProperty.call(message, "eventAdditionalMetadata"))
                $root.Web.EventAdditionalMetadata.encode(message.eventAdditionalMetadata, writer.uint32(/* id 64, wireType 2 =*/514).fork()).ldelim();
            if (message.isMentionedInStatus != null && Object.hasOwnProperty.call(message, "isMentionedInStatus"))
                writer.uint32(/* id 65, wireType 0 =*/520).bool(message.isMentionedInStatus);
            if (message.statusMentions != null && message.statusMentions.length)
                for (var i = 0; i < message.statusMentions.length; ++i)
                    writer.uint32(/* id 66, wireType 2 =*/530).string(message.statusMentions[i]);
            if (message.targetMessageId != null && Object.hasOwnProperty.call(message, "targetMessageId"))
                $root.Protocol.MessageKey.encode(message.targetMessageId, writer.uint32(/* id 67, wireType 2 =*/538).fork()).ldelim();
            if (message.messageAddOns != null && message.messageAddOns.length)
                for (var i = 0; i < message.messageAddOns.length; ++i)
                    $root.Web.MessageAddOn.encode(message.messageAddOns[i], writer.uint32(/* id 68, wireType 2 =*/546).fork()).ldelim();
            if (message.statusMentionMessageInfo != null && Object.hasOwnProperty.call(message, "statusMentionMessageInfo"))
                $root.Web.StatusMentionMessage.encode(message.statusMentionMessageInfo, writer.uint32(/* id 69, wireType 2 =*/554).fork()).ldelim();
            if (message.isSupportAiMessage != null && Object.hasOwnProperty.call(message, "isSupportAiMessage"))
                writer.uint32(/* id 70, wireType 0 =*/560).bool(message.isSupportAiMessage);
            if (message.statusMentionSources != null && message.statusMentionSources.length)
                for (var i = 0; i < message.statusMentionSources.length; ++i)
                    writer.uint32(/* id 71, wireType 2 =*/570).string(message.statusMentionSources[i]);
            if (message.supportAiCitations != null && message.supportAiCitations.length)
                for (var i = 0; i < message.supportAiCitations.length; ++i)
                    $root.Web.Citation.encode(message.supportAiCitations[i], writer.uint32(/* id 72, wireType 2 =*/578).fork()).ldelim();
            if (message.botTargetId != null && Object.hasOwnProperty.call(message, "botTargetId"))
                writer.uint32(/* id 73, wireType 2 =*/586).string(message.botTargetId);
            if (message.groupHistoryIndividualMessageInfo != null && Object.hasOwnProperty.call(message, "groupHistoryIndividualMessageInfo"))
                $root.Web.GroupHistoryIndividualMessageInfo.encode(message.groupHistoryIndividualMessageInfo, writer.uint32(/* id 74, wireType 2 =*/594).fork()).ldelim();
            if (message.groupHistoryBundleInfo != null && Object.hasOwnProperty.call(message, "groupHistoryBundleInfo"))
                $root.Web.GroupHistoryBundleInfo.encode(message.groupHistoryBundleInfo, writer.uint32(/* id 75, wireType 2 =*/602).fork()).ldelim();
            if (message.interactiveMessageAdditionalMetadata != null && Object.hasOwnProperty.call(message, "interactiveMessageAdditionalMetadata"))
                $root.Web.InteractiveMessageAdditionalMetadata.encode(message.interactiveMessageAdditionalMetadata, writer.uint32(/* id 76, wireType 2 =*/610).fork()).ldelim();
            if (message.quarantinedMessage != null && Object.hasOwnProperty.call(message, "quarantinedMessage"))
                $root.Web.QuarantinedMessage.encode(message.quarantinedMessage, writer.uint32(/* id 77, wireType 2 =*/618).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified WebMessageInfo message, length delimited. Does not implicitly {@link Web.WebMessageInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Web.WebMessageInfo
         * @static
         * @param {Web.IWebMessageInfo} message WebMessageInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        WebMessageInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a WebMessageInfo message from the specified reader or buffer.
         * @function decode
         * @memberof Web.WebMessageInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Web.WebMessageInfo} WebMessageInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        WebMessageInfo.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.Web.WebMessageInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.key = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.message = $root.E2E.Message.decode(reader, reader.uint32());
                        break;
                    }
                case 3: {
                        message.messageTimestamp = reader.uint64();
                        break;
                    }
                case 4: {
                        message.status = reader.int32();
                        break;
                    }
                case 5: {
                        message.participant = reader.string();
                        break;
                    }
                case 6: {
                        message.messageC2STimestamp = reader.uint64();
                        break;
                    }
                case 16: {
                        message.ignore = reader.bool();
                        break;
                    }
                case 17: {
                        message.starred = reader.bool();
                        break;
                    }
                case 18: {
                        message.broadcast = reader.bool();
                        break;
                    }
                case 19: {
                        message.pushName = reader.string();
                        break;
                    }
                case 20: {
                        message.mediaCiphertextSha256 = reader.bytes();
                        break;
                    }
                case 21: {
                        message.multicast = reader.bool();
                        break;
                    }
                case 22: {
                        message.urlText = reader.bool();
                        break;
                    }
                case 23: {
                        message.urlNumber = reader.bool();
                        break;
                    }
                case 24: {
                        message.messageStubType = reader.int32();
                        break;
                    }
                case 25: {
                        message.clearMedia = reader.bool();
                        break;
                    }
                case 26: {
                        if (!(message.messageStubParameters && message.messageStubParameters.length))
                            message.messageStubParameters = [];
                        message.messageStubParameters.push(reader.string());
                        break;
                    }
                case 27: {
                        message.duration = reader.uint32();
                        break;
                    }
                case 28: {
                        if (!(message.labels && message.labels.length))
                            message.labels = [];
                        message.labels.push(reader.string());
                        break;
                    }
                case 29: {
                        message.paymentInfo = $root.Web.PaymentInfo.decode(reader, reader.uint32());
                        break;
                    }
                case 30: {
                        message.finalLiveLocation = $root.E2E.Message.LiveLocationMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 31: {
                        message.quotedPaymentInfo = $root.Web.PaymentInfo.decode(reader, reader.uint32());
                        break;
                    }
                case 32: {
                        message.ephemeralStartTimestamp = reader.uint64();
                        break;
                    }
                case 33: {
                        message.ephemeralDuration = reader.uint32();
                        break;
                    }
                case 34: {
                        message.ephemeralOffToOn = reader.bool();
                        break;
                    }
                case 35: {
                        message.ephemeralOutOfSync = reader.bool();
                        break;
                    }
                case 36: {
                        message.bizPrivacyStatus = reader.int32();
                        break;
                    }
                case 37: {
                        message.verifiedBizName = reader.string();
                        break;
                    }
                case 38: {
                        message.mediaData = $root.E2E.PaymentBackground.MediaData.decode(reader, reader.uint32());
                        break;
                    }
                case 39: {
                        message.photoChange = $root.Web.PhotoChange.decode(reader, reader.uint32());
                        break;
                    }
                case 40: {
                        if (!(message.userReceipt && message.userReceipt.length))
                            message.userReceipt = [];
                        message.userReceipt.push($root.Web.UserReceipt.decode(reader, reader.uint32()));
                        break;
                    }
                case 41: {
                        if (!(message.reactions && message.reactions.length))
                            message.reactions = [];
                        message.reactions.push($root.Web.Reaction.decode(reader, reader.uint32()));
                        break;
                    }
                case 42: {
                        message.quotedStickerData = $root.E2E.PaymentBackground.MediaData.decode(reader, reader.uint32());
                        break;
                    }
                case 43: {
                        message.futureproofData = reader.bytes();
                        break;
                    }
                case 44: {
                        message.statusPsa = $root.Web.StatusPSA.decode(reader, reader.uint32());
                        break;
                    }
                case 45: {
                        if (!(message.pollUpdates && message.pollUpdates.length))
                            message.pollUpdates = [];
                        message.pollUpdates.push($root.Web.PollUpdate.decode(reader, reader.uint32()));
                        break;
                    }
                case 46: {
                        message.pollAdditionalMetadata = $root.Web.PollAdditionalMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 47: {
                        message.agentId = reader.string();
                        break;
                    }
                case 48: {
                        message.statusAlreadyViewed = reader.bool();
                        break;
                    }
                case 49: {
                        message.messageSecret = reader.bytes();
                        break;
                    }
                case 50: {
                        message.keepInChat = $root.Web.KeepInChat.decode(reader, reader.uint32());
                        break;
                    }
                case 51: {
                        message.originalSelfAuthorUserJidString = reader.string();
                        break;
                    }
                case 52: {
                        message.revokeMessageTimestamp = reader.uint64();
                        break;
                    }
                case 54: {
                        message.pinInChat = $root.Web.PinInChat.decode(reader, reader.uint32());
                        break;
                    }
                case 55: {
                        message.premiumMessageInfo = $root.Web.PremiumMessageInfo.decode(reader, reader.uint32());
                        break;
                    }
                case 56: {
                        message.is1PBizBotMessage = reader.bool();
                        break;
                    }
                case 57: {
                        message.isGroupHistoryMessage = reader.bool();
                        break;
                    }
                case 58: {
                        message.botMessageInvokerJid = reader.string();
                        break;
                    }
                case 59: {
                        message.commentMetadata = $root.Web.CommentMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 61: {
                        if (!(message.eventResponses && message.eventResponses.length))
                            message.eventResponses = [];
                        message.eventResponses.push($root.Web.EventResponse.decode(reader, reader.uint32()));
                        break;
                    }
                case 62: {
                        message.reportingTokenInfo = $root.Web.ReportingTokenInfo.decode(reader, reader.uint32());
                        break;
                    }
                case 63: {
                        message.newsletterServerId = reader.uint64();
                        break;
                    }
                case 64: {
                        message.eventAdditionalMetadata = $root.Web.EventAdditionalMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 65: {
                        message.isMentionedInStatus = reader.bool();
                        break;
                    }
                case 66: {
                        if (!(message.statusMentions && message.statusMentions.length))
                            message.statusMentions = [];
                        message.statusMentions.push(reader.string());
                        break;
                    }
                case 67: {
                        message.targetMessageId = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 68: {
                        if (!(message.messageAddOns && message.messageAddOns.length))
                            message.messageAddOns = [];
                        message.messageAddOns.push($root.Web.MessageAddOn.decode(reader, reader.uint32()));
                        break;
                    }
                case 69: {
                        message.statusMentionMessageInfo = $root.Web.StatusMentionMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 70: {
                        message.isSupportAiMessage = reader.bool();
                        break;
                    }
                case 71: {
                        if (!(message.statusMentionSources && message.statusMentionSources.length))
                            message.statusMentionSources = [];
                        message.statusMentionSources.push(reader.string());
                        break;
                    }
                case 72: {
                        if (!(message.supportAiCitations && message.supportAiCitations.length))
                            message.supportAiCitations = [];
                        message.supportAiCitations.push($root.Web.Citation.decode(reader, reader.uint32()));
                        break;
                    }
                case 73: {
                        message.botTargetId = reader.string();
                        break;
                    }
                case 74: {
                        message.groupHistoryIndividualMessageInfo = $root.Web.GroupHistoryIndividualMessageInfo.decode(reader, reader.uint32());
                        break;
                    }
                case 75: {
                        message.groupHistoryBundleInfo = $root.Web.GroupHistoryBundleInfo.decode(reader, reader.uint32());
                        break;
                    }
                case 76: {
                        message.interactiveMessageAdditionalMetadata = $root.Web.InteractiveMessageAdditionalMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 77: {
                        message.quarantinedMessage = $root.Web.QuarantinedMessage.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a WebMessageInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Web.WebMessageInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Web.WebMessageInfo} WebMessageInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        WebMessageInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a WebMessageInfo message.
         * @function verify
         * @memberof Web.WebMessageInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        WebMessageInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.key != null && message.hasOwnProperty("key")) {
                properties._key = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.key);
                    if (error)
                        return "key." + error;
                }
            }
            if (message.message != null && message.hasOwnProperty("message")) {
                properties._message = 1;
                {
                    var error = $root.E2E.Message.verify(message.message);
                    if (error)
                        return "message." + error;
                }
            }
            if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) {
                properties._messageTimestamp = 1;
                if (!$util.isInteger(message.messageTimestamp) && !(message.messageTimestamp && $util.isInteger(message.messageTimestamp.low) && $util.isInteger(message.messageTimestamp.high)))
                    return "messageTimestamp: integer|Long expected";
            }
            if (message.status != null && message.hasOwnProperty("status")) {
                properties._status = 1;
                switch (message.status) {
                default:
                    return "status: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                    break;
                }
            }
            if (message.participant != null && message.hasOwnProperty("participant")) {
                properties._participant = 1;
                if (!$util.isString(message.participant))
                    return "participant: string expected";
            }
            if (message.messageC2STimestamp != null && message.hasOwnProperty("messageC2STimestamp")) {
                properties._messageC2STimestamp = 1;
                if (!$util.isInteger(message.messageC2STimestamp) && !(message.messageC2STimestamp && $util.isInteger(message.messageC2STimestamp.low) && $util.isInteger(message.messageC2STimestamp.high)))
                    return "messageC2STimestamp: integer|Long expected";
            }
            if (message.ignore != null && message.hasOwnProperty("ignore")) {
                properties._ignore = 1;
                if (typeof message.ignore !== "boolean")
                    return "ignore: boolean expected";
            }
            if (message.starred != null && message.hasOwnProperty("starred")) {
                properties._starred = 1;
                if (typeof message.starred !== "boolean")
                    return "starred: boolean expected";
            }
            if (message.broadcast != null && message.hasOwnProperty("broadcast")) {
                properties._broadcast = 1;
                if (typeof message.broadcast !== "boolean")
                    return "broadcast: boolean expected";
            }
            if (message.pushName != null && message.hasOwnProperty("pushName")) {
                properties._pushName = 1;
                if (!$util.isString(message.pushName))
                    return "pushName: string expected";
            }
            if (message.mediaCiphertextSha256 != null && message.hasOwnProperty("mediaCiphertextSha256")) {
                properties._mediaCiphertextSha256 = 1;
                if (!(message.mediaCiphertextSha256 && typeof message.mediaCiphertextSha256.length === "number" || $util.isString(message.mediaCiphertextSha256)))
                    return "mediaCiphertextSha256: buffer expected";
            }
            if (message.multicast != null && message.hasOwnProperty("multicast")) {
                properties._multicast = 1;
                if (typeof message.multicast !== "boolean")
                    return "multicast: boolean expected";
            }
            if (message.urlText != null && message.hasOwnProperty("urlText")) {
                properties._urlText = 1;
                if (typeof message.urlText !== "boolean")
                    return "urlText: boolean expected";
            }
            if (message.urlNumber != null && message.hasOwnProperty("urlNumber")) {
                properties._urlNumber = 1;
                if (typeof message.urlNumber !== "boolean")
                    return "urlNumber: boolean expected";
            }
            if (message.messageStubType != null && message.hasOwnProperty("messageStubType")) {
                properties._messageStubType = 1;
                switch (message.messageStubType) {
                default:
                    return "messageStubType: 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:
                case 11:
                case 12:
                case 13:
                case 14:
                case 15:
                case 16:
                case 17:
                case 18:
                case 19:
                case 20:
                case 21:
                case 22:
                case 23:
                case 24:
                case 25:
                case 26:
                case 27:
                case 28:
                case 29:
                case 30:
                case 31:
                case 32:
                case 33:
                case 34:
                case 35:
                case 36:
                case 37:
                case 38:
                case 39:
                case 40:
                case 41:
                case 42:
                case 43:
                case 44:
                case 45:
                case 46:
                case 47:
                case 48:
                case 49:
                case 50:
                case 51:
                case 52:
                case 53:
                case 54:
                case 55:
                case 56:
                case 57:
                case 58:
                case 59:
                case 60:
                case 61:
                case 62:
                case 63:
                case 64:
                case 65:
                case 66:
                case 67:
                case 68:
                case 69:
                case 70:
                case 71:
                case 72:
                case 73:
                case 74:
                case 75:
                case 76:
                case 77:
                case 78:
                case 79:
                case 80:
                case 81:
                case 82:
                case 83:
                case 84:
                case 85:
                case 86:
                case 87:
                case 88:
                case 89:
                case 90:
                case 91:
                case 92:
                case 93:
                case 94:
                case 95:
                case 96:
                case 97:
                case 98:
                case 99:
                case 100:
                case 101:
                case 102:
                case 103:
                case 104:
                case 105:
                case 106:
                case 107:
                case 108:
                case 109:
                case 110:
                case 111:
                case 112:
                case 113:
                case 114:
                case 115:
                case 116:
                case 117:
                case 118:
                case 119:
                case 120:
                case 121:
                case 122:
                case 123:
                case 124:
                case 125:
                case 126:
                case 127:
                case 128:
                case 129:
                case 130:
                case 131:
                case 132:
                case 133:
                case 134:
                case 135:
                case 136:
                case 137:
                case 138:
                case 139:
                case 140:
                case 141:
                case 142:
                case 143:
                case 144:
                case 145:
                case 146:
                case 147:
                case 148:
                case 149:
                case 150:
                case 151:
                case 152:
                case 153:
                case 154:
                case 155:
                case 156:
                case 157:
                case 158:
                case 159:
                case 160:
                case 161:
                case 162:
                case 163:
                case 164:
                case 165:
                case 166:
                case 167:
                case 168:
                case 169:
                case 170:
                case 171:
                case 172:
                case 173:
                case 174:
                case 175:
                case 176:
                case 177:
                case 178:
                case 179:
                case 180:
                case 181:
                case 182:
                case 183:
                case 184:
                case 185:
                case 186:
                case 187:
                case 188:
                case 189:
                case 190:
                case 191:
                case 192:
                case 193:
                case 194:
                case 195:
                case 196:
                case 197:
                case 198:
                case 199:
                case 200:
                case 201:
                case 202:
                case 203:
                case 204:
                case 205:
                case 206:
                case 207:
                case 208:
                case 209:
                case 210:
                case 211:
                case 212:
                case 213:
                case 214:
                case 215:
                case 216:
                case 217:
                case 218:
                case 219:
                case 220:
                case 221:
                case 222:
                case 223:
                    break;
                }
            }
            if (message.clearMedia != null && message.hasOwnProperty("clearMedia")) {
                properties._clearMedia = 1;
                if (typeof message.clearMedia !== "boolean")
                    return "clearMedia: boolean expected";
            }
            if (message.messageStubParameters != null && message.hasOwnProperty("messageStubParameters")) {
                if (!Array.isArray(message.messageStubParameters))
                    return "messageStubParameters: array expected";
                for (var i = 0; i < message.messageStubParameters.length; ++i)
                    if (!$util.isString(message.messageStubParameters[i]))
                        return "messageStubParameters: string[] expected";
            }
            if (message.duration != null && message.hasOwnProperty("duration")) {
                properties._duration = 1;
                if (!$util.isInteger(message.duration))
                    return "duration: integer expected";
            }
            if (message.labels != null && message.hasOwnProperty("labels")) {
                if (!Array.isArray(message.labels))
                    return "labels: array expected";
                for (var i = 0; i < message.labels.length; ++i)
                    if (!$util.isString(message.labels[i]))
                        return "labels: string[] expected";
            }
            if (message.paymentInfo != null && message.hasOwnProperty("paymentInfo")) {
                properties._paymentInfo = 1;
                {
                    var error = $root.Web.PaymentInfo.verify(message.paymentInfo);
                    if (error)
                        return "paymentInfo." + error;
                }
            }
            if (message.finalLiveLocation != null && message.hasOwnProperty("finalLiveLocation")) {
                properties._finalLiveLocation = 1;
                {
                    var error = $root.E2E.Message.LiveLocationMessage.verify(message.finalLiveLocation);
                    if (error)
                        return "finalLiveLocation." + error;
                }
            }
            if (message.quotedPaymentInfo != null && message.hasOwnProperty("quotedPaymentInfo")) {
                properties._quotedPaymentInfo = 1;
                {
                    var error = $root.Web.PaymentInfo.verify(message.quotedPaymentInfo);
                    if (error)
                        return "quotedPaymentInfo." + error;
                }
            }
            if (message.ephemeralStartTimestamp != null && message.hasOwnProperty("ephemeralStartTimestamp")) {
                properties._ephemeralStartTimestamp = 1;
                if (!$util.isInteger(message.ephemeralStartTimestamp) && !(message.ephemeralStartTimestamp && $util.isInteger(message.ephemeralStartTimestamp.low) && $util.isInteger(message.ephemeralStartTimestamp.high)))
                    return "ephemeralStartTimestamp: integer|Long expected";
            }
            if (message.ephemeralDuration != null && message.hasOwnProperty("ephemeralDuration")) {
                properties._ephemeralDuration = 1;
                if (!$util.isInteger(message.ephemeralDuration))
                    return "ephemeralDuration: integer expected";
            }
            if (message.ephemeralOffToOn != null && message.hasOwnProperty("ephemeralOffToOn")) {
                properties._ephemeralOffToOn = 1;
                if (typeof message.ephemeralOffToOn !== "boolean")
                    return "ephemeralOffToOn: boolean expected";
            }
            if (message.ephemeralOutOfSync != null && message.hasOwnProperty("ephemeralOutOfSync")) {
                properties._ephemeralOutOfSync = 1;
                if (typeof message.ephemeralOutOfSync !== "boolean")
                    return "ephemeralOutOfSync: boolean expected";
            }
            if (message.bizPrivacyStatus != null && message.hasOwnProperty("bizPrivacyStatus")) {
                properties._bizPrivacyStatus = 1;
                switch (message.bizPrivacyStatus) {
                default:
                    return "bizPrivacyStatus: enum value expected";
                case 0:
                case 2:
                case 1:
                case 3:
                    break;
                }
            }
            if (message.verifiedBizName != null && message.hasOwnProperty("verifiedBizName")) {
                properties._verifiedBizName = 1;
                if (!$util.isString(message.verifiedBizName))
                    return "verifiedBizName: string expected";
            }
            if (message.mediaData != null && message.hasOwnProperty("mediaData")) {
                properties._mediaData = 1;
                {
                    var error = $root.E2E.PaymentBackground.MediaData.verify(message.mediaData);
                    if (error)
                        return "mediaData." + error;
                }
            }
            if (message.photoChange != null && message.hasOwnProperty("photoChange")) {
                properties._photoChange = 1;
                {
                    var error = $root.Web.PhotoChange.verify(message.photoChange);
                    if (error)
                        return "photoChange." + error;
                }
            }
            if (message.userReceipt != null && message.hasOwnProperty("userReceipt")) {
                if (!Array.isArray(message.userReceipt))
                    return "userReceipt: array expected";
                for (var i = 0; i < message.userReceipt.length; ++i) {
                    var error = $root.Web.UserReceipt.verify(message.userReceipt[i]);
                    if (error)
                        return "userReceipt." + error;
                }
            }
            if (message.reactions != null && message.hasOwnProperty("reactions")) {
                if (!Array.isArray(message.reactions))
                    return "reactions: array expected";
                for (var i = 0; i < message.reactions.length; ++i) {
                    var error = $root.Web.Reaction.verify(message.reactions[i]);
                    if (error)
                        return "reactions." + error;
                }
            }
            if (message.quotedStickerData != null && message.hasOwnProperty("quotedStickerData")) {
                properties._quotedStickerData = 1;
                {
                    var error = $root.E2E.PaymentBackground.MediaData.verify(message.quotedStickerData);
                    if (error)
                        return "quotedStickerData." + error;
                }
            }
            if (message.futureproofData != null && message.hasOwnProperty("futureproofData")) {
                properties._futureproofData = 1;
                if (!(message.futureproofData && typeof message.futureproofData.length === "number" || $util.isString(message.futureproofData)))
                    return "futureproofData: buffer expected";
            }
            if (message.statusPsa != null && message.hasOwnProperty("statusPsa")) {
                properties._statusPsa = 1;
                {
                    var error = $root.Web.StatusPSA.verify(message.statusPsa);
                    if (error)
                        return "statusPsa." + error;
                }
            }
            if (message.pollUpdates != null && message.hasOwnProperty("pollUpdates")) {
                if (!Array.isArray(message.pollUpdates))
                    return "pollUpdates: array expected";
                for (var i = 0; i < message.pollUpdates.length; ++i) {
                    var error = $root.Web.PollUpdate.verify(message.pollUpdates[i]);
                    if (error)
                        return "pollUpdates." + error;
                }
            }
            if (message.pollAdditionalMetadata != null && message.hasOwnProperty("pollAdditionalMetadata")) {
                properties._pollAdditionalMetadata = 1;
                {
                    var error = $root.Web.PollAdditionalMetadata.verify(message.pollAdditionalMetadata);
                    if (error)
                        return "pollAdditionalMetadata." + error;
                }
            }
            if (message.agentId != null && message.hasOwnProperty("agentId")) {
                properties._agentId = 1;
                if (!$util.isString(message.agentId))
                    return "agentId: string expected";
            }
            if (message.statusAlreadyViewed != null && message.hasOwnProperty("statusAlreadyViewed")) {
                properties._statusAlreadyViewed = 1;
                if (typeof message.statusAlreadyViewed !== "boolean")
                    return "statusAlreadyViewed: boolean 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.keepInChat != null && message.hasOwnProperty("keepInChat")) {
                properties._keepInChat = 1;
                {
                    var error = $root.Web.KeepInChat.verify(message.keepInChat);
                    if (error)
                        return "keepInChat." + error;
                }
            }
            if (message.originalSelfAuthorUserJidString != null && message.hasOwnProperty("originalSelfAuthorUserJidString")) {
                properties._originalSelfAuthorUserJidString = 1;
                if (!$util.isString(message.originalSelfAuthorUserJidString))
                    return "originalSelfAuthorUserJidString: string expected";
            }
            if (message.revokeMessageTimestamp != null && message.hasOwnProperty("revokeMessageTimestamp")) {
                properties._revokeMessageTimestamp = 1;
                if (!$util.isInteger(message.revokeMessageTimestamp) && !(message.revokeMessageTimestamp && $util.isInteger(message.revokeMessageTimestamp.low) && $util.isInteger(message.revokeMessageTimestamp.high)))
                    return "revokeMessageTimestamp: integer|Long expected";
            }
            if (message.pinInChat != null && message.hasOwnProperty("pinInChat")) {
                properties._pinInChat = 1;
                {
                    var error = $root.Web.PinInChat.verify(message.pinInChat);
                    if (error)
                        return "pinInChat." + error;
                }
            }
            if (message.premiumMessageInfo != null && message.hasOwnProperty("premiumMessageInfo")) {
                properties._premiumMessageInfo = 1;
                {
                    var error = $root.Web.PremiumMessageInfo.verify(message.premiumMessageInfo);
                    if (error)
                        return "premiumMessageInfo." + error;
                }
            }
            if (message.is1PBizBotMessage != null && message.hasOwnProperty("is1PBizBotMessage")) {
                properties._is1PBizBotMessage = 1;
                if (typeof message.is1PBizBotMessage !== "boolean")
                    return "is1PBizBotMessage: boolean expected";
            }
            if (message.isGroupHistoryMessage != null && message.hasOwnProperty("isGroupHistoryMessage")) {
                properties._isGroupHistoryMessage = 1;
                if (typeof message.isGroupHistoryMessage !== "boolean")
                    return "isGroupHistoryMessage: boolean expected";
            }
            if (message.botMessageInvokerJid != null && message.hasOwnProperty("botMessageInvokerJid")) {
                properties._botMessageInvokerJid = 1;
                if (!$util.isString(message.botMessageInvokerJid))
                    return "botMessageInvokerJid: string expected";
            }
            if (message.commentMetadata != null && message.hasOwnProperty("commentMetadata")) {
                properties._commentMetadata = 1;
                {
                    var error = $root.Web.CommentMetadata.verify(message.commentMetadata);
                    if (error)
                        return "commentMetadata." + error;
                }
            }
            if (message.eventResponses != null && message.hasOwnProperty("eventResponses")) {
                if (!Array.isArray(message.eventResponses))
                    return "eventResponses: array expected";
                for (var i = 0; i < message.eventResponses.length; ++i) {
                    var error = $root.Web.EventResponse.verify(message.eventResponses[i]);
                    if (error)
                        return "eventResponses." + error;
                }
            }
            if (message.reportingTokenInfo != null && message.hasOwnProperty("reportingTokenInfo")) {
                properties._reportingTokenInfo = 1;
                {
                    var error = $root.Web.ReportingTokenInfo.verify(message.reportingTokenInfo);
                    if (error)
                        return "reportingTokenInfo." + error;
                }
            }
            if (message.newsletterServerId != null && message.hasOwnProperty("newsletterServerId")) {
                properties._newsletterServerId = 1;
                if (!$util.isInteger(message.newsletterServerId) && !(message.newsletterServerId && $util.isInteger(message.newsletterServerId.low) && $util.isInteger(message.newsletterServerId.high)))
                    return "newsletterServerId: integer|Long expected";
            }
            if (message.eventAdditionalMetadata != null && message.hasOwnProperty("eventAdditionalMetadata")) {
                properties._eventAdditionalMetadata = 1;
                {
                    var error = $root.Web.EventAdditionalMetadata.verify(message.eventAdditionalMetadata);
                    if (error)
                        return "eventAdditionalMetadata." + error;
                }
            }
            if (message.isMentionedInStatus != null && message.hasOwnProperty("isMentionedInStatus")) {
                properties._isMentionedInStatus = 1;
                if (typeof message.isMentionedInStatus !== "boolean")
                    return "isMentionedInStatus: boolean expected";
            }
            if (message.statusMentions != null && message.hasOwnProperty("statusMentions")) {
                if (!Array.isArray(message.statusMentions))
                    return "statusMentions: array expected";
                for (var i = 0; i < message.statusMentions.length; ++i)
                    if (!$util.isString(message.statusMentions[i]))
                        return "statusMentions: string[] expected";
            }
            if (message.targetMessageId != null && message.hasOwnProperty("targetMessageId")) {
                properties._targetMessageId = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.targetMessageId);
                    if (error)
                        return "targetMessageId." + error;
                }
            }
            if (message.messageAddOns != null && message.hasOwnProperty("messageAddOns")) {
                if (!Array.isArray(message.messageAddOns))
                    return "messageAddOns: array expected";
                for (var i = 0; i < message.messageAddOns.length; ++i) {
                    var error = $root.Web.MessageAddOn.verify(message.messageAddOns[i]);
                    if (error)
                        return "messageAddOns." + error;
                }
            }
            if (message.statusMentionMessageInfo != null && message.hasOwnProperty("statusMentionMessageInfo")) {
                properties._statusMentionMessageInfo = 1;
                {
                    var error = $root.Web.StatusMentionMessage.verify(message.statusMentionMessageInfo);
                    if (error)
                        return "statusMentionMessageInfo." + error;
                }
            }
            if (message.isSupportAiMessage != null && message.hasOwnProperty("isSupportAiMessage")) {
                properties._isSupportAiMessage = 1;
                if (typeof message.isSupportAiMessage !== "boolean")
                    return "isSupportAiMessage: boolean expected";
            }
            if (message.statusMentionSources != null && message.hasOwnProperty("statusMentionSources")) {
                if (!Array.isArray(message.statusMentionSources))
                    return "statusMentionSources: array expected";
                for (var i = 0; i < message.statusMentionSources.length; ++i)
                    if (!$util.isString(message.statusMentionSources[i]))
                        return "statusMentionSources: string[] expected";
            }
            if (message.supportAiCitations != null && message.hasOwnProperty("supportAiCitations")) {
                if (!Array.isArray(message.supportAiCitations))
                    return "supportAiCitations: array expected";
                for (var i = 0; i < message.supportAiCitations.length; ++i) {
                    var error = $root.Web.Citation.verify(message.supportAiCitations[i]);
                    if (error)
                        return "supportAiCitations." + error;
                }
            }
            if (message.botTargetId != null && message.hasOwnProperty("botTargetId")) {
                properties._botTargetId = 1;
                if (!$util.isString(message.botTargetId))
                    return "botTargetId: string expected";
            }
            if (message.groupHistoryIndividualMessageInfo != null && message.hasOwnProperty("groupHistoryIndividualMessageInfo")) {
                properties._groupHistoryIndividualMessageInfo = 1;
                {
                    var error = $root.Web.GroupHistoryIndividualMessageInfo.verify(message.groupHistoryIndividualMessageInfo);
                    if (error)
                        return "groupHistoryIndividualMessageInfo." + error;
                }
            }
            if (message.groupHistoryBundleInfo != null && message.hasOwnProperty("groupHistoryBundleInfo")) {
                properties._groupHistoryBundleInfo = 1;
                {
                    var error = $root.Web.GroupHistoryBundleInfo.verify(message.groupHistoryBundleInfo);
                    if (error)
                        return "groupHistoryBundleInfo." + error;
                }
            }
            if (message.interactiveMessageAdditionalMetadata != null && message.hasOwnProperty("interactiveMessageAdditionalMetadata")) {
                properties._interactiveMessageAdditionalMetadata = 1;
                {
                    var error = $root.Web.InteractiveMessageAdditionalMetadata.verify(message.interactiveMessageAdditionalMetadata);
                    if (error)
                        return "interactiveMessageAdditionalMetadata." + error;
                }
            }
            if (message.quarantinedMessage != null && message.hasOwnProperty("quarantinedMessage")) {
                properties._quarantinedMessage = 1;
                {
                    var error = $root.Web.QuarantinedMessage.verify(message.quarantinedMessage);
                    if (error)
                        return "quarantinedMessage." + error;
                }
            }
            return null;
        };

        /**
         * Creates a WebMessageInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Web.WebMessageInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Web.WebMessageInfo} WebMessageInfo
         */
        WebMessageInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.Web.WebMessageInfo)
                return object;
            var message = new $root.Web.WebMessageInfo();
            if (object.key != null) {
                if (typeof object.key !== "object")
                    throw TypeError(".Web.WebMessageInfo.key: object expected");
                message.key = $root.Protocol.MessageKey.fromObject(object.key);
            }
            if (object.message != null) {
                if (typeof object.message !== "object")
                    throw TypeError(".Web.WebMessageInfo.message: object expected");
                message.message = $root.E2E.Message.fromObject(object.message);
            }
            if (object.messageTimestamp != null)
                if ($util.Long)
                    (message.messageTimestamp = $util.Long.fromValue(object.messageTimestamp)).unsigned = true;
                else if (typeof object.messageTimestamp === "string")
                    message.messageTimestamp = parseInt(object.messageTimestamp, 10);
                else if (typeof object.messageTimestamp === "number")
                    message.messageTimestamp = object.messageTimestamp;
                else if (typeof object.messageTimestamp === "object")
                    message.messageTimestamp = new $util.LongBits(object.messageTimestamp.low >>> 0, object.messageTimestamp.high >>> 0).toNumber(true);
            switch (object.status) {
            default:
                if (typeof object.status === "number") {
                    message.status = object.status;
                    break;
                }
                break;
            case "ERROR":
            case 0:
                message.status = 0;
                break;
            case "PENDING":
            case 1:
                message.status = 1;
                break;
            case "SERVER_ACK":
            case 2:
                message.status = 2;
                break;
            case "DELIVERY_ACK":
            case 3:
                message.status = 3;
                break;
            case "READ":
            case 4:
                message.status = 4;
                break;
            case "PLAYED":
            case 5:
                message.status = 5;
                break;
            }
            if (object.participant != null)
                message.participant = String(object.participant);
            if (object.messageC2STimestamp != null)
                if ($util.Long)
                    (message.messageC2STimestamp = $util.Long.fromValue(object.messageC2STimestamp)).unsigned = true;
                else if (typeof object.messageC2STimestamp === "string")
                    message.messageC2STimestamp = parseInt(object.messageC2STimestamp, 10);
                else if (typeof object.messageC2STimestamp === "number")
                    message.messageC2STimestamp = object.messageC2STimestamp;
                else if (typeof object.messageC2STimestamp === "object")
                    message.messageC2STimestamp = new $util.LongBits(object.messageC2STimestamp.low >>> 0, object.messageC2STimestamp.high >>> 0).toNumber(true);
            if (object.ignore != null)
                message.ignore = Boolean(object.ignore);
            if (object.starred != null)
                message.starred = Boolean(object.starred);
            if (object.broadcast != null)
                message.broadcast = Boolean(object.broadcast);
            if (object.pushName != null)
                message.pushName = String(object.pushName);
            if (object.mediaCiphertextSha256 != null)
                if (typeof object.mediaCiphertextSha256 === "string")
                    $util.base64.decode(object.mediaCiphertextSha256, message.mediaCiphertextSha256 = $util.newBuffer($util.base64.length(object.mediaCiphertextSha256)), 0);
                else if (object.mediaCiphertextSha256.length >= 0)
                    message.mediaCiphertextSha256 = object.mediaCiphertextSha256;
            if (object.multicast != null)
                message.multicast = Boolean(object.multicast);
            if (object.urlText != null)
                message.urlText = Boolean(object.urlText);
            if (object.urlNumber != null)
                message.urlNumber = Boolean(object.urlNumber);
            switch (object.messageStubType) {
            default:
                if (typeof object.messageStubType === "number") {
                    message.messageStubType = object.messageStubType;
                    break;
                }
                break;
            case "UNKNOWN":
            case 0:
                message.messageStubType = 0;
                break;
            case "REVOKE":
            case 1:
                message.messageStubType = 1;
                break;
            case "CIPHERTEXT":
            case 2:
                message.messageStubType = 2;
                break;
            case "FUTUREPROOF":
            case 3:
                message.messageStubType = 3;
                break;
            case "NON_VERIFIED_TRANSITION":
            case 4:
                message.messageStubType = 4;
                break;
            case "UNVERIFIED_TRANSITION":
            case 5:
                message.messageStubType = 5;
                break;
            case "VERIFIED_TRANSITION":
            case 6:
                message.messageStubType = 6;
                break;
            case "VERIFIED_LOW_UNKNOWN":
            case 7:
                message.messageStubType = 7;
                break;
            case "VERIFIED_HIGH":
            case 8:
                message.messageStubType = 8;
                break;
            case "VERIFIED_INITIAL_UNKNOWN":
            case 9:
                message.messageStubType = 9;
                break;
            case "VERIFIED_INITIAL_LOW":
            case 10:
                message.messageStubType = 10;
                break;
            case "VERIFIED_INITIAL_HIGH":
            case 11:
                message.messageStubType = 11;
                break;
            case "VERIFIED_TRANSITION_ANY_TO_NONE":
            case 12:
                message.messageStubType = 12;
                break;
            case "VERIFIED_TRANSITION_ANY_TO_HIGH":
            case 13:
                message.messageStubType = 13;
                break;
            case "VERIFIED_TRANSITION_HIGH_TO_LOW":
            case 14:
                message.messageStubType = 14;
                break;
            case "VERIFIED_TRANSITION_HIGH_TO_UNKNOWN":
            case 15:
                message.messageStubType = 15;
                break;
            case "VERIFIED_TRANSITION_UNKNOWN_TO_LOW":
            case 16:
                message.messageStubType = 16;
                break;
            case "VERIFIED_TRANSITION_LOW_TO_UNKNOWN":
            case 17:
                message.messageStubType = 17;
                break;
            case "VERIFIED_TRANSITION_NONE_TO_LOW":
            case 18:
                message.messageStubType = 18;
                break;
            case "VERIFIED_TRANSITION_NONE_TO_UNKNOWN":
            case 19:
                message.messageStubType = 19;
                break;
            case "GROUP_CREATE":
            case 20:
                message.messageStubType = 20;
                break;
            case "GROUP_CHANGE_SUBJECT":
            case 21:
                message.messageStubType = 21;
                break;
            case "GROUP_CHANGE_ICON":
            case 22:
                message.messageStubType = 22;
                break;
            case "GROUP_CHANGE_INVITE_LINK":
            case 23:
                message.messageStubType = 23;
                break;
            case "GROUP_CHANGE_DESCRIPTION":
            case 24:
                message.messageStubType = 24;
                break;
            case "GROUP_CHANGE_RESTRICT":
            case 25:
                message.messageStubType = 25;
                break;
            case "GROUP_CHANGE_ANNOUNCE":
            case 26:
                message.messageStubType = 26;
                break;
            case "GROUP_PARTICIPANT_ADD":
            case 27:
                message.messageStubType = 27;
                break;
            case "GROUP_PARTICIPANT_REMOVE":
            case 28:
                message.messageStubType = 28;
                break;
            case "GROUP_PARTICIPANT_PROMOTE":
            case 29:
                message.messageStubType = 29;
                break;
            case "GROUP_PARTICIPANT_DEMOTE":
            case 30:
                message.messageStubType = 30;
                break;
            case "GROUP_PARTICIPANT_INVITE":
            case 31:
                message.messageStubType = 31;
                break;
            case "GROUP_PARTICIPANT_LEAVE":
            case 32:
                message.messageStubType = 32;
                break;
            case "GROUP_PARTICIPANT_CHANGE_NUMBER":
            case 33:
                message.messageStubType = 33;
                break;
            case "BROADCAST_CREATE":
            case 34:
                message.messageStubType = 34;
                break;
            case "BROADCAST_ADD":
            case 35:
                message.messageStubType = 35;
                break;
            case "BROADCAST_REMOVE":
            case 36:
                message.messageStubType = 36;
                break;
            case "GENERIC_NOTIFICATION":
            case 37:
                message.messageStubType = 37;
                break;
            case "E2E_IDENTITY_CHANGED":
            case 38:
                message.messageStubType = 38;
                break;
            case "E2E_ENCRYPTED":
            case 39:
                message.messageStubType = 39;
                break;
            case "CALL_MISSED_VOICE":
            case 40:
                message.messageStubType = 40;
                break;
            case "CALL_MISSED_VIDEO":
            case 41:
                message.messageStubType = 41;
                break;
            case "INDIVIDUAL_CHANGE_NUMBER":
            case 42:
                message.messageStubType = 42;
                break;
            case "GROUP_DELETE":
            case 43:
                message.messageStubType = 43;
                break;
            case "GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE":
            case 44:
                message.messageStubType = 44;
                break;
            case "CALL_MISSED_GROUP_VOICE":
            case 45:
                message.messageStubType = 45;
                break;
            case "CALL_MISSED_GROUP_VIDEO":
            case 46:
                message.messageStubType = 46;
                break;
            case "PAYMENT_CIPHERTEXT":
            case 47:
                message.messageStubType = 47;
                break;
            case "PAYMENT_FUTUREPROOF":
            case 48:
                message.messageStubType = 48;
                break;
            case "PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED":
            case 49:
                message.messageStubType = 49;
                break;
            case "PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED":
            case 50:
                message.messageStubType = 50;
                break;
            case "PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED":
            case 51:
                message.messageStubType = 51;
                break;
            case "PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP":
            case 52:
                message.messageStubType = 52;
                break;
            case "PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP":
            case 53:
                message.messageStubType = 53;
                break;
            case "PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER":
            case 54:
                message.messageStubType = 54;
                break;
            case "PAYMENT_ACTION_SEND_PAYMENT_REMINDER":
            case 55:
                message.messageStubType = 55;
                break;
            case "PAYMENT_ACTION_SEND_PAYMENT_INVITATION":
            case 56:
                message.messageStubType = 56;
                break;
            case "PAYMENT_ACTION_REQUEST_DECLINED":
            case 57:
                message.messageStubType = 57;
                break;
            case "PAYMENT_ACTION_REQUEST_EXPIRED":
            case 58:
                message.messageStubType = 58;
                break;
            case "PAYMENT_ACTION_REQUEST_CANCELLED":
            case 59:
                message.messageStubType = 59;
                break;
            case "BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM":
            case 60:
                message.messageStubType = 60;
                break;
            case "BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP":
            case 61:
                message.messageStubType = 61;
                break;
            case "BIZ_INTRO_TOP":
            case 62:
                message.messageStubType = 62;
                break;
            case "BIZ_INTRO_BOTTOM":
            case 63:
                message.messageStubType = 63;
                break;
            case "BIZ_NAME_CHANGE":
            case 64:
                message.messageStubType = 64;
                break;
            case "BIZ_MOVE_TO_CONSUMER_APP":
            case 65:
                message.messageStubType = 65;
                break;
            case "BIZ_TWO_TIER_MIGRATION_TOP":
            case 66:
                message.messageStubType = 66;
                break;
            case "BIZ_TWO_TIER_MIGRATION_BOTTOM":
            case 67:
                message.messageStubType = 67;
                break;
            case "OVERSIZED":
            case 68:
                message.messageStubType = 68;
                break;
            case "GROUP_CHANGE_NO_FREQUENTLY_FORWARDED":
            case 69:
                message.messageStubType = 69;
                break;
            case "GROUP_V4_ADD_INVITE_SENT":
            case 70:
                message.messageStubType = 70;
                break;
            case "GROUP_PARTICIPANT_ADD_REQUEST_JOIN":
            case 71:
                message.messageStubType = 71;
                break;
            case "CHANGE_EPHEMERAL_SETTING":
            case 72:
                message.messageStubType = 72;
                break;
            case "E2E_DEVICE_CHANGED":
            case 73:
                message.messageStubType = 73;
                break;
            case "VIEWED_ONCE":
            case 74:
                message.messageStubType = 74;
                break;
            case "E2E_ENCRYPTED_NOW":
            case 75:
                message.messageStubType = 75;
                break;
            case "BLUE_MSG_BSP_FB_TO_BSP_PREMISE":
            case 76:
                message.messageStubType = 76;
                break;
            case "BLUE_MSG_BSP_FB_TO_SELF_FB":
            case 77:
                message.messageStubType = 77;
                break;
            case "BLUE_MSG_BSP_FB_TO_SELF_PREMISE":
            case 78:
                message.messageStubType = 78;
                break;
            case "BLUE_MSG_BSP_FB_UNVERIFIED":
            case 79:
                message.messageStubType = 79;
                break;
            case "BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED":
            case 80:
                message.messageStubType = 80;
                break;
            case "BLUE_MSG_BSP_FB_VERIFIED":
            case 81:
                message.messageStubType = 81;
                break;
            case "BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED":
            case 82:
                message.messageStubType = 82;
                break;
            case "BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE":
            case 83:
                message.messageStubType = 83;
                break;
            case "BLUE_MSG_BSP_PREMISE_UNVERIFIED":
            case 84:
                message.messageStubType = 84;
                break;
            case "BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED":
            case 85:
                message.messageStubType = 85;
                break;
            case "BLUE_MSG_BSP_PREMISE_VERIFIED":
            case 86:
                message.messageStubType = 86;
                break;
            case "BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED":
            case 87:
                message.messageStubType = 87;
                break;
            case "BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED":
            case 88:
                message.messageStubType = 88;
                break;
            case "BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED":
            case 89:
                message.messageStubType = 89;
                break;
            case "BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED":
            case 90:
                message.messageStubType = 90;
                break;
            case "BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED":
            case 91:
                message.messageStubType = 91;
                break;
            case "BLUE_MSG_SELF_FB_TO_BSP_PREMISE":
            case 92:
                message.messageStubType = 92;
                break;
            case "BLUE_MSG_SELF_FB_TO_SELF_PREMISE":
            case 93:
                message.messageStubType = 93;
                break;
            case "BLUE_MSG_SELF_FB_UNVERIFIED":
            case 94:
                message.messageStubType = 94;
                break;
            case "BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED":
            case 95:
                message.messageStubType = 95;
                break;
            case "BLUE_MSG_SELF_FB_VERIFIED":
            case 96:
                message.messageStubType = 96;
                break;
            case "BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED":
            case 97:
                message.messageStubType = 97;
                break;
            case "BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE":
            case 98:
                message.messageStubType = 98;
                break;
            case "BLUE_MSG_SELF_PREMISE_UNVERIFIED":
            case 99:
                message.messageStubType = 99;
                break;
            case "BLUE_MSG_SELF_PREMISE_VERIFIED":
            case 100:
                message.messageStubType = 100;
                break;
            case "BLUE_MSG_TO_BSP_FB":
            case 101:
                message.messageStubType = 101;
                break;
            case "BLUE_MSG_TO_CONSUMER":
            case 102:
                message.messageStubType = 102;
                break;
            case "BLUE_MSG_TO_SELF_FB":
            case 103:
                message.messageStubType = 103;
                break;
            case "BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED":
            case 104:
                message.messageStubType = 104;
                break;
            case "BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED":
            case 105:
                message.messageStubType = 105;
                break;
            case "BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED":
            case 106:
                message.messageStubType = 106;
                break;
            case "BLUE_MSG_UNVERIFIED_TO_VERIFIED":
            case 107:
                message.messageStubType = 107;
                break;
            case "BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED":
            case 108:
                message.messageStubType = 108;
                break;
            case "BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED":
            case 109:
                message.messageStubType = 109;
                break;
            case "BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED":
            case 110:
                message.messageStubType = 110;
                break;
            case "BLUE_MSG_VERIFIED_TO_UNVERIFIED":
            case 111:
                message.messageStubType = 111;
                break;
            case "BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED":
            case 112:
                message.messageStubType = 112;
                break;
            case "BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED":
            case 113:
                message.messageStubType = 113;
                break;
            case "BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED":
            case 114:
                message.messageStubType = 114;
                break;
            case "BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED":
            case 115:
                message.messageStubType = 115;
                break;
            case "BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED":
            case 116:
                message.messageStubType = 116;
                break;
            case "BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED":
            case 117:
                message.messageStubType = 117;
                break;
            case "E2E_IDENTITY_UNAVAILABLE":
            case 118:
                message.messageStubType = 118;
                break;
            case "GROUP_CREATING":
            case 119:
                message.messageStubType = 119;
                break;
            case "GROUP_CREATE_FAILED":
            case 120:
                message.messageStubType = 120;
                break;
            case "GROUP_BOUNCED":
            case 121:
                message.messageStubType = 121;
                break;
            case "BLOCK_CONTACT":
            case 122:
                message.messageStubType = 122;
                break;
            case "EPHEMERAL_SETTING_NOT_APPLIED":
            case 123:
                message.messageStubType = 123;
                break;
            case "SYNC_FAILED":
            case 124:
                message.messageStubType = 124;
                break;
            case "SYNCING":
            case 125:
                message.messageStubType = 125;
                break;
            case "BIZ_PRIVACY_MODE_INIT_FB":
            case 126:
                message.messageStubType = 126;
                break;
            case "BIZ_PRIVACY_MODE_INIT_BSP":
            case 127:
                message.messageStubType = 127;
                break;
            case "BIZ_PRIVACY_MODE_TO_FB":
            case 128:
                message.messageStubType = 128;
                break;
            case "BIZ_PRIVACY_MODE_TO_BSP":
            case 129:
                message.messageStubType = 129;
                break;
            case "DISAPPEARING_MODE":
            case 130:
                message.messageStubType = 130;
                break;
            case "E2E_DEVICE_FETCH_FAILED":
            case 131:
                message.messageStubType = 131;
                break;
            case "ADMIN_REVOKE":
            case 132:
                message.messageStubType = 132;
                break;
            case "GROUP_INVITE_LINK_GROWTH_LOCKED":
            case 133:
                message.messageStubType = 133;
                break;
            case "COMMUNITY_LINK_PARENT_GROUP":
            case 134:
                message.messageStubType = 134;
                break;
            case "COMMUNITY_LINK_SIBLING_GROUP":
            case 135:
                message.messageStubType = 135;
                break;
            case "COMMUNITY_LINK_SUB_GROUP":
            case 136:
                message.messageStubType = 136;
                break;
            case "COMMUNITY_UNLINK_PARENT_GROUP":
            case 137:
                message.messageStubType = 137;
                break;
            case "COMMUNITY_UNLINK_SIBLING_GROUP":
            case 138:
                message.messageStubType = 138;
                break;
            case "COMMUNITY_UNLINK_SUB_GROUP":
            case 139:
                message.messageStubType = 139;
                break;
            case "GROUP_PARTICIPANT_ACCEPT":
            case 140:
                message.messageStubType = 140;
                break;
            case "GROUP_PARTICIPANT_LINKED_GROUP_JOIN":
            case 141:
                message.messageStubType = 141;
                break;
            case "COMMUNITY_CREATE":
            case 142:
                message.messageStubType = 142;
                break;
            case "EPHEMERAL_KEEP_IN_CHAT":
            case 143:
                message.messageStubType = 143;
                break;
            case "GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST":
            case 144:
                message.messageStubType = 144;
                break;
            case "GROUP_MEMBERSHIP_JOIN_APPROVAL_MODE":
            case 145:
                message.messageStubType = 145;
                break;
            case "INTEGRITY_UNLINK_PARENT_GROUP":
            case 146:
                message.messageStubType = 146;
                break;
            case "COMMUNITY_PARTICIPANT_PROMOTE":
            case 147:
                message.messageStubType = 147;
                break;
            case "COMMUNITY_PARTICIPANT_DEMOTE":
            case 148:
                message.messageStubType = 148;
                break;
            case "COMMUNITY_PARENT_GROUP_DELETED":
            case 149:
                message.messageStubType = 149;
                break;
            case "COMMUNITY_LINK_PARENT_GROUP_MEMBERSHIP_APPROVAL":
            case 150:
                message.messageStubType = 150;
                break;
            case "GROUP_PARTICIPANT_JOINED_GROUP_AND_PARENT_GROUP":
            case 151:
                message.messageStubType = 151;
                break;
            case "MASKED_THREAD_CREATED":
            case 152:
                message.messageStubType = 152;
                break;
            case "MASKED_THREAD_UNMASKED":
            case 153:
                message.messageStubType = 153;
                break;
            case "BIZ_CHAT_ASSIGNMENT":
            case 154:
                message.messageStubType = 154;
                break;
            case "CHAT_PSA":
            case 155:
                message.messageStubType = 155;
                break;
            case "CHAT_POLL_CREATION_MESSAGE":
            case 156:
                message.messageStubType = 156;
                break;
            case "CAG_MASKED_THREAD_CREATED":
            case 157:
                message.messageStubType = 157;
                break;
            case "COMMUNITY_PARENT_GROUP_SUBJECT_CHANGED":
            case 158:
                message.messageStubType = 158;
                break;
            case "CAG_INVITE_AUTO_ADD":
            case 159:
                message.messageStubType = 159;
                break;
            case "BIZ_CHAT_ASSIGNMENT_UNASSIGN":
            case 160:
                message.messageStubType = 160;
                break;
            case "CAG_INVITE_AUTO_JOINED":
            case 161:
                message.messageStubType = 161;
                break;
            case "SCHEDULED_CALL_START_MESSAGE":
            case 162:
                message.messageStubType = 162;
                break;
            case "COMMUNITY_INVITE_RICH":
            case 163:
                message.messageStubType = 163;
                break;
            case "COMMUNITY_INVITE_AUTO_ADD_RICH":
            case 164:
                message.messageStubType = 164;
                break;
            case "SUB_GROUP_INVITE_RICH":
            case 165:
                message.messageStubType = 165;
                break;
            case "SUB_GROUP_PARTICIPANT_ADD_RICH":
            case 166:
                message.messageStubType = 166;
                break;
            case "COMMUNITY_LINK_PARENT_GROUP_RICH":
            case 167:
                message.messageStubType = 167;
                break;
            case "COMMUNITY_PARTICIPANT_ADD_RICH":
            case 168:
                message.messageStubType = 168;
                break;
            case "SILENCED_UNKNOWN_CALLER_AUDIO":
            case 169:
                message.messageStubType = 169;
                break;
            case "SILENCED_UNKNOWN_CALLER_VIDEO":
            case 170:
                message.messageStubType = 170;
                break;
            case "GROUP_MEMBER_ADD_MODE":
            case 171:
                message.messageStubType = 171;
                break;
            case "GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST_NON_ADMIN_ADD":
            case 172:
                message.messageStubType = 172;
                break;
            case "COMMUNITY_CHANGE_DESCRIPTION":
            case 173:
                message.messageStubType = 173;
                break;
            case "SENDER_INVITE":
            case 174:
                message.messageStubType = 174;
                break;
            case "RECEIVER_INVITE":
            case 175:
                message.messageStubType = 175;
                break;
            case "COMMUNITY_ALLOW_MEMBER_ADDED_GROUPS":
            case 176:
                message.messageStubType = 176;
                break;
            case "PINNED_MESSAGE_IN_CHAT":
            case 177:
                message.messageStubType = 177;
                break;
            case "PAYMENT_INVITE_SETUP_INVITER":
            case 178:
                message.messageStubType = 178;
                break;
            case "PAYMENT_INVITE_SETUP_INVITEE_RECEIVE_ONLY":
            case 179:
                message.messageStubType = 179;
                break;
            case "PAYMENT_INVITE_SETUP_INVITEE_SEND_AND_RECEIVE":
            case 180:
                message.messageStubType = 180;
                break;
            case "LINKED_GROUP_CALL_START":
            case 181:
                message.messageStubType = 181;
                break;
            case "REPORT_TO_ADMIN_ENABLED_STATUS":
            case 182:
                message.messageStubType = 182;
                break;
            case "EMPTY_SUBGROUP_CREATE":
            case 183:
                message.messageStubType = 183;
                break;
            case "SCHEDULED_CALL_CANCEL":
            case 184:
                message.messageStubType = 184;
                break;
            case "SUBGROUP_ADMIN_TRIGGERED_AUTO_ADD_RICH":
            case 185:
                message.messageStubType = 185;
                break;
            case "GROUP_CHANGE_RECENT_HISTORY_SHARING":
            case 186:
                message.messageStubType = 186;
                break;
            case "PAID_MESSAGE_SERVER_CAMPAIGN_ID":
            case 187:
                message.messageStubType = 187;
                break;
            case "GENERAL_CHAT_CREATE":
            case 188:
                message.messageStubType = 188;
                break;
            case "GENERAL_CHAT_ADD":
            case 189:
                message.messageStubType = 189;
                break;
            case "GENERAL_CHAT_AUTO_ADD_DISABLED":
            case 190:
                message.messageStubType = 190;
                break;
            case "SUGGESTED_SUBGROUP_ANNOUNCE":
            case 191:
                message.messageStubType = 191;
                break;
            case "BIZ_BOT_1P_MESSAGING_ENABLED":
            case 192:
                message.messageStubType = 192;
                break;
            case "CHANGE_USERNAME":
            case 193:
                message.messageStubType = 193;
                break;
            case "BIZ_COEX_PRIVACY_INIT_SELF":
            case 194:
                message.messageStubType = 194;
                break;
            case "BIZ_COEX_PRIVACY_TRANSITION_SELF":
            case 195:
                message.messageStubType = 195;
                break;
            case "SUPPORT_AI_EDUCATION":
            case 196:
                message.messageStubType = 196;
                break;
            case "BIZ_BOT_3P_MESSAGING_ENABLED":
            case 197:
                message.messageStubType = 197;
                break;
            case "REMINDER_SETUP_MESSAGE":
            case 198:
                message.messageStubType = 198;
                break;
            case "REMINDER_SENT_MESSAGE":
            case 199:
                message.messageStubType = 199;
                break;
            case "REMINDER_CANCEL_MESSAGE":
            case 200:
                message.messageStubType = 200;
                break;
            case "BIZ_COEX_PRIVACY_INIT":
            case 201:
                message.messageStubType = 201;
                break;
            case "BIZ_COEX_PRIVACY_TRANSITION":
            case 202:
                message.messageStubType = 202;
                break;
            case "GROUP_DEACTIVATED":
            case 203:
                message.messageStubType = 203;
                break;
            case "COMMUNITY_DEACTIVATE_SIBLING_GROUP":
            case 204:
                message.messageStubType = 204;
                break;
            case "EVENT_UPDATED":
            case 205:
                message.messageStubType = 205;
                break;
            case "EVENT_CANCELED":
            case 206:
                message.messageStubType = 206;
                break;
            case "COMMUNITY_OWNER_UPDATED":
            case 207:
                message.messageStubType = 207;
                break;
            case "COMMUNITY_SUB_GROUP_VISIBILITY_HIDDEN":
            case 208:
                message.messageStubType = 208;
                break;
            case "CAPI_GROUP_NE2EE_SYSTEM_MESSAGE":
            case 209:
                message.messageStubType = 209;
                break;
            case "STATUS_MENTION":
            case 210:
                message.messageStubType = 210;
                break;
            case "USER_CONTROLS_SYSTEM_MESSAGE":
            case 211:
                message.messageStubType = 211;
                break;
            case "SUPPORT_SYSTEM_MESSAGE":
            case 212:
                message.messageStubType = 212;
                break;
            case "CHANGE_LID":
            case 213:
                message.messageStubType = 213;
                break;
            case "BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_IN_MESSAGE":
            case 214:
                message.messageStubType = 214;
                break;
            case "BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_OUT_MESSAGE":
            case 215:
                message.messageStubType = 215;
                break;
            case "CHANGE_LIMIT_SHARING":
            case 216:
                message.messageStubType = 216;
                break;
            case "GROUP_MEMBER_LINK_MODE":
            case 217:
                message.messageStubType = 217;
                break;
            case "BIZ_AUTOMATICALLY_LABELED_CHAT_SYSTEM_MESSAGE":
            case 218:
                message.messageStubType = 218;
                break;
            case "PHONE_NUMBER_HIDING_CHAT_DEPRECATED_MESSAGE":
            case 219:
                message.messageStubType = 219;
                break;
            case "QUARANTINED_MESSAGE":
            case 220:
                message.messageStubType = 220;
                break;
            case "GROUP_MEMBER_SHARE_GROUP_HISTORY_MODE":
            case 221:
                message.messageStubType = 221;
                break;
            case "GROUP_OPEN_BOT_ADDED":
            case 222:
                message.messageStubType = 222;
                break;
            case "GROUP_TEE_BOT_ADDED":
            case 223:
                message.messageStubType = 223;
                break;
            }
            if (object.clearMedia != null)
                message.clearMedia = Boolean(object.clearMedia);
            if (object.messageStubParameters) {
                if (!Array.isArray(object.messageStubParameters))
                    throw TypeError(".Web.WebMessageInfo.messageStubParameters: array expected");
                message.messageStubParameters = [];
                for (var i = 0; i < object.messageStubParameters.length; ++i)
                    message.messageStubParameters[i] = String(object.messageStubParameters[i]);
            }
            if (object.duration != null)
                message.duration = object.duration >>> 0;
            if (object.labels) {
                if (!Array.isArray(object.labels))
                    throw TypeError(".Web.WebMessageInfo.labels: array expected");
                message.labels = [];
                for (var i = 0; i < object.labels.length; ++i)
                    message.labels[i] = String(object.labels[i]);
            }
            if (object.paymentInfo != null) {
                if (typeof object.paymentInfo !== "object")
                    throw TypeError(".Web.WebMessageInfo.paymentInfo: object expected");
                message.paymentInfo = $root.Web.PaymentInfo.fromObject(object.paymentInfo);
            }
            if (object.finalLiveLocation != null) {
                if (typeof object.finalLiveLocation !== "object")
                    throw TypeError(".Web.WebMessageInfo.finalLiveLocation: object expected");
                message.finalLiveLocation = $root.E2E.Message.LiveLocationMessage.fromObject(object.finalLiveLocation);
            }
            if (object.quotedPaymentInfo != null) {
                if (typeof object.quotedPaymentInfo !== "object")
                    throw TypeError(".Web.WebMessageInfo.quotedPaymentInfo: object expected");
                message.quotedPaymentInfo = $root.Web.PaymentInfo.fromObject(object.quotedPaymentInfo);
            }
            if (object.ephemeralStartTimestamp != null)
                if ($util.Long)
                    (message.ephemeralStartTimestamp = $util.Long.fromValue(object.ephemeralStartTimestamp)).unsigned = true;
                else if (typeof object.ephemeralStartTimestamp === "string")
                    message.ephemeralStartTimestamp = parseInt(object.ephemeralStartTimestamp, 10);
                else if (typeof object.ephemeralStartTimestamp === "number")
                    message.ephemeralStartTimestamp = object.ephemeralStartTimestamp;
                else if (typeof object.ephemeralStartTimestamp === "object")
                    message.ephemeralStartTimestamp = new $util.LongBits(object.ephemeralStartTimestamp.low >>> 0, object.ephemeralStartTimestamp.high >>> 0).toNumber(true);
            if (object.ephemeralDuration != null)
                message.ephemeralDuration = object.ephemeralDuration >>> 0;
            if (object.ephemeralOffToOn != null)
                message.ephemeralOffToOn = Boolean(object.ephemeralOffToOn);
            if (object.ephemeralOutOfSync != null)
                message.ephemeralOutOfSync = Boolean(object.ephemeralOutOfSync);
            switch (object.bizPrivacyStatus) {
            default:
                if (typeof object.bizPrivacyStatus === "number") {
                    message.bizPrivacyStatus = object.bizPrivacyStatus;
                    break;
                }
                break;
            case "E2EE":
            case 0:
                message.bizPrivacyStatus = 0;
                break;
            case "FB":
            case 2:
                message.bizPrivacyStatus = 2;
                break;
            case "BSP":
            case 1:
                message.bizPrivacyStatus = 1;
                break;
            case "BSP_AND_FB":
            case 3:
                message.bizPrivacyStatus = 3;
                break;
            }
            if (object.verifiedBizName != null)
                message.verifiedBizName = String(object.verifiedBizName);
            if (object.mediaData != null) {
                if (typeof object.mediaData !== "object")
                    throw TypeError(".Web.WebMessageInfo.mediaData: object expected");
                message.mediaData = $root.E2E.PaymentBackground.MediaData.fromObject(object.mediaData);
            }
            if (object.photoChange != null) {
                if (typeof object.photoChange !== "object")
                    throw TypeError(".Web.WebMessageInfo.photoChange: object expected");
                message.photoChange = $root.Web.PhotoChange.fromObject(object.photoChange);
            }
            if (object.userReceipt) {
                if (!Array.isArray(object.userReceipt))
                    throw TypeError(".Web.WebMessageInfo.userReceipt: array expected");
                message.userReceipt = [];
                for (var i = 0; i < object.userReceipt.length; ++i) {
                    if (typeof object.userReceipt[i] !== "object")
                        throw TypeError(".Web.WebMessageInfo.userReceipt: object expected");
                    message.userReceipt[i] = $root.Web.UserReceipt.fromObject(object.userReceipt[i]);
                }
            }
            if (object.reactions) {
                if (!Array.isArray(object.reactions))
                    throw TypeError(".Web.WebMessageInfo.reactions: array expected");
                message.reactions = [];
                for (var i = 0; i < object.reactions.length; ++i) {
                    if (typeof object.reactions[i] !== "object")
                        throw TypeError(".Web.WebMessageInfo.reactions: object expected");
                    message.reactions[i] = $root.Web.Reaction.fromObject(object.reactions[i]);
                }
            }
            if (object.quotedStickerData != null) {
                if (typeof object.quotedStickerData !== "object")
                    throw TypeError(".Web.WebMessageInfo.quotedStickerData: object expected");
                message.quotedStickerData = $root.E2E.PaymentBackground.MediaData.fromObject(object.quotedStickerData);
            }
            if (object.futureproofData != null)
                if (typeof object.futureproofData === "string")
                    $util.base64.decode(object.futureproofData, message.futureproofData = $util.newBuffer($util.base64.length(object.futureproofData)), 0);
                else if (object.futureproofData.length >= 0)
                    message.futureproofData = object.futureproofData;
            if (object.statusPsa != null) {
                if (typeof object.statusPsa !== "object")
                    throw TypeError(".Web.WebMessageInfo.statusPsa: object expected");
                message.statusPsa = $root.Web.StatusPSA.fromObject(object.statusPsa);
            }
            if (object.pollUpdates) {
                if (!Array.isArray(object.pollUpdates))
                    throw TypeError(".Web.WebMessageInfo.pollUpdates: array expected");
                message.pollUpdates = [];
                for (var i = 0; i < object.pollUpdates.length; ++i) {
                    if (typeof object.pollUpdates[i] !== "object")
                        throw TypeError(".Web.WebMessageInfo.pollUpdates: object expected");
                    message.pollUpdates[i] = $root.Web.PollUpdate.fromObject(object.pollUpdates[i]);
                }
            }
            if (object.pollAdditionalMetadata != null) {
                if (typeof object.pollAdditionalMetadata !== "object")
                    throw TypeError(".Web.WebMessageInfo.pollAdditionalMetadata: object expected");
                message.pollAdditionalMetadata = $root.Web.PollAdditionalMetadata.fromObject(object.pollAdditionalMetadata);
            }
            if (object.agentId != null)
                message.agentId = String(object.agentId);
            if (object.statusAlreadyViewed != null)
                message.statusAlreadyViewed = Boolean(object.statusAlreadyViewed);
            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.keepInChat != null) {
                if (typeof object.keepInChat !== "object")
                    throw TypeError(".Web.WebMessageInfo.keepInChat: object expected");
                message.keepInChat = $root.Web.KeepInChat.fromObject(object.keepInChat);
            }
            if (object.originalSelfAuthorUserJidString != null)
                message.originalSelfAuthorUserJidString = String(object.originalSelfAuthorUserJidString);
            if (object.revokeMessageTimestamp != null)
                if ($util.Long)
                    (message.revokeMessageTimestamp = $util.Long.fromValue(object.revokeMessageTimestamp)).unsigned = true;
                else if (typeof object.revokeMessageTimestamp === "string")
                    message.revokeMessageTimestamp = parseInt(object.revokeMessageTimestamp, 10);
                else if (typeof object.revokeMessageTimestamp === "number")
                    message.revokeMessageTimestamp = object.revokeMessageTimestamp;
                else if (typeof object.revokeMessageTimestamp === "object")
                    message.revokeMessageTimestamp = new $util.LongBits(object.revokeMessageTimestamp.low >>> 0, object.revokeMessageTimestamp.high >>> 0).toNumber(true);
            if (object.pinInChat != null) {
                if (typeof object.pinInChat !== "object")
                    throw TypeError(".Web.WebMessageInfo.pinInChat: object expected");
                message.pinInChat = $root.Web.PinInChat.fromObject(object.pinInChat);
            }
            if (object.premiumMessageInfo != null) {
                if (typeof object.premiumMessageInfo !== "object")
                    throw TypeError(".Web.WebMessageInfo.premiumMessageInfo: object expected");
                message.premiumMessageInfo = $root.Web.PremiumMessageInfo.fromObject(object.premiumMessageInfo);
            }
            if (object.is1PBizBotMessage != null)
                message.is1PBizBotMessage = Boolean(object.is1PBizBotMessage);
            if (object.isGroupHistoryMessage != null)
                message.isGroupHistoryMessage = Boolean(object.isGroupHistoryMessage);
            if (object.botMessageInvokerJid != null)
                message.botMessageInvokerJid = String(object.botMessageInvokerJid);
            if (object.commentMetadata != null) {
                if (typeof object.commentMetadata !== "object")
                    throw TypeError(".Web.WebMessageInfo.commentMetadata: object expected");
                message.commentMetadata = $root.Web.CommentMetadata.fromObject(object.commentMetadata);
            }
            if (object.eventResponses) {
                if (!Array.isArray(object.eventResponses))
                    throw TypeError(".Web.WebMessageInfo.eventResponses: array expected");
                message.eventResponses = [];
                for (var i = 0; i < object.eventResponses.length; ++i) {
                    if (typeof object.eventResponses[i] !== "object")
                        throw TypeError(".Web.WebMessageInfo.eventResponses: object expected");
                    message.eventResponses[i] = $root.Web.EventResponse.fromObject(object.eventResponses[i]);
                }
            }
            if (object.reportingTokenInfo != null) {
                if (typeof object.reportingTokenInfo !== "object")
                    throw TypeError(".Web.WebMessageInfo.reportingTokenInfo: object expected");
                message.reportingTokenInfo = $root.Web.ReportingTokenInfo.fromObject(object.reportingTokenInfo);
            }
            if (object.newsletterServerId != null)
                if ($util.Long)
                    (message.newsletterServerId = $util.Long.fromValue(object.newsletterServerId)).unsigned = true;
                else if (typeof object.newsletterServerId === "string")
                    message.newsletterServerId = parseInt(object.newsletterServerId, 10);
                else if (typeof object.newsletterServerId === "number")
                    message.newsletterServerId = object.newsletterServerId;
                else if (typeof object.newsletterServerId === "object")
                    message.newsletterServerId = new $util.LongBits(object.newsletterServerId.low >>> 0, object.newsletterServerId.high >>> 0).toNumber(true);
            if (object.eventAdditionalMetadata != null) {
                if (typeof object.eventAdditionalMetadata !== "object")
                    throw TypeError(".Web.WebMessageInfo.eventAdditionalMetadata: object expected");
                message.eventAdditionalMetadata = $root.Web.EventAdditionalMetadata.fromObject(object.eventAdditionalMetadata);
            }
            if (object.isMentionedInStatus != null)
                message.isMentionedInStatus = Boolean(object.isMentionedInStatus);
            if (object.statusMentions) {
                if (!Array.isArray(object.statusMentions))
                    throw TypeError(".Web.WebMessageInfo.statusMentions: array expected");
                message.statusMentions = [];
                for (var i = 0; i < object.statusMentions.length; ++i)
                    message.statusMentions[i] = String(object.statusMentions[i]);
            }
            if (object.targetMessageId != null) {
                if (typeof object.targetMessageId !== "object")
                    throw TypeError(".Web.WebMessageInfo.targetMessageId: object expected");
                message.targetMessageId = $root.Protocol.MessageKey.fromObject(object.targetMessageId);
            }
            if (object.messageAddOns) {
                if (!Array.isArray(object.messageAddOns))
                    throw TypeError(".Web.WebMessageInfo.messageAddOns: array expected");
                message.messageAddOns = [];
                for (var i = 0; i < object.messageAddOns.length; ++i) {
                    if (typeof object.messageAddOns[i] !== "object")
                        throw TypeError(".Web.WebMessageInfo.messageAddOns: object expected");
                    message.messageAddOns[i] = $root.Web.MessageAddOn.fromObject(object.messageAddOns[i]);
                }
            }
            if (object.statusMentionMessageInfo != null) {
                if (typeof object.statusMentionMessageInfo !== "object")
                    throw TypeError(".Web.WebMessageInfo.statusMentionMessageInfo: object expected");
                message.statusMentionMessageInfo = $root.Web.StatusMentionMessage.fromObject(object.statusMentionMessageInfo);
            }
            if (object.isSupportAiMessage != null)
                message.isSupportAiMessage = Boolean(object.isSupportAiMessage);
            if (object.statusMentionSources) {
                if (!Array.isArray(object.statusMentionSources))
                    throw TypeError(".Web.WebMessageInfo.statusMentionSources: array expected");
                message.statusMentionSources = [];
                for (var i = 0; i < object.statusMentionSources.length; ++i)
                    message.statusMentionSources[i] = String(object.statusMentionSources[i]);
            }
            if (object.supportAiCitations) {
                if (!Array.isArray(object.supportAiCitations))
                    throw TypeError(".Web.WebMessageInfo.supportAiCitations: array expected");
                message.supportAiCitations = [];
                for (var i = 0; i < object.supportAiCitations.length; ++i) {
                    if (typeof object.supportAiCitations[i] !== "object")
                        throw TypeError(".Web.WebMessageInfo.supportAiCitations: object expected");
                    message.supportAiCitations[i] = $root.Web.Citation.fromObject(object.supportAiCitations[i]);
                }
            }
            if (object.botTargetId != null)
                message.botTargetId = String(object.botTargetId);
            if (object.groupHistoryIndividualMessageInfo != null) {
                if (typeof object.groupHistoryIndividualMessageInfo !== "object")
                    throw TypeError(".Web.WebMessageInfo.groupHistoryIndividualMessageInfo: object expected");
                message.groupHistoryIndividualMessageInfo = $root.Web.GroupHistoryIndividualMessageInfo.fromObject(object.groupHistoryIndividualMessageInfo);
            }
            if (object.groupHistoryBundleInfo != null) {
                if (typeof object.groupHistoryBundleInfo !== "object")
                    throw TypeError(".Web.WebMessageInfo.groupHistoryBundleInfo: object expected");
                message.groupHistoryBundleInfo = $root.Web.GroupHistoryBundleInfo.fromObject(object.groupHistoryBundleInfo);
            }
            if (object.interactiveMessageAdditionalMetadata != null) {
                if (typeof object.interactiveMessageAdditionalMetadata !== "object")
                    throw TypeError(".Web.WebMessageInfo.interactiveMessageAdditionalMetadata: object expected");
                message.interactiveMessageAdditionalMetadata = $root.Web.InteractiveMessageAdditionalMetadata.fromObject(object.interactiveMessageAdditionalMetadata);
            }
            if (object.quarantinedMessage != null) {
                if (typeof object.quarantinedMessage !== "object")
                    throw TypeError(".Web.WebMessageInfo.quarantinedMessage: object expected");
                message.quarantinedMessage = $root.Web.QuarantinedMessage.fromObject(object.quarantinedMessage);
            }
            return message;
        };

        /**
         * Creates a plain object from a WebMessageInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Web.WebMessageInfo
         * @static
         * @param {Web.WebMessageInfo} message WebMessageInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        WebMessageInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults) {
                object.messageStubParameters = [];
                object.labels = [];
                object.userReceipt = [];
                object.reactions = [];
                object.pollUpdates = [];
                object.eventResponses = [];
                object.statusMentions = [];
                object.messageAddOns = [];
                object.statusMentionSources = [];
                object.supportAiCitations = [];
            }
            if (message.key != null && message.hasOwnProperty("key")) {
                object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                if (options.oneofs)
                    object._key = "key";
            }
            if (message.message != null && message.hasOwnProperty("message")) {
                object.message = $root.E2E.Message.toObject(message.message, options);
                if (options.oneofs)
                    object._message = "message";
            }
            if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) {
                if (typeof message.messageTimestamp === "number")
                    object.messageTimestamp = options.longs === String ? String(message.messageTimestamp) : message.messageTimestamp;
                else
                    object.messageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.messageTimestamp) : options.longs === Number ? new $util.LongBits(message.messageTimestamp.low >>> 0, message.messageTimestamp.high >>> 0).toNumber(true) : message.messageTimestamp;
                if (options.oneofs)
                    object._messageTimestamp = "messageTimestamp";
            }
            if (message.status != null && message.hasOwnProperty("status")) {
                object.status = options.enums === String ? $root.Web.WebMessageInfo.Status[message.status] === undefined ? message.status : $root.Web.WebMessageInfo.Status[message.status] : message.status;
                if (options.oneofs)
                    object._status = "status";
            }
            if (message.participant != null && message.hasOwnProperty("participant")) {
                object.participant = message.participant;
                if (options.oneofs)
                    object._participant = "participant";
            }
            if (message.messageC2STimestamp != null && message.hasOwnProperty("messageC2STimestamp")) {
                if (typeof message.messageC2STimestamp === "number")
                    object.messageC2STimestamp = options.longs === String ? String(message.messageC2STimestamp) : message.messageC2STimestamp;
                else
                    object.messageC2STimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.messageC2STimestamp) : options.longs === Number ? new $util.LongBits(message.messageC2STimestamp.low >>> 0, message.messageC2STimestamp.high >>> 0).toNumber(true) : message.messageC2STimestamp;
                if (options.oneofs)
                    object._messageC2STimestamp = "messageC2STimestamp";
            }
            if (message.ignore != null && message.hasOwnProperty("ignore")) {
                object.ignore = message.ignore;
                if (options.oneofs)
                    object._ignore = "ignore";
            }
            if (message.starred != null && message.hasOwnProperty("starred")) {
                object.starred = message.starred;
                if (options.oneofs)
                    object._starred = "starred";
            }
            if (message.broadcast != null && message.hasOwnProperty("broadcast")) {
                object.broadcast = message.broadcast;
                if (options.oneofs)
                    object._broadcast = "broadcast";
            }
            if (message.pushName != null && message.hasOwnProperty("pushName")) {
                object.pushName = message.pushName;
                if (options.oneofs)
                    object._pushName = "pushName";
            }
            if (message.mediaCiphertextSha256 != null && message.hasOwnProperty("mediaCiphertextSha256")) {
                object.mediaCiphertextSha256 = options.bytes === String ? $util.base64.encode(message.mediaCiphertextSha256, 0, message.mediaCiphertextSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaCiphertextSha256) : message.mediaCiphertextSha256;
                if (options.oneofs)
                    object._mediaCiphertextSha256 = "mediaCiphertextSha256";
            }
            if (message.multicast != null && message.hasOwnProperty("multicast")) {
                object.multicast = message.multicast;
                if (options.oneofs)
                    object._multicast = "multicast";
            }
            if (message.urlText != null && message.hasOwnProperty("urlText")) {
                object.urlText = message.urlText;
                if (options.oneofs)
                    object._urlText = "urlText";
            }
            if (message.urlNumber != null && message.hasOwnProperty("urlNumber")) {
                object.urlNumber = message.urlNumber;
                if (options.oneofs)
                    object._urlNumber = "urlNumber";
            }
            if (message.messageStubType != null && message.hasOwnProperty("messageStubType")) {
                object.messageStubType = options.enums === String ? $root.Web.WebMessageInfo.StubType[message.messageStubType] === undefined ? message.messageStubType : $root.Web.WebMessageInfo.StubType[message.messageStubType] : message.messageStubType;
                if (options.oneofs)
                    object._messageStubType = "messageStubType";
            }
            if (message.clearMedia != null && message.hasOwnProperty("clearMedia")) {
                object.clearMedia = message.clearMedia;
                if (options.oneofs)
                    object._clearMedia = "clearMedia";
            }
            if (message.messageStubParameters && message.messageStubParameters.length) {
                object.messageStubParameters = [];
                for (var j = 0; j < message.messageStubParameters.length; ++j)
                    object.messageStubParameters[j] = message.messageStubParameters[j];
            }
            if (message.duration != null && message.hasOwnProperty("duration")) {
                object.duration = message.duration;
                if (options.oneofs)
                    object._duration = "duration";
            }
            if (message.labels && message.labels.length) {
                object.labels = [];
                for (var j = 0; j < message.labels.length; ++j)
                    object.labels[j] = message.labels[j];
            }
            if (message.paymentInfo != null && message.hasOwnProperty("paymentInfo")) {
                object.paymentInfo = $root.Web.PaymentInfo.toObject(message.paymentInfo, options);
                if (options.oneofs)
                    object._paymentInfo = "paymentInfo";
            }
            if (message.finalLiveLocation != null && message.hasOwnProperty("finalLiveLocation")) {
                object.finalLiveLocation = $root.E2E.Message.LiveLocationMessage.toObject(message.finalLiveLocation, options);
                if (options.oneofs)
                    object._finalLiveLocation = "finalLiveLocation";
            }
            if (message.quotedPaymentInfo != null && message.hasOwnProperty("quotedPaymentInfo")) {
                object.quotedPaymentInfo = $root.Web.PaymentInfo.toObject(message.quotedPaymentInfo, options);
                if (options.oneofs)
                    object._quotedPaymentInfo = "quotedPaymentInfo";
            }
            if (message.ephemeralStartTimestamp != null && message.hasOwnProperty("ephemeralStartTimestamp")) {
                if (typeof message.ephemeralStartTimestamp === "number")
                    object.ephemeralStartTimestamp = options.longs === String ? String(message.ephemeralStartTimestamp) : message.ephemeralStartTimestamp;
                else
                    object.ephemeralStartTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.ephemeralStartTimestamp) : options.longs === Number ? new $util.LongBits(message.ephemeralStartTimestamp.low >>> 0, message.ephemeralStartTimestamp.high >>> 0).toNumber(true) : message.ephemeralStartTimestamp;
                if (options.oneofs)
                    object._ephemeralStartTimestamp = "ephemeralStartTimestamp";
            }
            if (message.ephemeralDuration != null && message.hasOwnProperty("ephemeralDuration")) {
                object.ephemeralDuration = message.ephemeralDuration;
                if (options.oneofs)
                    object._ephemeralDuration = "ephemeralDuration";
            }
            if (message.ephemeralOffToOn != null && message.hasOwnProperty("ephemeralOffToOn")) {
                object.ephemeralOffToOn = message.ephemeralOffToOn;
                if (options.oneofs)
                    object._ephemeralOffToOn = "ephemeralOffToOn";
            }
            if (message.ephemeralOutOfSync != null && message.hasOwnProperty("ephemeralOutOfSync")) {
                object.ephemeralOutOfSync = message.ephemeralOutOfSync;
                if (options.oneofs)
                    object._ephemeralOutOfSync = "ephemeralOutOfSync";
            }
            if (message.bizPrivacyStatus != null && message.hasOwnProperty("bizPrivacyStatus")) {
                object.bizPrivacyStatus = options.enums === String ? $root.Web.WebMessageInfo.BizPrivacyStatus[message.bizPrivacyStatus] === undefined ? message.bizPrivacyStatus : $root.Web.WebMessageInfo.BizPrivacyStatus[message.bizPrivacyStatus] : message.bizPrivacyStatus;
                if (options.oneofs)
                    object._bizPrivacyStatus = "bizPrivacyStatus";
            }
            if (message.verifiedBizName != null && message.hasOwnProperty("verifiedBizName")) {
                object.verifiedBizName = message.verifiedBizName;
                if (options.oneofs)
                    object._verifiedBizName = "verifiedBizName";
            }
            if (message.mediaData != null && message.hasOwnProperty("mediaData")) {
                object.mediaData = $root.E2E.PaymentBackground.MediaData.toObject(message.mediaData, options);
                if (options.oneofs)
                    object._mediaData = "mediaData";
            }
            if (message.photoChange != null && message.hasOwnProperty("photoChange")) {
                object.photoChange = $root.Web.PhotoChange.toObject(message.photoChange, options);
                if (options.oneofs)
                    object._photoChange = "photoChange";
            }
            if (message.userReceipt && message.userReceipt.length) {
                object.userReceipt = [];
                for (var j = 0; j < message.userReceipt.length; ++j)
                    object.userReceipt[j] = $root.Web.UserReceipt.toObject(message.userReceipt[j], options);
            }
            if (message.reactions && message.reactions.length) {
                object.reactions = [];
                for (var j = 0; j < message.reactions.length; ++j)
                    object.reactions[j] = $root.Web.Reaction.toObject(message.reactions[j], options);
            }
            if (message.quotedStickerData != null && message.hasOwnProperty("quotedStickerData")) {
                object.quotedStickerData = $root.E2E.PaymentBackground.MediaData.toObject(message.quotedStickerData, options);
                if (options.oneofs)
                    object._quotedStickerData = "quotedStickerData";
            }
            if (message.futureproofData != null && message.hasOwnProperty("futureproofData")) {
                object.futureproofData = options.bytes === String ? $util.base64.encode(message.futureproofData, 0, message.futureproofData.length) : options.bytes === Array ? Array.prototype.slice.call(message.futureproofData) : message.futureproofData;
                if (options.oneofs)
                    object._futureproofData = "futureproofData";
            }
            if (message.statusPsa != null && message.hasOwnProperty("statusPsa")) {
                object.statusPsa = $root.Web.StatusPSA.toObject(message.statusPsa, options);
                if (options.oneofs)
                    object._statusPsa = "statusPsa";
            }
            if (message.pollUpdates && message.pollUpdates.length) {
                object.pollUpdates = [];
                for (var j = 0; j < message.pollUpdates.length; ++j)
                    object.pollUpdates[j] = $root.Web.PollUpdate.toObject(message.pollUpdates[j], options);
            }
            if (message.pollAdditionalMetadata != null && message.hasOwnProperty("pollAdditionalMetadata")) {
                object.pollAdditionalMetadata = $root.Web.PollAdditionalMetadata.toObject(message.pollAdditionalMetadata, options);
                if (options.oneofs)
                    object._pollAdditionalMetadata = "pollAdditionalMetadata";
            }
            if (message.agentId != null && message.hasOwnProperty("agentId")) {
                object.agentId = message.agentId;
                if (options.oneofs)
                    object._agentId = "agentId";
            }
            if (message.statusAlreadyViewed != null && message.hasOwnProperty("statusAlreadyViewed")) {
                object.statusAlreadyViewed = message.statusAlreadyViewed;
                if (options.oneofs)
                    object._statusAlreadyViewed = "statusAlreadyViewed";
            }
            if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) {
                object.messageSecret = options.bytes === String ? $util.base64.encode(message.messageSecret, 0, message.messageSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSecret) : message.messageSecret;
                if (options.oneofs)
                    object._messageSecret = "messageSecret";
            }
            if (message.keepInChat != null && message.hasOwnProperty("keepInChat")) {
                object.keepInChat = $root.Web.KeepInChat.toObject(message.keepInChat, options);
                if (options.oneofs)
                    object._keepInChat = "keepInChat";
            }
            if (message.originalSelfAuthorUserJidString != null && message.hasOwnProperty("originalSelfAuthorUserJidString")) {
                object.originalSelfAuthorUserJidString = message.originalSelfAuthorUserJidString;
                if (options.oneofs)
                    object._originalSelfAuthorUserJidString = "originalSelfAuthorUserJidString";
            }
            if (message.revokeMessageTimestamp != null && message.hasOwnProperty("revokeMessageTimestamp")) {
                if (typeof message.revokeMessageTimestamp === "number")
                    object.revokeMessageTimestamp = options.longs === String ? String(message.revokeMessageTimestamp) : message.revokeMessageTimestamp;
                else
                    object.revokeMessageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.revokeMessageTimestamp) : options.longs === Number ? new $util.LongBits(message.revokeMessageTimestamp.low >>> 0, message.revokeMessageTimestamp.high >>> 0).toNumber(true) : message.revokeMessageTimestamp;
                if (options.oneofs)
                    object._revokeMessageTimestamp = "revokeMessageTimestamp";
            }
            if (message.pinInChat != null && message.hasOwnProperty("pinInChat")) {
                object.pinInChat = $root.Web.PinInChat.toObject(message.pinInChat, options);
                if (options.oneofs)
                    object._pinInChat = "pinInChat";
            }
            if (message.premiumMessageInfo != null && message.hasOwnProperty("premiumMessageInfo")) {
                object.premiumMessageInfo = $root.Web.PremiumMessageInfo.toObject(message.premiumMessageInfo, options);
                if (options.oneofs)
                    object._premiumMessageInfo = "premiumMessageInfo";
            }
            if (message.is1PBizBotMessage != null && message.hasOwnProperty("is1PBizBotMessage")) {
                object.is1PBizBotMessage = message.is1PBizBotMessage;
                if (options.oneofs)
                    object._is1PBizBotMessage = "is1PBizBotMessage";
            }
            if (message.isGroupHistoryMessage != null && message.hasOwnProperty("isGroupHistoryMessage")) {
                object.isGroupHistoryMessage = message.isGroupHistoryMessage;
                if (options.oneofs)
                    object._isGroupHistoryMessage = "isGroupHistoryMessage";
            }
            if (message.botMessageInvokerJid != null && message.hasOwnProperty("botMessageInvokerJid")) {
                object.botMessageInvokerJid = message.botMessageInvokerJid;
                if (options.oneofs)
                    object._botMessageInvokerJid = "botMessageInvokerJid";
            }
            if (message.commentMetadata != null && message.hasOwnProperty("commentMetadata")) {
                object.commentMetadata = $root.Web.CommentMetadata.toObject(message.commentMetadata, options);
                if (options.oneofs)
                    object._commentMetadata = "commentMetadata";
            }
            if (message.eventResponses && message.eventResponses.length) {
                object.eventResponses = [];
                for (var j = 0; j < message.eventResponses.length; ++j)
                    object.eventResponses[j] = $root.Web.EventResponse.toObject(message.eventResponses[j], options);
            }
            if (message.reportingTokenInfo != null && message.hasOwnProperty("reportingTokenInfo")) {
                object.reportingTokenInfo = $root.Web.ReportingTokenInfo.toObject(message.reportingTokenInfo, options);
                if (options.oneofs)
                    object._reportingTokenInfo = "reportingTokenInfo";
            }
            if (message.newsletterServerId != null && message.hasOwnProperty("newsletterServerId")) {
                if (typeof message.newsletterServerId === "number")
                    object.newsletterServerId = options.longs === String ? String(message.newsletterServerId) : message.newsletterServerId;
                else
                    object.newsletterServerId = options.longs === String ? $util.Long.prototype.toString.call(message.newsletterServerId) : options.longs === Number ? new $util.LongBits(message.newsletterServerId.low >>> 0, message.newsletterServerId.high >>> 0).toNumber(true) : message.newsletterServerId;
                if (options.oneofs)
                    object._newsletterServerId = "newsletterServerId";
            }
            if (message.eventAdditionalMetadata != null && message.hasOwnProperty("eventAdditionalMetadata")) {
                object.eventAdditionalMetadata = $root.Web.EventAdditionalMetadata.toObject(message.eventAdditionalMetadata, options);
                if (options.oneofs)
                    object._eventAdditionalMetadata = "eventAdditionalMetadata";
            }
            if (message.isMentionedInStatus != null && message.hasOwnProperty("isMentionedInStatus")) {
                object.isMentionedInStatus = message.isMentionedInStatus;
                if (options.oneofs)
                    object._isMentionedInStatus = "isMentionedInStatus";
            }
            if (message.statusMentions && message.statusMentions.length) {
                object.statusMentions = [];
                for (var j = 0; j < message.statusMentions.length; ++j)
                    object.statusMentions[j] = message.statusMentions[j];
            }
            if (message.targetMessageId != null && message.hasOwnProperty("targetMessageId")) {
                object.targetMessageId = $root.Protocol.MessageKey.toObject(message.targetMessageId, options);
                if (options.oneofs)
                    object._targetMessageId = "targetMessageId";
            }
            if (message.messageAddOns && message.messageAddOns.length) {
                object.messageAddOns = [];
                for (var j = 0; j < message.messageAddOns.length; ++j)
                    object.messageAddOns[j] = $root.Web.MessageAddOn.toObject(message.messageAddOns[j], options);
            }
            if (message.statusMentionMessageInfo != null && message.hasOwnProperty("statusMentionMessageInfo")) {
                object.statusMentionMessageInfo = $root.Web.StatusMentionMessage.toObject(message.statusMentionMessageInfo, options);
                if (options.oneofs)
                    object._statusMentionMessageInfo = "statusMentionMessageInfo";
            }
            if (message.isSupportAiMessage != null && message.hasOwnProperty("isSupportAiMessage")) {
                object.isSupportAiMessage = message.isSupportAiMessage;
                if (options.oneofs)
                    object._isSupportAiMessage = "isSupportAiMessage";
            }
            if (message.statusMentionSources && message.statusMentionSources.length) {
                object.statusMentionSources = [];
                for (var j = 0; j < message.statusMentionSources.length; ++j)
                    object.statusMentionSources[j] = message.statusMentionSources[j];
            }
            if (message.supportAiCitations && message.supportAiCitations.length) {
                object.supportAiCitations = [];
                for (var j = 0; j < message.supportAiCitations.length; ++j)
                    object.supportAiCitations[j] = $root.Web.Citation.toObject(message.supportAiCitations[j], options);
            }
            if (message.botTargetId != null && message.hasOwnProperty("botTargetId")) {
                object.botTargetId = message.botTargetId;
                if (options.oneofs)
                    object._botTargetId = "botTargetId";
            }
            if (message.groupHistoryIndividualMessageInfo != null && message.hasOwnProperty("groupHistoryIndividualMessageInfo")) {
                object.groupHistoryIndividualMessageInfo = $root.Web.GroupHistoryIndividualMessageInfo.toObject(message.groupHistoryIndividualMessageInfo, options);
                if (options.oneofs)
                    object._groupHistoryIndividualMessageInfo = "groupHistoryIndividualMessageInfo";
            }
            if (message.groupHistoryBundleInfo != null && message.hasOwnProperty("groupHistoryBundleInfo")) {
                object.groupHistoryBundleInfo = $root.Web.GroupHistoryBundleInfo.toObject(message.groupHistoryBundleInfo, options);
                if (options.oneofs)
                    object._groupHistoryBundleInfo = "groupHistoryBundleInfo";
            }
            if (message.interactiveMessageAdditionalMetadata != null && message.hasOwnProperty("interactiveMessageAdditionalMetadata")) {
                object.interactiveMessageAdditionalMetadata = $root.Web.InteractiveMessageAdditionalMetadata.toObject(message.interactiveMessageAdditionalMetadata, options);
                if (options.oneofs)
                    object._interactiveMessageAdditionalMetadata = "interactiveMessageAdditionalMetadata";
            }
            if (message.quarantinedMessage != null && message.hasOwnProperty("quarantinedMessage")) {
                object.quarantinedMessage = $root.Web.QuarantinedMessage.toObject(message.quarantinedMessage, options);
                if (options.oneofs)
                    object._quarantinedMessage = "quarantinedMessage";
            }
            return object;
        };

        /**
         * Converts this WebMessageInfo to JSON.
         * @function toJSON
         * @memberof Web.WebMessageInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        WebMessageInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for WebMessageInfo
         * @function getTypeUrl
         * @memberof Web.WebMessageInfo
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        WebMessageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Web.WebMessageInfo";
        };

        /**
         * BizPrivacyStatus enum.
         * @name Web.WebMessageInfo.BizPrivacyStatus
         * @enum {number}
         * @property {number} E2EE=0 E2EE value
         * @property {number} FB=2 FB value
         * @property {number} BSP=1 BSP value
         * @property {number} BSP_AND_FB=3 BSP_AND_FB value
         */
        WebMessageInfo.BizPrivacyStatus = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "E2EE"] = 0;
            values[valuesById[2] = "FB"] = 2;
            values[valuesById[1] = "BSP"] = 1;
            values[valuesById[3] = "BSP_AND_FB"] = 3;
            return values;
        })();

        /**
         * Status enum.
         * @name Web.WebMessageInfo.Status
         * @enum {number}
         * @property {number} ERROR=0 ERROR value
         * @property {number} PENDING=1 PENDING value
         * @property {number} SERVER_ACK=2 SERVER_ACK value
         * @property {number} DELIVERY_ACK=3 DELIVERY_ACK value
         * @property {number} READ=4 READ value
         * @property {number} PLAYED=5 PLAYED value
         */
        WebMessageInfo.Status = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "ERROR"] = 0;
            values[valuesById[1] = "PENDING"] = 1;
            values[valuesById[2] = "SERVER_ACK"] = 2;
            values[valuesById[3] = "DELIVERY_ACK"] = 3;
            values[valuesById[4] = "READ"] = 4;
            values[valuesById[5] = "PLAYED"] = 5;
            return values;
        })();

        /**
         * StubType enum.
         * @name Web.WebMessageInfo.StubType
         * @enum {number}
         * @property {number} UNKNOWN=0 UNKNOWN value
         * @property {number} REVOKE=1 REVOKE value
         * @property {number} CIPHERTEXT=2 CIPHERTEXT value
         * @property {number} FUTUREPROOF=3 FUTUREPROOF value
         * @property {number} NON_VERIFIED_TRANSITION=4 NON_VERIFIED_TRANSITION value
         * @property {number} UNVERIFIED_TRANSITION=5 UNVERIFIED_TRANSITION value
         * @property {number} VERIFIED_TRANSITION=6 VERIFIED_TRANSITION value
         * @property {number} VERIFIED_LOW_UNKNOWN=7 VERIFIED_LOW_UNKNOWN value
         * @property {number} VERIFIED_HIGH=8 VERIFIED_HIGH value
         * @property {number} VERIFIED_INITIAL_UNKNOWN=9 VERIFIED_INITIAL_UNKNOWN value
         * @property {number} VERIFIED_INITIAL_LOW=10 VERIFIED_INITIAL_LOW value
         * @property {number} VERIFIED_INITIAL_HIGH=11 VERIFIED_INITIAL_HIGH value
         * @property {number} VERIFIED_TRANSITION_ANY_TO_NONE=12 VERIFIED_TRANSITION_ANY_TO_NONE value
         * @property {number} VERIFIED_TRANSITION_ANY_TO_HIGH=13 VERIFIED_TRANSITION_ANY_TO_HIGH value
         * @property {number} VERIFIED_TRANSITION_HIGH_TO_LOW=14 VERIFIED_TRANSITION_HIGH_TO_LOW value
         * @property {number} VERIFIED_TRANSITION_HIGH_TO_UNKNOWN=15 VERIFIED_TRANSITION_HIGH_TO_UNKNOWN value
         * @property {number} VERIFIED_TRANSITION_UNKNOWN_TO_LOW=16 VERIFIED_TRANSITION_UNKNOWN_TO_LOW value
         * @property {number} VERIFIED_TRANSITION_LOW_TO_UNKNOWN=17 VERIFIED_TRANSITION_LOW_TO_UNKNOWN value
         * @property {number} VERIFIED_TRANSITION_NONE_TO_LOW=18 VERIFIED_TRANSITION_NONE_TO_LOW value
         * @property {number} VERIFIED_TRANSITION_NONE_TO_UNKNOWN=19 VERIFIED_TRANSITION_NONE_TO_UNKNOWN value
         * @property {number} GROUP_CREATE=20 GROUP_CREATE value
         * @property {number} GROUP_CHANGE_SUBJECT=21 GROUP_CHANGE_SUBJECT value
         * @property {number} GROUP_CHANGE_ICON=22 GROUP_CHANGE_ICON value
         * @property {number} GROUP_CHANGE_INVITE_LINK=23 GROUP_CHANGE_INVITE_LINK value
         * @property {number} GROUP_CHANGE_DESCRIPTION=24 GROUP_CHANGE_DESCRIPTION value
         * @property {number} GROUP_CHANGE_RESTRICT=25 GROUP_CHANGE_RESTRICT value
         * @property {number} GROUP_CHANGE_ANNOUNCE=26 GROUP_CHANGE_ANNOUNCE value
         * @property {number} GROUP_PARTICIPANT_ADD=27 GROUP_PARTICIPANT_ADD value
         * @property {number} GROUP_PARTICIPANT_REMOVE=28 GROUP_PARTICIPANT_REMOVE value
         * @property {number} GROUP_PARTICIPANT_PROMOTE=29 GROUP_PARTICIPANT_PROMOTE value
         * @property {number} GROUP_PARTICIPANT_DEMOTE=30 GROUP_PARTICIPANT_DEMOTE value
         * @property {number} GROUP_PARTICIPANT_INVITE=31 GROUP_PARTICIPANT_INVITE value
         * @property {number} GROUP_PARTICIPANT_LEAVE=32 GROUP_PARTICIPANT_LEAVE value
         * @property {number} GROUP_PARTICIPANT_CHANGE_NUMBER=33 GROUP_PARTICIPANT_CHANGE_NUMBER value
         * @property {number} BROADCAST_CREATE=34 BROADCAST_CREATE value
         * @property {number} BROADCAST_ADD=35 BROADCAST_ADD value
         * @property {number} BROADCAST_REMOVE=36 BROADCAST_REMOVE value
         * @property {number} GENERIC_NOTIFICATION=37 GENERIC_NOTIFICATION value
         * @property {number} E2E_IDENTITY_CHANGED=38 E2E_IDENTITY_CHANGED value
         * @property {number} E2E_ENCRYPTED=39 E2E_ENCRYPTED value
         * @property {number} CALL_MISSED_VOICE=40 CALL_MISSED_VOICE value
         * @property {number} CALL_MISSED_VIDEO=41 CALL_MISSED_VIDEO value
         * @property {number} INDIVIDUAL_CHANGE_NUMBER=42 INDIVIDUAL_CHANGE_NUMBER value
         * @property {number} GROUP_DELETE=43 GROUP_DELETE value
         * @property {number} GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE=44 GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE value
         * @property {number} CALL_MISSED_GROUP_VOICE=45 CALL_MISSED_GROUP_VOICE value
         * @property {number} CALL_MISSED_GROUP_VIDEO=46 CALL_MISSED_GROUP_VIDEO value
         * @property {number} PAYMENT_CIPHERTEXT=47 PAYMENT_CIPHERTEXT value
         * @property {number} PAYMENT_FUTUREPROOF=48 PAYMENT_FUTUREPROOF value
         * @property {number} PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED=49 PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED value
         * @property {number} PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED=50 PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED value
         * @property {number} PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED=51 PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED value
         * @property {number} PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP=52 PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP value
         * @property {number} PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP=53 PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP value
         * @property {number} PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER=54 PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER value
         * @property {number} PAYMENT_ACTION_SEND_PAYMENT_REMINDER=55 PAYMENT_ACTION_SEND_PAYMENT_REMINDER value
         * @property {number} PAYMENT_ACTION_SEND_PAYMENT_INVITATION=56 PAYMENT_ACTION_SEND_PAYMENT_INVITATION value
         * @property {number} PAYMENT_ACTION_REQUEST_DECLINED=57 PAYMENT_ACTION_REQUEST_DECLINED value
         * @property {number} PAYMENT_ACTION_REQUEST_EXPIRED=58 PAYMENT_ACTION_REQUEST_EXPIRED value
         * @property {number} PAYMENT_ACTION_REQUEST_CANCELLED=59 PAYMENT_ACTION_REQUEST_CANCELLED value
         * @property {number} BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM=60 BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM value
         * @property {number} BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP=61 BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP value
         * @property {number} BIZ_INTRO_TOP=62 BIZ_INTRO_TOP value
         * @property {number} BIZ_INTRO_BOTTOM=63 BIZ_INTRO_BOTTOM value
         * @property {number} BIZ_NAME_CHANGE=64 BIZ_NAME_CHANGE value
         * @property {number} BIZ_MOVE_TO_CONSUMER_APP=65 BIZ_MOVE_TO_CONSUMER_APP value
         * @property {number} BIZ_TWO_TIER_MIGRATION_TOP=66 BIZ_TWO_TIER_MIGRATION_TOP value
         * @property {number} BIZ_TWO_TIER_MIGRATION_BOTTOM=67 BIZ_TWO_TIER_MIGRATION_BOTTOM value
         * @property {number} OVERSIZED=68 OVERSIZED value
         * @property {number} GROUP_CHANGE_NO_FREQUENTLY_FORWARDED=69 GROUP_CHANGE_NO_FREQUENTLY_FORWARDED value
         * @property {number} GROUP_V4_ADD_INVITE_SENT=70 GROUP_V4_ADD_INVITE_SENT value
         * @property {number} GROUP_PARTICIPANT_ADD_REQUEST_JOIN=71 GROUP_PARTICIPANT_ADD_REQUEST_JOIN value
         * @property {number} CHANGE_EPHEMERAL_SETTING=72 CHANGE_EPHEMERAL_SETTING value
         * @property {number} E2E_DEVICE_CHANGED=73 E2E_DEVICE_CHANGED value
         * @property {number} VIEWED_ONCE=74 VIEWED_ONCE value
         * @property {number} E2E_ENCRYPTED_NOW=75 E2E_ENCRYPTED_NOW value
         * @property {number} BLUE_MSG_BSP_FB_TO_BSP_PREMISE=76 BLUE_MSG_BSP_FB_TO_BSP_PREMISE value
         * @property {number} BLUE_MSG_BSP_FB_TO_SELF_FB=77 BLUE_MSG_BSP_FB_TO_SELF_FB value
         * @property {number} BLUE_MSG_BSP_FB_TO_SELF_PREMISE=78 BLUE_MSG_BSP_FB_TO_SELF_PREMISE value
         * @property {number} BLUE_MSG_BSP_FB_UNVERIFIED=79 BLUE_MSG_BSP_FB_UNVERIFIED value
         * @property {number} BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED=80 BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED value
         * @property {number} BLUE_MSG_BSP_FB_VERIFIED=81 BLUE_MSG_BSP_FB_VERIFIED value
         * @property {number} BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED=82 BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED value
         * @property {number} BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE=83 BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE value
         * @property {number} BLUE_MSG_BSP_PREMISE_UNVERIFIED=84 BLUE_MSG_BSP_PREMISE_UNVERIFIED value
         * @property {number} BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED=85 BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED value
         * @property {number} BLUE_MSG_BSP_PREMISE_VERIFIED=86 BLUE_MSG_BSP_PREMISE_VERIFIED value
         * @property {number} BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED=87 BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED value
         * @property {number} BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED=88 BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED value
         * @property {number} BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED=89 BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED value
         * @property {number} BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED=90 BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED value
         * @property {number} BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED=91 BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED value
         * @property {number} BLUE_MSG_SELF_FB_TO_BSP_PREMISE=92 BLUE_MSG_SELF_FB_TO_BSP_PREMISE value
         * @property {number} BLUE_MSG_SELF_FB_TO_SELF_PREMISE=93 BLUE_MSG_SELF_FB_TO_SELF_PREMISE value
         * @property {number} BLUE_MSG_SELF_FB_UNVERIFIED=94 BLUE_MSG_SELF_FB_UNVERIFIED value
         * @property {number} BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED=95 BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED value
         * @property {number} BLUE_MSG_SELF_FB_VERIFIED=96 BLUE_MSG_SELF_FB_VERIFIED value
         * @property {number} BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED=97 BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED value
         * @property {number} BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE=98 BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE value
         * @property {number} BLUE_MSG_SELF_PREMISE_UNVERIFIED=99 BLUE_MSG_SELF_PREMISE_UNVERIFIED value
         * @property {number} BLUE_MSG_SELF_PREMISE_VERIFIED=100 BLUE_MSG_SELF_PREMISE_VERIFIED value
         * @property {number} BLUE_MSG_TO_BSP_FB=101 BLUE_MSG_TO_BSP_FB value
         * @property {number} BLUE_MSG_TO_CONSUMER=102 BLUE_MSG_TO_CONSUMER value
         * @property {number} BLUE_MSG_TO_SELF_FB=103 BLUE_MSG_TO_SELF_FB value
         * @property {number} BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED=104 BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED value
         * @property {number} BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED=105 BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED value
         * @property {number} BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED=106 BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED value
         * @property {number} BLUE_MSG_UNVERIFIED_TO_VERIFIED=107 BLUE_MSG_UNVERIFIED_TO_VERIFIED value
         * @property {number} BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED=108 BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED value
         * @property {number} BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED=109 BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED value
         * @property {number} BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED=110 BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED value
         * @property {number} BLUE_MSG_VERIFIED_TO_UNVERIFIED=111 BLUE_MSG_VERIFIED_TO_UNVERIFIED value
         * @property {number} BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED=112 BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED value
         * @property {number} BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED=113 BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED value
         * @property {number} BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED=114 BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED value
         * @property {number} BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED=115 BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED value
         * @property {number} BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED=116 BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED value
         * @property {number} BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED=117 BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED value
         * @property {number} E2E_IDENTITY_UNAVAILABLE=118 E2E_IDENTITY_UNAVAILABLE value
         * @property {number} GROUP_CREATING=119 GROUP_CREATING value
         * @property {number} GROUP_CREATE_FAILED=120 GROUP_CREATE_FAILED value
         * @property {number} GROUP_BOUNCED=121 GROUP_BOUNCED value
         * @property {number} BLOCK_CONTACT=122 BLOCK_CONTACT value
         * @property {number} EPHEMERAL_SETTING_NOT_APPLIED=123 EPHEMERAL_SETTING_NOT_APPLIED value
         * @property {number} SYNC_FAILED=124 SYNC_FAILED value
         * @property {number} SYNCING=125 SYNCING value
         * @property {number} BIZ_PRIVACY_MODE_INIT_FB=126 BIZ_PRIVACY_MODE_INIT_FB value
         * @property {number} BIZ_PRIVACY_MODE_INIT_BSP=127 BIZ_PRIVACY_MODE_INIT_BSP value
         * @property {number} BIZ_PRIVACY_MODE_TO_FB=128 BIZ_PRIVACY_MODE_TO_FB value
         * @property {number} BIZ_PRIVACY_MODE_TO_BSP=129 BIZ_PRIVACY_MODE_TO_BSP value
         * @property {number} DISAPPEARING_MODE=130 DISAPPEARING_MODE value
         * @property {number} E2E_DEVICE_FETCH_FAILED=131 E2E_DEVICE_FETCH_FAILED value
         * @property {number} ADMIN_REVOKE=132 ADMIN_REVOKE value
         * @property {number} GROUP_INVITE_LINK_GROWTH_LOCKED=133 GROUP_INVITE_LINK_GROWTH_LOCKED value
         * @property {number} COMMUNITY_LINK_PARENT_GROUP=134 COMMUNITY_LINK_PARENT_GROUP value
         * @property {number} COMMUNITY_LINK_SIBLING_GROUP=135 COMMUNITY_LINK_SIBLING_GROUP value
         * @property {number} COMMUNITY_LINK_SUB_GROUP=136 COMMUNITY_LINK_SUB_GROUP value
         * @property {number} COMMUNITY_UNLINK_PARENT_GROUP=137 COMMUNITY_UNLINK_PARENT_GROUP value
         * @property {number} COMMUNITY_UNLINK_SIBLING_GROUP=138 COMMUNITY_UNLINK_SIBLING_GROUP value
         * @property {number} COMMUNITY_UNLINK_SUB_GROUP=139 COMMUNITY_UNLINK_SUB_GROUP value
         * @property {number} GROUP_PARTICIPANT_ACCEPT=140 GROUP_PARTICIPANT_ACCEPT value
         * @property {number} GROUP_PARTICIPANT_LINKED_GROUP_JOIN=141 GROUP_PARTICIPANT_LINKED_GROUP_JOIN value
         * @property {number} COMMUNITY_CREATE=142 COMMUNITY_CREATE value
         * @property {number} EPHEMERAL_KEEP_IN_CHAT=143 EPHEMERAL_KEEP_IN_CHAT value
         * @property {number} GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST=144 GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST value
         * @property {number} GROUP_MEMBERSHIP_JOIN_APPROVAL_MODE=145 GROUP_MEMBERSHIP_JOIN_APPROVAL_MODE value
         * @property {number} INTEGRITY_UNLINK_PARENT_GROUP=146 INTEGRITY_UNLINK_PARENT_GROUP value
         * @property {number} COMMUNITY_PARTICIPANT_PROMOTE=147 COMMUNITY_PARTICIPANT_PROMOTE value
         * @property {number} COMMUNITY_PARTICIPANT_DEMOTE=148 COMMUNITY_PARTICIPANT_DEMOTE value
         * @property {number} COMMUNITY_PARENT_GROUP_DELETED=149 COMMUNITY_PARENT_GROUP_DELETED value
         * @property {number} COMMUNITY_LINK_PARENT_GROUP_MEMBERSHIP_APPROVAL=150 COMMUNITY_LINK_PARENT_GROUP_MEMBERSHIP_APPROVAL value
         * @property {number} GROUP_PARTICIPANT_JOINED_GROUP_AND_PARENT_GROUP=151 GROUP_PARTICIPANT_JOINED_GROUP_AND_PARENT_GROUP value
         * @property {number} MASKED_THREAD_CREATED=152 MASKED_THREAD_CREATED value
         * @property {number} MASKED_THREAD_UNMASKED=153 MASKED_THREAD_UNMASKED value
         * @property {number} BIZ_CHAT_ASSIGNMENT=154 BIZ_CHAT_ASSIGNMENT value
         * @property {number} CHAT_PSA=155 CHAT_PSA value
         * @property {number} CHAT_POLL_CREATION_MESSAGE=156 CHAT_POLL_CREATION_MESSAGE value
         * @property {number} CAG_MASKED_THREAD_CREATED=157 CAG_MASKED_THREAD_CREATED value
         * @property {number} COMMUNITY_PARENT_GROUP_SUBJECT_CHANGED=158 COMMUNITY_PARENT_GROUP_SUBJECT_CHANGED value
         * @property {number} CAG_INVITE_AUTO_ADD=159 CAG_INVITE_AUTO_ADD value
         * @property {number} BIZ_CHAT_ASSIGNMENT_UNASSIGN=160 BIZ_CHAT_ASSIGNMENT_UNASSIGN value
         * @property {number} CAG_INVITE_AUTO_JOINED=161 CAG_INVITE_AUTO_JOINED value
         * @property {number} SCHEDULED_CALL_START_MESSAGE=162 SCHEDULED_CALL_START_MESSAGE value
         * @property {number} COMMUNITY_INVITE_RICH=163 COMMUNITY_INVITE_RICH value
         * @property {number} COMMUNITY_INVITE_AUTO_ADD_RICH=164 COMMUNITY_INVITE_AUTO_ADD_RICH value
         * @property {number} SUB_GROUP_INVITE_RICH=165 SUB_GROUP_INVITE_RICH value
         * @property {number} SUB_GROUP_PARTICIPANT_ADD_RICH=166 SUB_GROUP_PARTICIPANT_ADD_RICH value
         * @property {number} COMMUNITY_LINK_PARENT_GROUP_RICH=167 COMMUNITY_LINK_PARENT_GROUP_RICH value
         * @property {number} COMMUNITY_PARTICIPANT_ADD_RICH=168 COMMUNITY_PARTICIPANT_ADD_RICH value
         * @property {number} SILENCED_UNKNOWN_CALLER_AUDIO=169 SILENCED_UNKNOWN_CALLER_AUDIO value
         * @property {number} SILENCED_UNKNOWN_CALLER_VIDEO=170 SILENCED_UNKNOWN_CALLER_VIDEO value
         * @property {number} GROUP_MEMBER_ADD_MODE=171 GROUP_MEMBER_ADD_MODE value
         * @property {number} GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST_NON_ADMIN_ADD=172 GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST_NON_ADMIN_ADD value
         * @property {number} COMMUNITY_CHANGE_DESCRIPTION=173 COMMUNITY_CHANGE_DESCRIPTION value
         * @property {number} SENDER_INVITE=174 SENDER_INVITE value
         * @property {number} RECEIVER_INVITE=175 RECEIVER_INVITE value
         * @property {number} COMMUNITY_ALLOW_MEMBER_ADDED_GROUPS=176 COMMUNITY_ALLOW_MEMBER_ADDED_GROUPS value
         * @property {number} PINNED_MESSAGE_IN_CHAT=177 PINNED_MESSAGE_IN_CHAT value
         * @property {number} PAYMENT_INVITE_SETUP_INVITER=178 PAYMENT_INVITE_SETUP_INVITER value
         * @property {number} PAYMENT_INVITE_SETUP_INVITEE_RECEIVE_ONLY=179 PAYMENT_INVITE_SETUP_INVITEE_RECEIVE_ONLY value
         * @property {number} PAYMENT_INVITE_SETUP_INVITEE_SEND_AND_RECEIVE=180 PAYMENT_INVITE_SETUP_INVITEE_SEND_AND_RECEIVE value
         * @property {number} LINKED_GROUP_CALL_START=181 LINKED_GROUP_CALL_START value
         * @property {number} REPORT_TO_ADMIN_ENABLED_STATUS=182 REPORT_TO_ADMIN_ENABLED_STATUS value
         * @property {number} EMPTY_SUBGROUP_CREATE=183 EMPTY_SUBGROUP_CREATE value
         * @property {number} SCHEDULED_CALL_CANCEL=184 SCHEDULED_CALL_CANCEL value
         * @property {number} SUBGROUP_ADMIN_TRIGGERED_AUTO_ADD_RICH=185 SUBGROUP_ADMIN_TRIGGERED_AUTO_ADD_RICH value
         * @property {number} GROUP_CHANGE_RECENT_HISTORY_SHARING=186 GROUP_CHANGE_RECENT_HISTORY_SHARING value
         * @property {number} PAID_MESSAGE_SERVER_CAMPAIGN_ID=187 PAID_MESSAGE_SERVER_CAMPAIGN_ID value
         * @property {number} GENERAL_CHAT_CREATE=188 GENERAL_CHAT_CREATE value
         * @property {number} GENERAL_CHAT_ADD=189 GENERAL_CHAT_ADD value
         * @property {number} GENERAL_CHAT_AUTO_ADD_DISABLED=190 GENERAL_CHAT_AUTO_ADD_DISABLED value
         * @property {number} SUGGESTED_SUBGROUP_ANNOUNCE=191 SUGGESTED_SUBGROUP_ANNOUNCE value
         * @property {number} BIZ_BOT_1P_MESSAGING_ENABLED=192 BIZ_BOT_1P_MESSAGING_ENABLED value
         * @property {number} CHANGE_USERNAME=193 CHANGE_USERNAME value
         * @property {number} BIZ_COEX_PRIVACY_INIT_SELF=194 BIZ_COEX_PRIVACY_INIT_SELF value
         * @property {number} BIZ_COEX_PRIVACY_TRANSITION_SELF=195 BIZ_COEX_PRIVACY_TRANSITION_SELF value
         * @property {number} SUPPORT_AI_EDUCATION=196 SUPPORT_AI_EDUCATION value
         * @property {number} BIZ_BOT_3P_MESSAGING_ENABLED=197 BIZ_BOT_3P_MESSAGING_ENABLED value
         * @property {number} REMINDER_SETUP_MESSAGE=198 REMINDER_SETUP_MESSAGE value
         * @property {number} REMINDER_SENT_MESSAGE=199 REMINDER_SENT_MESSAGE value
         * @property {number} REMINDER_CANCEL_MESSAGE=200 REMINDER_CANCEL_MESSAGE value
         * @property {number} BIZ_COEX_PRIVACY_INIT=201 BIZ_COEX_PRIVACY_INIT value
         * @property {number} BIZ_COEX_PRIVACY_TRANSITION=202 BIZ_COEX_PRIVACY_TRANSITION value
         * @property {number} GROUP_DEACTIVATED=203 GROUP_DEACTIVATED value
         * @property {number} COMMUNITY_DEACTIVATE_SIBLING_GROUP=204 COMMUNITY_DEACTIVATE_SIBLING_GROUP value
         * @property {number} EVENT_UPDATED=205 EVENT_UPDATED value
         * @property {number} EVENT_CANCELED=206 EVENT_CANCELED value
         * @property {number} COMMUNITY_OWNER_UPDATED=207 COMMUNITY_OWNER_UPDATED value
         * @property {number} COMMUNITY_SUB_GROUP_VISIBILITY_HIDDEN=208 COMMUNITY_SUB_GROUP_VISIBILITY_HIDDEN value
         * @property {number} CAPI_GROUP_NE2EE_SYSTEM_MESSAGE=209 CAPI_GROUP_NE2EE_SYSTEM_MESSAGE value
         * @property {number} STATUS_MENTION=210 STATUS_MENTION value
         * @property {number} USER_CONTROLS_SYSTEM_MESSAGE=211 USER_CONTROLS_SYSTEM_MESSAGE value
         * @property {number} SUPPORT_SYSTEM_MESSAGE=212 SUPPORT_SYSTEM_MESSAGE value
         * @property {number} CHANGE_LID=213 CHANGE_LID value
         * @property {number} BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_IN_MESSAGE=214 BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_IN_MESSAGE value
         * @property {number} BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_OUT_MESSAGE=215 BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_OUT_MESSAGE value
         * @property {number} CHANGE_LIMIT_SHARING=216 CHANGE_LIMIT_SHARING value
         * @property {number} GROUP_MEMBER_LINK_MODE=217 GROUP_MEMBER_LINK_MODE value
         * @property {number} BIZ_AUTOMATICALLY_LABELED_CHAT_SYSTEM_MESSAGE=218 BIZ_AUTOMATICALLY_LABELED_CHAT_SYSTEM_MESSAGE value
         * @property {number} PHONE_NUMBER_HIDING_CHAT_DEPRECATED_MESSAGE=219 PHONE_NUMBER_HIDING_CHAT_DEPRECATED_MESSAGE value
         * @property {number} QUARANTINED_MESSAGE=220 QUARANTINED_MESSAGE value
         * @property {number} GROUP_MEMBER_SHARE_GROUP_HISTORY_MODE=221 GROUP_MEMBER_SHARE_GROUP_HISTORY_MODE value
         * @property {number} GROUP_OPEN_BOT_ADDED=222 GROUP_OPEN_BOT_ADDED value
         * @property {number} GROUP_TEE_BOT_ADDED=223 GROUP_TEE_BOT_ADDED value
         */
        WebMessageInfo.StubType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "REVOKE"] = 1;
            values[valuesById[2] = "CIPHERTEXT"] = 2;
            values[valuesById[3] = "FUTUREPROOF"] = 3;
            values[valuesById[4] = "NON_VERIFIED_TRANSITION"] = 4;
            values[valuesById[5] = "UNVERIFIED_TRANSITION"] = 5;
            values[valuesById[6] = "VERIFIED_TRANSITION"] = 6;
            values[valuesById[7] = "VERIFIED_LOW_UNKNOWN"] = 7;
            values[valuesById[8] = "VERIFIED_HIGH"] = 8;
            values[valuesById[9] = "VERIFIED_INITIAL_UNKNOWN"] = 9;
            values[valuesById[10] = "VERIFIED_INITIAL_LOW"] = 10;
            values[valuesById[11] = "VERIFIED_INITIAL_HIGH"] = 11;
            values[valuesById[12] = "VERIFIED_TRANSITION_ANY_TO_NONE"] = 12;
            values[valuesById[13] = "VERIFIED_TRANSITION_ANY_TO_HIGH"] = 13;
            values[valuesById[14] = "VERIFIED_TRANSITION_HIGH_TO_LOW"] = 14;
            values[valuesById[15] = "VERIFIED_TRANSITION_HIGH_TO_UNKNOWN"] = 15;
            values[valuesById[16] = "VERIFIED_TRANSITION_UNKNOWN_TO_LOW"] = 16;
            values[valuesById[17] = "VERIFIED_TRANSITION_LOW_TO_UNKNOWN"] = 17;
            values[valuesById[18] = "VERIFIED_TRANSITION_NONE_TO_LOW"] = 18;
            values[valuesById[19] = "VERIFIED_TRANSITION_NONE_TO_UNKNOWN"] = 19;
            values[valuesById[20] = "GROUP_CREATE"] = 20;
            values[valuesById[21] = "GROUP_CHANGE_SUBJECT"] = 21;
            values[valuesById[22] = "GROUP_CHANGE_ICON"] = 22;
            values[valuesById[23] = "GROUP_CHANGE_INVITE_LINK"] = 23;
            values[valuesById[24] = "GROUP_CHANGE_DESCRIPTION"] = 24;
            values[valuesById[25] = "GROUP_CHANGE_RESTRICT"] = 25;
            values[valuesById[26] = "GROUP_CHANGE_ANNOUNCE"] = 26;
            values[valuesById[27] = "GROUP_PARTICIPANT_ADD"] = 27;
            values[valuesById[28] = "GROUP_PARTICIPANT_REMOVE"] = 28;
            values[valuesById[29] = "GROUP_PARTICIPANT_PROMOTE"] = 29;
            values[valuesById[30] = "GROUP_PARTICIPANT_DEMOTE"] = 30;
            values[valuesById[31] = "GROUP_PARTICIPANT_INVITE"] = 31;
            values[valuesById[32] = "GROUP_PARTICIPANT_LEAVE"] = 32;
            values[valuesById[33] = "GROUP_PARTICIPANT_CHANGE_NUMBER"] = 33;
            values[valuesById[34] = "BROADCAST_CREATE"] = 34;
            values[valuesById[35] = "BROADCAST_ADD"] = 35;
            values[valuesById[36] = "BROADCAST_REMOVE"] = 36;
            values[valuesById[37] = "GENERIC_NOTIFICATION"] = 37;
            values[valuesById[38] = "E2E_IDENTITY_CHANGED"] = 38;
            values[valuesById[39] = "E2E_ENCRYPTED"] = 39;
            values[valuesById[40] = "CALL_MISSED_VOICE"] = 40;
            values[valuesById[41] = "CALL_MISSED_VIDEO"] = 41;
            values[valuesById[42] = "INDIVIDUAL_CHANGE_NUMBER"] = 42;
            values[valuesById[43] = "GROUP_DELETE"] = 43;
            values[valuesById[44] = "GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE"] = 44;
            values[valuesById[45] = "CALL_MISSED_GROUP_VOICE"] = 45;
            values[valuesById[46] = "CALL_MISSED_GROUP_VIDEO"] = 46;
            values[valuesById[47] = "PAYMENT_CIPHERTEXT"] = 47;
            values[valuesById[48] = "PAYMENT_FUTUREPROOF"] = 48;
            values[valuesById[49] = "PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED"] = 49;
            values[valuesById[50] = "PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED"] = 50;
            values[valuesById[51] = "PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED"] = 51;
            values[valuesById[52] = "PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP"] = 52;
            values[valuesById[53] = "PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP"] = 53;
            values[valuesById[54] = "PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER"] = 54;
            values[valuesById[55] = "PAYMENT_ACTION_SEND_PAYMENT_REMINDER"] = 55;
            values[valuesById[56] = "PAYMENT_ACTION_SEND_PAYMENT_INVITATION"] = 56;
            values[valuesById[57] = "PAYMENT_ACTION_REQUEST_DECLINED"] = 57;
            values[valuesById[58] = "PAYMENT_ACTION_REQUEST_EXPIRED"] = 58;
            values[valuesById[59] = "PAYMENT_ACTION_REQUEST_CANCELLED"] = 59;
            values[valuesById[60] = "BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM"] = 60;
            values[valuesById[61] = "BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP"] = 61;
            values[valuesById[62] = "BIZ_INTRO_TOP"] = 62;
            values[valuesById[63] = "BIZ_INTRO_BOTTOM"] = 63;
            values[valuesById[64] = "BIZ_NAME_CHANGE"] = 64;
            values[valuesById[65] = "BIZ_MOVE_TO_CONSUMER_APP"] = 65;
            values[valuesById[66] = "BIZ_TWO_TIER_MIGRATION_TOP"] = 66;
            values[valuesById[67] = "BIZ_TWO_TIER_MIGRATION_BOTTOM"] = 67;
            values[valuesById[68] = "OVERSIZED"] = 68;
            values[valuesById[69] = "GROUP_CHANGE_NO_FREQUENTLY_FORWARDED"] = 69;
            values[valuesById[70] = "GROUP_V4_ADD_INVITE_SENT"] = 70;
            values[valuesById[71] = "GROUP_PARTICIPANT_ADD_REQUEST_JOIN"] = 71;
            values[valuesById[72] = "CHANGE_EPHEMERAL_SETTING"] = 72;
            values[valuesById[73] = "E2E_DEVICE_CHANGED"] = 73;
            values[valuesById[74] = "VIEWED_ONCE"] = 74;
            values[valuesById[75] = "E2E_ENCRYPTED_NOW"] = 75;
            values[valuesById[76] = "BLUE_MSG_BSP_FB_TO_BSP_PREMISE"] = 76;
            values[valuesById[77] = "BLUE_MSG_BSP_FB_TO_SELF_FB"] = 77;
            values[valuesById[78] = "BLUE_MSG_BSP_FB_TO_SELF_PREMISE"] = 78;
            values[valuesById[79] = "BLUE_MSG_BSP_FB_UNVERIFIED"] = 79;
            values[valuesById[80] = "BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED"] = 80;
            values[valuesById[81] = "BLUE_MSG_BSP_FB_VERIFIED"] = 81;
            values[valuesById[82] = "BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED"] = 82;
            values[valuesById[83] = "BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE"] = 83;
            values[valuesById[84] = "BLUE_MSG_BSP_PREMISE_UNVERIFIED"] = 84;
            values[valuesById[85] = "BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED"] = 85;
            values[valuesById[86] = "BLUE_MSG_BSP_PREMISE_VERIFIED"] = 86;
            values[valuesById[87] = "BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED"] = 87;
            values[valuesById[88] = "BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED"] = 88;
            values[valuesById[89] = "BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED"] = 89;
            values[valuesById[90] = "BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED"] = 90;
            values[valuesById[91] = "BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED"] = 91;
            values[valuesById[92] = "BLUE_MSG_SELF_FB_TO_BSP_PREMISE"] = 92;
            values[valuesById[93] = "BLUE_MSG_SELF_FB_TO_SELF_PREMISE"] = 93;
            values[valuesById[94] = "BLUE_MSG_SELF_FB_UNVERIFIED"] = 94;
            values[valuesById[95] = "BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED"] = 95;
            values[valuesById[96] = "BLUE_MSG_SELF_FB_VERIFIED"] = 96;
            values[valuesById[97] = "BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED"] = 97;
            values[valuesById[98] = "BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE"] = 98;
            values[valuesById[99] = "BLUE_MSG_SELF_PREMISE_UNVERIFIED"] = 99;
            values[valuesById[100] = "BLUE_MSG_SELF_PREMISE_VERIFIED"] = 100;
            values[valuesById[101] = "BLUE_MSG_TO_BSP_FB"] = 101;
            values[valuesById[102] = "BLUE_MSG_TO_CONSUMER"] = 102;
            values[valuesById[103] = "BLUE_MSG_TO_SELF_FB"] = 103;
            values[valuesById[104] = "BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED"] = 104;
            values[valuesById[105] = "BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED"] = 105;
            values[valuesById[106] = "BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED"] = 106;
            values[valuesById[107] = "BLUE_MSG_UNVERIFIED_TO_VERIFIED"] = 107;
            values[valuesById[108] = "BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED"] = 108;
            values[valuesById[109] = "BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED"] = 109;
            values[valuesById[110] = "BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED"] = 110;
            values[valuesById[111] = "BLUE_MSG_VERIFIED_TO_UNVERIFIED"] = 111;
            values[valuesById[112] = "BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED"] = 112;
            values[valuesById[113] = "BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED"] = 113;
            values[valuesById[114] = "BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED"] = 114;
            values[valuesById[115] = "BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED"] = 115;
            values[valuesById[116] = "BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED"] = 116;
            values[valuesById[117] = "BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED"] = 117;
            values[valuesById[118] = "E2E_IDENTITY_UNAVAILABLE"] = 118;
            values[valuesById[119] = "GROUP_CREATING"] = 119;
            values[valuesById[120] = "GROUP_CREATE_FAILED"] = 120;
            values[valuesById[121] = "GROUP_BOUNCED"] = 121;
            values[valuesById[122] = "BLOCK_CONTACT"] = 122;
            values[valuesById[123] = "EPHEMERAL_SETTING_NOT_APPLIED"] = 123;
            values[valuesById[124] = "SYNC_FAILED"] = 124;
            values[valuesById[125] = "SYNCING"] = 125;
            values[valuesById[126] = "BIZ_PRIVACY_MODE_INIT_FB"] = 126;
            values[valuesById[127] = "BIZ_PRIVACY_MODE_INIT_BSP"] = 127;
            values[valuesById[128] = "BIZ_PRIVACY_MODE_TO_FB"] = 128;
            values[valuesById[129] = "BIZ_PRIVACY_MODE_TO_BSP"] = 129;
            values[valuesById[130] = "DISAPPEARING_MODE"] = 130;
            values[valuesById[131] = "E2E_DEVICE_FETCH_FAILED"] = 131;
            values[valuesById[132] = "ADMIN_REVOKE"] = 132;
            values[valuesById[133] = "GROUP_INVITE_LINK_GROWTH_LOCKED"] = 133;
            values[valuesById[134] = "COMMUNITY_LINK_PARENT_GROUP"] = 134;
            values[valuesById[135] = "COMMUNITY_LINK_SIBLING_GROUP"] = 135;
            values[valuesById[136] = "COMMUNITY_LINK_SUB_GROUP"] = 136;
            values[valuesById[137] = "COMMUNITY_UNLINK_PARENT_GROUP"] = 137;
            values[valuesById[138] = "COMMUNITY_UNLINK_SIBLING_GROUP"] = 138;
            values[valuesById[139] = "COMMUNITY_UNLINK_SUB_GROUP"] = 139;
            values[valuesById[140] = "GROUP_PARTICIPANT_ACCEPT"] = 140;
            values[valuesById[141] = "GROUP_PARTICIPANT_LINKED_GROUP_JOIN"] = 141;
            values[valuesById[142] = "COMMUNITY_CREATE"] = 142;
            values[valuesById[143] = "EPHEMERAL_KEEP_IN_CHAT"] = 143;
            values[valuesById[144] = "GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST"] = 144;
            values[valuesById[145] = "GROUP_MEMBERSHIP_JOIN_APPROVAL_MODE"] = 145;
            values[valuesById[146] = "INTEGRITY_UNLINK_PARENT_GROUP"] = 146;
            values[valuesById[147] = "COMMUNITY_PARTICIPANT_PROMOTE"] = 147;
            values[valuesById[148] = "COMMUNITY_PARTICIPANT_DEMOTE"] = 148;
            values[valuesById[149] = "COMMUNITY_PARENT_GROUP_DELETED"] = 149;
            values[valuesById[150] = "COMMUNITY_LINK_PARENT_GROUP_MEMBERSHIP_APPROVAL"] = 150;
            values[valuesById[151] = "GROUP_PARTICIPANT_JOINED_GROUP_AND_PARENT_GROUP"] = 151;
            values[valuesById[152] = "MASKED_THREAD_CREATED"] = 152;
            values[valuesById[153] = "MASKED_THREAD_UNMASKED"] = 153;
            values[valuesById[154] = "BIZ_CHAT_ASSIGNMENT"] = 154;
            values[valuesById[155] = "CHAT_PSA"] = 155;
            values[valuesById[156] = "CHAT_POLL_CREATION_MESSAGE"] = 156;
            values[valuesById[157] = "CAG_MASKED_THREAD_CREATED"] = 157;
            values[valuesById[158] = "COMMUNITY_PARENT_GROUP_SUBJECT_CHANGED"] = 158;
            values[valuesById[159] = "CAG_INVITE_AUTO_ADD"] = 159;
            values[valuesById[160] = "BIZ_CHAT_ASSIGNMENT_UNASSIGN"] = 160;
            values[valuesById[161] = "CAG_INVITE_AUTO_JOINED"] = 161;
            values[valuesById[162] = "SCHEDULED_CALL_START_MESSAGE"] = 162;
            values[valuesById[163] = "COMMUNITY_INVITE_RICH"] = 163;
            values[valuesById[164] = "COMMUNITY_INVITE_AUTO_ADD_RICH"] = 164;
            values[valuesById[165] = "SUB_GROUP_INVITE_RICH"] = 165;
            values[valuesById[166] = "SUB_GROUP_PARTICIPANT_ADD_RICH"] = 166;
            values[valuesById[167] = "COMMUNITY_LINK_PARENT_GROUP_RICH"] = 167;
            values[valuesById[168] = "COMMUNITY_PARTICIPANT_ADD_RICH"] = 168;
            values[valuesById[169] = "SILENCED_UNKNOWN_CALLER_AUDIO"] = 169;
            values[valuesById[170] = "SILENCED_UNKNOWN_CALLER_VIDEO"] = 170;
            values[valuesById[171] = "GROUP_MEMBER_ADD_MODE"] = 171;
            values[valuesById[172] = "GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST_NON_ADMIN_ADD"] = 172;
            values[valuesById[173] = "COMMUNITY_CHANGE_DESCRIPTION"] = 173;
            values[valuesById[174] = "SENDER_INVITE"] = 174;
            values[valuesById[175] = "RECEIVER_INVITE"] = 175;
            values[valuesById[176] = "COMMUNITY_ALLOW_MEMBER_ADDED_GROUPS"] = 176;
            values[valuesById[177] = "PINNED_MESSAGE_IN_CHAT"] = 177;
            values[valuesById[178] = "PAYMENT_INVITE_SETUP_INVITER"] = 178;
            values[valuesById[179] = "PAYMENT_INVITE_SETUP_INVITEE_RECEIVE_ONLY"] = 179;
            values[valuesById[180] = "PAYMENT_INVITE_SETUP_INVITEE_SEND_AND_RECEIVE"] = 180;
            values[valuesById[181] = "LINKED_GROUP_CALL_START"] = 181;
            values[valuesById[182] = "REPORT_TO_ADMIN_ENABLED_STATUS"] = 182;
            values[valuesById[183] = "EMPTY_SUBGROUP_CREATE"] = 183;
            values[valuesById[184] = "SCHEDULED_CALL_CANCEL"] = 184;
            values[valuesById[185] = "SUBGROUP_ADMIN_TRIGGERED_AUTO_ADD_RICH"] = 185;
            values[valuesById[186] = "GROUP_CHANGE_RECENT_HISTORY_SHARING"] = 186;
            values[valuesById[187] = "PAID_MESSAGE_SERVER_CAMPAIGN_ID"] = 187;
            values[valuesById[188] = "GENERAL_CHAT_CREATE"] = 188;
            values[valuesById[189] = "GENERAL_CHAT_ADD"] = 189;
            values[valuesById[190] = "GENERAL_CHAT_AUTO_ADD_DISABLED"] = 190;
            values[valuesById[191] = "SUGGESTED_SUBGROUP_ANNOUNCE"] = 191;
            values[valuesById[192] = "BIZ_BOT_1P_MESSAGING_ENABLED"] = 192;
            values[valuesById[193] = "CHANGE_USERNAME"] = 193;
            values[valuesById[194] = "BIZ_COEX_PRIVACY_INIT_SELF"] = 194;
            values[valuesById[195] = "BIZ_COEX_PRIVACY_TRANSITION_SELF"] = 195;
            values[valuesById[196] = "SUPPORT_AI_EDUCATION"] = 196;
            values[valuesById[197] = "BIZ_BOT_3P_MESSAGING_ENABLED"] = 197;
            values[valuesById[198] = "REMINDER_SETUP_MESSAGE"] = 198;
            values[valuesById[199] = "REMINDER_SENT_MESSAGE"] = 199;
            values[valuesById[200] = "REMINDER_CANCEL_MESSAGE"] = 200;
            values[valuesById[201] = "BIZ_COEX_PRIVACY_INIT"] = 201;
            values[valuesById[202] = "BIZ_COEX_PRIVACY_TRANSITION"] = 202;
            values[valuesById[203] = "GROUP_DEACTIVATED"] = 203;
            values[valuesById[204] = "COMMUNITY_DEACTIVATE_SIBLING_GROUP"] = 204;
            values[valuesById[205] = "EVENT_UPDATED"] = 205;
            values[valuesById[206] = "EVENT_CANCELED"] = 206;
            values[valuesById[207] = "COMMUNITY_OWNER_UPDATED"] = 207;
            values[valuesById[208] = "COMMUNITY_SUB_GROUP_VISIBILITY_HIDDEN"] = 208;
            values[valuesById[209] = "CAPI_GROUP_NE2EE_SYSTEM_MESSAGE"] = 209;
            values[valuesById[210] = "STATUS_MENTION"] = 210;
            values[valuesById[211] = "USER_CONTROLS_SYSTEM_MESSAGE"] = 211;
            values[valuesById[212] = "SUPPORT_SYSTEM_MESSAGE"] = 212;
            values[valuesById[213] = "CHANGE_LID"] = 213;
            values[valuesById[214] = "BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_IN_MESSAGE"] = 214;
            values[valuesById[215] = "BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_OUT_MESSAGE"] = 215;
            values[valuesById[216] = "CHANGE_LIMIT_SHARING"] = 216;
            values[valuesById[217] = "GROUP_MEMBER_LINK_MODE"] = 217;
            values[valuesById[218] = "BIZ_AUTOMATICALLY_LABELED_CHAT_SYSTEM_MESSAGE"] = 218;
            values[valuesById[219] = "PHONE_NUMBER_HIDING_CHAT_DEPRECATED_MESSAGE"] = 219;
            values[valuesById[220] = "QUARANTINED_MESSAGE"] = 220;
            values[valuesById[221] = "GROUP_MEMBER_SHARE_GROUP_HISTORY_MODE"] = 221;
            values[valuesById[222] = "GROUP_OPEN_BOT_ADDED"] = 222;
            values[valuesById[223] = "GROUP_TEE_BOT_ADDED"] = 223;
            return values;
        })();

        return WebMessageInfo;
    })();

    return Web;
})();

$root.E2E = (function() {

    /**
     * Namespace E2E.
     * @exports E2E
     * @namespace
     */
    var E2E = {};

    E2E.AIQueryFanout = (function() {

        /**
         * Properties of a AIQueryFanout.
         * @memberof E2E
         * @interface IAIQueryFanout
         * @property {Protocol.IMessageKey|null} [messageKey] AIQueryFanout messageKey
         * @property {E2E.IMessage|null} [message] AIQueryFanout message
         * @property {number|Long|null} [timestamp] AIQueryFanout timestamp
         */

        /**
         * Constructs a new AIQueryFanout.
         * @memberof E2E
         * @classdesc Represents a AIQueryFanout.
         * @implements IAIQueryFanout
         * @constructor
         * @param {E2E.IAIQueryFanout=} [properties] Properties to set
         */
        function AIQueryFanout(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]];
        }

        /**
         * AIQueryFanout messageKey.
         * @member {Protocol.IMessageKey|null|undefined} messageKey
         * @memberof E2E.AIQueryFanout
         * @instance
         */
        AIQueryFanout.prototype.messageKey = null;

        /**
         * AIQueryFanout message.
         * @member {E2E.IMessage|null|undefined} message
         * @memberof E2E.AIQueryFanout
         * @instance
         */
        AIQueryFanout.prototype.message = null;

        /**
         * AIQueryFanout timestamp.
         * @member {number|Long|null|undefined} timestamp
         * @memberof E2E.AIQueryFanout
         * @instance
         */
        AIQueryFanout.prototype.timestamp = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * AIQueryFanout _messageKey.
         * @member {"messageKey"|undefined} _messageKey
         * @memberof E2E.AIQueryFanout
         * @instance
         */
        Object.defineProperty(AIQueryFanout.prototype, "_messageKey", {
            get: $util.oneOfGetter($oneOfFields = ["messageKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIQueryFanout _message.
         * @member {"message"|undefined} _message
         * @memberof E2E.AIQueryFanout
         * @instance
         */
        Object.defineProperty(AIQueryFanout.prototype, "_message", {
            get: $util.oneOfGetter($oneOfFields = ["message"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIQueryFanout _timestamp.
         * @member {"timestamp"|undefined} _timestamp
         * @memberof E2E.AIQueryFanout
         * @instance
         */
        Object.defineProperty(AIQueryFanout.prototype, "_timestamp", {
            get: $util.oneOfGetter($oneOfFields = ["timestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new AIQueryFanout instance using the specified properties.
         * @function create
         * @memberof E2E.AIQueryFanout
         * @static
         * @param {E2E.IAIQueryFanout=} [properties] Properties to set
         * @returns {E2E.AIQueryFanout} AIQueryFanout instance
         */
        AIQueryFanout.create = function create(properties) {
            return new AIQueryFanout(properties);
        };

        /**
         * Encodes the specified AIQueryFanout message. Does not implicitly {@link E2E.AIQueryFanout.verify|verify} messages.
         * @function encode
         * @memberof E2E.AIQueryFanout
         * @static
         * @param {E2E.IAIQueryFanout} message AIQueryFanout message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIQueryFanout.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.messageKey != null && Object.hasOwnProperty.call(message, "messageKey"))
                $root.Protocol.MessageKey.encode(message.messageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.message != null && Object.hasOwnProperty.call(message, "message"))
                $root.E2E.Message.encode(message.message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
                writer.uint32(/* id 3, wireType 0 =*/24).int64(message.timestamp);
            return writer;
        };

        /**
         * Encodes the specified AIQueryFanout message, length delimited. Does not implicitly {@link E2E.AIQueryFanout.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.AIQueryFanout
         * @static
         * @param {E2E.IAIQueryFanout} message AIQueryFanout message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIQueryFanout.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a AIQueryFanout message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.AIQueryFanout
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.AIQueryFanout} AIQueryFanout
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIQueryFanout.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.E2E.AIQueryFanout();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.messageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.message = $root.E2E.Message.decode(reader, reader.uint32());
                        break;
                    }
                case 3: {
                        message.timestamp = reader.int64();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a AIQueryFanout message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.AIQueryFanout
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.AIQueryFanout} AIQueryFanout
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIQueryFanout.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a AIQueryFanout message.
         * @function verify
         * @memberof E2E.AIQueryFanout
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIQueryFanout.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.messageKey != null && message.hasOwnProperty("messageKey")) {
                properties._messageKey = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.messageKey);
                    if (error)
                        return "messageKey." + error;
                }
            }
            if (message.message != null && message.hasOwnProperty("message")) {
                properties._message = 1;
                {
                    var error = $root.E2E.Message.verify(message.message);
                    if (error)
                        return "message." + error;
                }
            }
            if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
                properties._timestamp = 1;
                if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
                    return "timestamp: integer|Long expected";
            }
            return null;
        };

        /**
         * Creates a AIQueryFanout message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.AIQueryFanout
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.AIQueryFanout} AIQueryFanout
         */
        AIQueryFanout.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.AIQueryFanout)
                return object;
            var message = new $root.E2E.AIQueryFanout();
            if (object.messageKey != null) {
                if (typeof object.messageKey !== "object")
                    throw TypeError(".E2E.AIQueryFanout.messageKey: object expected");
                message.messageKey = $root.Protocol.MessageKey.fromObject(object.messageKey);
            }
            if (object.message != null) {
                if (typeof object.message !== "object")
                    throw TypeError(".E2E.AIQueryFanout.message: object expected");
                message.message = $root.E2E.Message.fromObject(object.message);
            }
            if (object.timestamp != null)
                if ($util.Long)
                    (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false;
                else if (typeof object.timestamp === "string")
                    message.timestamp = parseInt(object.timestamp, 10);
                else if (typeof object.timestamp === "number")
                    message.timestamp = object.timestamp;
                else if (typeof object.timestamp === "object")
                    message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber();
            return message;
        };

        /**
         * Creates a plain object from a AIQueryFanout message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.AIQueryFanout
         * @static
         * @param {E2E.AIQueryFanout} message AIQueryFanout
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIQueryFanout.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.messageKey != null && message.hasOwnProperty("messageKey")) {
                object.messageKey = $root.Protocol.MessageKey.toObject(message.messageKey, options);
                if (options.oneofs)
                    object._messageKey = "messageKey";
            }
            if (message.message != null && message.hasOwnProperty("message")) {
                object.message = $root.E2E.Message.toObject(message.message, options);
                if (options.oneofs)
                    object._message = "message";
            }
            if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
                if (typeof message.timestamp === "number")
                    object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
                else
                    object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp;
                if (options.oneofs)
                    object._timestamp = "timestamp";
            }
            return object;
        };

        /**
         * Converts this AIQueryFanout to JSON.
         * @function toJSON
         * @memberof E2E.AIQueryFanout
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        AIQueryFanout.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for AIQueryFanout
         * @function getTypeUrl
         * @memberof E2E.AIQueryFanout
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        AIQueryFanout.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.AIQueryFanout";
        };

        return AIQueryFanout;
    })();

    E2E.AIRichResponseMessage = (function() {

        /**
         * Properties of a AIRichResponseMessage.
         * @memberof E2E
         * @interface IAIRichResponseMessage
         * @property {AICommon.AIRichResponseMessageType|null} [messageType] AIRichResponseMessage messageType
         * @property {Array.<AICommon.IAIRichResponseSubMessage>|null} [submessages] AIRichResponseMessage submessages
         * @property {AICommon.IAIRichResponseUnifiedResponse|null} [unifiedResponse] AIRichResponseMessage unifiedResponse
         * @property {E2E.IContextInfo|null} [contextInfo] AIRichResponseMessage contextInfo
         */

        /**
         * Constructs a new AIRichResponseMessage.
         * @memberof E2E
         * @classdesc Represents a AIRichResponseMessage.
         * @implements IAIRichResponseMessage
         * @constructor
         * @param {E2E.IAIRichResponseMessage=} [properties] Properties to set
         */
        function AIRichResponseMessage(properties) {
            this.submessages = [];
            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]];
        }

        /**
         * AIRichResponseMessage messageType.
         * @member {AICommon.AIRichResponseMessageType|null|undefined} messageType
         * @memberof E2E.AIRichResponseMessage
         * @instance
         */
        AIRichResponseMessage.prototype.messageType = null;

        /**
         * AIRichResponseMessage submessages.
         * @member {Array.<AICommon.IAIRichResponseSubMessage>} submessages
         * @memberof E2E.AIRichResponseMessage
         * @instance
         */
        AIRichResponseMessage.prototype.submessages = $util.emptyArray;

        /**
         * AIRichResponseMessage unifiedResponse.
         * @member {AICommon.IAIRichResponseUnifiedResponse|null|undefined} unifiedResponse
         * @memberof E2E.AIRichResponseMessage
         * @instance
         */
        AIRichResponseMessage.prototype.unifiedResponse = null;

        /**
         * AIRichResponseMessage contextInfo.
         * @member {E2E.IContextInfo|null|undefined} contextInfo
         * @memberof E2E.AIRichResponseMessage
         * @instance
         */
        AIRichResponseMessage.prototype.contextInfo = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * AIRichResponseMessage _messageType.
         * @member {"messageType"|undefined} _messageType
         * @memberof E2E.AIRichResponseMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseMessage.prototype, "_messageType", {
            get: $util.oneOfGetter($oneOfFields = ["messageType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseMessage _unifiedResponse.
         * @member {"unifiedResponse"|undefined} _unifiedResponse
         * @memberof E2E.AIRichResponseMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseMessage.prototype, "_unifiedResponse", {
            get: $util.oneOfGetter($oneOfFields = ["unifiedResponse"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseMessage _contextInfo.
         * @member {"contextInfo"|undefined} _contextInfo
         * @memberof E2E.AIRichResponseMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseMessage.prototype, "_contextInfo", {
            get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new AIRichResponseMessage instance using the specified properties.
         * @function create
         * @memberof E2E.AIRichResponseMessage
         * @static
         * @param {E2E.IAIRichResponseMessage=} [properties] Properties to set
         * @returns {E2E.AIRichResponseMessage} AIRichResponseMessage instance
         */
        AIRichResponseMessage.create = function create(properties) {
            return new AIRichResponseMessage(properties);
        };

        /**
         * Encodes the specified AIRichResponseMessage message. Does not implicitly {@link E2E.AIRichResponseMessage.verify|verify} messages.
         * @function encode
         * @memberof E2E.AIRichResponseMessage
         * @static
         * @param {E2E.IAIRichResponseMessage} message AIRichResponseMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseMessage.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.messageType);
            if (message.submessages != null && message.submessages.length)
                for (var i = 0; i < message.submessages.length; ++i)
                    $root.AICommon.AIRichResponseSubMessage.encode(message.submessages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.unifiedResponse != null && Object.hasOwnProperty.call(message, "unifiedResponse"))
                $root.AICommon.AIRichResponseUnifiedResponse.encode(message.unifiedResponse, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified AIRichResponseMessage message, length delimited. Does not implicitly {@link E2E.AIRichResponseMessage.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.AIRichResponseMessage
         * @static
         * @param {E2E.IAIRichResponseMessage} message AIRichResponseMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a AIRichResponseMessage message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.AIRichResponseMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.AIRichResponseMessage} AIRichResponseMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseMessage.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.E2E.AIRichResponseMessage();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.messageType = reader.int32();
                        break;
                    }
                case 2: {
                        if (!(message.submessages && message.submessages.length))
                            message.submessages = [];
                        message.submessages.push($root.AICommon.AIRichResponseSubMessage.decode(reader, reader.uint32()));
                        break;
                    }
                case 3: {
                        message.unifiedResponse = $root.AICommon.AIRichResponseUnifiedResponse.decode(reader, reader.uint32());
                        break;
                    }
                case 4: {
                        message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a AIRichResponseMessage message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.AIRichResponseMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.AIRichResponseMessage} AIRichResponseMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseMessage.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a AIRichResponseMessage message.
         * @function verify
         * @memberof E2E.AIRichResponseMessage
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIRichResponseMessage.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.messageType != null && message.hasOwnProperty("messageType")) {
                properties._messageType = 1;
                switch (message.messageType) {
                default:
                    return "messageType: enum value expected";
                case 0:
                case 1:
                    break;
                }
            }
            if (message.submessages != null && message.hasOwnProperty("submessages")) {
                if (!Array.isArray(message.submessages))
                    return "submessages: array expected";
                for (var i = 0; i < message.submessages.length; ++i) {
                    var error = $root.AICommon.AIRichResponseSubMessage.verify(message.submessages[i]);
                    if (error)
                        return "submessages." + error;
                }
            }
            if (message.unifiedResponse != null && message.hasOwnProperty("unifiedResponse")) {
                properties._unifiedResponse = 1;
                {
                    var error = $root.AICommon.AIRichResponseUnifiedResponse.verify(message.unifiedResponse);
                    if (error)
                        return "unifiedResponse." + error;
                }
            }
            if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                properties._contextInfo = 1;
                {
                    var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                    if (error)
                        return "contextInfo." + error;
                }
            }
            return null;
        };

        /**
         * Creates a AIRichResponseMessage message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.AIRichResponseMessage
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.AIRichResponseMessage} AIRichResponseMessage
         */
        AIRichResponseMessage.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.AIRichResponseMessage)
                return object;
            var message = new $root.E2E.AIRichResponseMessage();
            switch (object.messageType) {
            default:
                if (typeof object.messageType === "number") {
                    message.messageType = object.messageType;
                    break;
                }
                break;
            case "AI_RICH_RESPONSE_TYPE_UNKNOWN":
            case 0:
                message.messageType = 0;
                break;
            case "AI_RICH_RESPONSE_TYPE_STANDARD":
            case 1:
                message.messageType = 1;
                break;
            }
            if (object.submessages) {
                if (!Array.isArray(object.submessages))
                    throw TypeError(".E2E.AIRichResponseMessage.submessages: array expected");
                message.submessages = [];
                for (var i = 0; i < object.submessages.length; ++i) {
                    if (typeof object.submessages[i] !== "object")
                        throw TypeError(".E2E.AIRichResponseMessage.submessages: object expected");
                    message.submessages[i] = $root.AICommon.AIRichResponseSubMessage.fromObject(object.submessages[i]);
                }
            }
            if (object.unifiedResponse != null) {
                if (typeof object.unifiedResponse !== "object")
                    throw TypeError(".E2E.AIRichResponseMessage.unifiedResponse: object expected");
                message.unifiedResponse = $root.AICommon.AIRichResponseUnifiedResponse.fromObject(object.unifiedResponse);
            }
            if (object.contextInfo != null) {
                if (typeof object.contextInfo !== "object")
                    throw TypeError(".E2E.AIRichResponseMessage.contextInfo: object expected");
                message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
            }
            return message;
        };

        /**
         * Creates a plain object from a AIRichResponseMessage message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.AIRichResponseMessage
         * @static
         * @param {E2E.AIRichResponseMessage} message AIRichResponseMessage
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIRichResponseMessage.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.submessages = [];
            if (message.messageType != null && message.hasOwnProperty("messageType")) {
                object.messageType = options.enums === String ? $root.AICommon.AIRichResponseMessageType[message.messageType] === undefined ? message.messageType : $root.AICommon.AIRichResponseMessageType[message.messageType] : message.messageType;
                if (options.oneofs)
                    object._messageType = "messageType";
            }
            if (message.submessages && message.submessages.length) {
                object.submessages = [];
                for (var j = 0; j < message.submessages.length; ++j)
                    object.submessages[j] = $root.AICommon.AIRichResponseSubMessage.toObject(message.submessages[j], options);
            }
            if (message.unifiedResponse != null && message.hasOwnProperty("unifiedResponse")) {
                object.unifiedResponse = $root.AICommon.AIRichResponseUnifiedResponse.toObject(message.unifiedResponse, options);
                if (options.oneofs)
                    object._unifiedResponse = "unifiedResponse";
            }
            if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                if (options.oneofs)
                    object._contextInfo = "contextInfo";
            }
            return object;
        };

        /**
         * Converts this AIRichResponseMessage to JSON.
         * @function toJSON
         * @memberof E2E.AIRichResponseMessage
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        AIRichResponseMessage.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for AIRichResponseMessage
         * @function getTypeUrl
         * @memberof E2E.AIRichResponseMessage
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        AIRichResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.AIRichResponseMessage";
        };

        return AIRichResponseMessage;
    })();

    E2E.MemberLabel = (function() {

        /**
         * Properties of a MemberLabel.
         * @memberof E2E
         * @interface IMemberLabel
         * @property {string|null} [label] MemberLabel label
         * @property {number|Long|null} [labelTimestamp] MemberLabel labelTimestamp
         */

        /**
         * Constructs a new MemberLabel.
         * @memberof E2E
         * @classdesc Represents a MemberLabel.
         * @implements IMemberLabel
         * @constructor
         * @param {E2E.IMemberLabel=} [properties] Properties to set
         */
        function MemberLabel(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]];
        }

        /**
         * MemberLabel label.
         * @member {string|null|undefined} label
         * @memberof E2E.MemberLabel
         * @instance
         */
        MemberLabel.prototype.label = null;

        /**
         * MemberLabel labelTimestamp.
         * @member {number|Long|null|undefined} labelTimestamp
         * @memberof E2E.MemberLabel
         * @instance
         */
        MemberLabel.prototype.labelTimestamp = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * MemberLabel _label.
         * @member {"label"|undefined} _label
         * @memberof E2E.MemberLabel
         * @instance
         */
        Object.defineProperty(MemberLabel.prototype, "_label", {
            get: $util.oneOfGetter($oneOfFields = ["label"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MemberLabel _labelTimestamp.
         * @member {"labelTimestamp"|undefined} _labelTimestamp
         * @memberof E2E.MemberLabel
         * @instance
         */
        Object.defineProperty(MemberLabel.prototype, "_labelTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["labelTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new MemberLabel instance using the specified properties.
         * @function create
         * @memberof E2E.MemberLabel
         * @static
         * @param {E2E.IMemberLabel=} [properties] Properties to set
         * @returns {E2E.MemberLabel} MemberLabel instance
         */
        MemberLabel.create = function create(properties) {
            return new MemberLabel(properties);
        };

        /**
         * Encodes the specified MemberLabel message. Does not implicitly {@link E2E.MemberLabel.verify|verify} messages.
         * @function encode
         * @memberof E2E.MemberLabel
         * @static
         * @param {E2E.IMemberLabel} message MemberLabel message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MemberLabel.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.label != null && Object.hasOwnProperty.call(message, "label"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.label);
            if (message.labelTimestamp != null && Object.hasOwnProperty.call(message, "labelTimestamp"))
                writer.uint32(/* id 2, wireType 0 =*/16).int64(message.labelTimestamp);
            return writer;
        };

        /**
         * Encodes the specified MemberLabel message, length delimited. Does not implicitly {@link E2E.MemberLabel.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.MemberLabel
         * @static
         * @param {E2E.IMemberLabel} message MemberLabel message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MemberLabel.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a MemberLabel message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.MemberLabel
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.MemberLabel} MemberLabel
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MemberLabel.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.E2E.MemberLabel();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.label = reader.string();
                        break;
                    }
                case 2: {
                        message.labelTimestamp = reader.int64();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a MemberLabel message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.MemberLabel
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.MemberLabel} MemberLabel
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MemberLabel.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a MemberLabel message.
         * @function verify
         * @memberof E2E.MemberLabel
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        MemberLabel.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.label != null && message.hasOwnProperty("label")) {
                properties._label = 1;
                if (!$util.isString(message.label))
                    return "label: string expected";
            }
            if (message.labelTimestamp != null && message.hasOwnProperty("labelTimestamp")) {
                properties._labelTimestamp = 1;
                if (!$util.isInteger(message.labelTimestamp) && !(message.labelTimestamp && $util.isInteger(message.labelTimestamp.low) && $util.isInteger(message.labelTimestamp.high)))
                    return "labelTimestamp: integer|Long expected";
            }
            return null;
        };

        /**
         * Creates a MemberLabel message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.MemberLabel
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.MemberLabel} MemberLabel
         */
        MemberLabel.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.MemberLabel)
                return object;
            var message = new $root.E2E.MemberLabel();
            if (object.label != null)
                message.label = String(object.label);
            if (object.labelTimestamp != null)
                if ($util.Long)
                    (message.labelTimestamp = $util.Long.fromValue(object.labelTimestamp)).unsigned = false;
                else if (typeof object.labelTimestamp === "string")
                    message.labelTimestamp = parseInt(object.labelTimestamp, 10);
                else if (typeof object.labelTimestamp === "number")
                    message.labelTimestamp = object.labelTimestamp;
                else if (typeof object.labelTimestamp === "object")
                    message.labelTimestamp = new $util.LongBits(object.labelTimestamp.low >>> 0, object.labelTimestamp.high >>> 0).toNumber();
            return message;
        };

        /**
         * Creates a plain object from a MemberLabel message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.MemberLabel
         * @static
         * @param {E2E.MemberLabel} message MemberLabel
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        MemberLabel.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.label != null && message.hasOwnProperty("label")) {
                object.label = message.label;
                if (options.oneofs)
                    object._label = "label";
            }
            if (message.labelTimestamp != null && message.hasOwnProperty("labelTimestamp")) {
                if (typeof message.labelTimestamp === "number")
                    object.labelTimestamp = options.longs === String ? String(message.labelTimestamp) : message.labelTimestamp;
                else
                    object.labelTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.labelTimestamp) : options.longs === Number ? new $util.LongBits(message.labelTimestamp.low >>> 0, message.labelTimestamp.high >>> 0).toNumber() : message.labelTimestamp;
                if (options.oneofs)
                    object._labelTimestamp = "labelTimestamp";
            }
            return object;
        };

        /**
         * Converts this MemberLabel to JSON.
         * @function toJSON
         * @memberof E2E.MemberLabel
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        MemberLabel.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for MemberLabel
         * @function getTypeUrl
         * @memberof E2E.MemberLabel
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        MemberLabel.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.MemberLabel";
        };

        return MemberLabel;
    })();

    E2E.UrlTrackingMap = (function() {

        /**
         * Properties of an UrlTrackingMap.
         * @memberof E2E
         * @interface IUrlTrackingMap
         * @property {Array.<E2E.UrlTrackingMap.IUrlTrackingMapElement>|null} [urlTrackingMapElements] UrlTrackingMap urlTrackingMapElements
         */

        /**
         * Constructs a new UrlTrackingMap.
         * @memberof E2E
         * @classdesc Represents an UrlTrackingMap.
         * @implements IUrlTrackingMap
         * @constructor
         * @param {E2E.IUrlTrackingMap=} [properties] Properties to set
         */
        function UrlTrackingMap(properties) {
            this.urlTrackingMapElements = [];
            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]];
        }

        /**
         * UrlTrackingMap urlTrackingMapElements.
         * @member {Array.<E2E.UrlTrackingMap.IUrlTrackingMapElement>} urlTrackingMapElements
         * @memberof E2E.UrlTrackingMap
         * @instance
         */
        UrlTrackingMap.prototype.urlTrackingMapElements = $util.emptyArray;

        /**
         * Creates a new UrlTrackingMap instance using the specified properties.
         * @function create
         * @memberof E2E.UrlTrackingMap
         * @static
         * @param {E2E.IUrlTrackingMap=} [properties] Properties to set
         * @returns {E2E.UrlTrackingMap} UrlTrackingMap instance
         */
        UrlTrackingMap.create = function create(properties) {
            return new UrlTrackingMap(properties);
        };

        /**
         * Encodes the specified UrlTrackingMap message. Does not implicitly {@link E2E.UrlTrackingMap.verify|verify} messages.
         * @function encode
         * @memberof E2E.UrlTrackingMap
         * @static
         * @param {E2E.IUrlTrackingMap} message UrlTrackingMap message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UrlTrackingMap.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.urlTrackingMapElements != null && message.urlTrackingMapElements.length)
                for (var i = 0; i < message.urlTrackingMapElements.length; ++i)
                    $root.E2E.UrlTrackingMap.UrlTrackingMapElement.encode(message.urlTrackingMapElements[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified UrlTrackingMap message, length delimited. Does not implicitly {@link E2E.UrlTrackingMap.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.UrlTrackingMap
         * @static
         * @param {E2E.IUrlTrackingMap} message UrlTrackingMap message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UrlTrackingMap.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes an UrlTrackingMap message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.UrlTrackingMap
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.UrlTrackingMap} UrlTrackingMap
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UrlTrackingMap.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.E2E.UrlTrackingMap();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        if (!(message.urlTrackingMapElements && message.urlTrackingMapElements.length))
                            message.urlTrackingMapElements = [];
                        message.urlTrackingMapElements.push($root.E2E.UrlTrackingMap.UrlTrackingMapElement.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes an UrlTrackingMap message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.UrlTrackingMap
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.UrlTrackingMap} UrlTrackingMap
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UrlTrackingMap.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies an UrlTrackingMap message.
         * @function verify
         * @memberof E2E.UrlTrackingMap
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        UrlTrackingMap.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.urlTrackingMapElements != null && message.hasOwnProperty("urlTrackingMapElements")) {
                if (!Array.isArray(message.urlTrackingMapElements))
                    return "urlTrackingMapElements: array expected";
                for (var i = 0; i < message.urlTrackingMapElements.length; ++i) {
                    var error = $root.E2E.UrlTrackingMap.UrlTrackingMapElement.verify(message.urlTrackingMapElements[i]);
                    if (error)
                        return "urlTrackingMapElements." + error;
                }
            }
            return null;
        };

        /**
         * Creates an UrlTrackingMap message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.UrlTrackingMap
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.UrlTrackingMap} UrlTrackingMap
         */
        UrlTrackingMap.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.UrlTrackingMap)
                return object;
            var message = new $root.E2E.UrlTrackingMap();
            if (object.urlTrackingMapElements) {
                if (!Array.isArray(object.urlTrackingMapElements))
                    throw TypeError(".E2E.UrlTrackingMap.urlTrackingMapElements: array expected");
                message.urlTrackingMapElements = [];
                for (var i = 0; i < object.urlTrackingMapElements.length; ++i) {
                    if (typeof object.urlTrackingMapElements[i] !== "object")
                        throw TypeError(".E2E.UrlTrackingMap.urlTrackingMapElements: object expected");
                    message.urlTrackingMapElements[i] = $root.E2E.UrlTrackingMap.UrlTrackingMapElement.fromObject(object.urlTrackingMapElements[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from an UrlTrackingMap message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.UrlTrackingMap
         * @static
         * @param {E2E.UrlTrackingMap} message UrlTrackingMap
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        UrlTrackingMap.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.urlTrackingMapElements = [];
            if (message.urlTrackingMapElements && message.urlTrackingMapElements.length) {
                object.urlTrackingMapElements = [];
                for (var j = 0; j < message.urlTrackingMapElements.length; ++j)
                    object.urlTrackingMapElements[j] = $root.E2E.UrlTrackingMap.UrlTrackingMapElement.toObject(message.urlTrackingMapElements[j], options);
            }
            return object;
        };

        /**
         * Converts this UrlTrackingMap to JSON.
         * @function toJSON
         * @memberof E2E.UrlTrackingMap
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        UrlTrackingMap.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for UrlTrackingMap
         * @function getTypeUrl
         * @memberof E2E.UrlTrackingMap
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        UrlTrackingMap.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.UrlTrackingMap";
        };

        UrlTrackingMap.UrlTrackingMapElement = (function() {

            /**
             * Properties of an UrlTrackingMapElement.
             * @memberof E2E.UrlTrackingMap
             * @interface IUrlTrackingMapElement
             * @property {string|null} [originalUrl] UrlTrackingMapElement originalUrl
             * @property {string|null} [unconsentedUsersUrl] UrlTrackingMapElement unconsentedUsersUrl
             * @property {string|null} [consentedUsersUrl] UrlTrackingMapElement consentedUsersUrl
             * @property {number|null} [cardIndex] UrlTrackingMapElement cardIndex
             */

            /**
             * Constructs a new UrlTrackingMapElement.
             * @memberof E2E.UrlTrackingMap
             * @classdesc Represents an UrlTrackingMapElement.
             * @implements IUrlTrackingMapElement
             * @constructor
             * @param {E2E.UrlTrackingMap.IUrlTrackingMapElement=} [properties] Properties to set
             */
            function UrlTrackingMapElement(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]];
            }

            /**
             * UrlTrackingMapElement originalUrl.
             * @member {string|null|undefined} originalUrl
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @instance
             */
            UrlTrackingMapElement.prototype.originalUrl = null;

            /**
             * UrlTrackingMapElement unconsentedUsersUrl.
             * @member {string|null|undefined} unconsentedUsersUrl
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @instance
             */
            UrlTrackingMapElement.prototype.unconsentedUsersUrl = null;

            /**
             * UrlTrackingMapElement consentedUsersUrl.
             * @member {string|null|undefined} consentedUsersUrl
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @instance
             */
            UrlTrackingMapElement.prototype.consentedUsersUrl = null;

            /**
             * UrlTrackingMapElement cardIndex.
             * @member {number|null|undefined} cardIndex
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @instance
             */
            UrlTrackingMapElement.prototype.cardIndex = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * UrlTrackingMapElement _originalUrl.
             * @member {"originalUrl"|undefined} _originalUrl
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @instance
             */
            Object.defineProperty(UrlTrackingMapElement.prototype, "_originalUrl", {
                get: $util.oneOfGetter($oneOfFields = ["originalUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * UrlTrackingMapElement _unconsentedUsersUrl.
             * @member {"unconsentedUsersUrl"|undefined} _unconsentedUsersUrl
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @instance
             */
            Object.defineProperty(UrlTrackingMapElement.prototype, "_unconsentedUsersUrl", {
                get: $util.oneOfGetter($oneOfFields = ["unconsentedUsersUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * UrlTrackingMapElement _consentedUsersUrl.
             * @member {"consentedUsersUrl"|undefined} _consentedUsersUrl
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @instance
             */
            Object.defineProperty(UrlTrackingMapElement.prototype, "_consentedUsersUrl", {
                get: $util.oneOfGetter($oneOfFields = ["consentedUsersUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * UrlTrackingMapElement _cardIndex.
             * @member {"cardIndex"|undefined} _cardIndex
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @instance
             */
            Object.defineProperty(UrlTrackingMapElement.prototype, "_cardIndex", {
                get: $util.oneOfGetter($oneOfFields = ["cardIndex"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new UrlTrackingMapElement instance using the specified properties.
             * @function create
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @static
             * @param {E2E.UrlTrackingMap.IUrlTrackingMapElement=} [properties] Properties to set
             * @returns {E2E.UrlTrackingMap.UrlTrackingMapElement} UrlTrackingMapElement instance
             */
            UrlTrackingMapElement.create = function create(properties) {
                return new UrlTrackingMapElement(properties);
            };

            /**
             * Encodes the specified UrlTrackingMapElement message. Does not implicitly {@link E2E.UrlTrackingMap.UrlTrackingMapElement.verify|verify} messages.
             * @function encode
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @static
             * @param {E2E.UrlTrackingMap.IUrlTrackingMapElement} message UrlTrackingMapElement message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            UrlTrackingMapElement.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.originalUrl != null && Object.hasOwnProperty.call(message, "originalUrl"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.originalUrl);
                if (message.unconsentedUsersUrl != null && Object.hasOwnProperty.call(message, "unconsentedUsersUrl"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.unconsentedUsersUrl);
                if (message.consentedUsersUrl != null && Object.hasOwnProperty.call(message, "consentedUsersUrl"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.consentedUsersUrl);
                if (message.cardIndex != null && Object.hasOwnProperty.call(message, "cardIndex"))
                    writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.cardIndex);
                return writer;
            };

            /**
             * Encodes the specified UrlTrackingMapElement message, length delimited. Does not implicitly {@link E2E.UrlTrackingMap.UrlTrackingMapElement.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @static
             * @param {E2E.UrlTrackingMap.IUrlTrackingMapElement} message UrlTrackingMapElement message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            UrlTrackingMapElement.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an UrlTrackingMapElement message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.UrlTrackingMap.UrlTrackingMapElement} UrlTrackingMapElement
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            UrlTrackingMapElement.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.E2E.UrlTrackingMap.UrlTrackingMapElement();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.originalUrl = reader.string();
                            break;
                        }
                    case 2: {
                            message.unconsentedUsersUrl = reader.string();
                            break;
                        }
                    case 3: {
                            message.consentedUsersUrl = reader.string();
                            break;
                        }
                    case 4: {
                            message.cardIndex = reader.uint32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an UrlTrackingMapElement message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.UrlTrackingMap.UrlTrackingMapElement} UrlTrackingMapElement
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            UrlTrackingMapElement.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an UrlTrackingMapElement message.
             * @function verify
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            UrlTrackingMapElement.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.originalUrl != null && message.hasOwnProperty("originalUrl")) {
                    properties._originalUrl = 1;
                    if (!$util.isString(message.originalUrl))
                        return "originalUrl: string expected";
                }
                if (message.unconsentedUsersUrl != null && message.hasOwnProperty("unconsentedUsersUrl")) {
                    properties._unconsentedUsersUrl = 1;
                    if (!$util.isString(message.unconsentedUsersUrl))
                        return "unconsentedUsersUrl: string expected";
                }
                if (message.consentedUsersUrl != null && message.hasOwnProperty("consentedUsersUrl")) {
                    properties._consentedUsersUrl = 1;
                    if (!$util.isString(message.consentedUsersUrl))
                        return "consentedUsersUrl: string expected";
                }
                if (message.cardIndex != null && message.hasOwnProperty("cardIndex")) {
                    properties._cardIndex = 1;
                    if (!$util.isInteger(message.cardIndex))
                        return "cardIndex: integer expected";
                }
                return null;
            };

            /**
             * Creates an UrlTrackingMapElement message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.UrlTrackingMap.UrlTrackingMapElement} UrlTrackingMapElement
             */
            UrlTrackingMapElement.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.UrlTrackingMap.UrlTrackingMapElement)
                    return object;
                var message = new $root.E2E.UrlTrackingMap.UrlTrackingMapElement();
                if (object.originalUrl != null)
                    message.originalUrl = String(object.originalUrl);
                if (object.unconsentedUsersUrl != null)
                    message.unconsentedUsersUrl = String(object.unconsentedUsersUrl);
                if (object.consentedUsersUrl != null)
                    message.consentedUsersUrl = String(object.consentedUsersUrl);
                if (object.cardIndex != null)
                    message.cardIndex = object.cardIndex >>> 0;
                return message;
            };

            /**
             * Creates a plain object from an UrlTrackingMapElement message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @static
             * @param {E2E.UrlTrackingMap.UrlTrackingMapElement} message UrlTrackingMapElement
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            UrlTrackingMapElement.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.originalUrl != null && message.hasOwnProperty("originalUrl")) {
                    object.originalUrl = message.originalUrl;
                    if (options.oneofs)
                        object._originalUrl = "originalUrl";
                }
                if (message.unconsentedUsersUrl != null && message.hasOwnProperty("unconsentedUsersUrl")) {
                    object.unconsentedUsersUrl = message.unconsentedUsersUrl;
                    if (options.oneofs)
                        object._unconsentedUsersUrl = "unconsentedUsersUrl";
                }
                if (message.consentedUsersUrl != null && message.hasOwnProperty("consentedUsersUrl")) {
                    object.consentedUsersUrl = message.consentedUsersUrl;
                    if (options.oneofs)
                        object._consentedUsersUrl = "consentedUsersUrl";
                }
                if (message.cardIndex != null && message.hasOwnProperty("cardIndex")) {
                    object.cardIndex = message.cardIndex;
                    if (options.oneofs)
                        object._cardIndex = "cardIndex";
                }
                return object;
            };

            /**
             * Converts this UrlTrackingMapElement to JSON.
             * @function toJSON
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            UrlTrackingMapElement.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for UrlTrackingMapElement
             * @function getTypeUrl
             * @memberof E2E.UrlTrackingMap.UrlTrackingMapElement
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            UrlTrackingMapElement.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.UrlTrackingMap.UrlTrackingMapElement";
            };

            return UrlTrackingMapElement;
        })();

        return UrlTrackingMap;
    })();

    E2E.ProcessedVideo = (function() {

        /**
         * Properties of a ProcessedVideo.
         * @memberof E2E
         * @interface IProcessedVideo
         * @property {string|null} [directPath] ProcessedVideo directPath
         * @property {Uint8Array|null} [fileSha256] ProcessedVideo fileSha256
         * @property {number|null} [height] ProcessedVideo height
         * @property {number|null} [width] ProcessedVideo width
         * @property {number|Long|null} [fileLength] ProcessedVideo fileLength
         * @property {number|null} [bitrate] ProcessedVideo bitrate
         * @property {E2E.ProcessedVideo.VideoQuality|null} [quality] ProcessedVideo quality
         * @property {Array.<string>|null} [capabilities] ProcessedVideo capabilities
         */

        /**
         * Constructs a new ProcessedVideo.
         * @memberof E2E
         * @classdesc Represents a ProcessedVideo.
         * @implements IProcessedVideo
         * @constructor
         * @param {E2E.IProcessedVideo=} [properties] Properties to set
         */
        function ProcessedVideo(properties) {
            this.capabilities = [];
            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]];
        }

        /**
         * ProcessedVideo directPath.
         * @member {string|null|undefined} directPath
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        ProcessedVideo.prototype.directPath = null;

        /**
         * ProcessedVideo fileSha256.
         * @member {Uint8Array|null|undefined} fileSha256
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        ProcessedVideo.prototype.fileSha256 = null;

        /**
         * ProcessedVideo height.
         * @member {number|null|undefined} height
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        ProcessedVideo.prototype.height = null;

        /**
         * ProcessedVideo width.
         * @member {number|null|undefined} width
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        ProcessedVideo.prototype.width = null;

        /**
         * ProcessedVideo fileLength.
         * @member {number|Long|null|undefined} fileLength
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        ProcessedVideo.prototype.fileLength = null;

        /**
         * ProcessedVideo bitrate.
         * @member {number|null|undefined} bitrate
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        ProcessedVideo.prototype.bitrate = null;

        /**
         * ProcessedVideo quality.
         * @member {E2E.ProcessedVideo.VideoQuality|null|undefined} quality
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        ProcessedVideo.prototype.quality = null;

        /**
         * ProcessedVideo capabilities.
         * @member {Array.<string>} capabilities
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        ProcessedVideo.prototype.capabilities = $util.emptyArray;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * ProcessedVideo _directPath.
         * @member {"directPath"|undefined} _directPath
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        Object.defineProperty(ProcessedVideo.prototype, "_directPath", {
            get: $util.oneOfGetter($oneOfFields = ["directPath"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ProcessedVideo _fileSha256.
         * @member {"fileSha256"|undefined} _fileSha256
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        Object.defineProperty(ProcessedVideo.prototype, "_fileSha256", {
            get: $util.oneOfGetter($oneOfFields = ["fileSha256"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ProcessedVideo _height.
         * @member {"height"|undefined} _height
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        Object.defineProperty(ProcessedVideo.prototype, "_height", {
            get: $util.oneOfGetter($oneOfFields = ["height"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ProcessedVideo _width.
         * @member {"width"|undefined} _width
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        Object.defineProperty(ProcessedVideo.prototype, "_width", {
            get: $util.oneOfGetter($oneOfFields = ["width"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ProcessedVideo _fileLength.
         * @member {"fileLength"|undefined} _fileLength
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        Object.defineProperty(ProcessedVideo.prototype, "_fileLength", {
            get: $util.oneOfGetter($oneOfFields = ["fileLength"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ProcessedVideo _bitrate.
         * @member {"bitrate"|undefined} _bitrate
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        Object.defineProperty(ProcessedVideo.prototype, "_bitrate", {
            get: $util.oneOfGetter($oneOfFields = ["bitrate"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ProcessedVideo _quality.
         * @member {"quality"|undefined} _quality
         * @memberof E2E.ProcessedVideo
         * @instance
         */
        Object.defineProperty(ProcessedVideo.prototype, "_quality", {
            get: $util.oneOfGetter($oneOfFields = ["quality"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new ProcessedVideo instance using the specified properties.
         * @function create
         * @memberof E2E.ProcessedVideo
         * @static
         * @param {E2E.IProcessedVideo=} [properties] Properties to set
         * @returns {E2E.ProcessedVideo} ProcessedVideo instance
         */
        ProcessedVideo.create = function create(properties) {
            return new ProcessedVideo(properties);
        };

        /**
         * Encodes the specified ProcessedVideo message. Does not implicitly {@link E2E.ProcessedVideo.verify|verify} messages.
         * @function encode
         * @memberof E2E.ProcessedVideo
         * @static
         * @param {E2E.IProcessedVideo} message ProcessedVideo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ProcessedVideo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.directPath);
            if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256"))
                writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.fileSha256);
            if (message.height != null && Object.hasOwnProperty.call(message, "height"))
                writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.height);
            if (message.width != null && Object.hasOwnProperty.call(message, "width"))
                writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.width);
            if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength"))
                writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.fileLength);
            if (message.bitrate != null && Object.hasOwnProperty.call(message, "bitrate"))
                writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.bitrate);
            if (message.quality != null && Object.hasOwnProperty.call(message, "quality"))
                writer.uint32(/* id 7, wireType 0 =*/56).int32(message.quality);
            if (message.capabilities != null && message.capabilities.length)
                for (var i = 0; i < message.capabilities.length; ++i)
                    writer.uint32(/* id 8, wireType 2 =*/66).string(message.capabilities[i]);
            return writer;
        };

        /**
         * Encodes the specified ProcessedVideo message, length delimited. Does not implicitly {@link E2E.ProcessedVideo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.ProcessedVideo
         * @static
         * @param {E2E.IProcessedVideo} message ProcessedVideo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ProcessedVideo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ProcessedVideo message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.ProcessedVideo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.ProcessedVideo} ProcessedVideo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ProcessedVideo.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.E2E.ProcessedVideo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.directPath = reader.string();
                        break;
                    }
                case 2: {
                        message.fileSha256 = reader.bytes();
                        break;
                    }
                case 3: {
                        message.height = reader.uint32();
                        break;
                    }
                case 4: {
                        message.width = reader.uint32();
                        break;
                    }
                case 5: {
                        message.fileLength = reader.uint64();
                        break;
                    }
                case 6: {
                        message.bitrate = reader.uint32();
                        break;
                    }
                case 7: {
                        message.quality = reader.int32();
                        break;
                    }
                case 8: {
                        if (!(message.capabilities && message.capabilities.length))
                            message.capabilities = [];
                        message.capabilities.push(reader.string());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ProcessedVideo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.ProcessedVideo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.ProcessedVideo} ProcessedVideo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ProcessedVideo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ProcessedVideo message.
         * @function verify
         * @memberof E2E.ProcessedVideo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ProcessedVideo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.directPath != null && message.hasOwnProperty("directPath")) {
                properties._directPath = 1;
                if (!$util.isString(message.directPath))
                    return "directPath: string expected";
            }
            if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                properties._fileSha256 = 1;
                if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                    return "fileSha256: buffer expected";
            }
            if (message.height != null && message.hasOwnProperty("height")) {
                properties._height = 1;
                if (!$util.isInteger(message.height))
                    return "height: integer expected";
            }
            if (message.width != null && message.hasOwnProperty("width")) {
                properties._width = 1;
                if (!$util.isInteger(message.width))
                    return "width: integer expected";
            }
            if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                properties._fileLength = 1;
                if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high)))
                    return "fileLength: integer|Long expected";
            }
            if (message.bitrate != null && message.hasOwnProperty("bitrate")) {
                properties._bitrate = 1;
                if (!$util.isInteger(message.bitrate))
                    return "bitrate: integer expected";
            }
            if (message.quality != null && message.hasOwnProperty("quality")) {
                properties._quality = 1;
                switch (message.quality) {
                default:
                    return "quality: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.capabilities != null && message.hasOwnProperty("capabilities")) {
                if (!Array.isArray(message.capabilities))
                    return "capabilities: array expected";
                for (var i = 0; i < message.capabilities.length; ++i)
                    if (!$util.isString(message.capabilities[i]))
                        return "capabilities: string[] expected";
            }
            return null;
        };

        /**
         * Creates a ProcessedVideo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.ProcessedVideo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.ProcessedVideo} ProcessedVideo
         */
        ProcessedVideo.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.ProcessedVideo)
                return object;
            var message = new $root.E2E.ProcessedVideo();
            if (object.directPath != null)
                message.directPath = String(object.directPath);
            if (object.fileSha256 != null)
                if (typeof object.fileSha256 === "string")
                    $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0);
                else if (object.fileSha256.length >= 0)
                    message.fileSha256 = object.fileSha256;
            if (object.height != null)
                message.height = object.height >>> 0;
            if (object.width != null)
                message.width = object.width >>> 0;
            if (object.fileLength != null)
                if ($util.Long)
                    (message.fileLength = $util.Long.fromValue(object.fileLength)).unsigned = true;
                else if (typeof object.fileLength === "string")
                    message.fileLength = parseInt(object.fileLength, 10);
                else if (typeof object.fileLength === "number")
                    message.fileLength = object.fileLength;
                else if (typeof object.fileLength === "object")
                    message.fileLength = new $util.LongBits(object.fileLength.low >>> 0, object.fileLength.high >>> 0).toNumber(true);
            if (object.bitrate != null)
                message.bitrate = object.bitrate >>> 0;
            switch (object.quality) {
            default:
                if (typeof object.quality === "number") {
                    message.quality = object.quality;
                    break;
                }
                break;
            case "UNDEFINED":
            case 0:
                message.quality = 0;
                break;
            case "LOW":
            case 1:
                message.quality = 1;
                break;
            case "MID":
            case 2:
                message.quality = 2;
                break;
            case "HIGH":
            case 3:
                message.quality = 3;
                break;
            }
            if (object.capabilities) {
                if (!Array.isArray(object.capabilities))
                    throw TypeError(".E2E.ProcessedVideo.capabilities: array expected");
                message.capabilities = [];
                for (var i = 0; i < object.capabilities.length; ++i)
                    message.capabilities[i] = String(object.capabilities[i]);
            }
            return message;
        };

        /**
         * Creates a plain object from a ProcessedVideo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.ProcessedVideo
         * @static
         * @param {E2E.ProcessedVideo} message ProcessedVideo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        ProcessedVideo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.capabilities = [];
            if (message.directPath != null && message.hasOwnProperty("directPath")) {
                object.directPath = message.directPath;
                if (options.oneofs)
                    object._directPath = "directPath";
            }
            if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256;
                if (options.oneofs)
                    object._fileSha256 = "fileSha256";
            }
            if (message.height != null && message.hasOwnProperty("height")) {
                object.height = message.height;
                if (options.oneofs)
                    object._height = "height";
            }
            if (message.width != null && message.hasOwnProperty("width")) {
                object.width = message.width;
                if (options.oneofs)
                    object._width = "width";
            }
            if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                if (typeof message.fileLength === "number")
                    object.fileLength = options.longs === String ? String(message.fileLength) : message.fileLength;
                else
                    object.fileLength = options.longs === String ? $util.Long.prototype.toString.call(message.fileLength) : options.longs === Number ? new $util.LongBits(message.fileLength.low >>> 0, message.fileLength.high >>> 0).toNumber(true) : message.fileLength;
                if (options.oneofs)
                    object._fileLength = "fileLength";
            }
            if (message.bitrate != null && message.hasOwnProperty("bitrate")) {
                object.bitrate = message.bitrate;
                if (options.oneofs)
                    object._bitrate = "bitrate";
            }
            if (message.quality != null && message.hasOwnProperty("quality")) {
                object.quality = options.enums === String ? $root.E2E.ProcessedVideo.VideoQuality[message.quality] === undefined ? message.quality : $root.E2E.ProcessedVideo.VideoQuality[message.quality] : message.quality;
                if (options.oneofs)
                    object._quality = "quality";
            }
            if (message.capabilities && message.capabilities.length) {
                object.capabilities = [];
                for (var j = 0; j < message.capabilities.length; ++j)
                    object.capabilities[j] = message.capabilities[j];
            }
            return object;
        };

        /**
         * Converts this ProcessedVideo to JSON.
         * @function toJSON
         * @memberof E2E.ProcessedVideo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        ProcessedVideo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for ProcessedVideo
         * @function getTypeUrl
         * @memberof E2E.ProcessedVideo
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        ProcessedVideo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.ProcessedVideo";
        };

        /**
         * VideoQuality enum.
         * @name E2E.ProcessedVideo.VideoQuality
         * @enum {number}
         * @property {number} UNDEFINED=0 UNDEFINED value
         * @property {number} LOW=1 LOW value
         * @property {number} MID=2 MID value
         * @property {number} HIGH=3 HIGH value
         */
        ProcessedVideo.VideoQuality = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNDEFINED"] = 0;
            values[valuesById[1] = "LOW"] = 1;
            values[valuesById[2] = "MID"] = 2;
            values[valuesById[3] = "HIGH"] = 3;
            return values;
        })();

        return ProcessedVideo;
    })();

    E2E.LIDMigrationMappingSyncMessage = (function() {

        /**
         * Properties of a LIDMigrationMappingSyncMessage.
         * @memberof E2E
         * @interface ILIDMigrationMappingSyncMessage
         * @property {Uint8Array|null} [encodedMappingPayload] LIDMigrationMappingSyncMessage encodedMappingPayload
         */

        /**
         * Constructs a new LIDMigrationMappingSyncMessage.
         * @memberof E2E
         * @classdesc Represents a LIDMigrationMappingSyncMessage.
         * @implements ILIDMigrationMappingSyncMessage
         * @constructor
         * @param {E2E.ILIDMigrationMappingSyncMessage=} [properties] Properties to set
         */
        function LIDMigrationMappingSyncMessage(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]];
        }

        /**
         * LIDMigrationMappingSyncMessage encodedMappingPayload.
         * @member {Uint8Array|null|undefined} encodedMappingPayload
         * @memberof E2E.LIDMigrationMappingSyncMessage
         * @instance
         */
        LIDMigrationMappingSyncMessage.prototype.encodedMappingPayload = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * LIDMigrationMappingSyncMessage _encodedMappingPayload.
         * @member {"encodedMappingPayload"|undefined} _encodedMappingPayload
         * @memberof E2E.LIDMigrationMappingSyncMessage
         * @instance
         */
        Object.defineProperty(LIDMigrationMappingSyncMessage.prototype, "_encodedMappingPayload", {
            get: $util.oneOfGetter($oneOfFields = ["encodedMappingPayload"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new LIDMigrationMappingSyncMessage instance using the specified properties.
         * @function create
         * @memberof E2E.LIDMigrationMappingSyncMessage
         * @static
         * @param {E2E.ILIDMigrationMappingSyncMessage=} [properties] Properties to set
         * @returns {E2E.LIDMigrationMappingSyncMessage} LIDMigrationMappingSyncMessage instance
         */
        LIDMigrationMappingSyncMessage.create = function create(properties) {
            return new LIDMigrationMappingSyncMessage(properties);
        };

        /**
         * Encodes the specified LIDMigrationMappingSyncMessage message. Does not implicitly {@link E2E.LIDMigrationMappingSyncMessage.verify|verify} messages.
         * @function encode
         * @memberof E2E.LIDMigrationMappingSyncMessage
         * @static
         * @param {E2E.ILIDMigrationMappingSyncMessage} message LIDMigrationMappingSyncMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        LIDMigrationMappingSyncMessage.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.encodedMappingPayload != null && Object.hasOwnProperty.call(message, "encodedMappingPayload"))
                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedMappingPayload);
            return writer;
        };

        /**
         * Encodes the specified LIDMigrationMappingSyncMessage message, length delimited. Does not implicitly {@link E2E.LIDMigrationMappingSyncMessage.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.LIDMigrationMappingSyncMessage
         * @static
         * @param {E2E.ILIDMigrationMappingSyncMessage} message LIDMigrationMappingSyncMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        LIDMigrationMappingSyncMessage.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a LIDMigrationMappingSyncMessage message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.LIDMigrationMappingSyncMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.LIDMigrationMappingSyncMessage} LIDMigrationMappingSyncMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        LIDMigrationMappingSyncMessage.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.E2E.LIDMigrationMappingSyncMessage();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.encodedMappingPayload = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a LIDMigrationMappingSyncMessage message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.LIDMigrationMappingSyncMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.LIDMigrationMappingSyncMessage} LIDMigrationMappingSyncMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        LIDMigrationMappingSyncMessage.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a LIDMigrationMappingSyncMessage message.
         * @function verify
         * @memberof E2E.LIDMigrationMappingSyncMessage
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        LIDMigrationMappingSyncMessage.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.encodedMappingPayload != null && message.hasOwnProperty("encodedMappingPayload")) {
                properties._encodedMappingPayload = 1;
                if (!(message.encodedMappingPayload && typeof message.encodedMappingPayload.length === "number" || $util.isString(message.encodedMappingPayload)))
                    return "encodedMappingPayload: buffer expected";
            }
            return null;
        };

        /**
         * Creates a LIDMigrationMappingSyncMessage message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.LIDMigrationMappingSyncMessage
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.LIDMigrationMappingSyncMessage} LIDMigrationMappingSyncMessage
         */
        LIDMigrationMappingSyncMessage.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.LIDMigrationMappingSyncMessage)
                return object;
            var message = new $root.E2E.LIDMigrationMappingSyncMessage();
            if (object.encodedMappingPayload != null)
                if (typeof object.encodedMappingPayload === "string")
                    $util.base64.decode(object.encodedMappingPayload, message.encodedMappingPayload = $util.newBuffer($util.base64.length(object.encodedMappingPayload)), 0);
                else if (object.encodedMappingPayload.length >= 0)
                    message.encodedMappingPayload = object.encodedMappingPayload;
            return message;
        };

        /**
         * Creates a plain object from a LIDMigrationMappingSyncMessage message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.LIDMigrationMappingSyncMessage
         * @static
         * @param {E2E.LIDMigrationMappingSyncMessage} message LIDMigrationMappingSyncMessage
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        LIDMigrationMappingSyncMessage.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.encodedMappingPayload != null && message.hasOwnProperty("encodedMappingPayload")) {
                object.encodedMappingPayload = options.bytes === String ? $util.base64.encode(message.encodedMappingPayload, 0, message.encodedMappingPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedMappingPayload) : message.encodedMappingPayload;
                if (options.oneofs)
                    object._encodedMappingPayload = "encodedMappingPayload";
            }
            return object;
        };

        /**
         * Converts this LIDMigrationMappingSyncMessage to JSON.
         * @function toJSON
         * @memberof E2E.LIDMigrationMappingSyncMessage
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        LIDMigrationMappingSyncMessage.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for LIDMigrationMappingSyncMessage
         * @function getTypeUrl
         * @memberof E2E.LIDMigrationMappingSyncMessage
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        LIDMigrationMappingSyncMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.LIDMigrationMappingSyncMessage";
        };

        return LIDMigrationMappingSyncMessage;
    })();

    E2E.MediaNotifyMessage = (function() {

        /**
         * Properties of a MediaNotifyMessage.
         * @memberof E2E
         * @interface IMediaNotifyMessage
         * @property {string|null} [expressPathUrl] MediaNotifyMessage expressPathUrl
         * @property {Uint8Array|null} [fileEncSha256] MediaNotifyMessage fileEncSha256
         * @property {number|Long|null} [fileLength] MediaNotifyMessage fileLength
         */

        /**
         * Constructs a new MediaNotifyMessage.
         * @memberof E2E
         * @classdesc Represents a MediaNotifyMessage.
         * @implements IMediaNotifyMessage
         * @constructor
         * @param {E2E.IMediaNotifyMessage=} [properties] Properties to set
         */
        function MediaNotifyMessage(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]];
        }

        /**
         * MediaNotifyMessage expressPathUrl.
         * @member {string|null|undefined} expressPathUrl
         * @memberof E2E.MediaNotifyMessage
         * @instance
         */
        MediaNotifyMessage.prototype.expressPathUrl = null;

        /**
         * MediaNotifyMessage fileEncSha256.
         * @member {Uint8Array|null|undefined} fileEncSha256
         * @memberof E2E.MediaNotifyMessage
         * @instance
         */
        MediaNotifyMessage.prototype.fileEncSha256 = null;

        /**
         * MediaNotifyMessage fileLength.
         * @member {number|Long|null|undefined} fileLength
         * @memberof E2E.MediaNotifyMessage
         * @instance
         */
        MediaNotifyMessage.prototype.fileLength = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * MediaNotifyMessage _expressPathUrl.
         * @member {"expressPathUrl"|undefined} _expressPathUrl
         * @memberof E2E.MediaNotifyMessage
         * @instance
         */
        Object.defineProperty(MediaNotifyMessage.prototype, "_expressPathUrl", {
            get: $util.oneOfGetter($oneOfFields = ["expressPathUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MediaNotifyMessage _fileEncSha256.
         * @member {"fileEncSha256"|undefined} _fileEncSha256
         * @memberof E2E.MediaNotifyMessage
         * @instance
         */
        Object.defineProperty(MediaNotifyMessage.prototype, "_fileEncSha256", {
            get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MediaNotifyMessage _fileLength.
         * @member {"fileLength"|undefined} _fileLength
         * @memberof E2E.MediaNotifyMessage
         * @instance
         */
        Object.defineProperty(MediaNotifyMessage.prototype, "_fileLength", {
            get: $util.oneOfGetter($oneOfFields = ["fileLength"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new MediaNotifyMessage instance using the specified properties.
         * @function create
         * @memberof E2E.MediaNotifyMessage
         * @static
         * @param {E2E.IMediaNotifyMessage=} [properties] Properties to set
         * @returns {E2E.MediaNotifyMessage} MediaNotifyMessage instance
         */
        MediaNotifyMessage.create = function create(properties) {
            return new MediaNotifyMessage(properties);
        };

        /**
         * Encodes the specified MediaNotifyMessage message. Does not implicitly {@link E2E.MediaNotifyMessage.verify|verify} messages.
         * @function encode
         * @memberof E2E.MediaNotifyMessage
         * @static
         * @param {E2E.IMediaNotifyMessage} message MediaNotifyMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MediaNotifyMessage.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.expressPathUrl != null && Object.hasOwnProperty.call(message, "expressPathUrl"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.expressPathUrl);
            if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256"))
                writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.fileEncSha256);
            if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength"))
                writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.fileLength);
            return writer;
        };

        /**
         * Encodes the specified MediaNotifyMessage message, length delimited. Does not implicitly {@link E2E.MediaNotifyMessage.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.MediaNotifyMessage
         * @static
         * @param {E2E.IMediaNotifyMessage} message MediaNotifyMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MediaNotifyMessage.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a MediaNotifyMessage message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.MediaNotifyMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.MediaNotifyMessage} MediaNotifyMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MediaNotifyMessage.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.E2E.MediaNotifyMessage();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.expressPathUrl = reader.string();
                        break;
                    }
                case 2: {
                        message.fileEncSha256 = reader.bytes();
                        break;
                    }
                case 3: {
                        message.fileLength = reader.uint64();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a MediaNotifyMessage message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.MediaNotifyMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.MediaNotifyMessage} MediaNotifyMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MediaNotifyMessage.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a MediaNotifyMessage message.
         * @function verify
         * @memberof E2E.MediaNotifyMessage
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        MediaNotifyMessage.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.expressPathUrl != null && message.hasOwnProperty("expressPathUrl")) {
                properties._expressPathUrl = 1;
                if (!$util.isString(message.expressPathUrl))
                    return "expressPathUrl: string expected";
            }
            if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                properties._fileEncSha256 = 1;
                if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                    return "fileEncSha256: buffer expected";
            }
            if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                properties._fileLength = 1;
                if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high)))
                    return "fileLength: integer|Long expected";
            }
            return null;
        };

        /**
         * Creates a MediaNotifyMessage message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.MediaNotifyMessage
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.MediaNotifyMessage} MediaNotifyMessage
         */
        MediaNotifyMessage.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.MediaNotifyMessage)
                return object;
            var message = new $root.E2E.MediaNotifyMessage();
            if (object.expressPathUrl != null)
                message.expressPathUrl = String(object.expressPathUrl);
            if (object.fileEncSha256 != null)
                if (typeof object.fileEncSha256 === "string")
                    $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0);
                else if (object.fileEncSha256.length >= 0)
                    message.fileEncSha256 = object.fileEncSha256;
            if (object.fileLength != null)
                if ($util.Long)
                    (message.fileLength = $util.Long.fromValue(object.fileLength)).unsigned = true;
                else if (typeof object.fileLength === "string")
                    message.fileLength = parseInt(object.fileLength, 10);
                else if (typeof object.fileLength === "number")
                    message.fileLength = object.fileLength;
                else if (typeof object.fileLength === "object")
                    message.fileLength = new $util.LongBits(object.fileLength.low >>> 0, object.fileLength.high >>> 0).toNumber(true);
            return message;
        };

        /**
         * Creates a plain object from a MediaNotifyMessage message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.MediaNotifyMessage
         * @static
         * @param {E2E.MediaNotifyMessage} message MediaNotifyMessage
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        MediaNotifyMessage.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.expressPathUrl != null && message.hasOwnProperty("expressPathUrl")) {
                object.expressPathUrl = message.expressPathUrl;
                if (options.oneofs)
                    object._expressPathUrl = "expressPathUrl";
            }
            if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256;
                if (options.oneofs)
                    object._fileEncSha256 = "fileEncSha256";
            }
            if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                if (typeof message.fileLength === "number")
                    object.fileLength = options.longs === String ? String(message.fileLength) : message.fileLength;
                else
                    object.fileLength = options.longs === String ? $util.Long.prototype.toString.call(message.fileLength) : options.longs === Number ? new $util.LongBits(message.fileLength.low >>> 0, message.fileLength.high >>> 0).toNumber(true) : message.fileLength;
                if (options.oneofs)
                    object._fileLength = "fileLength";
            }
            return object;
        };

        /**
         * Converts this MediaNotifyMessage to JSON.
         * @function toJSON
         * @memberof E2E.MediaNotifyMessage
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        MediaNotifyMessage.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for MediaNotifyMessage
         * @function getTypeUrl
         * @memberof E2E.MediaNotifyMessage
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        MediaNotifyMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.MediaNotifyMessage";
        };

        return MediaNotifyMessage;
    })();

    E2E.MessageSecretMessage = (function() {

        /**
         * Properties of a MessageSecretMessage.
         * @memberof E2E
         * @interface IMessageSecretMessage
         * @property {number|null} [version] MessageSecretMessage version
         * @property {Uint8Array|null} [encIv] MessageSecretMessage encIv
         * @property {Uint8Array|null} [encPayload] MessageSecretMessage encPayload
         */

        /**
         * Constructs a new MessageSecretMessage.
         * @memberof E2E
         * @classdesc Represents a MessageSecretMessage.
         * @implements IMessageSecretMessage
         * @constructor
         * @param {E2E.IMessageSecretMessage=} [properties] Properties to set
         */
        function MessageSecretMessage(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]];
        }

        /**
         * MessageSecretMessage version.
         * @member {number|null|undefined} version
         * @memberof E2E.MessageSecretMessage
         * @instance
         */
        MessageSecretMessage.prototype.version = null;

        /**
         * MessageSecretMessage encIv.
         * @member {Uint8Array|null|undefined} encIv
         * @memberof E2E.MessageSecretMessage
         * @instance
         */
        MessageSecretMessage.prototype.encIv = null;

        /**
         * MessageSecretMessage encPayload.
         * @member {Uint8Array|null|undefined} encPayload
         * @memberof E2E.MessageSecretMessage
         * @instance
         */
        MessageSecretMessage.prototype.encPayload = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * MessageSecretMessage _version.
         * @member {"version"|undefined} _version
         * @memberof E2E.MessageSecretMessage
         * @instance
         */
        Object.defineProperty(MessageSecretMessage.prototype, "_version", {
            get: $util.oneOfGetter($oneOfFields = ["version"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageSecretMessage _encIv.
         * @member {"encIv"|undefined} _encIv
         * @memberof E2E.MessageSecretMessage
         * @instance
         */
        Object.defineProperty(MessageSecretMessage.prototype, "_encIv", {
            get: $util.oneOfGetter($oneOfFields = ["encIv"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageSecretMessage _encPayload.
         * @member {"encPayload"|undefined} _encPayload
         * @memberof E2E.MessageSecretMessage
         * @instance
         */
        Object.defineProperty(MessageSecretMessage.prototype, "_encPayload", {
            get: $util.oneOfGetter($oneOfFields = ["encPayload"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new MessageSecretMessage instance using the specified properties.
         * @function create
         * @memberof E2E.MessageSecretMessage
         * @static
         * @param {E2E.IMessageSecretMessage=} [properties] Properties to set
         * @returns {E2E.MessageSecretMessage} MessageSecretMessage instance
         */
        MessageSecretMessage.create = function create(properties) {
            return new MessageSecretMessage(properties);
        };

        /**
         * Encodes the specified MessageSecretMessage message. Does not implicitly {@link E2E.MessageSecretMessage.verify|verify} messages.
         * @function encode
         * @memberof E2E.MessageSecretMessage
         * @static
         * @param {E2E.IMessageSecretMessage} message MessageSecretMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MessageSecretMessage.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.version != null && Object.hasOwnProperty.call(message, "version"))
                writer.uint32(/* id 1, wireType 5 =*/13).sfixed32(message.version);
            if (message.encIv != null && Object.hasOwnProperty.call(message, "encIv"))
                writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encIv);
            if (message.encPayload != null && Object.hasOwnProperty.call(message, "encPayload"))
                writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.encPayload);
            return writer;
        };

        /**
         * Encodes the specified MessageSecretMessage message, length delimited. Does not implicitly {@link E2E.MessageSecretMessage.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.MessageSecretMessage
         * @static
         * @param {E2E.IMessageSecretMessage} message MessageSecretMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MessageSecretMessage.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a MessageSecretMessage message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.MessageSecretMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.MessageSecretMessage} MessageSecretMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MessageSecretMessage.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.E2E.MessageSecretMessage();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.version = reader.sfixed32();
                        break;
                    }
                case 2: {
                        message.encIv = reader.bytes();
                        break;
                    }
                case 3: {
                        message.encPayload = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a MessageSecretMessage message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.MessageSecretMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.MessageSecretMessage} MessageSecretMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MessageSecretMessage.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a MessageSecretMessage message.
         * @function verify
         * @memberof E2E.MessageSecretMessage
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        MessageSecretMessage.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.version != null && message.hasOwnProperty("version")) {
                properties._version = 1;
                if (!$util.isInteger(message.version))
                    return "version: integer 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.encPayload != null && message.hasOwnProperty("encPayload")) {
                properties._encPayload = 1;
                if (!(message.encPayload && typeof message.encPayload.length === "number" || $util.isString(message.encPayload)))
                    return "encPayload: buffer expected";
            }
            return null;
        };

        /**
         * Creates a MessageSecretMessage message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.MessageSecretMessage
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.MessageSecretMessage} MessageSecretMessage
         */
        MessageSecretMessage.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.MessageSecretMessage)
                return object;
            var message = new $root.E2E.MessageSecretMessage();
            if (object.version != null)
                message.version = object.version | 0;
            if (object.encIv != null)
                if (typeof object.encIv === "string")
                    $util.base64.decode(object.encIv, message.encIv = $util.newBuffer($util.base64.length(object.encIv)), 0);
                else if (object.encIv.length >= 0)
                    message.encIv = object.encIv;
            if (object.encPayload != null)
                if (typeof object.encPayload === "string")
                    $util.base64.decode(object.encPayload, message.encPayload = $util.newBuffer($util.base64.length(object.encPayload)), 0);
                else if (object.encPayload.length >= 0)
                    message.encPayload = object.encPayload;
            return message;
        };

        /**
         * Creates a plain object from a MessageSecretMessage message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.MessageSecretMessage
         * @static
         * @param {E2E.MessageSecretMessage} message MessageSecretMessage
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        MessageSecretMessage.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.version != null && message.hasOwnProperty("version")) {
                object.version = message.version;
                if (options.oneofs)
                    object._version = "version";
            }
            if (message.encIv != null && message.hasOwnProperty("encIv")) {
                object.encIv = options.bytes === String ? $util.base64.encode(message.encIv, 0, message.encIv.length) : options.bytes === Array ? Array.prototype.slice.call(message.encIv) : message.encIv;
                if (options.oneofs)
                    object._encIv = "encIv";
            }
            if (message.encPayload != null && message.hasOwnProperty("encPayload")) {
                object.encPayload = options.bytes === String ? $util.base64.encode(message.encPayload, 0, message.encPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encPayload) : message.encPayload;
                if (options.oneofs)
                    object._encPayload = "encPayload";
            }
            return object;
        };

        /**
         * Converts this MessageSecretMessage to JSON.
         * @function toJSON
         * @memberof E2E.MessageSecretMessage
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        MessageSecretMessage.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for MessageSecretMessage
         * @function getTypeUrl
         * @memberof E2E.MessageSecretMessage
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        MessageSecretMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.MessageSecretMessage";
        };

        return MessageSecretMessage;
    })();

    E2E.GroupMention = (function() {

        /**
         * Properties of a GroupMention.
         * @memberof E2E
         * @interface IGroupMention
         * @property {string|null} [groupJid] GroupMention groupJid
         * @property {string|null} [groupSubject] GroupMention groupSubject
         */

        /**
         * Constructs a new GroupMention.
         * @memberof E2E
         * @classdesc Represents a GroupMention.
         * @implements IGroupMention
         * @constructor
         * @param {E2E.IGroupMention=} [properties] Properties to set
         */
        function GroupMention(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]];
        }

        /**
         * GroupMention groupJid.
         * @member {string|null|undefined} groupJid
         * @memberof E2E.GroupMention
         * @instance
         */
        GroupMention.prototype.groupJid = null;

        /**
         * GroupMention groupSubject.
         * @member {string|null|undefined} groupSubject
         * @memberof E2E.GroupMention
         * @instance
         */
        GroupMention.prototype.groupSubject = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * GroupMention _groupJid.
         * @member {"groupJid"|undefined} _groupJid
         * @memberof E2E.GroupMention
         * @instance
         */
        Object.defineProperty(GroupMention.prototype, "_groupJid", {
            get: $util.oneOfGetter($oneOfFields = ["groupJid"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * GroupMention _groupSubject.
         * @member {"groupSubject"|undefined} _groupSubject
         * @memberof E2E.GroupMention
         * @instance
         */
        Object.defineProperty(GroupMention.prototype, "_groupSubject", {
            get: $util.oneOfGetter($oneOfFields = ["groupSubject"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new GroupMention instance using the specified properties.
         * @function create
         * @memberof E2E.GroupMention
         * @static
         * @param {E2E.IGroupMention=} [properties] Properties to set
         * @returns {E2E.GroupMention} GroupMention instance
         */
        GroupMention.create = function create(properties) {
            return new GroupMention(properties);
        };

        /**
         * Encodes the specified GroupMention message. Does not implicitly {@link E2E.GroupMention.verify|verify} messages.
         * @function encode
         * @memberof E2E.GroupMention
         * @static
         * @param {E2E.IGroupMention} message GroupMention message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        GroupMention.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.groupJid != null && Object.hasOwnProperty.call(message, "groupJid"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.groupJid);
            if (message.groupSubject != null && Object.hasOwnProperty.call(message, "groupSubject"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.groupSubject);
            return writer;
        };

        /**
         * Encodes the specified GroupMention message, length delimited. Does not implicitly {@link E2E.GroupMention.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.GroupMention
         * @static
         * @param {E2E.IGroupMention} message GroupMention message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        GroupMention.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a GroupMention message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.GroupMention
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.GroupMention} GroupMention
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        GroupMention.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.E2E.GroupMention();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.groupJid = reader.string();
                        break;
                    }
                case 2: {
                        message.groupSubject = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a GroupMention message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.GroupMention
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.GroupMention} GroupMention
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        GroupMention.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a GroupMention message.
         * @function verify
         * @memberof E2E.GroupMention
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        GroupMention.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.groupJid != null && message.hasOwnProperty("groupJid")) {
                properties._groupJid = 1;
                if (!$util.isString(message.groupJid))
                    return "groupJid: string expected";
            }
            if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) {
                properties._groupSubject = 1;
                if (!$util.isString(message.groupSubject))
                    return "groupSubject: string expected";
            }
            return null;
        };

        /**
         * Creates a GroupMention message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.GroupMention
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.GroupMention} GroupMention
         */
        GroupMention.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.GroupMention)
                return object;
            var message = new $root.E2E.GroupMention();
            if (object.groupJid != null)
                message.groupJid = String(object.groupJid);
            if (object.groupSubject != null)
                message.groupSubject = String(object.groupSubject);
            return message;
        };

        /**
         * Creates a plain object from a GroupMention message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.GroupMention
         * @static
         * @param {E2E.GroupMention} message GroupMention
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        GroupMention.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.groupJid != null && message.hasOwnProperty("groupJid")) {
                object.groupJid = message.groupJid;
                if (options.oneofs)
                    object._groupJid = "groupJid";
            }
            if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) {
                object.groupSubject = message.groupSubject;
                if (options.oneofs)
                    object._groupSubject = "groupSubject";
            }
            return object;
        };

        /**
         * Converts this GroupMention to JSON.
         * @function toJSON
         * @memberof E2E.GroupMention
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        GroupMention.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for GroupMention
         * @function getTypeUrl
         * @memberof E2E.GroupMention
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        GroupMention.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.GroupMention";
        };

        return GroupMention;
    })();

    E2E.ActionLink = (function() {

        /**
         * Properties of an ActionLink.
         * @memberof E2E
         * @interface IActionLink
         * @property {string|null} [url] ActionLink url
         * @property {string|null} [buttonTitle] ActionLink buttonTitle
         */

        /**
         * Constructs a new ActionLink.
         * @memberof E2E
         * @classdesc Represents an ActionLink.
         * @implements IActionLink
         * @constructor
         * @param {E2E.IActionLink=} [properties] Properties to set
         */
        function ActionLink(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]];
        }

        /**
         * ActionLink url.
         * @member {string|null|undefined} url
         * @memberof E2E.ActionLink
         * @instance
         */
        ActionLink.prototype.url = null;

        /**
         * ActionLink buttonTitle.
         * @member {string|null|undefined} buttonTitle
         * @memberof E2E.ActionLink
         * @instance
         */
        ActionLink.prototype.buttonTitle = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * ActionLink _url.
         * @member {"url"|undefined} _url
         * @memberof E2E.ActionLink
         * @instance
         */
        Object.defineProperty(ActionLink.prototype, "_url", {
            get: $util.oneOfGetter($oneOfFields = ["url"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ActionLink _buttonTitle.
         * @member {"buttonTitle"|undefined} _buttonTitle
         * @memberof E2E.ActionLink
         * @instance
         */
        Object.defineProperty(ActionLink.prototype, "_buttonTitle", {
            get: $util.oneOfGetter($oneOfFields = ["buttonTitle"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new ActionLink instance using the specified properties.
         * @function create
         * @memberof E2E.ActionLink
         * @static
         * @param {E2E.IActionLink=} [properties] Properties to set
         * @returns {E2E.ActionLink} ActionLink instance
         */
        ActionLink.create = function create(properties) {
            return new ActionLink(properties);
        };

        /**
         * Encodes the specified ActionLink message. Does not implicitly {@link E2E.ActionLink.verify|verify} messages.
         * @function encode
         * @memberof E2E.ActionLink
         * @static
         * @param {E2E.IActionLink} message ActionLink message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ActionLink.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.url);
            if (message.buttonTitle != null && Object.hasOwnProperty.call(message, "buttonTitle"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.buttonTitle);
            return writer;
        };

        /**
         * Encodes the specified ActionLink message, length delimited. Does not implicitly {@link E2E.ActionLink.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.ActionLink
         * @static
         * @param {E2E.IActionLink} message ActionLink message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ActionLink.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes an ActionLink message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.ActionLink
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.ActionLink} ActionLink
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ActionLink.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.E2E.ActionLink();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.url = reader.string();
                        break;
                    }
                case 2: {
                        message.buttonTitle = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes an ActionLink message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.ActionLink
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.ActionLink} ActionLink
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ActionLink.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies an ActionLink message.
         * @function verify
         * @memberof E2E.ActionLink
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ActionLink.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.url != null && message.hasOwnProperty("url")) {
                properties._url = 1;
                if (!$util.isString(message.url))
                    return "url: string expected";
            }
            if (message.buttonTitle != null && message.hasOwnProperty("buttonTitle")) {
                properties._buttonTitle = 1;
                if (!$util.isString(message.buttonTitle))
                    return "buttonTitle: string expected";
            }
            return null;
        };

        /**
         * Creates an ActionLink message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.ActionLink
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.ActionLink} ActionLink
         */
        ActionLink.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.ActionLink)
                return object;
            var message = new $root.E2E.ActionLink();
            if (object.url != null)
                message.url = String(object.url);
            if (object.buttonTitle != null)
                message.buttonTitle = String(object.buttonTitle);
            return message;
        };

        /**
         * Creates a plain object from an ActionLink message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.ActionLink
         * @static
         * @param {E2E.ActionLink} message ActionLink
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        ActionLink.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.url != null && message.hasOwnProperty("url")) {
                object.url = message.url;
                if (options.oneofs)
                    object._url = "url";
            }
            if (message.buttonTitle != null && message.hasOwnProperty("buttonTitle")) {
                object.buttonTitle = message.buttonTitle;
                if (options.oneofs)
                    object._buttonTitle = "buttonTitle";
            }
            return object;
        };

        /**
         * Converts this ActionLink to JSON.
         * @function toJSON
         * @memberof E2E.ActionLink
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        ActionLink.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for ActionLink
         * @function getTypeUrl
         * @memberof E2E.ActionLink
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        ActionLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.ActionLink";
        };

        return ActionLink;
    })();

    E2E.DisappearingMode = (function() {

        /**
         * Properties of a DisappearingMode.
         * @memberof E2E
         * @interface IDisappearingMode
         * @property {E2E.DisappearingMode.Initiator|null} [initiator] DisappearingMode initiator
         * @property {E2E.DisappearingMode.Trigger|null} [trigger] DisappearingMode trigger
         * @property {string|null} [initiatorDeviceJid] DisappearingMode initiatorDeviceJid
         * @property {boolean|null} [initiatedByMe] DisappearingMode initiatedByMe
         */

        /**
         * Constructs a new DisappearingMode.
         * @memberof E2E
         * @classdesc Represents a DisappearingMode.
         * @implements IDisappearingMode
         * @constructor
         * @param {E2E.IDisappearingMode=} [properties] Properties to set
         */
        function DisappearingMode(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]];
        }

        /**
         * DisappearingMode initiator.
         * @member {E2E.DisappearingMode.Initiator|null|undefined} initiator
         * @memberof E2E.DisappearingMode
         * @instance
         */
        DisappearingMode.prototype.initiator = null;

        /**
         * DisappearingMode trigger.
         * @member {E2E.DisappearingMode.Trigger|null|undefined} trigger
         * @memberof E2E.DisappearingMode
         * @instance
         */
        DisappearingMode.prototype.trigger = null;

        /**
         * DisappearingMode initiatorDeviceJid.
         * @member {string|null|undefined} initiatorDeviceJid
         * @memberof E2E.DisappearingMode
         * @instance
         */
        DisappearingMode.prototype.initiatorDeviceJid = null;

        /**
         * DisappearingMode initiatedByMe.
         * @member {boolean|null|undefined} initiatedByMe
         * @memberof E2E.DisappearingMode
         * @instance
         */
        DisappearingMode.prototype.initiatedByMe = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * DisappearingMode _initiator.
         * @member {"initiator"|undefined} _initiator
         * @memberof E2E.DisappearingMode
         * @instance
         */
        Object.defineProperty(DisappearingMode.prototype, "_initiator", {
            get: $util.oneOfGetter($oneOfFields = ["initiator"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * DisappearingMode _trigger.
         * @member {"trigger"|undefined} _trigger
         * @memberof E2E.DisappearingMode
         * @instance
         */
        Object.defineProperty(DisappearingMode.prototype, "_trigger", {
            get: $util.oneOfGetter($oneOfFields = ["trigger"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * DisappearingMode _initiatorDeviceJid.
         * @member {"initiatorDeviceJid"|undefined} _initiatorDeviceJid
         * @memberof E2E.DisappearingMode
         * @instance
         */
        Object.defineProperty(DisappearingMode.prototype, "_initiatorDeviceJid", {
            get: $util.oneOfGetter($oneOfFields = ["initiatorDeviceJid"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * DisappearingMode _initiatedByMe.
         * @member {"initiatedByMe"|undefined} _initiatedByMe
         * @memberof E2E.DisappearingMode
         * @instance
         */
        Object.defineProperty(DisappearingMode.prototype, "_initiatedByMe", {
            get: $util.oneOfGetter($oneOfFields = ["initiatedByMe"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new DisappearingMode instance using the specified properties.
         * @function create
         * @memberof E2E.DisappearingMode
         * @static
         * @param {E2E.IDisappearingMode=} [properties] Properties to set
         * @returns {E2E.DisappearingMode} DisappearingMode instance
         */
        DisappearingMode.create = function create(properties) {
            return new DisappearingMode(properties);
        };

        /**
         * Encodes the specified DisappearingMode message. Does not implicitly {@link E2E.DisappearingMode.verify|verify} messages.
         * @function encode
         * @memberof E2E.DisappearingMode
         * @static
         * @param {E2E.IDisappearingMode} message DisappearingMode message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        DisappearingMode.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.initiator != null && Object.hasOwnProperty.call(message, "initiator"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.initiator);
            if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.trigger);
            if (message.initiatorDeviceJid != null && Object.hasOwnProperty.call(message, "initiatorDeviceJid"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.initiatorDeviceJid);
            if (message.initiatedByMe != null && Object.hasOwnProperty.call(message, "initiatedByMe"))
                writer.uint32(/* id 4, wireType 0 =*/32).bool(message.initiatedByMe);
            return writer;
        };

        /**
         * Encodes the specified DisappearingMode message, length delimited. Does not implicitly {@link E2E.DisappearingMode.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.DisappearingMode
         * @static
         * @param {E2E.IDisappearingMode} message DisappearingMode message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        DisappearingMode.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a DisappearingMode message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.DisappearingMode
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.DisappearingMode} DisappearingMode
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        DisappearingMode.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.E2E.DisappearingMode();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.initiator = reader.int32();
                        break;
                    }
                case 2: {
                        message.trigger = reader.int32();
                        break;
                    }
                case 3: {
                        message.initiatorDeviceJid = reader.string();
                        break;
                    }
                case 4: {
                        message.initiatedByMe = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a DisappearingMode message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.DisappearingMode
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.DisappearingMode} DisappearingMode
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        DisappearingMode.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a DisappearingMode message.
         * @function verify
         * @memberof E2E.DisappearingMode
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        DisappearingMode.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.initiator != null && message.hasOwnProperty("initiator")) {
                properties._initiator = 1;
                switch (message.initiator) {
                default:
                    return "initiator: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.trigger != null && message.hasOwnProperty("trigger")) {
                properties._trigger = 1;
                switch (message.trigger) {
                default:
                    return "trigger: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                    break;
                }
            }
            if (message.initiatorDeviceJid != null && message.hasOwnProperty("initiatorDeviceJid")) {
                properties._initiatorDeviceJid = 1;
                if (!$util.isString(message.initiatorDeviceJid))
                    return "initiatorDeviceJid: string expected";
            }
            if (message.initiatedByMe != null && message.hasOwnProperty("initiatedByMe")) {
                properties._initiatedByMe = 1;
                if (typeof message.initiatedByMe !== "boolean")
                    return "initiatedByMe: boolean expected";
            }
            return null;
        };

        /**
         * Creates a DisappearingMode message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.DisappearingMode
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.DisappearingMode} DisappearingMode
         */
        DisappearingMode.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.DisappearingMode)
                return object;
            var message = new $root.E2E.DisappearingMode();
            switch (object.initiator) {
            default:
                if (typeof object.initiator === "number") {
                    message.initiator = object.initiator;
                    break;
                }
                break;
            case "CHANGED_IN_CHAT":
            case 0:
                message.initiator = 0;
                break;
            case "INITIATED_BY_ME":
            case 1:
                message.initiator = 1;
                break;
            case "INITIATED_BY_OTHER":
            case 2:
                message.initiator = 2;
                break;
            case "BIZ_UPGRADE_FB_HOSTING":
            case 3:
                message.initiator = 3;
                break;
            }
            switch (object.trigger) {
            default:
                if (typeof object.trigger === "number") {
                    message.trigger = object.trigger;
                    break;
                }
                break;
            case "UNKNOWN":
            case 0:
                message.trigger = 0;
                break;
            case "CHAT_SETTING":
            case 1:
                message.trigger = 1;
                break;
            case "ACCOUNT_SETTING":
            case 2:
                message.trigger = 2;
                break;
            case "BULK_CHANGE":
            case 3:
                message.trigger = 3;
                break;
            case "BIZ_SUPPORTS_FB_HOSTING":
            case 4:
                message.trigger = 4;
                break;
            case "UNKNOWN_GROUPS":
            case 5:
                message.trigger = 5;
                break;
            }
            if (object.initiatorDeviceJid != null)
                message.initiatorDeviceJid = String(object.initiatorDeviceJid);
            if (object.initiatedByMe != null)
                message.initiatedByMe = Boolean(object.initiatedByMe);
            return message;
        };

        /**
         * Creates a plain object from a DisappearingMode message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.DisappearingMode
         * @static
         * @param {E2E.DisappearingMode} message DisappearingMode
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        DisappearingMode.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.initiator != null && message.hasOwnProperty("initiator")) {
                object.initiator = options.enums === String ? $root.E2E.DisappearingMode.Initiator[message.initiator] === undefined ? message.initiator : $root.E2E.DisappearingMode.Initiator[message.initiator] : message.initiator;
                if (options.oneofs)
                    object._initiator = "initiator";
            }
            if (message.trigger != null && message.hasOwnProperty("trigger")) {
                object.trigger = options.enums === String ? $root.E2E.DisappearingMode.Trigger[message.trigger] === undefined ? message.trigger : $root.E2E.DisappearingMode.Trigger[message.trigger] : message.trigger;
                if (options.oneofs)
                    object._trigger = "trigger";
            }
            if (message.initiatorDeviceJid != null && message.hasOwnProperty("initiatorDeviceJid")) {
                object.initiatorDeviceJid = message.initiatorDeviceJid;
                if (options.oneofs)
                    object._initiatorDeviceJid = "initiatorDeviceJid";
            }
            if (message.initiatedByMe != null && message.hasOwnProperty("initiatedByMe")) {
                object.initiatedByMe = message.initiatedByMe;
                if (options.oneofs)
                    object._initiatedByMe = "initiatedByMe";
            }
            return object;
        };

        /**
         * Converts this DisappearingMode to JSON.
         * @function toJSON
         * @memberof E2E.DisappearingMode
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        DisappearingMode.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for DisappearingMode
         * @function getTypeUrl
         * @memberof E2E.DisappearingMode
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        DisappearingMode.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.DisappearingMode";
        };

        /**
         * Initiator enum.
         * @name E2E.DisappearingMode.Initiator
         * @enum {number}
         * @property {number} CHANGED_IN_CHAT=0 CHANGED_IN_CHAT value
         * @property {number} INITIATED_BY_ME=1 INITIATED_BY_ME value
         * @property {number} INITIATED_BY_OTHER=2 INITIATED_BY_OTHER value
         * @property {number} BIZ_UPGRADE_FB_HOSTING=3 BIZ_UPGRADE_FB_HOSTING value
         */
        DisappearingMode.Initiator = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "CHANGED_IN_CHAT"] = 0;
            values[valuesById[1] = "INITIATED_BY_ME"] = 1;
            values[valuesById[2] = "INITIATED_BY_OTHER"] = 2;
            values[valuesById[3] = "BIZ_UPGRADE_FB_HOSTING"] = 3;
            return values;
        })();

        /**
         * Trigger enum.
         * @name E2E.DisappearingMode.Trigger
         * @enum {number}
         * @property {number} UNKNOWN=0 UNKNOWN value
         * @property {number} CHAT_SETTING=1 CHAT_SETTING value
         * @property {number} ACCOUNT_SETTING=2 ACCOUNT_SETTING value
         * @property {number} BULK_CHANGE=3 BULK_CHANGE value
         * @property {number} BIZ_SUPPORTS_FB_HOSTING=4 BIZ_SUPPORTS_FB_HOSTING value
         * @property {number} UNKNOWN_GROUPS=5 UNKNOWN_GROUPS value
         */
        DisappearingMode.Trigger = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "CHAT_SETTING"] = 1;
            values[valuesById[2] = "ACCOUNT_SETTING"] = 2;
            values[valuesById[3] = "BULK_CHANGE"] = 3;
            values[valuesById[4] = "BIZ_SUPPORTS_FB_HOSTING"] = 4;
            values[valuesById[5] = "UNKNOWN_GROUPS"] = 5;
            return values;
        })();

        return DisappearingMode;
    })();

    E2E.PaymentBackground = (function() {

        /**
         * Properties of a PaymentBackground.
         * @memberof E2E
         * @interface IPaymentBackground
         * @property {string|null} [id] PaymentBackground id
         * @property {number|Long|null} [fileLength] PaymentBackground fileLength
         * @property {number|null} [width] PaymentBackground width
         * @property {number|null} [height] PaymentBackground height
         * @property {string|null} [mimetype] PaymentBackground mimetype
         * @property {number|null} [placeholderArgb] PaymentBackground placeholderArgb
         * @property {number|null} [textArgb] PaymentBackground textArgb
         * @property {number|null} [subtextArgb] PaymentBackground subtextArgb
         * @property {E2E.PaymentBackground.IMediaData|null} [mediaData] PaymentBackground mediaData
         * @property {E2E.PaymentBackground.Type|null} [type] PaymentBackground type
         */

        /**
         * Constructs a new PaymentBackground.
         * @memberof E2E
         * @classdesc Represents a PaymentBackground.
         * @implements IPaymentBackground
         * @constructor
         * @param {E2E.IPaymentBackground=} [properties] Properties to set
         */
        function PaymentBackground(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]];
        }

        /**
         * PaymentBackground id.
         * @member {string|null|undefined} id
         * @memberof E2E.PaymentBackground
         * @instance
         */
        PaymentBackground.prototype.id = null;

        /**
         * PaymentBackground fileLength.
         * @member {number|Long|null|undefined} fileLength
         * @memberof E2E.PaymentBackground
         * @instance
         */
        PaymentBackground.prototype.fileLength = null;

        /**
         * PaymentBackground width.
         * @member {number|null|undefined} width
         * @memberof E2E.PaymentBackground
         * @instance
         */
        PaymentBackground.prototype.width = null;

        /**
         * PaymentBackground height.
         * @member {number|null|undefined} height
         * @memberof E2E.PaymentBackground
         * @instance
         */
        PaymentBackground.prototype.height = null;

        /**
         * PaymentBackground mimetype.
         * @member {string|null|undefined} mimetype
         * @memberof E2E.PaymentBackground
         * @instance
         */
        PaymentBackground.prototype.mimetype = null;

        /**
         * PaymentBackground placeholderArgb.
         * @member {number|null|undefined} placeholderArgb
         * @memberof E2E.PaymentBackground
         * @instance
         */
        PaymentBackground.prototype.placeholderArgb = null;

        /**
         * PaymentBackground textArgb.
         * @member {number|null|undefined} textArgb
         * @memberof E2E.PaymentBackground
         * @instance
         */
        PaymentBackground.prototype.textArgb = null;

        /**
         * PaymentBackground subtextArgb.
         * @member {number|null|undefined} subtextArgb
         * @memberof E2E.PaymentBackground
         * @instance
         */
        PaymentBackground.prototype.subtextArgb = null;

        /**
         * PaymentBackground mediaData.
         * @member {E2E.PaymentBackground.IMediaData|null|undefined} mediaData
         * @memberof E2E.PaymentBackground
         * @instance
         */
        PaymentBackground.prototype.mediaData = null;

        /**
         * PaymentBackground type.
         * @member {E2E.PaymentBackground.Type|null|undefined} type
         * @memberof E2E.PaymentBackground
         * @instance
         */
        PaymentBackground.prototype.type = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * PaymentBackground _id.
         * @member {"id"|undefined} _id
         * @memberof E2E.PaymentBackground
         * @instance
         */
        Object.defineProperty(PaymentBackground.prototype, "_id", {
            get: $util.oneOfGetter($oneOfFields = ["id"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentBackground _fileLength.
         * @member {"fileLength"|undefined} _fileLength
         * @memberof E2E.PaymentBackground
         * @instance
         */
        Object.defineProperty(PaymentBackground.prototype, "_fileLength", {
            get: $util.oneOfGetter($oneOfFields = ["fileLength"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentBackground _width.
         * @member {"width"|undefined} _width
         * @memberof E2E.PaymentBackground
         * @instance
         */
        Object.defineProperty(PaymentBackground.prototype, "_width", {
            get: $util.oneOfGetter($oneOfFields = ["width"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentBackground _height.
         * @member {"height"|undefined} _height
         * @memberof E2E.PaymentBackground
         * @instance
         */
        Object.defineProperty(PaymentBackground.prototype, "_height", {
            get: $util.oneOfGetter($oneOfFields = ["height"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentBackground _mimetype.
         * @member {"mimetype"|undefined} _mimetype
         * @memberof E2E.PaymentBackground
         * @instance
         */
        Object.defineProperty(PaymentBackground.prototype, "_mimetype", {
            get: $util.oneOfGetter($oneOfFields = ["mimetype"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentBackground _placeholderArgb.
         * @member {"placeholderArgb"|undefined} _placeholderArgb
         * @memberof E2E.PaymentBackground
         * @instance
         */
        Object.defineProperty(PaymentBackground.prototype, "_placeholderArgb", {
            get: $util.oneOfGetter($oneOfFields = ["placeholderArgb"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentBackground _textArgb.
         * @member {"textArgb"|undefined} _textArgb
         * @memberof E2E.PaymentBackground
         * @instance
         */
        Object.defineProperty(PaymentBackground.prototype, "_textArgb", {
            get: $util.oneOfGetter($oneOfFields = ["textArgb"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentBackground _subtextArgb.
         * @member {"subtextArgb"|undefined} _subtextArgb
         * @memberof E2E.PaymentBackground
         * @instance
         */
        Object.defineProperty(PaymentBackground.prototype, "_subtextArgb", {
            get: $util.oneOfGetter($oneOfFields = ["subtextArgb"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentBackground _mediaData.
         * @member {"mediaData"|undefined} _mediaData
         * @memberof E2E.PaymentBackground
         * @instance
         */
        Object.defineProperty(PaymentBackground.prototype, "_mediaData", {
            get: $util.oneOfGetter($oneOfFields = ["mediaData"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PaymentBackground _type.
         * @member {"type"|undefined} _type
         * @memberof E2E.PaymentBackground
         * @instance
         */
        Object.defineProperty(PaymentBackground.prototype, "_type", {
            get: $util.oneOfGetter($oneOfFields = ["type"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new PaymentBackground instance using the specified properties.
         * @function create
         * @memberof E2E.PaymentBackground
         * @static
         * @param {E2E.IPaymentBackground=} [properties] Properties to set
         * @returns {E2E.PaymentBackground} PaymentBackground instance
         */
        PaymentBackground.create = function create(properties) {
            return new PaymentBackground(properties);
        };

        /**
         * Encodes the specified PaymentBackground message. Does not implicitly {@link E2E.PaymentBackground.verify|verify} messages.
         * @function encode
         * @memberof E2E.PaymentBackground
         * @static
         * @param {E2E.IPaymentBackground} message PaymentBackground message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PaymentBackground.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.id);
            if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength"))
                writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.fileLength);
            if (message.width != null && Object.hasOwnProperty.call(message, "width"))
                writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.width);
            if (message.height != null && Object.hasOwnProperty.call(message, "height"))
                writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.height);
            if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype"))
                writer.uint32(/* id 5, wireType 2 =*/42).string(message.mimetype);
            if (message.placeholderArgb != null && Object.hasOwnProperty.call(message, "placeholderArgb"))
                writer.uint32(/* id 6, wireType 5 =*/53).fixed32(message.placeholderArgb);
            if (message.textArgb != null && Object.hasOwnProperty.call(message, "textArgb"))
                writer.uint32(/* id 7, wireType 5 =*/61).fixed32(message.textArgb);
            if (message.subtextArgb != null && Object.hasOwnProperty.call(message, "subtextArgb"))
                writer.uint32(/* id 8, wireType 5 =*/69).fixed32(message.subtextArgb);
            if (message.mediaData != null && Object.hasOwnProperty.call(message, "mediaData"))
                $root.E2E.PaymentBackground.MediaData.encode(message.mediaData, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
            if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type);
            return writer;
        };

        /**
         * Encodes the specified PaymentBackground message, length delimited. Does not implicitly {@link E2E.PaymentBackground.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.PaymentBackground
         * @static
         * @param {E2E.IPaymentBackground} message PaymentBackground message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PaymentBackground.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a PaymentBackground message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.PaymentBackground
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.PaymentBackground} PaymentBackground
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PaymentBackground.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.E2E.PaymentBackground();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.id = reader.string();
                        break;
                    }
                case 2: {
                        message.fileLength = reader.uint64();
                        break;
                    }
                case 3: {
                        message.width = reader.uint32();
                        break;
                    }
                case 4: {
                        message.height = reader.uint32();
                        break;
                    }
                case 5: {
                        message.mimetype = reader.string();
                        break;
                    }
                case 6: {
                        message.placeholderArgb = reader.fixed32();
                        break;
                    }
                case 7: {
                        message.textArgb = reader.fixed32();
                        break;
                    }
                case 8: {
                        message.subtextArgb = reader.fixed32();
                        break;
                    }
                case 9: {
                        message.mediaData = $root.E2E.PaymentBackground.MediaData.decode(reader, reader.uint32());
                        break;
                    }
                case 10: {
                        message.type = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a PaymentBackground message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.PaymentBackground
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.PaymentBackground} PaymentBackground
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PaymentBackground.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a PaymentBackground message.
         * @function verify
         * @memberof E2E.PaymentBackground
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        PaymentBackground.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.id != null && message.hasOwnProperty("id")) {
                properties._id = 1;
                if (!$util.isString(message.id))
                    return "id: string expected";
            }
            if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                properties._fileLength = 1;
                if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high)))
                    return "fileLength: integer|Long expected";
            }
            if (message.width != null && message.hasOwnProperty("width")) {
                properties._width = 1;
                if (!$util.isInteger(message.width))
                    return "width: integer expected";
            }
            if (message.height != null && message.hasOwnProperty("height")) {
                properties._height = 1;
                if (!$util.isInteger(message.height))
                    return "height: integer expected";
            }
            if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                properties._mimetype = 1;
                if (!$util.isString(message.mimetype))
                    return "mimetype: string expected";
            }
            if (message.placeholderArgb != null && message.hasOwnProperty("placeholderArgb")) {
                properties._placeholderArgb = 1;
                if (!$util.isInteger(message.placeholderArgb))
                    return "placeholderArgb: integer expected";
            }
            if (message.textArgb != null && message.hasOwnProperty("textArgb")) {
                properties._textArgb = 1;
                if (!$util.isInteger(message.textArgb))
                    return "textArgb: integer expected";
            }
            if (message.subtextArgb != null && message.hasOwnProperty("subtextArgb")) {
                properties._subtextArgb = 1;
                if (!$util.isInteger(message.subtextArgb))
                    return "subtextArgb: integer expected";
            }
            if (message.mediaData != null && message.hasOwnProperty("mediaData")) {
                properties._mediaData = 1;
                {
                    var error = $root.E2E.PaymentBackground.MediaData.verify(message.mediaData);
                    if (error)
                        return "mediaData." + error;
                }
            }
            if (message.type != null && message.hasOwnProperty("type")) {
                properties._type = 1;
                switch (message.type) {
                default:
                    return "type: enum value expected";
                case 0:
                case 1:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a PaymentBackground message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.PaymentBackground
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.PaymentBackground} PaymentBackground
         */
        PaymentBackground.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.PaymentBackground)
                return object;
            var message = new $root.E2E.PaymentBackground();
            if (object.id != null)
                message.id = String(object.id);
            if (object.fileLength != null)
                if ($util.Long)
                    (message.fileLength = $util.Long.fromValue(object.fileLength)).unsigned = true;
                else if (typeof object.fileLength === "string")
                    message.fileLength = parseInt(object.fileLength, 10);
                else if (typeof object.fileLength === "number")
                    message.fileLength = object.fileLength;
                else if (typeof object.fileLength === "object")
                    message.fileLength = new $util.LongBits(object.fileLength.low >>> 0, object.fileLength.high >>> 0).toNumber(true);
            if (object.width != null)
                message.width = object.width >>> 0;
            if (object.height != null)
                message.height = object.height >>> 0;
            if (object.mimetype != null)
                message.mimetype = String(object.mimetype);
            if (object.placeholderArgb != null)
                message.placeholderArgb = object.placeholderArgb >>> 0;
            if (object.textArgb != null)
                message.textArgb = object.textArgb >>> 0;
            if (object.subtextArgb != null)
                message.subtextArgb = object.subtextArgb >>> 0;
            if (object.mediaData != null) {
                if (typeof object.mediaData !== "object")
                    throw TypeError(".E2E.PaymentBackground.mediaData: object expected");
                message.mediaData = $root.E2E.PaymentBackground.MediaData.fromObject(object.mediaData);
            }
            switch (object.type) {
            default:
                if (typeof object.type === "number") {
                    message.type = object.type;
                    break;
                }
                break;
            case "UNKNOWN":
            case 0:
                message.type = 0;
                break;
            case "DEFAULT":
            case 1:
                message.type = 1;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a PaymentBackground message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.PaymentBackground
         * @static
         * @param {E2E.PaymentBackground} message PaymentBackground
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        PaymentBackground.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.id != null && message.hasOwnProperty("id")) {
                object.id = message.id;
                if (options.oneofs)
                    object._id = "id";
            }
            if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                if (typeof message.fileLength === "number")
                    object.fileLength = options.longs === String ? String(message.fileLength) : message.fileLength;
                else
                    object.fileLength = options.longs === String ? $util.Long.prototype.toString.call(message.fileLength) : options.longs === Number ? new $util.LongBits(message.fileLength.low >>> 0, message.fileLength.high >>> 0).toNumber(true) : message.fileLength;
                if (options.oneofs)
                    object._fileLength = "fileLength";
            }
            if (message.width != null && message.hasOwnProperty("width")) {
                object.width = message.width;
                if (options.oneofs)
                    object._width = "width";
            }
            if (message.height != null && message.hasOwnProperty("height")) {
                object.height = message.height;
                if (options.oneofs)
                    object._height = "height";
            }
            if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                object.mimetype = message.mimetype;
                if (options.oneofs)
                    object._mimetype = "mimetype";
            }
            if (message.placeholderArgb != null && message.hasOwnProperty("placeholderArgb")) {
                object.placeholderArgb = message.placeholderArgb;
                if (options.oneofs)
                    object._placeholderArgb = "placeholderArgb";
            }
            if (message.textArgb != null && message.hasOwnProperty("textArgb")) {
                object.textArgb = message.textArgb;
                if (options.oneofs)
                    object._textArgb = "textArgb";
            }
            if (message.subtextArgb != null && message.hasOwnProperty("subtextArgb")) {
                object.subtextArgb = message.subtextArgb;
                if (options.oneofs)
                    object._subtextArgb = "subtextArgb";
            }
            if (message.mediaData != null && message.hasOwnProperty("mediaData")) {
                object.mediaData = $root.E2E.PaymentBackground.MediaData.toObject(message.mediaData, options);
                if (options.oneofs)
                    object._mediaData = "mediaData";
            }
            if (message.type != null && message.hasOwnProperty("type")) {
                object.type = options.enums === String ? $root.E2E.PaymentBackground.Type[message.type] === undefined ? message.type : $root.E2E.PaymentBackground.Type[message.type] : message.type;
                if (options.oneofs)
                    object._type = "type";
            }
            return object;
        };

        /**
         * Converts this PaymentBackground to JSON.
         * @function toJSON
         * @memberof E2E.PaymentBackground
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        PaymentBackground.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for PaymentBackground
         * @function getTypeUrl
         * @memberof E2E.PaymentBackground
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        PaymentBackground.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.PaymentBackground";
        };

        PaymentBackground.MediaData = (function() {

            /**
             * Properties of a MediaData.
             * @memberof E2E.PaymentBackground
             * @interface IMediaData
             * @property {Uint8Array|null} [mediaKey] MediaData mediaKey
             * @property {number|Long|null} [mediaKeyTimestamp] MediaData mediaKeyTimestamp
             * @property {Uint8Array|null} [fileSha256] MediaData fileSha256
             * @property {Uint8Array|null} [fileEncSha256] MediaData fileEncSha256
             * @property {string|null} [directPath] MediaData directPath
             */

            /**
             * Constructs a new MediaData.
             * @memberof E2E.PaymentBackground
             * @classdesc Represents a MediaData.
             * @implements IMediaData
             * @constructor
             * @param {E2E.PaymentBackground.IMediaData=} [properties] Properties to set
             */
            function MediaData(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]];
            }

            /**
             * MediaData mediaKey.
             * @member {Uint8Array|null|undefined} mediaKey
             * @memberof E2E.PaymentBackground.MediaData
             * @instance
             */
            MediaData.prototype.mediaKey = null;

            /**
             * MediaData mediaKeyTimestamp.
             * @member {number|Long|null|undefined} mediaKeyTimestamp
             * @memberof E2E.PaymentBackground.MediaData
             * @instance
             */
            MediaData.prototype.mediaKeyTimestamp = null;

            /**
             * MediaData fileSha256.
             * @member {Uint8Array|null|undefined} fileSha256
             * @memberof E2E.PaymentBackground.MediaData
             * @instance
             */
            MediaData.prototype.fileSha256 = null;

            /**
             * MediaData fileEncSha256.
             * @member {Uint8Array|null|undefined} fileEncSha256
             * @memberof E2E.PaymentBackground.MediaData
             * @instance
             */
            MediaData.prototype.fileEncSha256 = null;

            /**
             * MediaData directPath.
             * @member {string|null|undefined} directPath
             * @memberof E2E.PaymentBackground.MediaData
             * @instance
             */
            MediaData.prototype.directPath = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * MediaData _mediaKey.
             * @member {"mediaKey"|undefined} _mediaKey
             * @memberof E2E.PaymentBackground.MediaData
             * @instance
             */
            Object.defineProperty(MediaData.prototype, "_mediaKey", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MediaData _mediaKeyTimestamp.
             * @member {"mediaKeyTimestamp"|undefined} _mediaKeyTimestamp
             * @memberof E2E.PaymentBackground.MediaData
             * @instance
             */
            Object.defineProperty(MediaData.prototype, "_mediaKeyTimestamp", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MediaData _fileSha256.
             * @member {"fileSha256"|undefined} _fileSha256
             * @memberof E2E.PaymentBackground.MediaData
             * @instance
             */
            Object.defineProperty(MediaData.prototype, "_fileSha256", {
                get: $util.oneOfGetter($oneOfFields = ["fileSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MediaData _fileEncSha256.
             * @member {"fileEncSha256"|undefined} _fileEncSha256
             * @memberof E2E.PaymentBackground.MediaData
             * @instance
             */
            Object.defineProperty(MediaData.prototype, "_fileEncSha256", {
                get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MediaData _directPath.
             * @member {"directPath"|undefined} _directPath
             * @memberof E2E.PaymentBackground.MediaData
             * @instance
             */
            Object.defineProperty(MediaData.prototype, "_directPath", {
                get: $util.oneOfGetter($oneOfFields = ["directPath"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new MediaData instance using the specified properties.
             * @function create
             * @memberof E2E.PaymentBackground.MediaData
             * @static
             * @param {E2E.PaymentBackground.IMediaData=} [properties] Properties to set
             * @returns {E2E.PaymentBackground.MediaData} MediaData instance
             */
            MediaData.create = function create(properties) {
                return new MediaData(properties);
            };

            /**
             * Encodes the specified MediaData message. Does not implicitly {@link E2E.PaymentBackground.MediaData.verify|verify} messages.
             * @function encode
             * @memberof E2E.PaymentBackground.MediaData
             * @static
             * @param {E2E.PaymentBackground.IMediaData} message MediaData message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MediaData.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey"))
                    writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.mediaKey);
                if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int64(message.mediaKeyTimestamp);
                if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256"))
                    writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.fileSha256);
                if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256"))
                    writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.fileEncSha256);
                if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.directPath);
                return writer;
            };

            /**
             * Encodes the specified MediaData message, length delimited. Does not implicitly {@link E2E.PaymentBackground.MediaData.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.PaymentBackground.MediaData
             * @static
             * @param {E2E.PaymentBackground.IMediaData} message MediaData message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MediaData.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MediaData message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.PaymentBackground.MediaData
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.PaymentBackground.MediaData} MediaData
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MediaData.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.E2E.PaymentBackground.MediaData();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.mediaKey = reader.bytes();
                            break;
                        }
                    case 2: {
                            message.mediaKeyTimestamp = reader.int64();
                            break;
                        }
                    case 3: {
                            message.fileSha256 = reader.bytes();
                            break;
                        }
                    case 4: {
                            message.fileEncSha256 = reader.bytes();
                            break;
                        }
                    case 5: {
                            message.directPath = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a MediaData message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.PaymentBackground.MediaData
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.PaymentBackground.MediaData} MediaData
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MediaData.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MediaData message.
             * @function verify
             * @memberof E2E.PaymentBackground.MediaData
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MediaData.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    properties._mediaKey = 1;
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    properties._mediaKeyTimestamp = 1;
                    if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high)))
                        return "mediaKeyTimestamp: integer|Long expected";
                }
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                    properties._fileSha256 = 1;
                    if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                        return "fileSha256: buffer expected";
                }
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                    properties._fileEncSha256 = 1;
                    if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                        return "fileEncSha256: buffer expected";
                }
                if (message.directPath != null && message.hasOwnProperty("directPath")) {
                    properties._directPath = 1;
                    if (!$util.isString(message.directPath))
                        return "directPath: string expected";
                }
                return null;
            };

            /**
             * Creates a MediaData message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.PaymentBackground.MediaData
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.PaymentBackground.MediaData} MediaData
             */
            MediaData.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.PaymentBackground.MediaData)
                    return object;
                var message = new $root.E2E.PaymentBackground.MediaData();
                if (object.mediaKey != null)
                    if (typeof object.mediaKey === "string")
                        $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0);
                    else if (object.mediaKey.length >= 0)
                        message.mediaKey = object.mediaKey;
                if (object.mediaKeyTimestamp != null)
                    if ($util.Long)
                        (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false;
                    else if (typeof object.mediaKeyTimestamp === "string")
                        message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10);
                    else if (typeof object.mediaKeyTimestamp === "number")
                        message.mediaKeyTimestamp = object.mediaKeyTimestamp;
                    else if (typeof object.mediaKeyTimestamp === "object")
                        message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber();
                if (object.fileSha256 != null)
                    if (typeof object.fileSha256 === "string")
                        $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0);
                    else if (object.fileSha256.length >= 0)
                        message.fileSha256 = object.fileSha256;
                if (object.fileEncSha256 != null)
                    if (typeof object.fileEncSha256 === "string")
                        $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0);
                    else if (object.fileEncSha256.length >= 0)
                        message.fileEncSha256 = object.fileEncSha256;
                if (object.directPath != null)
                    message.directPath = String(object.directPath);
                return message;
            };

            /**
             * Creates a plain object from a MediaData message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.PaymentBackground.MediaData
             * @static
             * @param {E2E.PaymentBackground.MediaData} message MediaData
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MediaData.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey;
                    if (options.oneofs)
                        object._mediaKey = "mediaKey";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    if (typeof message.mediaKeyTimestamp === "number")
                        object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp;
                    else
                        object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp;
                    if (options.oneofs)
                        object._mediaKeyTimestamp = "mediaKeyTimestamp";
                }
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                    object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256;
                    if (options.oneofs)
                        object._fileSha256 = "fileSha256";
                }
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                    object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256;
                    if (options.oneofs)
                        object._fileEncSha256 = "fileEncSha256";
                }
                if (message.directPath != null && message.hasOwnProperty("directPath")) {
                    object.directPath = message.directPath;
                    if (options.oneofs)
                        object._directPath = "directPath";
                }
                return object;
            };

            /**
             * Converts this MediaData to JSON.
             * @function toJSON
             * @memberof E2E.PaymentBackground.MediaData
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MediaData.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for MediaData
             * @function getTypeUrl
             * @memberof E2E.PaymentBackground.MediaData
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            MediaData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.PaymentBackground.MediaData";
            };

            return MediaData;
        })();

        /**
         * Type enum.
         * @name E2E.PaymentBackground.Type
         * @enum {number}
         * @property {number} UNKNOWN=0 UNKNOWN value
         * @property {number} DEFAULT=1 DEFAULT value
         */
        PaymentBackground.Type = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "DEFAULT"] = 1;
            return values;
        })();

        return PaymentBackground;
    })();

    E2E.Money = (function() {

        /**
         * Properties of a Money.
         * @memberof E2E
         * @interface IMoney
         * @property {number|Long|null} [value] Money value
         * @property {number|null} [offset] Money offset
         * @property {string|null} [currencyCode] Money currencyCode
         */

        /**
         * Constructs a new Money.
         * @memberof E2E
         * @classdesc Represents a Money.
         * @implements IMoney
         * @constructor
         * @param {E2E.IMoney=} [properties] Properties to set
         */
        function Money(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]];
        }

        /**
         * Money value.
         * @member {number|Long|null|undefined} value
         * @memberof E2E.Money
         * @instance
         */
        Money.prototype.value = null;

        /**
         * Money offset.
         * @member {number|null|undefined} offset
         * @memberof E2E.Money
         * @instance
         */
        Money.prototype.offset = null;

        /**
         * Money currencyCode.
         * @member {string|null|undefined} currencyCode
         * @memberof E2E.Money
         * @instance
         */
        Money.prototype.currencyCode = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * Money _value.
         * @member {"value"|undefined} _value
         * @memberof E2E.Money
         * @instance
         */
        Object.defineProperty(Money.prototype, "_value", {
            get: $util.oneOfGetter($oneOfFields = ["value"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Money _offset.
         * @member {"offset"|undefined} _offset
         * @memberof E2E.Money
         * @instance
         */
        Object.defineProperty(Money.prototype, "_offset", {
            get: $util.oneOfGetter($oneOfFields = ["offset"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Money _currencyCode.
         * @member {"currencyCode"|undefined} _currencyCode
         * @memberof E2E.Money
         * @instance
         */
        Object.defineProperty(Money.prototype, "_currencyCode", {
            get: $util.oneOfGetter($oneOfFields = ["currencyCode"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new Money instance using the specified properties.
         * @function create
         * @memberof E2E.Money
         * @static
         * @param {E2E.IMoney=} [properties] Properties to set
         * @returns {E2E.Money} Money instance
         */
        Money.create = function create(properties) {
            return new Money(properties);
        };

        /**
         * Encodes the specified Money message. Does not implicitly {@link E2E.Money.verify|verify} messages.
         * @function encode
         * @memberof E2E.Money
         * @static
         * @param {E2E.IMoney} message Money message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Money.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value);
            if (message.offset != null && Object.hasOwnProperty.call(message, "offset"))
                writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.offset);
            if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.currencyCode);
            return writer;
        };

        /**
         * Encodes the specified Money message, length delimited. Does not implicitly {@link E2E.Money.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.Money
         * @static
         * @param {E2E.IMoney} message Money message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Money.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Money message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.Money
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.Money} Money
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Money.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.E2E.Money();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.value = reader.int64();
                        break;
                    }
                case 2: {
                        message.offset = reader.uint32();
                        break;
                    }
                case 3: {
                        message.currencyCode = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Money message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.Money
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.Money} Money
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Money.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Money message.
         * @function verify
         * @memberof E2E.Money
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Money.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.value != null && message.hasOwnProperty("value")) {
                properties._value = 1;
                if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high)))
                    return "value: integer|Long expected";
            }
            if (message.offset != null && message.hasOwnProperty("offset")) {
                properties._offset = 1;
                if (!$util.isInteger(message.offset))
                    return "offset: integer expected";
            }
            if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) {
                properties._currencyCode = 1;
                if (!$util.isString(message.currencyCode))
                    return "currencyCode: string expected";
            }
            return null;
        };

        /**
         * Creates a Money message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.Money
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.Money} Money
         */
        Money.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.Money)
                return object;
            var message = new $root.E2E.Money();
            if (object.value != null)
                if ($util.Long)
                    (message.value = $util.Long.fromValue(object.value)).unsigned = false;
                else if (typeof object.value === "string")
                    message.value = parseInt(object.value, 10);
                else if (typeof object.value === "number")
                    message.value = object.value;
                else if (typeof object.value === "object")
                    message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber();
            if (object.offset != null)
                message.offset = object.offset >>> 0;
            if (object.currencyCode != null)
                message.currencyCode = String(object.currencyCode);
            return message;
        };

        /**
         * Creates a plain object from a Money message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.Money
         * @static
         * @param {E2E.Money} message Money
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Money.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.value != null && message.hasOwnProperty("value")) {
                if (typeof message.value === "number")
                    object.value = options.longs === String ? String(message.value) : message.value;
                else
                    object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value;
                if (options.oneofs)
                    object._value = "value";
            }
            if (message.offset != null && message.hasOwnProperty("offset")) {
                object.offset = message.offset;
                if (options.oneofs)
                    object._offset = "offset";
            }
            if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) {
                object.currencyCode = message.currencyCode;
                if (options.oneofs)
                    object._currencyCode = "currencyCode";
            }
            return object;
        };

        /**
         * Converts this Money to JSON.
         * @function toJSON
         * @memberof E2E.Money
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Money.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for Money
         * @function getTypeUrl
         * @memberof E2E.Money
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        Money.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.Money";
        };

        return Money;
    })();

    E2E.HydratedTemplateButton = (function() {

        /**
         * Properties of a HydratedTemplateButton.
         * @memberof E2E
         * @interface IHydratedTemplateButton
         * @property {number|null} [index] HydratedTemplateButton index
         * @property {E2E.HydratedTemplateButton.IHydratedQuickReplyButton|null} [quickReplyButton] HydratedTemplateButton quickReplyButton
         * @property {E2E.HydratedTemplateButton.IHydratedURLButton|null} [urlButton] HydratedTemplateButton urlButton
         * @property {E2E.HydratedTemplateButton.IHydratedCallButton|null} [callButton] HydratedTemplateButton callButton
         */

        /**
         * Constructs a new HydratedTemplateButton.
         * @memberof E2E
         * @classdesc Represents a HydratedTemplateButton.
         * @implements IHydratedTemplateButton
         * @constructor
         * @param {E2E.IHydratedTemplateButton=} [properties] Properties to set
         */
        function HydratedTemplateButton(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]];
        }

        /**
         * HydratedTemplateButton index.
         * @member {number|null|undefined} index
         * @memberof E2E.HydratedTemplateButton
         * @instance
         */
        HydratedTemplateButton.prototype.index = null;

        /**
         * HydratedTemplateButton quickReplyButton.
         * @member {E2E.HydratedTemplateButton.IHydratedQuickReplyButton|null|undefined} quickReplyButton
         * @memberof E2E.HydratedTemplateButton
         * @instance
         */
        HydratedTemplateButton.prototype.quickReplyButton = null;

        /**
         * HydratedTemplateButton urlButton.
         * @member {E2E.HydratedTemplateButton.IHydratedURLButton|null|undefined} urlButton
         * @memberof E2E.HydratedTemplateButton
         * @instance
         */
        HydratedTemplateButton.prototype.urlButton = null;

        /**
         * HydratedTemplateButton callButton.
         * @member {E2E.HydratedTemplateButton.IHydratedCallButton|null|undefined} callButton
         * @memberof E2E.HydratedTemplateButton
         * @instance
         */
        HydratedTemplateButton.prototype.callButton = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * HydratedTemplateButton _index.
         * @member {"index"|undefined} _index
         * @memberof E2E.HydratedTemplateButton
         * @instance
         */
        Object.defineProperty(HydratedTemplateButton.prototype, "_index", {
            get: $util.oneOfGetter($oneOfFields = ["index"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * HydratedTemplateButton hydratedButton.
         * @member {"quickReplyButton"|"urlButton"|"callButton"|undefined} hydratedButton
         * @memberof E2E.HydratedTemplateButton
         * @instance
         */
        Object.defineProperty(HydratedTemplateButton.prototype, "hydratedButton", {
            get: $util.oneOfGetter($oneOfFields = ["quickReplyButton", "urlButton", "callButton"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new HydratedTemplateButton instance using the specified properties.
         * @function create
         * @memberof E2E.HydratedTemplateButton
         * @static
         * @param {E2E.IHydratedTemplateButton=} [properties] Properties to set
         * @returns {E2E.HydratedTemplateButton} HydratedTemplateButton instance
         */
        HydratedTemplateButton.create = function create(properties) {
            return new HydratedTemplateButton(properties);
        };

        /**
         * Encodes the specified HydratedTemplateButton message. Does not implicitly {@link E2E.HydratedTemplateButton.verify|verify} messages.
         * @function encode
         * @memberof E2E.HydratedTemplateButton
         * @static
         * @param {E2E.IHydratedTemplateButton} message HydratedTemplateButton message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        HydratedTemplateButton.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.quickReplyButton != null && Object.hasOwnProperty.call(message, "quickReplyButton"))
                $root.E2E.HydratedTemplateButton.HydratedQuickReplyButton.encode(message.quickReplyButton, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.urlButton != null && Object.hasOwnProperty.call(message, "urlButton"))
                $root.E2E.HydratedTemplateButton.HydratedURLButton.encode(message.urlButton, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.callButton != null && Object.hasOwnProperty.call(message, "callButton"))
                $root.E2E.HydratedTemplateButton.HydratedCallButton.encode(message.callButton, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.index != null && Object.hasOwnProperty.call(message, "index"))
                writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.index);
            return writer;
        };

        /**
         * Encodes the specified HydratedTemplateButton message, length delimited. Does not implicitly {@link E2E.HydratedTemplateButton.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.HydratedTemplateButton
         * @static
         * @param {E2E.IHydratedTemplateButton} message HydratedTemplateButton message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        HydratedTemplateButton.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a HydratedTemplateButton message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.HydratedTemplateButton
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.HydratedTemplateButton} HydratedTemplateButton
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        HydratedTemplateButton.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.E2E.HydratedTemplateButton();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 4: {
                        message.index = reader.uint32();
                        break;
                    }
                case 1: {
                        message.quickReplyButton = $root.E2E.HydratedTemplateButton.HydratedQuickReplyButton.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.urlButton = $root.E2E.HydratedTemplateButton.HydratedURLButton.decode(reader, reader.uint32());
                        break;
                    }
                case 3: {
                        message.callButton = $root.E2E.HydratedTemplateButton.HydratedCallButton.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a HydratedTemplateButton message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.HydratedTemplateButton
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.HydratedTemplateButton} HydratedTemplateButton
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        HydratedTemplateButton.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a HydratedTemplateButton message.
         * @function verify
         * @memberof E2E.HydratedTemplateButton
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        HydratedTemplateButton.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.index != null && message.hasOwnProperty("index")) {
                properties._index = 1;
                if (!$util.isInteger(message.index))
                    return "index: integer expected";
            }
            if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) {
                properties.hydratedButton = 1;
                {
                    var error = $root.E2E.HydratedTemplateButton.HydratedQuickReplyButton.verify(message.quickReplyButton);
                    if (error)
                        return "quickReplyButton." + error;
                }
            }
            if (message.urlButton != null && message.hasOwnProperty("urlButton")) {
                if (properties.hydratedButton === 1)
                    return "hydratedButton: multiple values";
                properties.hydratedButton = 1;
                {
                    var error = $root.E2E.HydratedTemplateButton.HydratedURLButton.verify(message.urlButton);
                    if (error)
                        return "urlButton." + error;
                }
            }
            if (message.callButton != null && message.hasOwnProperty("callButton")) {
                if (properties.hydratedButton === 1)
                    return "hydratedButton: multiple values";
                properties.hydratedButton = 1;
                {
                    var error = $root.E2E.HydratedTemplateButton.HydratedCallButton.verify(message.callButton);
                    if (error)
                        return "callButton." + error;
                }
            }
            return null;
        };

        /**
         * Creates a HydratedTemplateButton message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.HydratedTemplateButton
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.HydratedTemplateButton} HydratedTemplateButton
         */
        HydratedTemplateButton.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.HydratedTemplateButton)
                return object;
            var message = new $root.E2E.HydratedTemplateButton();
            if (object.index != null)
                message.index = object.index >>> 0;
            if (object.quickReplyButton != null) {
                if (typeof object.quickReplyButton !== "object")
                    throw TypeError(".E2E.HydratedTemplateButton.quickReplyButton: object expected");
                message.quickReplyButton = $root.E2E.HydratedTemplateButton.HydratedQuickReplyButton.fromObject(object.quickReplyButton);
            }
            if (object.urlButton != null) {
                if (typeof object.urlButton !== "object")
                    throw TypeError(".E2E.HydratedTemplateButton.urlButton: object expected");
                message.urlButton = $root.E2E.HydratedTemplateButton.HydratedURLButton.fromObject(object.urlButton);
            }
            if (object.callButton != null) {
                if (typeof object.callButton !== "object")
                    throw TypeError(".E2E.HydratedTemplateButton.callButton: object expected");
                message.callButton = $root.E2E.HydratedTemplateButton.HydratedCallButton.fromObject(object.callButton);
            }
            return message;
        };

        /**
         * Creates a plain object from a HydratedTemplateButton message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.HydratedTemplateButton
         * @static
         * @param {E2E.HydratedTemplateButton} message HydratedTemplateButton
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        HydratedTemplateButton.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) {
                object.quickReplyButton = $root.E2E.HydratedTemplateButton.HydratedQuickReplyButton.toObject(message.quickReplyButton, options);
                if (options.oneofs)
                    object.hydratedButton = "quickReplyButton";
            }
            if (message.urlButton != null && message.hasOwnProperty("urlButton")) {
                object.urlButton = $root.E2E.HydratedTemplateButton.HydratedURLButton.toObject(message.urlButton, options);
                if (options.oneofs)
                    object.hydratedButton = "urlButton";
            }
            if (message.callButton != null && message.hasOwnProperty("callButton")) {
                object.callButton = $root.E2E.HydratedTemplateButton.HydratedCallButton.toObject(message.callButton, options);
                if (options.oneofs)
                    object.hydratedButton = "callButton";
            }
            if (message.index != null && message.hasOwnProperty("index")) {
                object.index = message.index;
                if (options.oneofs)
                    object._index = "index";
            }
            return object;
        };

        /**
         * Converts this HydratedTemplateButton to JSON.
         * @function toJSON
         * @memberof E2E.HydratedTemplateButton
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        HydratedTemplateButton.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for HydratedTemplateButton
         * @function getTypeUrl
         * @memberof E2E.HydratedTemplateButton
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        HydratedTemplateButton.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.HydratedTemplateButton";
        };

        HydratedTemplateButton.HydratedCallButton = (function() {

            /**
             * Properties of a HydratedCallButton.
             * @memberof E2E.HydratedTemplateButton
             * @interface IHydratedCallButton
             * @property {string|null} [displayText] HydratedCallButton displayText
             * @property {string|null} [phoneNumber] HydratedCallButton phoneNumber
             */

            /**
             * Constructs a new HydratedCallButton.
             * @memberof E2E.HydratedTemplateButton
             * @classdesc Represents a HydratedCallButton.
             * @implements IHydratedCallButton
             * @constructor
             * @param {E2E.HydratedTemplateButton.IHydratedCallButton=} [properties] Properties to set
             */
            function HydratedCallButton(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]];
            }

            /**
             * HydratedCallButton displayText.
             * @member {string|null|undefined} displayText
             * @memberof E2E.HydratedTemplateButton.HydratedCallButton
             * @instance
             */
            HydratedCallButton.prototype.displayText = null;

            /**
             * HydratedCallButton phoneNumber.
             * @member {string|null|undefined} phoneNumber
             * @memberof E2E.HydratedTemplateButton.HydratedCallButton
             * @instance
             */
            HydratedCallButton.prototype.phoneNumber = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * HydratedCallButton _displayText.
             * @member {"displayText"|undefined} _displayText
             * @memberof E2E.HydratedTemplateButton.HydratedCallButton
             * @instance
             */
            Object.defineProperty(HydratedCallButton.prototype, "_displayText", {
                get: $util.oneOfGetter($oneOfFields = ["displayText"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HydratedCallButton _phoneNumber.
             * @member {"phoneNumber"|undefined} _phoneNumber
             * @memberof E2E.HydratedTemplateButton.HydratedCallButton
             * @instance
             */
            Object.defineProperty(HydratedCallButton.prototype, "_phoneNumber", {
                get: $util.oneOfGetter($oneOfFields = ["phoneNumber"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new HydratedCallButton instance using the specified properties.
             * @function create
             * @memberof E2E.HydratedTemplateButton.HydratedCallButton
             * @static
             * @param {E2E.HydratedTemplateButton.IHydratedCallButton=} [properties] Properties to set
             * @returns {E2E.HydratedTemplateButton.HydratedCallButton} HydratedCallButton instance
             */
            HydratedCallButton.create = function create(properties) {
                return new HydratedCallButton(properties);
            };

            /**
             * Encodes the specified HydratedCallButton message. Does not implicitly {@link E2E.HydratedTemplateButton.HydratedCallButton.verify|verify} messages.
             * @function encode
             * @memberof E2E.HydratedTemplateButton.HydratedCallButton
             * @static
             * @param {E2E.HydratedTemplateButton.IHydratedCallButton} message HydratedCallButton message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HydratedCallButton.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayText);
                if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.phoneNumber);
                return writer;
            };

            /**
             * Encodes the specified HydratedCallButton message, length delimited. Does not implicitly {@link E2E.HydratedTemplateButton.HydratedCallButton.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.HydratedTemplateButton.HydratedCallButton
             * @static
             * @param {E2E.HydratedTemplateButton.IHydratedCallButton} message HydratedCallButton message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HydratedCallButton.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a HydratedCallButton message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.HydratedTemplateButton.HydratedCallButton
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.HydratedTemplateButton.HydratedCallButton} HydratedCallButton
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HydratedCallButton.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.E2E.HydratedTemplateButton.HydratedCallButton();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.displayText = reader.string();
                            break;
                        }
                    case 2: {
                            message.phoneNumber = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a HydratedCallButton message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.HydratedTemplateButton.HydratedCallButton
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.HydratedTemplateButton.HydratedCallButton} HydratedCallButton
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HydratedCallButton.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a HydratedCallButton message.
             * @function verify
             * @memberof E2E.HydratedTemplateButton.HydratedCallButton
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            HydratedCallButton.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.displayText != null && message.hasOwnProperty("displayText")) {
                    properties._displayText = 1;
                    if (!$util.isString(message.displayText))
                        return "displayText: string expected";
                }
                if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) {
                    properties._phoneNumber = 1;
                    if (!$util.isString(message.phoneNumber))
                        return "phoneNumber: string expected";
                }
                return null;
            };

            /**
             * Creates a HydratedCallButton message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.HydratedTemplateButton.HydratedCallButton
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.HydratedTemplateButton.HydratedCallButton} HydratedCallButton
             */
            HydratedCallButton.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.HydratedTemplateButton.HydratedCallButton)
                    return object;
                var message = new $root.E2E.HydratedTemplateButton.HydratedCallButton();
                if (object.displayText != null)
                    message.displayText = String(object.displayText);
                if (object.phoneNumber != null)
                    message.phoneNumber = String(object.phoneNumber);
                return message;
            };

            /**
             * Creates a plain object from a HydratedCallButton message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.HydratedTemplateButton.HydratedCallButton
             * @static
             * @param {E2E.HydratedTemplateButton.HydratedCallButton} message HydratedCallButton
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            HydratedCallButton.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.displayText != null && message.hasOwnProperty("displayText")) {
                    object.displayText = message.displayText;
                    if (options.oneofs)
                        object._displayText = "displayText";
                }
                if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) {
                    object.phoneNumber = message.phoneNumber;
                    if (options.oneofs)
                        object._phoneNumber = "phoneNumber";
                }
                return object;
            };

            /**
             * Converts this HydratedCallButton to JSON.
             * @function toJSON
             * @memberof E2E.HydratedTemplateButton.HydratedCallButton
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            HydratedCallButton.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for HydratedCallButton
             * @function getTypeUrl
             * @memberof E2E.HydratedTemplateButton.HydratedCallButton
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            HydratedCallButton.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.HydratedTemplateButton.HydratedCallButton";
            };

            return HydratedCallButton;
        })();

        HydratedTemplateButton.HydratedQuickReplyButton = (function() {

            /**
             * Properties of a HydratedQuickReplyButton.
             * @memberof E2E.HydratedTemplateButton
             * @interface IHydratedQuickReplyButton
             * @property {string|null} [displayText] HydratedQuickReplyButton displayText
             * @property {string|null} [id] HydratedQuickReplyButton id
             */

            /**
             * Constructs a new HydratedQuickReplyButton.
             * @memberof E2E.HydratedTemplateButton
             * @classdesc Represents a HydratedQuickReplyButton.
             * @implements IHydratedQuickReplyButton
             * @constructor
             * @param {E2E.HydratedTemplateButton.IHydratedQuickReplyButton=} [properties] Properties to set
             */
            function HydratedQuickReplyButton(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]];
            }

            /**
             * HydratedQuickReplyButton displayText.
             * @member {string|null|undefined} displayText
             * @memberof E2E.HydratedTemplateButton.HydratedQuickReplyButton
             * @instance
             */
            HydratedQuickReplyButton.prototype.displayText = null;

            /**
             * HydratedQuickReplyButton id.
             * @member {string|null|undefined} id
             * @memberof E2E.HydratedTemplateButton.HydratedQuickReplyButton
             * @instance
             */
            HydratedQuickReplyButton.prototype.id = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * HydratedQuickReplyButton _displayText.
             * @member {"displayText"|undefined} _displayText
             * @memberof E2E.HydratedTemplateButton.HydratedQuickReplyButton
             * @instance
             */
            Object.defineProperty(HydratedQuickReplyButton.prototype, "_displayText", {
                get: $util.oneOfGetter($oneOfFields = ["displayText"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HydratedQuickReplyButton _id.
             * @member {"id"|undefined} _id
             * @memberof E2E.HydratedTemplateButton.HydratedQuickReplyButton
             * @instance
             */
            Object.defineProperty(HydratedQuickReplyButton.prototype, "_id", {
                get: $util.oneOfGetter($oneOfFields = ["id"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new HydratedQuickReplyButton instance using the specified properties.
             * @function create
             * @memberof E2E.HydratedTemplateButton.HydratedQuickReplyButton
             * @static
             * @param {E2E.HydratedTemplateButton.IHydratedQuickReplyButton=} [properties] Properties to set
             * @returns {E2E.HydratedTemplateButton.HydratedQuickReplyButton} HydratedQuickReplyButton instance
             */
            HydratedQuickReplyButton.create = function create(properties) {
                return new HydratedQuickReplyButton(properties);
            };

            /**
             * Encodes the specified HydratedQuickReplyButton message. Does not implicitly {@link E2E.HydratedTemplateButton.HydratedQuickReplyButton.verify|verify} messages.
             * @function encode
             * @memberof E2E.HydratedTemplateButton.HydratedQuickReplyButton
             * @static
             * @param {E2E.HydratedTemplateButton.IHydratedQuickReplyButton} message HydratedQuickReplyButton message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HydratedQuickReplyButton.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayText);
                if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.id);
                return writer;
            };

            /**
             * Encodes the specified HydratedQuickReplyButton message, length delimited. Does not implicitly {@link E2E.HydratedTemplateButton.HydratedQuickReplyButton.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.HydratedTemplateButton.HydratedQuickReplyButton
             * @static
             * @param {E2E.HydratedTemplateButton.IHydratedQuickReplyButton} message HydratedQuickReplyButton message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HydratedQuickReplyButton.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a HydratedQuickReplyButton message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.HydratedTemplateButton.HydratedQuickReplyButton
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.HydratedTemplateButton.HydratedQuickReplyButton} HydratedQuickReplyButton
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HydratedQuickReplyButton.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.E2E.HydratedTemplateButton.HydratedQuickReplyButton();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.displayText = reader.string();
                            break;
                        }
                    case 2: {
                            message.id = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a HydratedQuickReplyButton message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.HydratedTemplateButton.HydratedQuickReplyButton
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.HydratedTemplateButton.HydratedQuickReplyButton} HydratedQuickReplyButton
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HydratedQuickReplyButton.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a HydratedQuickReplyButton message.
             * @function verify
             * @memberof E2E.HydratedTemplateButton.HydratedQuickReplyButton
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            HydratedQuickReplyButton.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.displayText != null && message.hasOwnProperty("displayText")) {
                    properties._displayText = 1;
                    if (!$util.isString(message.displayText))
                        return "displayText: string expected";
                }
                if (message.id != null && message.hasOwnProperty("id")) {
                    properties._id = 1;
                    if (!$util.isString(message.id))
                        return "id: string expected";
                }
                return null;
            };

            /**
             * Creates a HydratedQuickReplyButton message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.HydratedTemplateButton.HydratedQuickReplyButton
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.HydratedTemplateButton.HydratedQuickReplyButton} HydratedQuickReplyButton
             */
            HydratedQuickReplyButton.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.HydratedTemplateButton.HydratedQuickReplyButton)
                    return object;
                var message = new $root.E2E.HydratedTemplateButton.HydratedQuickReplyButton();
                if (object.displayText != null)
                    message.displayText = String(object.displayText);
                if (object.id != null)
                    message.id = String(object.id);
                return message;
            };

            /**
             * Creates a plain object from a HydratedQuickReplyButton message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.HydratedTemplateButton.HydratedQuickReplyButton
             * @static
             * @param {E2E.HydratedTemplateButton.HydratedQuickReplyButton} message HydratedQuickReplyButton
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            HydratedQuickReplyButton.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.displayText != null && message.hasOwnProperty("displayText")) {
                    object.displayText = message.displayText;
                    if (options.oneofs)
                        object._displayText = "displayText";
                }
                if (message.id != null && message.hasOwnProperty("id")) {
                    object.id = message.id;
                    if (options.oneofs)
                        object._id = "id";
                }
                return object;
            };

            /**
             * Converts this HydratedQuickReplyButton to JSON.
             * @function toJSON
             * @memberof E2E.HydratedTemplateButton.HydratedQuickReplyButton
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            HydratedQuickReplyButton.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for HydratedQuickReplyButton
             * @function getTypeUrl
             * @memberof E2E.HydratedTemplateButton.HydratedQuickReplyButton
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            HydratedQuickReplyButton.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.HydratedTemplateButton.HydratedQuickReplyButton";
            };

            return HydratedQuickReplyButton;
        })();

        HydratedTemplateButton.HydratedURLButton = (function() {

            /**
             * Properties of a HydratedURLButton.
             * @memberof E2E.HydratedTemplateButton
             * @interface IHydratedURLButton
             * @property {string|null} [displayText] HydratedURLButton displayText
             * @property {string|null} [url] HydratedURLButton url
             * @property {string|null} [consentedUsersUrl] HydratedURLButton consentedUsersUrl
             * @property {E2E.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType|null} [webviewPresentation] HydratedURLButton webviewPresentation
             */

            /**
             * Constructs a new HydratedURLButton.
             * @memberof E2E.HydratedTemplateButton
             * @classdesc Represents a HydratedURLButton.
             * @implements IHydratedURLButton
             * @constructor
             * @param {E2E.HydratedTemplateButton.IHydratedURLButton=} [properties] Properties to set
             */
            function HydratedURLButton(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]];
            }

            /**
             * HydratedURLButton displayText.
             * @member {string|null|undefined} displayText
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @instance
             */
            HydratedURLButton.prototype.displayText = null;

            /**
             * HydratedURLButton url.
             * @member {string|null|undefined} url
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @instance
             */
            HydratedURLButton.prototype.url = null;

            /**
             * HydratedURLButton consentedUsersUrl.
             * @member {string|null|undefined} consentedUsersUrl
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @instance
             */
            HydratedURLButton.prototype.consentedUsersUrl = null;

            /**
             * HydratedURLButton webviewPresentation.
             * @member {E2E.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType|null|undefined} webviewPresentation
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @instance
             */
            HydratedURLButton.prototype.webviewPresentation = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * HydratedURLButton _displayText.
             * @member {"displayText"|undefined} _displayText
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @instance
             */
            Object.defineProperty(HydratedURLButton.prototype, "_displayText", {
                get: $util.oneOfGetter($oneOfFields = ["displayText"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HydratedURLButton _url.
             * @member {"url"|undefined} _url
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @instance
             */
            Object.defineProperty(HydratedURLButton.prototype, "_url", {
                get: $util.oneOfGetter($oneOfFields = ["url"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HydratedURLButton _consentedUsersUrl.
             * @member {"consentedUsersUrl"|undefined} _consentedUsersUrl
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @instance
             */
            Object.defineProperty(HydratedURLButton.prototype, "_consentedUsersUrl", {
                get: $util.oneOfGetter($oneOfFields = ["consentedUsersUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HydratedURLButton _webviewPresentation.
             * @member {"webviewPresentation"|undefined} _webviewPresentation
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @instance
             */
            Object.defineProperty(HydratedURLButton.prototype, "_webviewPresentation", {
                get: $util.oneOfGetter($oneOfFields = ["webviewPresentation"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new HydratedURLButton instance using the specified properties.
             * @function create
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @static
             * @param {E2E.HydratedTemplateButton.IHydratedURLButton=} [properties] Properties to set
             * @returns {E2E.HydratedTemplateButton.HydratedURLButton} HydratedURLButton instance
             */
            HydratedURLButton.create = function create(properties) {
                return new HydratedURLButton(properties);
            };

            /**
             * Encodes the specified HydratedURLButton message. Does not implicitly {@link E2E.HydratedTemplateButton.HydratedURLButton.verify|verify} messages.
             * @function encode
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @static
             * @param {E2E.HydratedTemplateButton.IHydratedURLButton} message HydratedURLButton message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HydratedURLButton.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayText);
                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.url);
                if (message.consentedUsersUrl != null && Object.hasOwnProperty.call(message, "consentedUsersUrl"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.consentedUsersUrl);
                if (message.webviewPresentation != null && Object.hasOwnProperty.call(message, "webviewPresentation"))
                    writer.uint32(/* id 4, wireType 0 =*/32).int32(message.webviewPresentation);
                return writer;
            };

            /**
             * Encodes the specified HydratedURLButton message, length delimited. Does not implicitly {@link E2E.HydratedTemplateButton.HydratedURLButton.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @static
             * @param {E2E.HydratedTemplateButton.IHydratedURLButton} message HydratedURLButton message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HydratedURLButton.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a HydratedURLButton message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.HydratedTemplateButton.HydratedURLButton} HydratedURLButton
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HydratedURLButton.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.E2E.HydratedTemplateButton.HydratedURLButton();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.displayText = reader.string();
                            break;
                        }
                    case 2: {
                            message.url = reader.string();
                            break;
                        }
                    case 3: {
                            message.consentedUsersUrl = reader.string();
                            break;
                        }
                    case 4: {
                            message.webviewPresentation = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a HydratedURLButton message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.HydratedTemplateButton.HydratedURLButton} HydratedURLButton
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HydratedURLButton.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a HydratedURLButton message.
             * @function verify
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            HydratedURLButton.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.displayText != null && message.hasOwnProperty("displayText")) {
                    properties._displayText = 1;
                    if (!$util.isString(message.displayText))
                        return "displayText: string expected";
                }
                if (message.url != null && message.hasOwnProperty("url")) {
                    properties._url = 1;
                    if (!$util.isString(message.url))
                        return "url: string expected";
                }
                if (message.consentedUsersUrl != null && message.hasOwnProperty("consentedUsersUrl")) {
                    properties._consentedUsersUrl = 1;
                    if (!$util.isString(message.consentedUsersUrl))
                        return "consentedUsersUrl: string expected";
                }
                if (message.webviewPresentation != null && message.hasOwnProperty("webviewPresentation")) {
                    properties._webviewPresentation = 1;
                    switch (message.webviewPresentation) {
                    default:
                        return "webviewPresentation: enum value expected";
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a HydratedURLButton message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.HydratedTemplateButton.HydratedURLButton} HydratedURLButton
             */
            HydratedURLButton.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.HydratedTemplateButton.HydratedURLButton)
                    return object;
                var message = new $root.E2E.HydratedTemplateButton.HydratedURLButton();
                if (object.displayText != null)
                    message.displayText = String(object.displayText);
                if (object.url != null)
                    message.url = String(object.url);
                if (object.consentedUsersUrl != null)
                    message.consentedUsersUrl = String(object.consentedUsersUrl);
                switch (object.webviewPresentation) {
                default:
                    if (typeof object.webviewPresentation === "number") {
                        message.webviewPresentation = object.webviewPresentation;
                        break;
                    }
                    break;
                case "FULL":
                case 1:
                    message.webviewPresentation = 1;
                    break;
                case "TALL":
                case 2:
                    message.webviewPresentation = 2;
                    break;
                case "COMPACT":
                case 3:
                    message.webviewPresentation = 3;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a HydratedURLButton message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @static
             * @param {E2E.HydratedTemplateButton.HydratedURLButton} message HydratedURLButton
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            HydratedURLButton.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.displayText != null && message.hasOwnProperty("displayText")) {
                    object.displayText = message.displayText;
                    if (options.oneofs)
                        object._displayText = "displayText";
                }
                if (message.url != null && message.hasOwnProperty("url")) {
                    object.url = message.url;
                    if (options.oneofs)
                        object._url = "url";
                }
                if (message.consentedUsersUrl != null && message.hasOwnProperty("consentedUsersUrl")) {
                    object.consentedUsersUrl = message.consentedUsersUrl;
                    if (options.oneofs)
                        object._consentedUsersUrl = "consentedUsersUrl";
                }
                if (message.webviewPresentation != null && message.hasOwnProperty("webviewPresentation")) {
                    object.webviewPresentation = options.enums === String ? $root.E2E.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType[message.webviewPresentation] === undefined ? message.webviewPresentation : $root.E2E.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType[message.webviewPresentation] : message.webviewPresentation;
                    if (options.oneofs)
                        object._webviewPresentation = "webviewPresentation";
                }
                return object;
            };

            /**
             * Converts this HydratedURLButton to JSON.
             * @function toJSON
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            HydratedURLButton.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for HydratedURLButton
             * @function getTypeUrl
             * @memberof E2E.HydratedTemplateButton.HydratedURLButton
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            HydratedURLButton.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.HydratedTemplateButton.HydratedURLButton";
            };

            /**
             * WebviewPresentationType enum.
             * @name E2E.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType
             * @enum {number}
             * @property {number} FULL=1 FULL value
             * @property {number} TALL=2 TALL value
             * @property {number} COMPACT=3 COMPACT value
             */
            HydratedURLButton.WebviewPresentationType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[1] = "FULL"] = 1;
                values[valuesById[2] = "TALL"] = 2;
                values[valuesById[3] = "COMPACT"] = 3;
                return values;
            })();

            return HydratedURLButton;
        })();

        return HydratedTemplateButton;
    })();

    E2E.TemplateButton = (function() {

        /**
         * Properties of a TemplateButton.
         * @memberof E2E
         * @interface ITemplateButton
         * @property {number|null} [index] TemplateButton index
         * @property {E2E.TemplateButton.IQuickReplyButton|null} [quickReplyButton] TemplateButton quickReplyButton
         * @property {E2E.TemplateButton.IURLButton|null} [urlButton] TemplateButton urlButton
         * @property {E2E.TemplateButton.ICallButton|null} [callButton] TemplateButton callButton
         */

        /**
         * Constructs a new TemplateButton.
         * @memberof E2E
         * @classdesc Represents a TemplateButton.
         * @implements ITemplateButton
         * @constructor
         * @param {E2E.ITemplateButton=} [properties] Properties to set
         */
        function TemplateButton(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]];
        }

        /**
         * TemplateButton index.
         * @member {number|null|undefined} index
         * @memberof E2E.TemplateButton
         * @instance
         */
        TemplateButton.prototype.index = null;

        /**
         * TemplateButton quickReplyButton.
         * @member {E2E.TemplateButton.IQuickReplyButton|null|undefined} quickReplyButton
         * @memberof E2E.TemplateButton
         * @instance
         */
        TemplateButton.prototype.quickReplyButton = null;

        /**
         * TemplateButton urlButton.
         * @member {E2E.TemplateButton.IURLButton|null|undefined} urlButton
         * @memberof E2E.TemplateButton
         * @instance
         */
        TemplateButton.prototype.urlButton = null;

        /**
         * TemplateButton callButton.
         * @member {E2E.TemplateButton.ICallButton|null|undefined} callButton
         * @memberof E2E.TemplateButton
         * @instance
         */
        TemplateButton.prototype.callButton = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * TemplateButton _index.
         * @member {"index"|undefined} _index
         * @memberof E2E.TemplateButton
         * @instance
         */
        Object.defineProperty(TemplateButton.prototype, "_index", {
            get: $util.oneOfGetter($oneOfFields = ["index"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * TemplateButton button.
         * @member {"quickReplyButton"|"urlButton"|"callButton"|undefined} button
         * @memberof E2E.TemplateButton
         * @instance
         */
        Object.defineProperty(TemplateButton.prototype, "button", {
            get: $util.oneOfGetter($oneOfFields = ["quickReplyButton", "urlButton", "callButton"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new TemplateButton instance using the specified properties.
         * @function create
         * @memberof E2E.TemplateButton
         * @static
         * @param {E2E.ITemplateButton=} [properties] Properties to set
         * @returns {E2E.TemplateButton} TemplateButton instance
         */
        TemplateButton.create = function create(properties) {
            return new TemplateButton(properties);
        };

        /**
         * Encodes the specified TemplateButton message. Does not implicitly {@link E2E.TemplateButton.verify|verify} messages.
         * @function encode
         * @memberof E2E.TemplateButton
         * @static
         * @param {E2E.ITemplateButton} message TemplateButton message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        TemplateButton.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.quickReplyButton != null && Object.hasOwnProperty.call(message, "quickReplyButton"))
                $root.E2E.TemplateButton.QuickReplyButton.encode(message.quickReplyButton, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.urlButton != null && Object.hasOwnProperty.call(message, "urlButton"))
                $root.E2E.TemplateButton.URLButton.encode(message.urlButton, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.callButton != null && Object.hasOwnProperty.call(message, "callButton"))
                $root.E2E.TemplateButton.CallButton.encode(message.callButton, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.index != null && Object.hasOwnProperty.call(message, "index"))
                writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.index);
            return writer;
        };

        /**
         * Encodes the specified TemplateButton message, length delimited. Does not implicitly {@link E2E.TemplateButton.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.TemplateButton
         * @static
         * @param {E2E.ITemplateButton} message TemplateButton message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        TemplateButton.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a TemplateButton message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.TemplateButton
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.TemplateButton} TemplateButton
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        TemplateButton.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.E2E.TemplateButton();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 4: {
                        message.index = reader.uint32();
                        break;
                    }
                case 1: {
                        message.quickReplyButton = $root.E2E.TemplateButton.QuickReplyButton.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.urlButton = $root.E2E.TemplateButton.URLButton.decode(reader, reader.uint32());
                        break;
                    }
                case 3: {
                        message.callButton = $root.E2E.TemplateButton.CallButton.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a TemplateButton message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.TemplateButton
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.TemplateButton} TemplateButton
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        TemplateButton.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a TemplateButton message.
         * @function verify
         * @memberof E2E.TemplateButton
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        TemplateButton.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.index != null && message.hasOwnProperty("index")) {
                properties._index = 1;
                if (!$util.isInteger(message.index))
                    return "index: integer expected";
            }
            if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) {
                properties.button = 1;
                {
                    var error = $root.E2E.TemplateButton.QuickReplyButton.verify(message.quickReplyButton);
                    if (error)
                        return "quickReplyButton." + error;
                }
            }
            if (message.urlButton != null && message.hasOwnProperty("urlButton")) {
                if (properties.button === 1)
                    return "button: multiple values";
                properties.button = 1;
                {
                    var error = $root.E2E.TemplateButton.URLButton.verify(message.urlButton);
                    if (error)
                        return "urlButton." + error;
                }
            }
            if (message.callButton != null && message.hasOwnProperty("callButton")) {
                if (properties.button === 1)
                    return "button: multiple values";
                properties.button = 1;
                {
                    var error = $root.E2E.TemplateButton.CallButton.verify(message.callButton);
                    if (error)
                        return "callButton." + error;
                }
            }
            return null;
        };

        /**
         * Creates a TemplateButton message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.TemplateButton
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.TemplateButton} TemplateButton
         */
        TemplateButton.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.TemplateButton)
                return object;
            var message = new $root.E2E.TemplateButton();
            if (object.index != null)
                message.index = object.index >>> 0;
            if (object.quickReplyButton != null) {
                if (typeof object.quickReplyButton !== "object")
                    throw TypeError(".E2E.TemplateButton.quickReplyButton: object expected");
                message.quickReplyButton = $root.E2E.TemplateButton.QuickReplyButton.fromObject(object.quickReplyButton);
            }
            if (object.urlButton != null) {
                if (typeof object.urlButton !== "object")
                    throw TypeError(".E2E.TemplateButton.urlButton: object expected");
                message.urlButton = $root.E2E.TemplateButton.URLButton.fromObject(object.urlButton);
            }
            if (object.callButton != null) {
                if (typeof object.callButton !== "object")
                    throw TypeError(".E2E.TemplateButton.callButton: object expected");
                message.callButton = $root.E2E.TemplateButton.CallButton.fromObject(object.callButton);
            }
            return message;
        };

        /**
         * Creates a plain object from a TemplateButton message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.TemplateButton
         * @static
         * @param {E2E.TemplateButton} message TemplateButton
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        TemplateButton.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) {
                object.quickReplyButton = $root.E2E.TemplateButton.QuickReplyButton.toObject(message.quickReplyButton, options);
                if (options.oneofs)
                    object.button = "quickReplyButton";
            }
            if (message.urlButton != null && message.hasOwnProperty("urlButton")) {
                object.urlButton = $root.E2E.TemplateButton.URLButton.toObject(message.urlButton, options);
                if (options.oneofs)
                    object.button = "urlButton";
            }
            if (message.callButton != null && message.hasOwnProperty("callButton")) {
                object.callButton = $root.E2E.TemplateButton.CallButton.toObject(message.callButton, options);
                if (options.oneofs)
                    object.button = "callButton";
            }
            if (message.index != null && message.hasOwnProperty("index")) {
                object.index = message.index;
                if (options.oneofs)
                    object._index = "index";
            }
            return object;
        };

        /**
         * Converts this TemplateButton to JSON.
         * @function toJSON
         * @memberof E2E.TemplateButton
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        TemplateButton.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for TemplateButton
         * @function getTypeUrl
         * @memberof E2E.TemplateButton
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        TemplateButton.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.TemplateButton";
        };

        TemplateButton.CallButton = (function() {

            /**
             * Properties of a CallButton.
             * @memberof E2E.TemplateButton
             * @interface ICallButton
             * @property {E2E.Message.IHighlyStructuredMessage|null} [displayText] CallButton displayText
             * @property {E2E.Message.IHighlyStructuredMessage|null} [phoneNumber] CallButton phoneNumber
             */

            /**
             * Constructs a new CallButton.
             * @memberof E2E.TemplateButton
             * @classdesc Represents a CallButton.
             * @implements ICallButton
             * @constructor
             * @param {E2E.TemplateButton.ICallButton=} [properties] Properties to set
             */
            function CallButton(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]];
            }

            /**
             * CallButton displayText.
             * @member {E2E.Message.IHighlyStructuredMessage|null|undefined} displayText
             * @memberof E2E.TemplateButton.CallButton
             * @instance
             */
            CallButton.prototype.displayText = null;

            /**
             * CallButton phoneNumber.
             * @member {E2E.Message.IHighlyStructuredMessage|null|undefined} phoneNumber
             * @memberof E2E.TemplateButton.CallButton
             * @instance
             */
            CallButton.prototype.phoneNumber = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * CallButton _displayText.
             * @member {"displayText"|undefined} _displayText
             * @memberof E2E.TemplateButton.CallButton
             * @instance
             */
            Object.defineProperty(CallButton.prototype, "_displayText", {
                get: $util.oneOfGetter($oneOfFields = ["displayText"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * CallButton _phoneNumber.
             * @member {"phoneNumber"|undefined} _phoneNumber
             * @memberof E2E.TemplateButton.CallButton
             * @instance
             */
            Object.defineProperty(CallButton.prototype, "_phoneNumber", {
                get: $util.oneOfGetter($oneOfFields = ["phoneNumber"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new CallButton instance using the specified properties.
             * @function create
             * @memberof E2E.TemplateButton.CallButton
             * @static
             * @param {E2E.TemplateButton.ICallButton=} [properties] Properties to set
             * @returns {E2E.TemplateButton.CallButton} CallButton instance
             */
            CallButton.create = function create(properties) {
                return new CallButton(properties);
            };

            /**
             * Encodes the specified CallButton message. Does not implicitly {@link E2E.TemplateButton.CallButton.verify|verify} messages.
             * @function encode
             * @memberof E2E.TemplateButton.CallButton
             * @static
             * @param {E2E.TemplateButton.ICallButton} message CallButton message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CallButton.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText"))
                    $root.E2E.Message.HighlyStructuredMessage.encode(message.displayText, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber"))
                    $root.E2E.Message.HighlyStructuredMessage.encode(message.phoneNumber, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified CallButton message, length delimited. Does not implicitly {@link E2E.TemplateButton.CallButton.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.TemplateButton.CallButton
             * @static
             * @param {E2E.TemplateButton.ICallButton} message CallButton message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CallButton.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CallButton message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.TemplateButton.CallButton
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.TemplateButton.CallButton} CallButton
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CallButton.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.E2E.TemplateButton.CallButton();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.displayText = $root.E2E.Message.HighlyStructuredMessage.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.phoneNumber = $root.E2E.Message.HighlyStructuredMessage.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a CallButton message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.TemplateButton.CallButton
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.TemplateButton.CallButton} CallButton
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CallButton.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CallButton message.
             * @function verify
             * @memberof E2E.TemplateButton.CallButton
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CallButton.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.displayText != null && message.hasOwnProperty("displayText")) {
                    properties._displayText = 1;
                    {
                        var error = $root.E2E.Message.HighlyStructuredMessage.verify(message.displayText);
                        if (error)
                            return "displayText." + error;
                    }
                }
                if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) {
                    properties._phoneNumber = 1;
                    {
                        var error = $root.E2E.Message.HighlyStructuredMessage.verify(message.phoneNumber);
                        if (error)
                            return "phoneNumber." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a CallButton message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.TemplateButton.CallButton
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.TemplateButton.CallButton} CallButton
             */
            CallButton.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.TemplateButton.CallButton)
                    return object;
                var message = new $root.E2E.TemplateButton.CallButton();
                if (object.displayText != null) {
                    if (typeof object.displayText !== "object")
                        throw TypeError(".E2E.TemplateButton.CallButton.displayText: object expected");
                    message.displayText = $root.E2E.Message.HighlyStructuredMessage.fromObject(object.displayText);
                }
                if (object.phoneNumber != null) {
                    if (typeof object.phoneNumber !== "object")
                        throw TypeError(".E2E.TemplateButton.CallButton.phoneNumber: object expected");
                    message.phoneNumber = $root.E2E.Message.HighlyStructuredMessage.fromObject(object.phoneNumber);
                }
                return message;
            };

            /**
             * Creates a plain object from a CallButton message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.TemplateButton.CallButton
             * @static
             * @param {E2E.TemplateButton.CallButton} message CallButton
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CallButton.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.displayText != null && message.hasOwnProperty("displayText")) {
                    object.displayText = $root.E2E.Message.HighlyStructuredMessage.toObject(message.displayText, options);
                    if (options.oneofs)
                        object._displayText = "displayText";
                }
                if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) {
                    object.phoneNumber = $root.E2E.Message.HighlyStructuredMessage.toObject(message.phoneNumber, options);
                    if (options.oneofs)
                        object._phoneNumber = "phoneNumber";
                }
                return object;
            };

            /**
             * Converts this CallButton to JSON.
             * @function toJSON
             * @memberof E2E.TemplateButton.CallButton
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CallButton.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for CallButton
             * @function getTypeUrl
             * @memberof E2E.TemplateButton.CallButton
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            CallButton.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.TemplateButton.CallButton";
            };

            return CallButton;
        })();

        TemplateButton.QuickReplyButton = (function() {

            /**
             * Properties of a QuickReplyButton.
             * @memberof E2E.TemplateButton
             * @interface IQuickReplyButton
             * @property {E2E.Message.IHighlyStructuredMessage|null} [displayText] QuickReplyButton displayText
             * @property {string|null} [id] QuickReplyButton id
             */

            /**
             * Constructs a new QuickReplyButton.
             * @memberof E2E.TemplateButton
             * @classdesc Represents a QuickReplyButton.
             * @implements IQuickReplyButton
             * @constructor
             * @param {E2E.TemplateButton.IQuickReplyButton=} [properties] Properties to set
             */
            function QuickReplyButton(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]];
            }

            /**
             * QuickReplyButton displayText.
             * @member {E2E.Message.IHighlyStructuredMessage|null|undefined} displayText
             * @memberof E2E.TemplateButton.QuickReplyButton
             * @instance
             */
            QuickReplyButton.prototype.displayText = null;

            /**
             * QuickReplyButton id.
             * @member {string|null|undefined} id
             * @memberof E2E.TemplateButton.QuickReplyButton
             * @instance
             */
            QuickReplyButton.prototype.id = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * QuickReplyButton _displayText.
             * @member {"displayText"|undefined} _displayText
             * @memberof E2E.TemplateButton.QuickReplyButton
             * @instance
             */
            Object.defineProperty(QuickReplyButton.prototype, "_displayText", {
                get: $util.oneOfGetter($oneOfFields = ["displayText"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * QuickReplyButton _id.
             * @member {"id"|undefined} _id
             * @memberof E2E.TemplateButton.QuickReplyButton
             * @instance
             */
            Object.defineProperty(QuickReplyButton.prototype, "_id", {
                get: $util.oneOfGetter($oneOfFields = ["id"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new QuickReplyButton instance using the specified properties.
             * @function create
             * @memberof E2E.TemplateButton.QuickReplyButton
             * @static
             * @param {E2E.TemplateButton.IQuickReplyButton=} [properties] Properties to set
             * @returns {E2E.TemplateButton.QuickReplyButton} QuickReplyButton instance
             */
            QuickReplyButton.create = function create(properties) {
                return new QuickReplyButton(properties);
            };

            /**
             * Encodes the specified QuickReplyButton message. Does not implicitly {@link E2E.TemplateButton.QuickReplyButton.verify|verify} messages.
             * @function encode
             * @memberof E2E.TemplateButton.QuickReplyButton
             * @static
             * @param {E2E.TemplateButton.IQuickReplyButton} message QuickReplyButton message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            QuickReplyButton.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText"))
                    $root.E2E.Message.HighlyStructuredMessage.encode(message.displayText, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.id);
                return writer;
            };

            /**
             * Encodes the specified QuickReplyButton message, length delimited. Does not implicitly {@link E2E.TemplateButton.QuickReplyButton.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.TemplateButton.QuickReplyButton
             * @static
             * @param {E2E.TemplateButton.IQuickReplyButton} message QuickReplyButton message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            QuickReplyButton.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a QuickReplyButton message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.TemplateButton.QuickReplyButton
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.TemplateButton.QuickReplyButton} QuickReplyButton
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            QuickReplyButton.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.E2E.TemplateButton.QuickReplyButton();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.displayText = $root.E2E.Message.HighlyStructuredMessage.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.id = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a QuickReplyButton message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.TemplateButton.QuickReplyButton
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.TemplateButton.QuickReplyButton} QuickReplyButton
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            QuickReplyButton.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a QuickReplyButton message.
             * @function verify
             * @memberof E2E.TemplateButton.QuickReplyButton
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            QuickReplyButton.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.displayText != null && message.hasOwnProperty("displayText")) {
                    properties._displayText = 1;
                    {
                        var error = $root.E2E.Message.HighlyStructuredMessage.verify(message.displayText);
                        if (error)
                            return "displayText." + error;
                    }
                }
                if (message.id != null && message.hasOwnProperty("id")) {
                    properties._id = 1;
                    if (!$util.isString(message.id))
                        return "id: string expected";
                }
                return null;
            };

            /**
             * Creates a QuickReplyButton message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.TemplateButton.QuickReplyButton
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.TemplateButton.QuickReplyButton} QuickReplyButton
             */
            QuickReplyButton.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.TemplateButton.QuickReplyButton)
                    return object;
                var message = new $root.E2E.TemplateButton.QuickReplyButton();
                if (object.displayText != null) {
                    if (typeof object.displayText !== "object")
                        throw TypeError(".E2E.TemplateButton.QuickReplyButton.displayText: object expected");
                    message.displayText = $root.E2E.Message.HighlyStructuredMessage.fromObject(object.displayText);
                }
                if (object.id != null)
                    message.id = String(object.id);
                return message;
            };

            /**
             * Creates a plain object from a QuickReplyButton message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.TemplateButton.QuickReplyButton
             * @static
             * @param {E2E.TemplateButton.QuickReplyButton} message QuickReplyButton
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            QuickReplyButton.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.displayText != null && message.hasOwnProperty("displayText")) {
                    object.displayText = $root.E2E.Message.HighlyStructuredMessage.toObject(message.displayText, options);
                    if (options.oneofs)
                        object._displayText = "displayText";
                }
                if (message.id != null && message.hasOwnProperty("id")) {
                    object.id = message.id;
                    if (options.oneofs)
                        object._id = "id";
                }
                return object;
            };

            /**
             * Converts this QuickReplyButton to JSON.
             * @function toJSON
             * @memberof E2E.TemplateButton.QuickReplyButton
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            QuickReplyButton.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for QuickReplyButton
             * @function getTypeUrl
             * @memberof E2E.TemplateButton.QuickReplyButton
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            QuickReplyButton.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.TemplateButton.QuickReplyButton";
            };

            return QuickReplyButton;
        })();

        TemplateButton.URLButton = (function() {

            /**
             * Properties of a URLButton.
             * @memberof E2E.TemplateButton
             * @interface IURLButton
             * @property {E2E.Message.IHighlyStructuredMessage|null} [displayText] URLButton displayText
             * @property {E2E.Message.IHighlyStructuredMessage|null} [url] URLButton url
             */

            /**
             * Constructs a new URLButton.
             * @memberof E2E.TemplateButton
             * @classdesc Represents a URLButton.
             * @implements IURLButton
             * @constructor
             * @param {E2E.TemplateButton.IURLButton=} [properties] Properties to set
             */
            function URLButton(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]];
            }

            /**
             * URLButton displayText.
             * @member {E2E.Message.IHighlyStructuredMessage|null|undefined} displayText
             * @memberof E2E.TemplateButton.URLButton
             * @instance
             */
            URLButton.prototype.displayText = null;

            /**
             * URLButton url.
             * @member {E2E.Message.IHighlyStructuredMessage|null|undefined} url
             * @memberof E2E.TemplateButton.URLButton
             * @instance
             */
            URLButton.prototype.url = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * URLButton _displayText.
             * @member {"displayText"|undefined} _displayText
             * @memberof E2E.TemplateButton.URLButton
             * @instance
             */
            Object.defineProperty(URLButton.prototype, "_displayText", {
                get: $util.oneOfGetter($oneOfFields = ["displayText"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * URLButton _url.
             * @member {"url"|undefined} _url
             * @memberof E2E.TemplateButton.URLButton
             * @instance
             */
            Object.defineProperty(URLButton.prototype, "_url", {
                get: $util.oneOfGetter($oneOfFields = ["url"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new URLButton instance using the specified properties.
             * @function create
             * @memberof E2E.TemplateButton.URLButton
             * @static
             * @param {E2E.TemplateButton.IURLButton=} [properties] Properties to set
             * @returns {E2E.TemplateButton.URLButton} URLButton instance
             */
            URLButton.create = function create(properties) {
                return new URLButton(properties);
            };

            /**
             * Encodes the specified URLButton message. Does not implicitly {@link E2E.TemplateButton.URLButton.verify|verify} messages.
             * @function encode
             * @memberof E2E.TemplateButton.URLButton
             * @static
             * @param {E2E.TemplateButton.IURLButton} message URLButton message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            URLButton.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText"))
                    $root.E2E.Message.HighlyStructuredMessage.encode(message.displayText, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                    $root.E2E.Message.HighlyStructuredMessage.encode(message.url, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified URLButton message, length delimited. Does not implicitly {@link E2E.TemplateButton.URLButton.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.TemplateButton.URLButton
             * @static
             * @param {E2E.TemplateButton.IURLButton} message URLButton message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            URLButton.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a URLButton message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.TemplateButton.URLButton
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.TemplateButton.URLButton} URLButton
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            URLButton.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.E2E.TemplateButton.URLButton();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.displayText = $root.E2E.Message.HighlyStructuredMessage.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.url = $root.E2E.Message.HighlyStructuredMessage.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a URLButton message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.TemplateButton.URLButton
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.TemplateButton.URLButton} URLButton
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            URLButton.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a URLButton message.
             * @function verify
             * @memberof E2E.TemplateButton.URLButton
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            URLButton.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.displayText != null && message.hasOwnProperty("displayText")) {
                    properties._displayText = 1;
                    {
                        var error = $root.E2E.Message.HighlyStructuredMessage.verify(message.displayText);
                        if (error)
                            return "displayText." + error;
                    }
                }
                if (message.url != null && message.hasOwnProperty("url")) {
                    properties._url = 1;
                    {
                        var error = $root.E2E.Message.HighlyStructuredMessage.verify(message.url);
                        if (error)
                            return "url." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a URLButton message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.TemplateButton.URLButton
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.TemplateButton.URLButton} URLButton
             */
            URLButton.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.TemplateButton.URLButton)
                    return object;
                var message = new $root.E2E.TemplateButton.URLButton();
                if (object.displayText != null) {
                    if (typeof object.displayText !== "object")
                        throw TypeError(".E2E.TemplateButton.URLButton.displayText: object expected");
                    message.displayText = $root.E2E.Message.HighlyStructuredMessage.fromObject(object.displayText);
                }
                if (object.url != null) {
                    if (typeof object.url !== "object")
                        throw TypeError(".E2E.TemplateButton.URLButton.url: object expected");
                    message.url = $root.E2E.Message.HighlyStructuredMessage.fromObject(object.url);
                }
                return message;
            };

            /**
             * Creates a plain object from a URLButton message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.TemplateButton.URLButton
             * @static
             * @param {E2E.TemplateButton.URLButton} message URLButton
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            URLButton.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.displayText != null && message.hasOwnProperty("displayText")) {
                    object.displayText = $root.E2E.Message.HighlyStructuredMessage.toObject(message.displayText, options);
                    if (options.oneofs)
                        object._displayText = "displayText";
                }
                if (message.url != null && message.hasOwnProperty("url")) {
                    object.url = $root.E2E.Message.HighlyStructuredMessage.toObject(message.url, options);
                    if (options.oneofs)
                        object._url = "url";
                }
                return object;
            };

            /**
             * Converts this URLButton to JSON.
             * @function toJSON
             * @memberof E2E.TemplateButton.URLButton
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            URLButton.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for URLButton
             * @function getTypeUrl
             * @memberof E2E.TemplateButton.URLButton
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            URLButton.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.TemplateButton.URLButton";
            };

            return URLButton;
        })();

        return TemplateButton;
    })();

    E2E.Location = (function() {

        /**
         * Properties of a Location.
         * @memberof E2E
         * @interface ILocation
         * @property {number|null} [degreesLatitude] Location degreesLatitude
         * @property {number|null} [degreesLongitude] Location degreesLongitude
         * @property {string|null} [name] Location name
         */

        /**
         * Constructs a new Location.
         * @memberof E2E
         * @classdesc Represents a Location.
         * @implements ILocation
         * @constructor
         * @param {E2E.ILocation=} [properties] Properties to set
         */
        function Location(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]];
        }

        /**
         * Location degreesLatitude.
         * @member {number|null|undefined} degreesLatitude
         * @memberof E2E.Location
         * @instance
         */
        Location.prototype.degreesLatitude = null;

        /**
         * Location degreesLongitude.
         * @member {number|null|undefined} degreesLongitude
         * @memberof E2E.Location
         * @instance
         */
        Location.prototype.degreesLongitude = null;

        /**
         * Location name.
         * @member {string|null|undefined} name
         * @memberof E2E.Location
         * @instance
         */
        Location.prototype.name = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * Location _degreesLatitude.
         * @member {"degreesLatitude"|undefined} _degreesLatitude
         * @memberof E2E.Location
         * @instance
         */
        Object.defineProperty(Location.prototype, "_degreesLatitude", {
            get: $util.oneOfGetter($oneOfFields = ["degreesLatitude"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Location _degreesLongitude.
         * @member {"degreesLongitude"|undefined} _degreesLongitude
         * @memberof E2E.Location
         * @instance
         */
        Object.defineProperty(Location.prototype, "_degreesLongitude", {
            get: $util.oneOfGetter($oneOfFields = ["degreesLongitude"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Location _name.
         * @member {"name"|undefined} _name
         * @memberof E2E.Location
         * @instance
         */
        Object.defineProperty(Location.prototype, "_name", {
            get: $util.oneOfGetter($oneOfFields = ["name"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new Location instance using the specified properties.
         * @function create
         * @memberof E2E.Location
         * @static
         * @param {E2E.ILocation=} [properties] Properties to set
         * @returns {E2E.Location} Location instance
         */
        Location.create = function create(properties) {
            return new Location(properties);
        };

        /**
         * Encodes the specified Location message. Does not implicitly {@link E2E.Location.verify|verify} messages.
         * @function encode
         * @memberof E2E.Location
         * @static
         * @param {E2E.ILocation} message Location message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Location.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.degreesLatitude != null && Object.hasOwnProperty.call(message, "degreesLatitude"))
                writer.uint32(/* id 1, wireType 1 =*/9).double(message.degreesLatitude);
            if (message.degreesLongitude != null && Object.hasOwnProperty.call(message, "degreesLongitude"))
                writer.uint32(/* id 2, wireType 1 =*/17).double(message.degreesLongitude);
            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.name);
            return writer;
        };

        /**
         * Encodes the specified Location message, length delimited. Does not implicitly {@link E2E.Location.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.Location
         * @static
         * @param {E2E.ILocation} message Location message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Location.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Location message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.Location
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.Location} Location
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Location.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.E2E.Location();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.degreesLatitude = reader.double();
                        break;
                    }
                case 2: {
                        message.degreesLongitude = reader.double();
                        break;
                    }
                case 3: {
                        message.name = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Location message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.Location
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.Location} Location
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Location.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Location message.
         * @function verify
         * @memberof E2E.Location
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Location.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) {
                properties._degreesLatitude = 1;
                if (typeof message.degreesLatitude !== "number")
                    return "degreesLatitude: number expected";
            }
            if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) {
                properties._degreesLongitude = 1;
                if (typeof message.degreesLongitude !== "number")
                    return "degreesLongitude: number expected";
            }
            if (message.name != null && message.hasOwnProperty("name")) {
                properties._name = 1;
                if (!$util.isString(message.name))
                    return "name: string expected";
            }
            return null;
        };

        /**
         * Creates a Location message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.Location
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.Location} Location
         */
        Location.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.Location)
                return object;
            var message = new $root.E2E.Location();
            if (object.degreesLatitude != null)
                message.degreesLatitude = Number(object.degreesLatitude);
            if (object.degreesLongitude != null)
                message.degreesLongitude = Number(object.degreesLongitude);
            if (object.name != null)
                message.name = String(object.name);
            return message;
        };

        /**
         * Creates a plain object from a Location message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.Location
         * @static
         * @param {E2E.Location} message Location
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Location.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) {
                object.degreesLatitude = options.json && !isFinite(message.degreesLatitude) ? String(message.degreesLatitude) : message.degreesLatitude;
                if (options.oneofs)
                    object._degreesLatitude = "degreesLatitude";
            }
            if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) {
                object.degreesLongitude = options.json && !isFinite(message.degreesLongitude) ? String(message.degreesLongitude) : message.degreesLongitude;
                if (options.oneofs)
                    object._degreesLongitude = "degreesLongitude";
            }
            if (message.name != null && message.hasOwnProperty("name")) {
                object.name = message.name;
                if (options.oneofs)
                    object._name = "name";
            }
            return object;
        };

        /**
         * Converts this Location to JSON.
         * @function toJSON
         * @memberof E2E.Location
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Location.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for Location
         * @function getTypeUrl
         * @memberof E2E.Location
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.Location";
        };

        return Location;
    })();

    E2E.Point = (function() {

        /**
         * Properties of a Point.
         * @memberof E2E
         * @interface IPoint
         * @property {number|null} [xDeprecated] Point xDeprecated
         * @property {number|null} [yDeprecated] Point yDeprecated
         * @property {number|null} [x] Point x
         * @property {number|null} [y] Point y
         */

        /**
         * Constructs a new Point.
         * @memberof E2E
         * @classdesc Represents a Point.
         * @implements IPoint
         * @constructor
         * @param {E2E.IPoint=} [properties] Properties to set
         */
        function Point(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]];
        }

        /**
         * Point xDeprecated.
         * @member {number|null|undefined} xDeprecated
         * @memberof E2E.Point
         * @instance
         */
        Point.prototype.xDeprecated = null;

        /**
         * Point yDeprecated.
         * @member {number|null|undefined} yDeprecated
         * @memberof E2E.Point
         * @instance
         */
        Point.prototype.yDeprecated = null;

        /**
         * Point x.
         * @member {number|null|undefined} x
         * @memberof E2E.Point
         * @instance
         */
        Point.prototype.x = null;

        /**
         * Point y.
         * @member {number|null|undefined} y
         * @memberof E2E.Point
         * @instance
         */
        Point.prototype.y = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * Point _xDeprecated.
         * @member {"xDeprecated"|undefined} _xDeprecated
         * @memberof E2E.Point
         * @instance
         */
        Object.defineProperty(Point.prototype, "_xDeprecated", {
            get: $util.oneOfGetter($oneOfFields = ["xDeprecated"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Point _yDeprecated.
         * @member {"yDeprecated"|undefined} _yDeprecated
         * @memberof E2E.Point
         * @instance
         */
        Object.defineProperty(Point.prototype, "_yDeprecated", {
            get: $util.oneOfGetter($oneOfFields = ["yDeprecated"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Point _x.
         * @member {"x"|undefined} _x
         * @memberof E2E.Point
         * @instance
         */
        Object.defineProperty(Point.prototype, "_x", {
            get: $util.oneOfGetter($oneOfFields = ["x"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Point _y.
         * @member {"y"|undefined} _y
         * @memberof E2E.Point
         * @instance
         */
        Object.defineProperty(Point.prototype, "_y", {
            get: $util.oneOfGetter($oneOfFields = ["y"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new Point instance using the specified properties.
         * @function create
         * @memberof E2E.Point
         * @static
         * @param {E2E.IPoint=} [properties] Properties to set
         * @returns {E2E.Point} Point instance
         */
        Point.create = function create(properties) {
            return new Point(properties);
        };

        /**
         * Encodes the specified Point message. Does not implicitly {@link E2E.Point.verify|verify} messages.
         * @function encode
         * @memberof E2E.Point
         * @static
         * @param {E2E.IPoint} message Point message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Point.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.xDeprecated != null && Object.hasOwnProperty.call(message, "xDeprecated"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.xDeprecated);
            if (message.yDeprecated != null && Object.hasOwnProperty.call(message, "yDeprecated"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.yDeprecated);
            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                writer.uint32(/* id 3, wireType 1 =*/25).double(message.x);
            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                writer.uint32(/* id 4, wireType 1 =*/33).double(message.y);
            return writer;
        };

        /**
         * Encodes the specified Point message, length delimited. Does not implicitly {@link E2E.Point.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.Point
         * @static
         * @param {E2E.IPoint} message Point message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Point.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Point message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.Point
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.Point} Point
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Point.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.E2E.Point();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.xDeprecated = reader.int32();
                        break;
                    }
                case 2: {
                        message.yDeprecated = reader.int32();
                        break;
                    }
                case 3: {
                        message.x = reader.double();
                        break;
                    }
                case 4: {
                        message.y = reader.double();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Point message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.Point
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.Point} Point
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Point.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Point message.
         * @function verify
         * @memberof E2E.Point
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Point.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.xDeprecated != null && message.hasOwnProperty("xDeprecated")) {
                properties._xDeprecated = 1;
                if (!$util.isInteger(message.xDeprecated))
                    return "xDeprecated: integer expected";
            }
            if (message.yDeprecated != null && message.hasOwnProperty("yDeprecated")) {
                properties._yDeprecated = 1;
                if (!$util.isInteger(message.yDeprecated))
                    return "yDeprecated: integer expected";
            }
            if (message.x != null && message.hasOwnProperty("x")) {
                properties._x = 1;
                if (typeof message.x !== "number")
                    return "x: number expected";
            }
            if (message.y != null && message.hasOwnProperty("y")) {
                properties._y = 1;
                if (typeof message.y !== "number")
                    return "y: number expected";
            }
            return null;
        };

        /**
         * Creates a Point message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.Point
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.Point} Point
         */
        Point.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.Point)
                return object;
            var message = new $root.E2E.Point();
            if (object.xDeprecated != null)
                message.xDeprecated = object.xDeprecated | 0;
            if (object.yDeprecated != null)
                message.yDeprecated = object.yDeprecated | 0;
            if (object.x != null)
                message.x = Number(object.x);
            if (object.y != null)
                message.y = Number(object.y);
            return message;
        };

        /**
         * Creates a plain object from a Point message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.Point
         * @static
         * @param {E2E.Point} message Point
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Point.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.xDeprecated != null && message.hasOwnProperty("xDeprecated")) {
                object.xDeprecated = message.xDeprecated;
                if (options.oneofs)
                    object._xDeprecated = "xDeprecated";
            }
            if (message.yDeprecated != null && message.hasOwnProperty("yDeprecated")) {
                object.yDeprecated = message.yDeprecated;
                if (options.oneofs)
                    object._yDeprecated = "yDeprecated";
            }
            if (message.x != null && message.hasOwnProperty("x")) {
                object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x;
                if (options.oneofs)
                    object._x = "x";
            }
            if (message.y != null && message.hasOwnProperty("y")) {
                object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y;
                if (options.oneofs)
                    object._y = "y";
            }
            return object;
        };

        /**
         * Converts this Point to JSON.
         * @function toJSON
         * @memberof E2E.Point
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Point.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for Point
         * @function getTypeUrl
         * @memberof E2E.Point
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        Point.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.Point";
        };

        return Point;
    })();

    E2E.InteractiveAnnotation = (function() {

        /**
         * Properties of an InteractiveAnnotation.
         * @memberof E2E
         * @interface IInteractiveAnnotation
         * @property {Array.<E2E.IPoint>|null} [polygonVertices] InteractiveAnnotation polygonVertices
         * @property {boolean|null} [shouldSkipConfirmation] InteractiveAnnotation shouldSkipConfirmation
         * @property {E2E.IEmbeddedContent|null} [embeddedContent] InteractiveAnnotation embeddedContent
         * @property {E2E.InteractiveAnnotation.StatusLinkType|null} [statusLinkType] InteractiveAnnotation statusLinkType
         * @property {E2E.ILocation|null} [location] InteractiveAnnotation location
         * @property {E2E.ContextInfo.IForwardedNewsletterMessageInfo|null} [newsletter] InteractiveAnnotation newsletter
         * @property {boolean|null} [embeddedAction] InteractiveAnnotation embeddedAction
         * @property {E2E.ITapLinkAction|null} [tapAction] InteractiveAnnotation tapAction
         */

        /**
         * Constructs a new InteractiveAnnotation.
         * @memberof E2E
         * @classdesc Represents an InteractiveAnnotation.
         * @implements IInteractiveAnnotation
         * @constructor
         * @param {E2E.IInteractiveAnnotation=} [properties] Properties to set
         */
        function InteractiveAnnotation(properties) {
            this.polygonVertices = [];
            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]];
        }

        /**
         * InteractiveAnnotation polygonVertices.
         * @member {Array.<E2E.IPoint>} polygonVertices
         * @memberof E2E.InteractiveAnnotation
         * @instance
         */
        InteractiveAnnotation.prototype.polygonVertices = $util.emptyArray;

        /**
         * InteractiveAnnotation shouldSkipConfirmation.
         * @member {boolean|null|undefined} shouldSkipConfirmation
         * @memberof E2E.InteractiveAnnotation
         * @instance
         */
        InteractiveAnnotation.prototype.shouldSkipConfirmation = null;

        /**
         * InteractiveAnnotation embeddedContent.
         * @member {E2E.IEmbeddedContent|null|undefined} embeddedContent
         * @memberof E2E.InteractiveAnnotation
         * @instance
         */
        InteractiveAnnotation.prototype.embeddedContent = null;

        /**
         * InteractiveAnnotation statusLinkType.
         * @member {E2E.InteractiveAnnotation.StatusLinkType|null|undefined} statusLinkType
         * @memberof E2E.InteractiveAnnotation
         * @instance
         */
        InteractiveAnnotation.prototype.statusLinkType = null;

        /**
         * InteractiveAnnotation location.
         * @member {E2E.ILocation|null|undefined} location
         * @memberof E2E.InteractiveAnnotation
         * @instance
         */
        InteractiveAnnotation.prototype.location = null;

        /**
         * InteractiveAnnotation newsletter.
         * @member {E2E.ContextInfo.IForwardedNewsletterMessageInfo|null|undefined} newsletter
         * @memberof E2E.InteractiveAnnotation
         * @instance
         */
        InteractiveAnnotation.prototype.newsletter = null;

        /**
         * InteractiveAnnotation embeddedAction.
         * @member {boolean|null|undefined} embeddedAction
         * @memberof E2E.InteractiveAnnotation
         * @instance
         */
        InteractiveAnnotation.prototype.embeddedAction = null;

        /**
         * InteractiveAnnotation tapAction.
         * @member {E2E.ITapLinkAction|null|undefined} tapAction
         * @memberof E2E.InteractiveAnnotation
         * @instance
         */
        InteractiveAnnotation.prototype.tapAction = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * InteractiveAnnotation _shouldSkipConfirmation.
         * @member {"shouldSkipConfirmation"|undefined} _shouldSkipConfirmation
         * @memberof E2E.InteractiveAnnotation
         * @instance
         */
        Object.defineProperty(InteractiveAnnotation.prototype, "_shouldSkipConfirmation", {
            get: $util.oneOfGetter($oneOfFields = ["shouldSkipConfirmation"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InteractiveAnnotation _embeddedContent.
         * @member {"embeddedContent"|undefined} _embeddedContent
         * @memberof E2E.InteractiveAnnotation
         * @instance
         */
        Object.defineProperty(InteractiveAnnotation.prototype, "_embeddedContent", {
            get: $util.oneOfGetter($oneOfFields = ["embeddedContent"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InteractiveAnnotation _statusLinkType.
         * @member {"statusLinkType"|undefined} _statusLinkType
         * @memberof E2E.InteractiveAnnotation
         * @instance
         */
        Object.defineProperty(InteractiveAnnotation.prototype, "_statusLinkType", {
            get: $util.oneOfGetter($oneOfFields = ["statusLinkType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InteractiveAnnotation action.
         * @member {"location"|"newsletter"|"embeddedAction"|"tapAction"|undefined} action
         * @memberof E2E.InteractiveAnnotation
         * @instance
         */
        Object.defineProperty(InteractiveAnnotation.prototype, "action", {
            get: $util.oneOfGetter($oneOfFields = ["location", "newsletter", "embeddedAction", "tapAction"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new InteractiveAnnotation instance using the specified properties.
         * @function create
         * @memberof E2E.InteractiveAnnotation
         * @static
         * @param {E2E.IInteractiveAnnotation=} [properties] Properties to set
         * @returns {E2E.InteractiveAnnotation} InteractiveAnnotation instance
         */
        InteractiveAnnotation.create = function create(properties) {
            return new InteractiveAnnotation(properties);
        };

        /**
         * Encodes the specified InteractiveAnnotation message. Does not implicitly {@link E2E.InteractiveAnnotation.verify|verify} messages.
         * @function encode
         * @memberof E2E.InteractiveAnnotation
         * @static
         * @param {E2E.IInteractiveAnnotation} message InteractiveAnnotation message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        InteractiveAnnotation.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.polygonVertices != null && message.polygonVertices.length)
                for (var i = 0; i < message.polygonVertices.length; ++i)
                    $root.E2E.Point.encode(message.polygonVertices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.location != null && Object.hasOwnProperty.call(message, "location"))
                $root.E2E.Location.encode(message.location, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.newsletter != null && Object.hasOwnProperty.call(message, "newsletter"))
                $root.E2E.ContextInfo.ForwardedNewsletterMessageInfo.encode(message.newsletter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.shouldSkipConfirmation != null && Object.hasOwnProperty.call(message, "shouldSkipConfirmation"))
                writer.uint32(/* id 4, wireType 0 =*/32).bool(message.shouldSkipConfirmation);
            if (message.embeddedContent != null && Object.hasOwnProperty.call(message, "embeddedContent"))
                $root.E2E.EmbeddedContent.encode(message.embeddedContent, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
            if (message.embeddedAction != null && Object.hasOwnProperty.call(message, "embeddedAction"))
                writer.uint32(/* id 6, wireType 0 =*/48).bool(message.embeddedAction);
            if (message.tapAction != null && Object.hasOwnProperty.call(message, "tapAction"))
                $root.E2E.TapLinkAction.encode(message.tapAction, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
            if (message.statusLinkType != null && Object.hasOwnProperty.call(message, "statusLinkType"))
                writer.uint32(/* id 8, wireType 0 =*/64).int32(message.statusLinkType);
            return writer;
        };

        /**
         * Encodes the specified InteractiveAnnotation message, length delimited. Does not implicitly {@link E2E.InteractiveAnnotation.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.InteractiveAnnotation
         * @static
         * @param {E2E.IInteractiveAnnotation} message InteractiveAnnotation message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        InteractiveAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes an InteractiveAnnotation message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.InteractiveAnnotation
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.InteractiveAnnotation} InteractiveAnnotation
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        InteractiveAnnotation.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.E2E.InteractiveAnnotation();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        if (!(message.polygonVertices && message.polygonVertices.length))
                            message.polygonVertices = [];
                        message.polygonVertices.push($root.E2E.Point.decode(reader, reader.uint32()));
                        break;
                    }
                case 4: {
                        message.shouldSkipConfirmation = reader.bool();
                        break;
                    }
                case 5: {
                        message.embeddedContent = $root.E2E.EmbeddedContent.decode(reader, reader.uint32());
                        break;
                    }
                case 8: {
                        message.statusLinkType = reader.int32();
                        break;
                    }
                case 2: {
                        message.location = $root.E2E.Location.decode(reader, reader.uint32());
                        break;
                    }
                case 3: {
                        message.newsletter = $root.E2E.ContextInfo.ForwardedNewsletterMessageInfo.decode(reader, reader.uint32());
                        break;
                    }
                case 6: {
                        message.embeddedAction = reader.bool();
                        break;
                    }
                case 7: {
                        message.tapAction = $root.E2E.TapLinkAction.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes an InteractiveAnnotation message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.InteractiveAnnotation
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.InteractiveAnnotation} InteractiveAnnotation
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        InteractiveAnnotation.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies an InteractiveAnnotation message.
         * @function verify
         * @memberof E2E.InteractiveAnnotation
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        InteractiveAnnotation.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.polygonVertices != null && message.hasOwnProperty("polygonVertices")) {
                if (!Array.isArray(message.polygonVertices))
                    return "polygonVertices: array expected";
                for (var i = 0; i < message.polygonVertices.length; ++i) {
                    var error = $root.E2E.Point.verify(message.polygonVertices[i]);
                    if (error)
                        return "polygonVertices." + error;
                }
            }
            if (message.shouldSkipConfirmation != null && message.hasOwnProperty("shouldSkipConfirmation")) {
                properties._shouldSkipConfirmation = 1;
                if (typeof message.shouldSkipConfirmation !== "boolean")
                    return "shouldSkipConfirmation: boolean expected";
            }
            if (message.embeddedContent != null && message.hasOwnProperty("embeddedContent")) {
                properties._embeddedContent = 1;
                {
                    var error = $root.E2E.EmbeddedContent.verify(message.embeddedContent);
                    if (error)
                        return "embeddedContent." + error;
                }
            }
            if (message.statusLinkType != null && message.hasOwnProperty("statusLinkType")) {
                properties._statusLinkType = 1;
                switch (message.statusLinkType) {
                default:
                    return "statusLinkType: enum value expected";
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.location != null && message.hasOwnProperty("location")) {
                properties.action = 1;
                {
                    var error = $root.E2E.Location.verify(message.location);
                    if (error)
                        return "location." + error;
                }
            }
            if (message.newsletter != null && message.hasOwnProperty("newsletter")) {
                if (properties.action === 1)
                    return "action: multiple values";
                properties.action = 1;
                {
                    var error = $root.E2E.ContextInfo.ForwardedNewsletterMessageInfo.verify(message.newsletter);
                    if (error)
                        return "newsletter." + error;
                }
            }
            if (message.embeddedAction != null && message.hasOwnProperty("embeddedAction")) {
                if (properties.action === 1)
                    return "action: multiple values";
                properties.action = 1;
                if (typeof message.embeddedAction !== "boolean")
                    return "embeddedAction: boolean expected";
            }
            if (message.tapAction != null && message.hasOwnProperty("tapAction")) {
                if (properties.action === 1)
                    return "action: multiple values";
                properties.action = 1;
                {
                    var error = $root.E2E.TapLinkAction.verify(message.tapAction);
                    if (error)
                        return "tapAction." + error;
                }
            }
            return null;
        };

        /**
         * Creates an InteractiveAnnotation message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.InteractiveAnnotation
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.InteractiveAnnotation} InteractiveAnnotation
         */
        InteractiveAnnotation.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.InteractiveAnnotation)
                return object;
            var message = new $root.E2E.InteractiveAnnotation();
            if (object.polygonVertices) {
                if (!Array.isArray(object.polygonVertices))
                    throw TypeError(".E2E.InteractiveAnnotation.polygonVertices: array expected");
                message.polygonVertices = [];
                for (var i = 0; i < object.polygonVertices.length; ++i) {
                    if (typeof object.polygonVertices[i] !== "object")
                        throw TypeError(".E2E.InteractiveAnnotation.polygonVertices: object expected");
                    message.polygonVertices[i] = $root.E2E.Point.fromObject(object.polygonVertices[i]);
                }
            }
            if (object.shouldSkipConfirmation != null)
                message.shouldSkipConfirmation = Boolean(object.shouldSkipConfirmation);
            if (object.embeddedContent != null) {
                if (typeof object.embeddedContent !== "object")
                    throw TypeError(".E2E.InteractiveAnnotation.embeddedContent: object expected");
                message.embeddedContent = $root.E2E.EmbeddedContent.fromObject(object.embeddedContent);
            }
            switch (object.statusLinkType) {
            default:
                if (typeof object.statusLinkType === "number") {
                    message.statusLinkType = object.statusLinkType;
                    break;
                }
                break;
            case "RASTERIZED_LINK_PREVIEW":
            case 1:
                message.statusLinkType = 1;
                break;
            case "RASTERIZED_LINK_TRUNCATED":
            case 2:
                message.statusLinkType = 2;
                break;
            case "RASTERIZED_LINK_FULL_URL":
            case 3:
                message.statusLinkType = 3;
                break;
            }
            if (object.location != null) {
                if (typeof object.location !== "object")
                    throw TypeError(".E2E.InteractiveAnnotation.location: object expected");
                message.location = $root.E2E.Location.fromObject(object.location);
            }
            if (object.newsletter != null) {
                if (typeof object.newsletter !== "object")
                    throw TypeError(".E2E.InteractiveAnnotation.newsletter: object expected");
                message.newsletter = $root.E2E.ContextInfo.ForwardedNewsletterMessageInfo.fromObject(object.newsletter);
            }
            if (object.embeddedAction != null)
                message.embeddedAction = Boolean(object.embeddedAction);
            if (object.tapAction != null) {
                if (typeof object.tapAction !== "object")
                    throw TypeError(".E2E.InteractiveAnnotation.tapAction: object expected");
                message.tapAction = $root.E2E.TapLinkAction.fromObject(object.tapAction);
            }
            return message;
        };

        /**
         * Creates a plain object from an InteractiveAnnotation message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.InteractiveAnnotation
         * @static
         * @param {E2E.InteractiveAnnotation} message InteractiveAnnotation
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        InteractiveAnnotation.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.polygonVertices = [];
            if (message.polygonVertices && message.polygonVertices.length) {
                object.polygonVertices = [];
                for (var j = 0; j < message.polygonVertices.length; ++j)
                    object.polygonVertices[j] = $root.E2E.Point.toObject(message.polygonVertices[j], options);
            }
            if (message.location != null && message.hasOwnProperty("location")) {
                object.location = $root.E2E.Location.toObject(message.location, options);
                if (options.oneofs)
                    object.action = "location";
            }
            if (message.newsletter != null && message.hasOwnProperty("newsletter")) {
                object.newsletter = $root.E2E.ContextInfo.ForwardedNewsletterMessageInfo.toObject(message.newsletter, options);
                if (options.oneofs)
                    object.action = "newsletter";
            }
            if (message.shouldSkipConfirmation != null && message.hasOwnProperty("shouldSkipConfirmation")) {
                object.shouldSkipConfirmation = message.shouldSkipConfirmation;
                if (options.oneofs)
                    object._shouldSkipConfirmation = "shouldSkipConfirmation";
            }
            if (message.embeddedContent != null && message.hasOwnProperty("embeddedContent")) {
                object.embeddedContent = $root.E2E.EmbeddedContent.toObject(message.embeddedContent, options);
                if (options.oneofs)
                    object._embeddedContent = "embeddedContent";
            }
            if (message.embeddedAction != null && message.hasOwnProperty("embeddedAction")) {
                object.embeddedAction = message.embeddedAction;
                if (options.oneofs)
                    object.action = "embeddedAction";
            }
            if (message.tapAction != null && message.hasOwnProperty("tapAction")) {
                object.tapAction = $root.E2E.TapLinkAction.toObject(message.tapAction, options);
                if (options.oneofs)
                    object.action = "tapAction";
            }
            if (message.statusLinkType != null && message.hasOwnProperty("statusLinkType")) {
                object.statusLinkType = options.enums === String ? $root.E2E.InteractiveAnnotation.StatusLinkType[message.statusLinkType] === undefined ? message.statusLinkType : $root.E2E.InteractiveAnnotation.StatusLinkType[message.statusLinkType] : message.statusLinkType;
                if (options.oneofs)
                    object._statusLinkType = "statusLinkType";
            }
            return object;
        };

        /**
         * Converts this InteractiveAnnotation to JSON.
         * @function toJSON
         * @memberof E2E.InteractiveAnnotation
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        InteractiveAnnotation.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for InteractiveAnnotation
         * @function getTypeUrl
         * @memberof E2E.InteractiveAnnotation
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        InteractiveAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.InteractiveAnnotation";
        };

        /**
         * StatusLinkType enum.
         * @name E2E.InteractiveAnnotation.StatusLinkType
         * @enum {number}
         * @property {number} RASTERIZED_LINK_PREVIEW=1 RASTERIZED_LINK_PREVIEW value
         * @property {number} RASTERIZED_LINK_TRUNCATED=2 RASTERIZED_LINK_TRUNCATED value
         * @property {number} RASTERIZED_LINK_FULL_URL=3 RASTERIZED_LINK_FULL_URL value
         */
        InteractiveAnnotation.StatusLinkType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[1] = "RASTERIZED_LINK_PREVIEW"] = 1;
            values[valuesById[2] = "RASTERIZED_LINK_TRUNCATED"] = 2;
            values[valuesById[3] = "RASTERIZED_LINK_FULL_URL"] = 3;
            return values;
        })();

        return InteractiveAnnotation;
    })();

    E2E.TapLinkAction = (function() {

        /**
         * Properties of a TapLinkAction.
         * @memberof E2E
         * @interface ITapLinkAction
         * @property {string|null} [title] TapLinkAction title
         * @property {string|null} [tapUrl] TapLinkAction tapUrl
         */

        /**
         * Constructs a new TapLinkAction.
         * @memberof E2E
         * @classdesc Represents a TapLinkAction.
         * @implements ITapLinkAction
         * @constructor
         * @param {E2E.ITapLinkAction=} [properties] Properties to set
         */
        function TapLinkAction(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]];
        }

        /**
         * TapLinkAction title.
         * @member {string|null|undefined} title
         * @memberof E2E.TapLinkAction
         * @instance
         */
        TapLinkAction.prototype.title = null;

        /**
         * TapLinkAction tapUrl.
         * @member {string|null|undefined} tapUrl
         * @memberof E2E.TapLinkAction
         * @instance
         */
        TapLinkAction.prototype.tapUrl = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * TapLinkAction _title.
         * @member {"title"|undefined} _title
         * @memberof E2E.TapLinkAction
         * @instance
         */
        Object.defineProperty(TapLinkAction.prototype, "_title", {
            get: $util.oneOfGetter($oneOfFields = ["title"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * TapLinkAction _tapUrl.
         * @member {"tapUrl"|undefined} _tapUrl
         * @memberof E2E.TapLinkAction
         * @instance
         */
        Object.defineProperty(TapLinkAction.prototype, "_tapUrl", {
            get: $util.oneOfGetter($oneOfFields = ["tapUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new TapLinkAction instance using the specified properties.
         * @function create
         * @memberof E2E.TapLinkAction
         * @static
         * @param {E2E.ITapLinkAction=} [properties] Properties to set
         * @returns {E2E.TapLinkAction} TapLinkAction instance
         */
        TapLinkAction.create = function create(properties) {
            return new TapLinkAction(properties);
        };

        /**
         * Encodes the specified TapLinkAction message. Does not implicitly {@link E2E.TapLinkAction.verify|verify} messages.
         * @function encode
         * @memberof E2E.TapLinkAction
         * @static
         * @param {E2E.ITapLinkAction} message TapLinkAction message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        TapLinkAction.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.title);
            if (message.tapUrl != null && Object.hasOwnProperty.call(message, "tapUrl"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.tapUrl);
            return writer;
        };

        /**
         * Encodes the specified TapLinkAction message, length delimited. Does not implicitly {@link E2E.TapLinkAction.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.TapLinkAction
         * @static
         * @param {E2E.ITapLinkAction} message TapLinkAction message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        TapLinkAction.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a TapLinkAction message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.TapLinkAction
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.TapLinkAction} TapLinkAction
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        TapLinkAction.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.E2E.TapLinkAction();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.title = reader.string();
                        break;
                    }
                case 2: {
                        message.tapUrl = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a TapLinkAction message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.TapLinkAction
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.TapLinkAction} TapLinkAction
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        TapLinkAction.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a TapLinkAction message.
         * @function verify
         * @memberof E2E.TapLinkAction
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        TapLinkAction.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.title != null && message.hasOwnProperty("title")) {
                properties._title = 1;
                if (!$util.isString(message.title))
                    return "title: string expected";
            }
            if (message.tapUrl != null && message.hasOwnProperty("tapUrl")) {
                properties._tapUrl = 1;
                if (!$util.isString(message.tapUrl))
                    return "tapUrl: string expected";
            }
            return null;
        };

        /**
         * Creates a TapLinkAction message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.TapLinkAction
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.TapLinkAction} TapLinkAction
         */
        TapLinkAction.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.TapLinkAction)
                return object;
            var message = new $root.E2E.TapLinkAction();
            if (object.title != null)
                message.title = String(object.title);
            if (object.tapUrl != null)
                message.tapUrl = String(object.tapUrl);
            return message;
        };

        /**
         * Creates a plain object from a TapLinkAction message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.TapLinkAction
         * @static
         * @param {E2E.TapLinkAction} message TapLinkAction
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        TapLinkAction.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.title != null && message.hasOwnProperty("title")) {
                object.title = message.title;
                if (options.oneofs)
                    object._title = "title";
            }
            if (message.tapUrl != null && message.hasOwnProperty("tapUrl")) {
                object.tapUrl = message.tapUrl;
                if (options.oneofs)
                    object._tapUrl = "tapUrl";
            }
            return object;
        };

        /**
         * Converts this TapLinkAction to JSON.
         * @function toJSON
         * @memberof E2E.TapLinkAction
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        TapLinkAction.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for TapLinkAction
         * @function getTypeUrl
         * @memberof E2E.TapLinkAction
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        TapLinkAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.TapLinkAction";
        };

        return TapLinkAction;
    })();

    E2E.EmbeddedContent = (function() {

        /**
         * Properties of an EmbeddedContent.
         * @memberof E2E
         * @interface IEmbeddedContent
         * @property {E2E.IEmbeddedMessage|null} [embeddedMessage] EmbeddedContent embeddedMessage
         * @property {E2E.IEmbeddedMusic|null} [embeddedMusic] EmbeddedContent embeddedMusic
         */

        /**
         * Constructs a new EmbeddedContent.
         * @memberof E2E
         * @classdesc Represents an EmbeddedContent.
         * @implements IEmbeddedContent
         * @constructor
         * @param {E2E.IEmbeddedContent=} [properties] Properties to set
         */
        function EmbeddedContent(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]];
        }

        /**
         * EmbeddedContent embeddedMessage.
         * @member {E2E.IEmbeddedMessage|null|undefined} embeddedMessage
         * @memberof E2E.EmbeddedContent
         * @instance
         */
        EmbeddedContent.prototype.embeddedMessage = null;

        /**
         * EmbeddedContent embeddedMusic.
         * @member {E2E.IEmbeddedMusic|null|undefined} embeddedMusic
         * @memberof E2E.EmbeddedContent
         * @instance
         */
        EmbeddedContent.prototype.embeddedMusic = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * EmbeddedContent content.
         * @member {"embeddedMessage"|"embeddedMusic"|undefined} content
         * @memberof E2E.EmbeddedContent
         * @instance
         */
        Object.defineProperty(EmbeddedContent.prototype, "content", {
            get: $util.oneOfGetter($oneOfFields = ["embeddedMessage", "embeddedMusic"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new EmbeddedContent instance using the specified properties.
         * @function create
         * @memberof E2E.EmbeddedContent
         * @static
         * @param {E2E.IEmbeddedContent=} [properties] Properties to set
         * @returns {E2E.EmbeddedContent} EmbeddedContent instance
         */
        EmbeddedContent.create = function create(properties) {
            return new EmbeddedContent(properties);
        };

        /**
         * Encodes the specified EmbeddedContent message. Does not implicitly {@link E2E.EmbeddedContent.verify|verify} messages.
         * @function encode
         * @memberof E2E.EmbeddedContent
         * @static
         * @param {E2E.IEmbeddedContent} message EmbeddedContent message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        EmbeddedContent.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.embeddedMessage != null && Object.hasOwnProperty.call(message, "embeddedMessage"))
                $root.E2E.EmbeddedMessage.encode(message.embeddedMessage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.embeddedMusic != null && Object.hasOwnProperty.call(message, "embeddedMusic"))
                $root.E2E.EmbeddedMusic.encode(message.embeddedMusic, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified EmbeddedContent message, length delimited. Does not implicitly {@link E2E.EmbeddedContent.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.EmbeddedContent
         * @static
         * @param {E2E.IEmbeddedContent} message EmbeddedContent message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        EmbeddedContent.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes an EmbeddedContent message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.EmbeddedContent
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.EmbeddedContent} EmbeddedContent
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        EmbeddedContent.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.E2E.EmbeddedContent();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.embeddedMessage = $root.E2E.EmbeddedMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.embeddedMusic = $root.E2E.EmbeddedMusic.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes an EmbeddedContent message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.EmbeddedContent
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.EmbeddedContent} EmbeddedContent
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        EmbeddedContent.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies an EmbeddedContent message.
         * @function verify
         * @memberof E2E.EmbeddedContent
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        EmbeddedContent.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.embeddedMessage != null && message.hasOwnProperty("embeddedMessage")) {
                properties.content = 1;
                {
                    var error = $root.E2E.EmbeddedMessage.verify(message.embeddedMessage);
                    if (error)
                        return "embeddedMessage." + error;
                }
            }
            if (message.embeddedMusic != null && message.hasOwnProperty("embeddedMusic")) {
                if (properties.content === 1)
                    return "content: multiple values";
                properties.content = 1;
                {
                    var error = $root.E2E.EmbeddedMusic.verify(message.embeddedMusic);
                    if (error)
                        return "embeddedMusic." + error;
                }
            }
            return null;
        };

        /**
         * Creates an EmbeddedContent message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.EmbeddedContent
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.EmbeddedContent} EmbeddedContent
         */
        EmbeddedContent.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.EmbeddedContent)
                return object;
            var message = new $root.E2E.EmbeddedContent();
            if (object.embeddedMessage != null) {
                if (typeof object.embeddedMessage !== "object")
                    throw TypeError(".E2E.EmbeddedContent.embeddedMessage: object expected");
                message.embeddedMessage = $root.E2E.EmbeddedMessage.fromObject(object.embeddedMessage);
            }
            if (object.embeddedMusic != null) {
                if (typeof object.embeddedMusic !== "object")
                    throw TypeError(".E2E.EmbeddedContent.embeddedMusic: object expected");
                message.embeddedMusic = $root.E2E.EmbeddedMusic.fromObject(object.embeddedMusic);
            }
            return message;
        };

        /**
         * Creates a plain object from an EmbeddedContent message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.EmbeddedContent
         * @static
         * @param {E2E.EmbeddedContent} message EmbeddedContent
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        EmbeddedContent.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.embeddedMessage != null && message.hasOwnProperty("embeddedMessage")) {
                object.embeddedMessage = $root.E2E.EmbeddedMessage.toObject(message.embeddedMessage, options);
                if (options.oneofs)
                    object.content = "embeddedMessage";
            }
            if (message.embeddedMusic != null && message.hasOwnProperty("embeddedMusic")) {
                object.embeddedMusic = $root.E2E.EmbeddedMusic.toObject(message.embeddedMusic, options);
                if (options.oneofs)
                    object.content = "embeddedMusic";
            }
            return object;
        };

        /**
         * Converts this EmbeddedContent to JSON.
         * @function toJSON
         * @memberof E2E.EmbeddedContent
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        EmbeddedContent.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for EmbeddedContent
         * @function getTypeUrl
         * @memberof E2E.EmbeddedContent
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        EmbeddedContent.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.EmbeddedContent";
        };

        return EmbeddedContent;
    })();

    E2E.EmbeddedMusic = (function() {

        /**
         * Properties of an EmbeddedMusic.
         * @memberof E2E
         * @interface IEmbeddedMusic
         * @property {string|null} [musicContentMediaId] EmbeddedMusic musicContentMediaId
         * @property {string|null} [songId] EmbeddedMusic songId
         * @property {string|null} [author] EmbeddedMusic author
         * @property {string|null} [title] EmbeddedMusic title
         * @property {string|null} [artworkDirectPath] EmbeddedMusic artworkDirectPath
         * @property {Uint8Array|null} [artworkSha256] EmbeddedMusic artworkSha256
         * @property {Uint8Array|null} [artworkEncSha256] EmbeddedMusic artworkEncSha256
         * @property {string|null} [artistAttribution] EmbeddedMusic artistAttribution
         * @property {Uint8Array|null} [countryBlocklist] EmbeddedMusic countryBlocklist
         * @property {boolean|null} [isExplicit] EmbeddedMusic isExplicit
         * @property {Uint8Array|null} [artworkMediaKey] EmbeddedMusic artworkMediaKey
         * @property {number|Long|null} [musicSongStartTimeInMs] EmbeddedMusic musicSongStartTimeInMs
         * @property {number|Long|null} [derivedContentStartTimeInMs] EmbeddedMusic derivedContentStartTimeInMs
         * @property {number|Long|null} [overlapDurationInMs] EmbeddedMusic overlapDurationInMs
         */

        /**
         * Constructs a new EmbeddedMusic.
         * @memberof E2E
         * @classdesc Represents an EmbeddedMusic.
         * @implements IEmbeddedMusic
         * @constructor
         * @param {E2E.IEmbeddedMusic=} [properties] Properties to set
         */
        function EmbeddedMusic(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]];
        }

        /**
         * EmbeddedMusic musicContentMediaId.
         * @member {string|null|undefined} musicContentMediaId
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.musicContentMediaId = null;

        /**
         * EmbeddedMusic songId.
         * @member {string|null|undefined} songId
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.songId = null;

        /**
         * EmbeddedMusic author.
         * @member {string|null|undefined} author
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.author = null;

        /**
         * EmbeddedMusic title.
         * @member {string|null|undefined} title
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.title = null;

        /**
         * EmbeddedMusic artworkDirectPath.
         * @member {string|null|undefined} artworkDirectPath
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.artworkDirectPath = null;

        /**
         * EmbeddedMusic artworkSha256.
         * @member {Uint8Array|null|undefined} artworkSha256
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.artworkSha256 = null;

        /**
         * EmbeddedMusic artworkEncSha256.
         * @member {Uint8Array|null|undefined} artworkEncSha256
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.artworkEncSha256 = null;

        /**
         * EmbeddedMusic artistAttribution.
         * @member {string|null|undefined} artistAttribution
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.artistAttribution = null;

        /**
         * EmbeddedMusic countryBlocklist.
         * @member {Uint8Array|null|undefined} countryBlocklist
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.countryBlocklist = null;

        /**
         * EmbeddedMusic isExplicit.
         * @member {boolean|null|undefined} isExplicit
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.isExplicit = null;

        /**
         * EmbeddedMusic artworkMediaKey.
         * @member {Uint8Array|null|undefined} artworkMediaKey
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.artworkMediaKey = null;

        /**
         * EmbeddedMusic musicSongStartTimeInMs.
         * @member {number|Long|null|undefined} musicSongStartTimeInMs
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.musicSongStartTimeInMs = null;

        /**
         * EmbeddedMusic derivedContentStartTimeInMs.
         * @member {number|Long|null|undefined} derivedContentStartTimeInMs
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.derivedContentStartTimeInMs = null;

        /**
         * EmbeddedMusic overlapDurationInMs.
         * @member {number|Long|null|undefined} overlapDurationInMs
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        EmbeddedMusic.prototype.overlapDurationInMs = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * EmbeddedMusic _musicContentMediaId.
         * @member {"musicContentMediaId"|undefined} _musicContentMediaId
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        Object.defineProperty(EmbeddedMusic.prototype, "_musicContentMediaId", {
            get: $util.oneOfGetter($oneOfFields = ["musicContentMediaId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * EmbeddedMusic _songId.
         * @member {"songId"|undefined} _songId
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        Object.defineProperty(EmbeddedMusic.prototype, "_songId", {
            get: $util.oneOfGetter($oneOfFields = ["songId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * EmbeddedMusic _author.
         * @member {"author"|undefined} _author
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        Object.defineProperty(EmbeddedMusic.prototype, "_author", {
            get: $util.oneOfGetter($oneOfFields = ["author"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * EmbeddedMusic _title.
         * @member {"title"|undefined} _title
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        Object.defineProperty(EmbeddedMusic.prototype, "_title", {
            get: $util.oneOfGetter($oneOfFields = ["title"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * EmbeddedMusic _artworkDirectPath.
         * @member {"artworkDirectPath"|undefined} _artworkDirectPath
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        Object.defineProperty(EmbeddedMusic.prototype, "_artworkDirectPath", {
            get: $util.oneOfGetter($oneOfFields = ["artworkDirectPath"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * EmbeddedMusic _artworkSha256.
         * @member {"artworkSha256"|undefined} _artworkSha256
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        Object.defineProperty(EmbeddedMusic.prototype, "_artworkSha256", {
            get: $util.oneOfGetter($oneOfFields = ["artworkSha256"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * EmbeddedMusic _artworkEncSha256.
         * @member {"artworkEncSha256"|undefined} _artworkEncSha256
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        Object.defineProperty(EmbeddedMusic.prototype, "_artworkEncSha256", {
            get: $util.oneOfGetter($oneOfFields = ["artworkEncSha256"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * EmbeddedMusic _artistAttribution.
         * @member {"artistAttribution"|undefined} _artistAttribution
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        Object.defineProperty(EmbeddedMusic.prototype, "_artistAttribution", {
            get: $util.oneOfGetter($oneOfFields = ["artistAttribution"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * EmbeddedMusic _countryBlocklist.
         * @member {"countryBlocklist"|undefined} _countryBlocklist
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        Object.defineProperty(EmbeddedMusic.prototype, "_countryBlocklist", {
            get: $util.oneOfGetter($oneOfFields = ["countryBlocklist"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * EmbeddedMusic _isExplicit.
         * @member {"isExplicit"|undefined} _isExplicit
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        Object.defineProperty(EmbeddedMusic.prototype, "_isExplicit", {
            get: $util.oneOfGetter($oneOfFields = ["isExplicit"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * EmbeddedMusic _artworkMediaKey.
         * @member {"artworkMediaKey"|undefined} _artworkMediaKey
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        Object.defineProperty(EmbeddedMusic.prototype, "_artworkMediaKey", {
            get: $util.oneOfGetter($oneOfFields = ["artworkMediaKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * EmbeddedMusic _musicSongStartTimeInMs.
         * @member {"musicSongStartTimeInMs"|undefined} _musicSongStartTimeInMs
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        Object.defineProperty(EmbeddedMusic.prototype, "_musicSongStartTimeInMs", {
            get: $util.oneOfGetter($oneOfFields = ["musicSongStartTimeInMs"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * EmbeddedMusic _derivedContentStartTimeInMs.
         * @member {"derivedContentStartTimeInMs"|undefined} _derivedContentStartTimeInMs
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        Object.defineProperty(EmbeddedMusic.prototype, "_derivedContentStartTimeInMs", {
            get: $util.oneOfGetter($oneOfFields = ["derivedContentStartTimeInMs"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * EmbeddedMusic _overlapDurationInMs.
         * @member {"overlapDurationInMs"|undefined} _overlapDurationInMs
         * @memberof E2E.EmbeddedMusic
         * @instance
         */
        Object.defineProperty(EmbeddedMusic.prototype, "_overlapDurationInMs", {
            get: $util.oneOfGetter($oneOfFields = ["overlapDurationInMs"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new EmbeddedMusic instance using the specified properties.
         * @function create
         * @memberof E2E.EmbeddedMusic
         * @static
         * @param {E2E.IEmbeddedMusic=} [properties] Properties to set
         * @returns {E2E.EmbeddedMusic} EmbeddedMusic instance
         */
        EmbeddedMusic.create = function create(properties) {
            return new EmbeddedMusic(properties);
        };

        /**
         * Encodes the specified EmbeddedMusic message. Does not implicitly {@link E2E.EmbeddedMusic.verify|verify} messages.
         * @function encode
         * @memberof E2E.EmbeddedMusic
         * @static
         * @param {E2E.IEmbeddedMusic} message EmbeddedMusic message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        EmbeddedMusic.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.musicContentMediaId != null && Object.hasOwnProperty.call(message, "musicContentMediaId"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.musicContentMediaId);
            if (message.songId != null && Object.hasOwnProperty.call(message, "songId"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.songId);
            if (message.author != null && Object.hasOwnProperty.call(message, "author"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.author);
            if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                writer.uint32(/* id 4, wireType 2 =*/34).string(message.title);
            if (message.artworkDirectPath != null && Object.hasOwnProperty.call(message, "artworkDirectPath"))
                writer.uint32(/* id 5, wireType 2 =*/42).string(message.artworkDirectPath);
            if (message.artworkSha256 != null && Object.hasOwnProperty.call(message, "artworkSha256"))
                writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.artworkSha256);
            if (message.artworkEncSha256 != null && Object.hasOwnProperty.call(message, "artworkEncSha256"))
                writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.artworkEncSha256);
            if (message.artistAttribution != null && Object.hasOwnProperty.call(message, "artistAttribution"))
                writer.uint32(/* id 8, wireType 2 =*/66).string(message.artistAttribution);
            if (message.countryBlocklist != null && Object.hasOwnProperty.call(message, "countryBlocklist"))
                writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.countryBlocklist);
            if (message.isExplicit != null && Object.hasOwnProperty.call(message, "isExplicit"))
                writer.uint32(/* id 10, wireType 0 =*/80).bool(message.isExplicit);
            if (message.artworkMediaKey != null && Object.hasOwnProperty.call(message, "artworkMediaKey"))
                writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.artworkMediaKey);
            if (message.musicSongStartTimeInMs != null && Object.hasOwnProperty.call(message, "musicSongStartTimeInMs"))
                writer.uint32(/* id 12, wireType 0 =*/96).int64(message.musicSongStartTimeInMs);
            if (message.derivedContentStartTimeInMs != null && Object.hasOwnProperty.call(message, "derivedContentStartTimeInMs"))
                writer.uint32(/* id 13, wireType 0 =*/104).int64(message.derivedContentStartTimeInMs);
            if (message.overlapDurationInMs != null && Object.hasOwnProperty.call(message, "overlapDurationInMs"))
                writer.uint32(/* id 14, wireType 0 =*/112).int64(message.overlapDurationInMs);
            return writer;
        };

        /**
         * Encodes the specified EmbeddedMusic message, length delimited. Does not implicitly {@link E2E.EmbeddedMusic.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.EmbeddedMusic
         * @static
         * @param {E2E.IEmbeddedMusic} message EmbeddedMusic message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        EmbeddedMusic.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes an EmbeddedMusic message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.EmbeddedMusic
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.EmbeddedMusic} EmbeddedMusic
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        EmbeddedMusic.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.E2E.EmbeddedMusic();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.musicContentMediaId = reader.string();
                        break;
                    }
                case 2: {
                        message.songId = reader.string();
                        break;
                    }
                case 3: {
                        message.author = reader.string();
                        break;
                    }
                case 4: {
                        message.title = reader.string();
                        break;
                    }
                case 5: {
                        message.artworkDirectPath = reader.string();
                        break;
                    }
                case 6: {
                        message.artworkSha256 = reader.bytes();
                        break;
                    }
                case 7: {
                        message.artworkEncSha256 = reader.bytes();
                        break;
                    }
                case 8: {
                        message.artistAttribution = reader.string();
                        break;
                    }
                case 9: {
                        message.countryBlocklist = reader.bytes();
                        break;
                    }
                case 10: {
                        message.isExplicit = reader.bool();
                        break;
                    }
                case 11: {
                        message.artworkMediaKey = reader.bytes();
                        break;
                    }
                case 12: {
                        message.musicSongStartTimeInMs = reader.int64();
                        break;
                    }
                case 13: {
                        message.derivedContentStartTimeInMs = reader.int64();
                        break;
                    }
                case 14: {
                        message.overlapDurationInMs = reader.int64();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes an EmbeddedMusic message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.EmbeddedMusic
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.EmbeddedMusic} EmbeddedMusic
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        EmbeddedMusic.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies an EmbeddedMusic message.
         * @function verify
         * @memberof E2E.EmbeddedMusic
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        EmbeddedMusic.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.musicContentMediaId != null && message.hasOwnProperty("musicContentMediaId")) {
                properties._musicContentMediaId = 1;
                if (!$util.isString(message.musicContentMediaId))
                    return "musicContentMediaId: string expected";
            }
            if (message.songId != null && message.hasOwnProperty("songId")) {
                properties._songId = 1;
                if (!$util.isString(message.songId))
                    return "songId: string expected";
            }
            if (message.author != null && message.hasOwnProperty("author")) {
                properties._author = 1;
                if (!$util.isString(message.author))
                    return "author: string expected";
            }
            if (message.title != null && message.hasOwnProperty("title")) {
                properties._title = 1;
                if (!$util.isString(message.title))
                    return "title: string expected";
            }
            if (message.artworkDirectPath != null && message.hasOwnProperty("artworkDirectPath")) {
                properties._artworkDirectPath = 1;
                if (!$util.isString(message.artworkDirectPath))
                    return "artworkDirectPath: string expected";
            }
            if (message.artworkSha256 != null && message.hasOwnProperty("artworkSha256")) {
                properties._artworkSha256 = 1;
                if (!(message.artworkSha256 && typeof message.artworkSha256.length === "number" || $util.isString(message.artworkSha256)))
                    return "artworkSha256: buffer expected";
            }
            if (message.artworkEncSha256 != null && message.hasOwnProperty("artworkEncSha256")) {
                properties._artworkEncSha256 = 1;
                if (!(message.artworkEncSha256 && typeof message.artworkEncSha256.length === "number" || $util.isString(message.artworkEncSha256)))
                    return "artworkEncSha256: buffer expected";
            }
            if (message.artistAttribution != null && message.hasOwnProperty("artistAttribution")) {
                properties._artistAttribution = 1;
                if (!$util.isString(message.artistAttribution))
                    return "artistAttribution: string expected";
            }
            if (message.countryBlocklist != null && message.hasOwnProperty("countryBlocklist")) {
                properties._countryBlocklist = 1;
                if (!(message.countryBlocklist && typeof message.countryBlocklist.length === "number" || $util.isString(message.countryBlocklist)))
                    return "countryBlocklist: buffer expected";
            }
            if (message.isExplicit != null && message.hasOwnProperty("isExplicit")) {
                properties._isExplicit = 1;
                if (typeof message.isExplicit !== "boolean")
                    return "isExplicit: boolean expected";
            }
            if (message.artworkMediaKey != null && message.hasOwnProperty("artworkMediaKey")) {
                properties._artworkMediaKey = 1;
                if (!(message.artworkMediaKey && typeof message.artworkMediaKey.length === "number" || $util.isString(message.artworkMediaKey)))
                    return "artworkMediaKey: buffer expected";
            }
            if (message.musicSongStartTimeInMs != null && message.hasOwnProperty("musicSongStartTimeInMs")) {
                properties._musicSongStartTimeInMs = 1;
                if (!$util.isInteger(message.musicSongStartTimeInMs) && !(message.musicSongStartTimeInMs && $util.isInteger(message.musicSongStartTimeInMs.low) && $util.isInteger(message.musicSongStartTimeInMs.high)))
                    return "musicSongStartTimeInMs: integer|Long expected";
            }
            if (message.derivedContentStartTimeInMs != null && message.hasOwnProperty("derivedContentStartTimeInMs")) {
                properties._derivedContentStartTimeInMs = 1;
                if (!$util.isInteger(message.derivedContentStartTimeInMs) && !(message.derivedContentStartTimeInMs && $util.isInteger(message.derivedContentStartTimeInMs.low) && $util.isInteger(message.derivedContentStartTimeInMs.high)))
                    return "derivedContentStartTimeInMs: integer|Long expected";
            }
            if (message.overlapDurationInMs != null && message.hasOwnProperty("overlapDurationInMs")) {
                properties._overlapDurationInMs = 1;
                if (!$util.isInteger(message.overlapDurationInMs) && !(message.overlapDurationInMs && $util.isInteger(message.overlapDurationInMs.low) && $util.isInteger(message.overlapDurationInMs.high)))
                    return "overlapDurationInMs: integer|Long expected";
            }
            return null;
        };

        /**
         * Creates an EmbeddedMusic message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.EmbeddedMusic
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.EmbeddedMusic} EmbeddedMusic
         */
        EmbeddedMusic.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.EmbeddedMusic)
                return object;
            var message = new $root.E2E.EmbeddedMusic();
            if (object.musicContentMediaId != null)
                message.musicContentMediaId = String(object.musicContentMediaId);
            if (object.songId != null)
                message.songId = String(object.songId);
            if (object.author != null)
                message.author = String(object.author);
            if (object.title != null)
                message.title = String(object.title);
            if (object.artworkDirectPath != null)
                message.artworkDirectPath = String(object.artworkDirectPath);
            if (object.artworkSha256 != null)
                if (typeof object.artworkSha256 === "string")
                    $util.base64.decode(object.artworkSha256, message.artworkSha256 = $util.newBuffer($util.base64.length(object.artworkSha256)), 0);
                else if (object.artworkSha256.length >= 0)
                    message.artworkSha256 = object.artworkSha256;
            if (object.artworkEncSha256 != null)
                if (typeof object.artworkEncSha256 === "string")
                    $util.base64.decode(object.artworkEncSha256, message.artworkEncSha256 = $util.newBuffer($util.base64.length(object.artworkEncSha256)), 0);
                else if (object.artworkEncSha256.length >= 0)
                    message.artworkEncSha256 = object.artworkEncSha256;
            if (object.artistAttribution != null)
                message.artistAttribution = String(object.artistAttribution);
            if (object.countryBlocklist != null)
                if (typeof object.countryBlocklist === "string")
                    $util.base64.decode(object.countryBlocklist, message.countryBlocklist = $util.newBuffer($util.base64.length(object.countryBlocklist)), 0);
                else if (object.countryBlocklist.length >= 0)
                    message.countryBlocklist = object.countryBlocklist;
            if (object.isExplicit != null)
                message.isExplicit = Boolean(object.isExplicit);
            if (object.artworkMediaKey != null)
                if (typeof object.artworkMediaKey === "string")
                    $util.base64.decode(object.artworkMediaKey, message.artworkMediaKey = $util.newBuffer($util.base64.length(object.artworkMediaKey)), 0);
                else if (object.artworkMediaKey.length >= 0)
                    message.artworkMediaKey = object.artworkMediaKey;
            if (object.musicSongStartTimeInMs != null)
                if ($util.Long)
                    (message.musicSongStartTimeInMs = $util.Long.fromValue(object.musicSongStartTimeInMs)).unsigned = false;
                else if (typeof object.musicSongStartTimeInMs === "string")
                    message.musicSongStartTimeInMs = parseInt(object.musicSongStartTimeInMs, 10);
                else if (typeof object.musicSongStartTimeInMs === "number")
                    message.musicSongStartTimeInMs = object.musicSongStartTimeInMs;
                else if (typeof object.musicSongStartTimeInMs === "object")
                    message.musicSongStartTimeInMs = new $util.LongBits(object.musicSongStartTimeInMs.low >>> 0, object.musicSongStartTimeInMs.high >>> 0).toNumber();
            if (object.derivedContentStartTimeInMs != null)
                if ($util.Long)
                    (message.derivedContentStartTimeInMs = $util.Long.fromValue(object.derivedContentStartTimeInMs)).unsigned = false;
                else if (typeof object.derivedContentStartTimeInMs === "string")
                    message.derivedContentStartTimeInMs = parseInt(object.derivedContentStartTimeInMs, 10);
                else if (typeof object.derivedContentStartTimeInMs === "number")
                    message.derivedContentStartTimeInMs = object.derivedContentStartTimeInMs;
                else if (typeof object.derivedContentStartTimeInMs === "object")
                    message.derivedContentStartTimeInMs = new $util.LongBits(object.derivedContentStartTimeInMs.low >>> 0, object.derivedContentStartTimeInMs.high >>> 0).toNumber();
            if (object.overlapDurationInMs != null)
                if ($util.Long)
                    (message.overlapDurationInMs = $util.Long.fromValue(object.overlapDurationInMs)).unsigned = false;
                else if (typeof object.overlapDurationInMs === "string")
                    message.overlapDurationInMs = parseInt(object.overlapDurationInMs, 10);
                else if (typeof object.overlapDurationInMs === "number")
                    message.overlapDurationInMs = object.overlapDurationInMs;
                else if (typeof object.overlapDurationInMs === "object")
                    message.overlapDurationInMs = new $util.LongBits(object.overlapDurationInMs.low >>> 0, object.overlapDurationInMs.high >>> 0).toNumber();
            return message;
        };

        /**
         * Creates a plain object from an EmbeddedMusic message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.EmbeddedMusic
         * @static
         * @param {E2E.EmbeddedMusic} message EmbeddedMusic
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        EmbeddedMusic.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.musicContentMediaId != null && message.hasOwnProperty("musicContentMediaId")) {
                object.musicContentMediaId = message.musicContentMediaId;
                if (options.oneofs)
                    object._musicContentMediaId = "musicContentMediaId";
            }
            if (message.songId != null && message.hasOwnProperty("songId")) {
                object.songId = message.songId;
                if (options.oneofs)
                    object._songId = "songId";
            }
            if (message.author != null && message.hasOwnProperty("author")) {
                object.author = message.author;
                if (options.oneofs)
                    object._author = "author";
            }
            if (message.title != null && message.hasOwnProperty("title")) {
                object.title = message.title;
                if (options.oneofs)
                    object._title = "title";
            }
            if (message.artworkDirectPath != null && message.hasOwnProperty("artworkDirectPath")) {
                object.artworkDirectPath = message.artworkDirectPath;
                if (options.oneofs)
                    object._artworkDirectPath = "artworkDirectPath";
            }
            if (message.artworkSha256 != null && message.hasOwnProperty("artworkSha256")) {
                object.artworkSha256 = options.bytes === String ? $util.base64.encode(message.artworkSha256, 0, message.artworkSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.artworkSha256) : message.artworkSha256;
                if (options.oneofs)
                    object._artworkSha256 = "artworkSha256";
            }
            if (message.artworkEncSha256 != null && message.hasOwnProperty("artworkEncSha256")) {
                object.artworkEncSha256 = options.bytes === String ? $util.base64.encode(message.artworkEncSha256, 0, message.artworkEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.artworkEncSha256) : message.artworkEncSha256;
                if (options.oneofs)
                    object._artworkEncSha256 = "artworkEncSha256";
            }
            if (message.artistAttribution != null && message.hasOwnProperty("artistAttribution")) {
                object.artistAttribution = message.artistAttribution;
                if (options.oneofs)
                    object._artistAttribution = "artistAttribution";
            }
            if (message.countryBlocklist != null && message.hasOwnProperty("countryBlocklist")) {
                object.countryBlocklist = options.bytes === String ? $util.base64.encode(message.countryBlocklist, 0, message.countryBlocklist.length) : options.bytes === Array ? Array.prototype.slice.call(message.countryBlocklist) : message.countryBlocklist;
                if (options.oneofs)
                    object._countryBlocklist = "countryBlocklist";
            }
            if (message.isExplicit != null && message.hasOwnProperty("isExplicit")) {
                object.isExplicit = message.isExplicit;
                if (options.oneofs)
                    object._isExplicit = "isExplicit";
            }
            if (message.artworkMediaKey != null && message.hasOwnProperty("artworkMediaKey")) {
                object.artworkMediaKey = options.bytes === String ? $util.base64.encode(message.artworkMediaKey, 0, message.artworkMediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.artworkMediaKey) : message.artworkMediaKey;
                if (options.oneofs)
                    object._artworkMediaKey = "artworkMediaKey";
            }
            if (message.musicSongStartTimeInMs != null && message.hasOwnProperty("musicSongStartTimeInMs")) {
                if (typeof message.musicSongStartTimeInMs === "number")
                    object.musicSongStartTimeInMs = options.longs === String ? String(message.musicSongStartTimeInMs) : message.musicSongStartTimeInMs;
                else
                    object.musicSongStartTimeInMs = options.longs === String ? $util.Long.prototype.toString.call(message.musicSongStartTimeInMs) : options.longs === Number ? new $util.LongBits(message.musicSongStartTimeInMs.low >>> 0, message.musicSongStartTimeInMs.high >>> 0).toNumber() : message.musicSongStartTimeInMs;
                if (options.oneofs)
                    object._musicSongStartTimeInMs = "musicSongStartTimeInMs";
            }
            if (message.derivedContentStartTimeInMs != null && message.hasOwnProperty("derivedContentStartTimeInMs")) {
                if (typeof message.derivedContentStartTimeInMs === "number")
                    object.derivedContentStartTimeInMs = options.longs === String ? String(message.derivedContentStartTimeInMs) : message.derivedContentStartTimeInMs;
                else
                    object.derivedContentStartTimeInMs = options.longs === String ? $util.Long.prototype.toString.call(message.derivedContentStartTimeInMs) : options.longs === Number ? new $util.LongBits(message.derivedContentStartTimeInMs.low >>> 0, message.derivedContentStartTimeInMs.high >>> 0).toNumber() : message.derivedContentStartTimeInMs;
                if (options.oneofs)
                    object._derivedContentStartTimeInMs = "derivedContentStartTimeInMs";
            }
            if (message.overlapDurationInMs != null && message.hasOwnProperty("overlapDurationInMs")) {
                if (typeof message.overlapDurationInMs === "number")
                    object.overlapDurationInMs = options.longs === String ? String(message.overlapDurationInMs) : message.overlapDurationInMs;
                else
                    object.overlapDurationInMs = options.longs === String ? $util.Long.prototype.toString.call(message.overlapDurationInMs) : options.longs === Number ? new $util.LongBits(message.overlapDurationInMs.low >>> 0, message.overlapDurationInMs.high >>> 0).toNumber() : message.overlapDurationInMs;
                if (options.oneofs)
                    object._overlapDurationInMs = "overlapDurationInMs";
            }
            return object;
        };

        /**
         * Converts this EmbeddedMusic to JSON.
         * @function toJSON
         * @memberof E2E.EmbeddedMusic
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        EmbeddedMusic.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for EmbeddedMusic
         * @function getTypeUrl
         * @memberof E2E.EmbeddedMusic
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        EmbeddedMusic.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.EmbeddedMusic";
        };

        return EmbeddedMusic;
    })();

    E2E.EmbeddedMessage = (function() {

        /**
         * Properties of an EmbeddedMessage.
         * @memberof E2E
         * @interface IEmbeddedMessage
         * @property {string|null} [stanzaId] EmbeddedMessage stanzaId
         * @property {E2E.IMessage|null} [message] EmbeddedMessage message
         */

        /**
         * Constructs a new EmbeddedMessage.
         * @memberof E2E
         * @classdesc Represents an EmbeddedMessage.
         * @implements IEmbeddedMessage
         * @constructor
         * @param {E2E.IEmbeddedMessage=} [properties] Properties to set
         */
        function EmbeddedMessage(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]];
        }

        /**
         * EmbeddedMessage stanzaId.
         * @member {string|null|undefined} stanzaId
         * @memberof E2E.EmbeddedMessage
         * @instance
         */
        EmbeddedMessage.prototype.stanzaId = null;

        /**
         * EmbeddedMessage message.
         * @member {E2E.IMessage|null|undefined} message
         * @memberof E2E.EmbeddedMessage
         * @instance
         */
        EmbeddedMessage.prototype.message = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * EmbeddedMessage _stanzaId.
         * @member {"stanzaId"|undefined} _stanzaId
         * @memberof E2E.EmbeddedMessage
         * @instance
         */
        Object.defineProperty(EmbeddedMessage.prototype, "_stanzaId", {
            get: $util.oneOfGetter($oneOfFields = ["stanzaId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * EmbeddedMessage _message.
         * @member {"message"|undefined} _message
         * @memberof E2E.EmbeddedMessage
         * @instance
         */
        Object.defineProperty(EmbeddedMessage.prototype, "_message", {
            get: $util.oneOfGetter($oneOfFields = ["message"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new EmbeddedMessage instance using the specified properties.
         * @function create
         * @memberof E2E.EmbeddedMessage
         * @static
         * @param {E2E.IEmbeddedMessage=} [properties] Properties to set
         * @returns {E2E.EmbeddedMessage} EmbeddedMessage instance
         */
        EmbeddedMessage.create = function create(properties) {
            return new EmbeddedMessage(properties);
        };

        /**
         * Encodes the specified EmbeddedMessage message. Does not implicitly {@link E2E.EmbeddedMessage.verify|verify} messages.
         * @function encode
         * @memberof E2E.EmbeddedMessage
         * @static
         * @param {E2E.IEmbeddedMessage} message EmbeddedMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        EmbeddedMessage.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.stanzaId);
            if (message.message != null && Object.hasOwnProperty.call(message, "message"))
                $root.E2E.Message.encode(message.message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified EmbeddedMessage message, length delimited. Does not implicitly {@link E2E.EmbeddedMessage.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.EmbeddedMessage
         * @static
         * @param {E2E.IEmbeddedMessage} message EmbeddedMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        EmbeddedMessage.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes an EmbeddedMessage message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.EmbeddedMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.EmbeddedMessage} EmbeddedMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        EmbeddedMessage.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.E2E.EmbeddedMessage();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.stanzaId = reader.string();
                        break;
                    }
                case 2: {
                        message.message = $root.E2E.Message.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes an EmbeddedMessage message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.EmbeddedMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.EmbeddedMessage} EmbeddedMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        EmbeddedMessage.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies an EmbeddedMessage message.
         * @function verify
         * @memberof E2E.EmbeddedMessage
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        EmbeddedMessage.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) {
                properties._stanzaId = 1;
                if (!$util.isString(message.stanzaId))
                    return "stanzaId: string expected";
            }
            if (message.message != null && message.hasOwnProperty("message")) {
                properties._message = 1;
                {
                    var error = $root.E2E.Message.verify(message.message);
                    if (error)
                        return "message." + error;
                }
            }
            return null;
        };

        /**
         * Creates an EmbeddedMessage message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.EmbeddedMessage
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.EmbeddedMessage} EmbeddedMessage
         */
        EmbeddedMessage.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.EmbeddedMessage)
                return object;
            var message = new $root.E2E.EmbeddedMessage();
            if (object.stanzaId != null)
                message.stanzaId = String(object.stanzaId);
            if (object.message != null) {
                if (typeof object.message !== "object")
                    throw TypeError(".E2E.EmbeddedMessage.message: object expected");
                message.message = $root.E2E.Message.fromObject(object.message);
            }
            return message;
        };

        /**
         * Creates a plain object from an EmbeddedMessage message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.EmbeddedMessage
         * @static
         * @param {E2E.EmbeddedMessage} message EmbeddedMessage
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        EmbeddedMessage.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) {
                object.stanzaId = message.stanzaId;
                if (options.oneofs)
                    object._stanzaId = "stanzaId";
            }
            if (message.message != null && message.hasOwnProperty("message")) {
                object.message = $root.E2E.Message.toObject(message.message, options);
                if (options.oneofs)
                    object._message = "message";
            }
            return object;
        };

        /**
         * Converts this EmbeddedMessage to JSON.
         * @function toJSON
         * @memberof E2E.EmbeddedMessage
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        EmbeddedMessage.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for EmbeddedMessage
         * @function getTypeUrl
         * @memberof E2E.EmbeddedMessage
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        EmbeddedMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.EmbeddedMessage";
        };

        return EmbeddedMessage;
    })();

    E2E.DeviceListMetadata = (function() {

        /**
         * Properties of a DeviceListMetadata.
         * @memberof E2E
         * @interface IDeviceListMetadata
         * @property {Uint8Array|null} [senderKeyHash] DeviceListMetadata senderKeyHash
         * @property {number|Long|null} [senderTimestamp] DeviceListMetadata senderTimestamp
         * @property {Array.<number>|null} [senderKeyIndexes] DeviceListMetadata senderKeyIndexes
         * @property {Adv.ADVEncryptionType|null} [senderAccountType] DeviceListMetadata senderAccountType
         * @property {Adv.ADVEncryptionType|null} [receiverAccountType] DeviceListMetadata receiverAccountType
         * @property {Uint8Array|null} [recipientKeyHash] DeviceListMetadata recipientKeyHash
         * @property {number|Long|null} [recipientTimestamp] DeviceListMetadata recipientTimestamp
         * @property {Array.<number>|null} [recipientKeyIndexes] DeviceListMetadata recipientKeyIndexes
         */

        /**
         * Constructs a new DeviceListMetadata.
         * @memberof E2E
         * @classdesc Represents a DeviceListMetadata.
         * @implements IDeviceListMetadata
         * @constructor
         * @param {E2E.IDeviceListMetadata=} [properties] Properties to set
         */
        function DeviceListMetadata(properties) {
            this.senderKeyIndexes = [];
            this.recipientKeyIndexes = [];
            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]];
        }

        /**
         * DeviceListMetadata senderKeyHash.
         * @member {Uint8Array|null|undefined} senderKeyHash
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        DeviceListMetadata.prototype.senderKeyHash = null;

        /**
         * DeviceListMetadata senderTimestamp.
         * @member {number|Long|null|undefined} senderTimestamp
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        DeviceListMetadata.prototype.senderTimestamp = null;

        /**
         * DeviceListMetadata senderKeyIndexes.
         * @member {Array.<number>} senderKeyIndexes
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        DeviceListMetadata.prototype.senderKeyIndexes = $util.emptyArray;

        /**
         * DeviceListMetadata senderAccountType.
         * @member {Adv.ADVEncryptionType|null|undefined} senderAccountType
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        DeviceListMetadata.prototype.senderAccountType = null;

        /**
         * DeviceListMetadata receiverAccountType.
         * @member {Adv.ADVEncryptionType|null|undefined} receiverAccountType
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        DeviceListMetadata.prototype.receiverAccountType = null;

        /**
         * DeviceListMetadata recipientKeyHash.
         * @member {Uint8Array|null|undefined} recipientKeyHash
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        DeviceListMetadata.prototype.recipientKeyHash = null;

        /**
         * DeviceListMetadata recipientTimestamp.
         * @member {number|Long|null|undefined} recipientTimestamp
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        DeviceListMetadata.prototype.recipientTimestamp = null;

        /**
         * DeviceListMetadata recipientKeyIndexes.
         * @member {Array.<number>} recipientKeyIndexes
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        DeviceListMetadata.prototype.recipientKeyIndexes = $util.emptyArray;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * DeviceListMetadata _senderKeyHash.
         * @member {"senderKeyHash"|undefined} _senderKeyHash
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        Object.defineProperty(DeviceListMetadata.prototype, "_senderKeyHash", {
            get: $util.oneOfGetter($oneOfFields = ["senderKeyHash"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * DeviceListMetadata _senderTimestamp.
         * @member {"senderTimestamp"|undefined} _senderTimestamp
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        Object.defineProperty(DeviceListMetadata.prototype, "_senderTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["senderTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * DeviceListMetadata _senderAccountType.
         * @member {"senderAccountType"|undefined} _senderAccountType
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        Object.defineProperty(DeviceListMetadata.prototype, "_senderAccountType", {
            get: $util.oneOfGetter($oneOfFields = ["senderAccountType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * DeviceListMetadata _receiverAccountType.
         * @member {"receiverAccountType"|undefined} _receiverAccountType
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        Object.defineProperty(DeviceListMetadata.prototype, "_receiverAccountType", {
            get: $util.oneOfGetter($oneOfFields = ["receiverAccountType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * DeviceListMetadata _recipientKeyHash.
         * @member {"recipientKeyHash"|undefined} _recipientKeyHash
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        Object.defineProperty(DeviceListMetadata.prototype, "_recipientKeyHash", {
            get: $util.oneOfGetter($oneOfFields = ["recipientKeyHash"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * DeviceListMetadata _recipientTimestamp.
         * @member {"recipientTimestamp"|undefined} _recipientTimestamp
         * @memberof E2E.DeviceListMetadata
         * @instance
         */
        Object.defineProperty(DeviceListMetadata.prototype, "_recipientTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["recipientTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new DeviceListMetadata instance using the specified properties.
         * @function create
         * @memberof E2E.DeviceListMetadata
         * @static
         * @param {E2E.IDeviceListMetadata=} [properties] Properties to set
         * @returns {E2E.DeviceListMetadata} DeviceListMetadata instance
         */
        DeviceListMetadata.create = function create(properties) {
            return new DeviceListMetadata(properties);
        };

        /**
         * Encodes the specified DeviceListMetadata message. Does not implicitly {@link E2E.DeviceListMetadata.verify|verify} messages.
         * @function encode
         * @memberof E2E.DeviceListMetadata
         * @static
         * @param {E2E.IDeviceListMetadata} message DeviceListMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        DeviceListMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.senderKeyHash != null && Object.hasOwnProperty.call(message, "senderKeyHash"))
                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.senderKeyHash);
            if (message.senderTimestamp != null && Object.hasOwnProperty.call(message, "senderTimestamp"))
                writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.senderTimestamp);
            if (message.senderKeyIndexes != null && message.senderKeyIndexes.length) {
                writer.uint32(/* id 3, wireType 2 =*/26).fork();
                for (var i = 0; i < message.senderKeyIndexes.length; ++i)
                    writer.uint32(message.senderKeyIndexes[i]);
                writer.ldelim();
            }
            if (message.senderAccountType != null && Object.hasOwnProperty.call(message, "senderAccountType"))
                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.senderAccountType);
            if (message.receiverAccountType != null && Object.hasOwnProperty.call(message, "receiverAccountType"))
                writer.uint32(/* id 5, wireType 0 =*/40).int32(message.receiverAccountType);
            if (message.recipientKeyHash != null && Object.hasOwnProperty.call(message, "recipientKeyHash"))
                writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.recipientKeyHash);
            if (message.recipientTimestamp != null && Object.hasOwnProperty.call(message, "recipientTimestamp"))
                writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.recipientTimestamp);
            if (message.recipientKeyIndexes != null && message.recipientKeyIndexes.length) {
                writer.uint32(/* id 10, wireType 2 =*/82).fork();
                for (var i = 0; i < message.recipientKeyIndexes.length; ++i)
                    writer.uint32(message.recipientKeyIndexes[i]);
                writer.ldelim();
            }
            return writer;
        };

        /**
         * Encodes the specified DeviceListMetadata message, length delimited. Does not implicitly {@link E2E.DeviceListMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.DeviceListMetadata
         * @static
         * @param {E2E.IDeviceListMetadata} message DeviceListMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        DeviceListMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a DeviceListMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.DeviceListMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.DeviceListMetadata} DeviceListMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        DeviceListMetadata.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.E2E.DeviceListMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.senderKeyHash = reader.bytes();
                        break;
                    }
                case 2: {
                        message.senderTimestamp = reader.uint64();
                        break;
                    }
                case 3: {
                        if (!(message.senderKeyIndexes && message.senderKeyIndexes.length))
                            message.senderKeyIndexes = [];
                        if ((tag & 7) === 2) {
                            var end2 = reader.uint32() + reader.pos;
                            while (reader.pos < end2)
                                message.senderKeyIndexes.push(reader.uint32());
                        } else
                            message.senderKeyIndexes.push(reader.uint32());
                        break;
                    }
                case 4: {
                        message.senderAccountType = reader.int32();
                        break;
                    }
                case 5: {
                        message.receiverAccountType = reader.int32();
                        break;
                    }
                case 8: {
                        message.recipientKeyHash = reader.bytes();
                        break;
                    }
                case 9: {
                        message.recipientTimestamp = reader.uint64();
                        break;
                    }
                case 10: {
                        if (!(message.recipientKeyIndexes && message.recipientKeyIndexes.length))
                            message.recipientKeyIndexes = [];
                        if ((tag & 7) === 2) {
                            var end2 = reader.uint32() + reader.pos;
                            while (reader.pos < end2)
                                message.recipientKeyIndexes.push(reader.uint32());
                        } else
                            message.recipientKeyIndexes.push(reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a DeviceListMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.DeviceListMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.DeviceListMetadata} DeviceListMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        DeviceListMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a DeviceListMetadata message.
         * @function verify
         * @memberof E2E.DeviceListMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        DeviceListMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.senderKeyHash != null && message.hasOwnProperty("senderKeyHash")) {
                properties._senderKeyHash = 1;
                if (!(message.senderKeyHash && typeof message.senderKeyHash.length === "number" || $util.isString(message.senderKeyHash)))
                    return "senderKeyHash: buffer expected";
            }
            if (message.senderTimestamp != null && message.hasOwnProperty("senderTimestamp")) {
                properties._senderTimestamp = 1;
                if (!$util.isInteger(message.senderTimestamp) && !(message.senderTimestamp && $util.isInteger(message.senderTimestamp.low) && $util.isInteger(message.senderTimestamp.high)))
                    return "senderTimestamp: integer|Long expected";
            }
            if (message.senderKeyIndexes != null && message.hasOwnProperty("senderKeyIndexes")) {
                if (!Array.isArray(message.senderKeyIndexes))
                    return "senderKeyIndexes: array expected";
                for (var i = 0; i < message.senderKeyIndexes.length; ++i)
                    if (!$util.isInteger(message.senderKeyIndexes[i]))
                        return "senderKeyIndexes: integer[] expected";
            }
            if (message.senderAccountType != null && message.hasOwnProperty("senderAccountType")) {
                properties._senderAccountType = 1;
                switch (message.senderAccountType) {
                default:
                    return "senderAccountType: enum value expected";
                case 0:
                case 1:
                    break;
                }
            }
            if (message.receiverAccountType != null && message.hasOwnProperty("receiverAccountType")) {
                properties._receiverAccountType = 1;
                switch (message.receiverAccountType) {
                default:
                    return "receiverAccountType: enum value expected";
                case 0:
                case 1:
                    break;
                }
            }
            if (message.recipientKeyHash != null && message.hasOwnProperty("recipientKeyHash")) {
                properties._recipientKeyHash = 1;
                if (!(message.recipientKeyHash && typeof message.recipientKeyHash.length === "number" || $util.isString(message.recipientKeyHash)))
                    return "recipientKeyHash: buffer expected";
            }
            if (message.recipientTimestamp != null && message.hasOwnProperty("recipientTimestamp")) {
                properties._recipientTimestamp = 1;
                if (!$util.isInteger(message.recipientTimestamp) && !(message.recipientTimestamp && $util.isInteger(message.recipientTimestamp.low) && $util.isInteger(message.recipientTimestamp.high)))
                    return "recipientTimestamp: integer|Long expected";
            }
            if (message.recipientKeyIndexes != null && message.hasOwnProperty("recipientKeyIndexes")) {
                if (!Array.isArray(message.recipientKeyIndexes))
                    return "recipientKeyIndexes: array expected";
                for (var i = 0; i < message.recipientKeyIndexes.length; ++i)
                    if (!$util.isInteger(message.recipientKeyIndexes[i]))
                        return "recipientKeyIndexes: integer[] expected";
            }
            return null;
        };

        /**
         * Creates a DeviceListMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.DeviceListMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.DeviceListMetadata} DeviceListMetadata
         */
        DeviceListMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.DeviceListMetadata)
                return object;
            var message = new $root.E2E.DeviceListMetadata();
            if (object.senderKeyHash != null)
                if (typeof object.senderKeyHash === "string")
                    $util.base64.decode(object.senderKeyHash, message.senderKeyHash = $util.newBuffer($util.base64.length(object.senderKeyHash)), 0);
                else if (object.senderKeyHash.length >= 0)
                    message.senderKeyHash = object.senderKeyHash;
            if (object.senderTimestamp != null)
                if ($util.Long)
                    (message.senderTimestamp = $util.Long.fromValue(object.senderTimestamp)).unsigned = true;
                else if (typeof object.senderTimestamp === "string")
                    message.senderTimestamp = parseInt(object.senderTimestamp, 10);
                else if (typeof object.senderTimestamp === "number")
                    message.senderTimestamp = object.senderTimestamp;
                else if (typeof object.senderTimestamp === "object")
                    message.senderTimestamp = new $util.LongBits(object.senderTimestamp.low >>> 0, object.senderTimestamp.high >>> 0).toNumber(true);
            if (object.senderKeyIndexes) {
                if (!Array.isArray(object.senderKeyIndexes))
                    throw TypeError(".E2E.DeviceListMetadata.senderKeyIndexes: array expected");
                message.senderKeyIndexes = [];
                for (var i = 0; i < object.senderKeyIndexes.length; ++i)
                    message.senderKeyIndexes[i] = object.senderKeyIndexes[i] >>> 0;
            }
            switch (object.senderAccountType) {
            default:
                if (typeof object.senderAccountType === "number") {
                    message.senderAccountType = object.senderAccountType;
                    break;
                }
                break;
            case "E2EE":
            case 0:
                message.senderAccountType = 0;
                break;
            case "HOSTED":
            case 1:
                message.senderAccountType = 1;
                break;
            }
            switch (object.receiverAccountType) {
            default:
                if (typeof object.receiverAccountType === "number") {
                    message.receiverAccountType = object.receiverAccountType;
                    break;
                }
                break;
            case "E2EE":
            case 0:
                message.receiverAccountType = 0;
                break;
            case "HOSTED":
            case 1:
                message.receiverAccountType = 1;
                break;
            }
            if (object.recipientKeyHash != null)
                if (typeof object.recipientKeyHash === "string")
                    $util.base64.decode(object.recipientKeyHash, message.recipientKeyHash = $util.newBuffer($util.base64.length(object.recipientKeyHash)), 0);
                else if (object.recipientKeyHash.length >= 0)
                    message.recipientKeyHash = object.recipientKeyHash;
            if (object.recipientTimestamp != null)
                if ($util.Long)
                    (message.recipientTimestamp = $util.Long.fromValue(object.recipientTimestamp)).unsigned = true;
                else if (typeof object.recipientTimestamp === "string")
                    message.recipientTimestamp = parseInt(object.recipientTimestamp, 10);
                else if (typeof object.recipientTimestamp === "number")
                    message.recipientTimestamp = object.recipientTimestamp;
                else if (typeof object.recipientTimestamp === "object")
                    message.recipientTimestamp = new $util.LongBits(object.recipientTimestamp.low >>> 0, object.recipientTimestamp.high >>> 0).toNumber(true);
            if (object.recipientKeyIndexes) {
                if (!Array.isArray(object.recipientKeyIndexes))
                    throw TypeError(".E2E.DeviceListMetadata.recipientKeyIndexes: array expected");
                message.recipientKeyIndexes = [];
                for (var i = 0; i < object.recipientKeyIndexes.length; ++i)
                    message.recipientKeyIndexes[i] = object.recipientKeyIndexes[i] >>> 0;
            }
            return message;
        };

        /**
         * Creates a plain object from a DeviceListMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.DeviceListMetadata
         * @static
         * @param {E2E.DeviceListMetadata} message DeviceListMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        DeviceListMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults) {
                object.senderKeyIndexes = [];
                object.recipientKeyIndexes = [];
            }
            if (message.senderKeyHash != null && message.hasOwnProperty("senderKeyHash")) {
                object.senderKeyHash = options.bytes === String ? $util.base64.encode(message.senderKeyHash, 0, message.senderKeyHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.senderKeyHash) : message.senderKeyHash;
                if (options.oneofs)
                    object._senderKeyHash = "senderKeyHash";
            }
            if (message.senderTimestamp != null && message.hasOwnProperty("senderTimestamp")) {
                if (typeof message.senderTimestamp === "number")
                    object.senderTimestamp = options.longs === String ? String(message.senderTimestamp) : message.senderTimestamp;
                else
                    object.senderTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.senderTimestamp) : options.longs === Number ? new $util.LongBits(message.senderTimestamp.low >>> 0, message.senderTimestamp.high >>> 0).toNumber(true) : message.senderTimestamp;
                if (options.oneofs)
                    object._senderTimestamp = "senderTimestamp";
            }
            if (message.senderKeyIndexes && message.senderKeyIndexes.length) {
                object.senderKeyIndexes = [];
                for (var j = 0; j < message.senderKeyIndexes.length; ++j)
                    object.senderKeyIndexes[j] = message.senderKeyIndexes[j];
            }
            if (message.senderAccountType != null && message.hasOwnProperty("senderAccountType")) {
                object.senderAccountType = options.enums === String ? $root.Adv.ADVEncryptionType[message.senderAccountType] === undefined ? message.senderAccountType : $root.Adv.ADVEncryptionType[message.senderAccountType] : message.senderAccountType;
                if (options.oneofs)
                    object._senderAccountType = "senderAccountType";
            }
            if (message.receiverAccountType != null && message.hasOwnProperty("receiverAccountType")) {
                object.receiverAccountType = options.enums === String ? $root.Adv.ADVEncryptionType[message.receiverAccountType] === undefined ? message.receiverAccountType : $root.Adv.ADVEncryptionType[message.receiverAccountType] : message.receiverAccountType;
                if (options.oneofs)
                    object._receiverAccountType = "receiverAccountType";
            }
            if (message.recipientKeyHash != null && message.hasOwnProperty("recipientKeyHash")) {
                object.recipientKeyHash = options.bytes === String ? $util.base64.encode(message.recipientKeyHash, 0, message.recipientKeyHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.recipientKeyHash) : message.recipientKeyHash;
                if (options.oneofs)
                    object._recipientKeyHash = "recipientKeyHash";
            }
            if (message.recipientTimestamp != null && message.hasOwnProperty("recipientTimestamp")) {
                if (typeof message.recipientTimestamp === "number")
                    object.recipientTimestamp = options.longs === String ? String(message.recipientTimestamp) : message.recipientTimestamp;
                else
                    object.recipientTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.recipientTimestamp) : options.longs === Number ? new $util.LongBits(message.recipientTimestamp.low >>> 0, message.recipientTimestamp.high >>> 0).toNumber(true) : message.recipientTimestamp;
                if (options.oneofs)
                    object._recipientTimestamp = "recipientTimestamp";
            }
            if (message.recipientKeyIndexes && message.recipientKeyIndexes.length) {
                object.recipientKeyIndexes = [];
                for (var j = 0; j < message.recipientKeyIndexes.length; ++j)
                    object.recipientKeyIndexes[j] = message.recipientKeyIndexes[j];
            }
            return object;
        };

        /**
         * Converts this DeviceListMetadata to JSON.
         * @function toJSON
         * @memberof E2E.DeviceListMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        DeviceListMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for DeviceListMetadata
         * @function getTypeUrl
         * @memberof E2E.DeviceListMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        DeviceListMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.DeviceListMetadata";
        };

        return DeviceListMetadata;
    })();

    E2E.MessageContextInfo = (function() {

        /**
         * Properties of a MessageContextInfo.
         * @memberof E2E
         * @interface IMessageContextInfo
         * @property {E2E.IDeviceListMetadata|null} [deviceListMetadata] MessageContextInfo deviceListMetadata
         * @property {number|null} [deviceListMetadataVersion] MessageContextInfo deviceListMetadataVersion
         * @property {Uint8Array|null} [messageSecret] MessageContextInfo messageSecret
         * @property {Uint8Array|null} [paddingBytes] MessageContextInfo paddingBytes
         * @property {number|null} [messageAddOnDurationInSecs] MessageContextInfo messageAddOnDurationInSecs
         * @property {Uint8Array|null} [botMessageSecret] MessageContextInfo botMessageSecret
         * @property {AICommon.IBotMetadata|null} [botMetadata] MessageContextInfo botMetadata
         * @property {number|null} [reportingTokenVersion] MessageContextInfo reportingTokenVersion
         * @property {E2E.MessageContextInfo.MessageAddonExpiryType|null} [messageAddOnExpiryType] MessageContextInfo messageAddOnExpiryType
         * @property {E2E.IMessageAssociation|null} [messageAssociation] MessageContextInfo messageAssociation
         * @property {boolean|null} [capiCreatedGroup] MessageContextInfo capiCreatedGroup
         * @property {string|null} [supportPayload] MessageContextInfo supportPayload
         * @property {Protocol.ILimitSharing|null} [limitSharing] MessageContextInfo limitSharing
         * @property {Protocol.ILimitSharing|null} [limitSharingV2] MessageContextInfo limitSharingV2
         * @property {Array.<E2E.IThreadID>|null} [threadId] MessageContextInfo threadId
         * @property {E2E.WebLinkRenderConfig|null} [weblinkRenderConfig] MessageContextInfo weblinkRenderConfig
         */

        /**
         * Constructs a new MessageContextInfo.
         * @memberof E2E
         * @classdesc Represents a MessageContextInfo.
         * @implements IMessageContextInfo
         * @constructor
         * @param {E2E.IMessageContextInfo=} [properties] Properties to set
         */
        function MessageContextInfo(properties) {
            this.threadId = [];
            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]];
        }

        /**
         * MessageContextInfo deviceListMetadata.
         * @member {E2E.IDeviceListMetadata|null|undefined} deviceListMetadata
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.deviceListMetadata = null;

        /**
         * MessageContextInfo deviceListMetadataVersion.
         * @member {number|null|undefined} deviceListMetadataVersion
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.deviceListMetadataVersion = null;

        /**
         * MessageContextInfo messageSecret.
         * @member {Uint8Array|null|undefined} messageSecret
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.messageSecret = null;

        /**
         * MessageContextInfo paddingBytes.
         * @member {Uint8Array|null|undefined} paddingBytes
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.paddingBytes = null;

        /**
         * MessageContextInfo messageAddOnDurationInSecs.
         * @member {number|null|undefined} messageAddOnDurationInSecs
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.messageAddOnDurationInSecs = null;

        /**
         * MessageContextInfo botMessageSecret.
         * @member {Uint8Array|null|undefined} botMessageSecret
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.botMessageSecret = null;

        /**
         * MessageContextInfo botMetadata.
         * @member {AICommon.IBotMetadata|null|undefined} botMetadata
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.botMetadata = null;

        /**
         * MessageContextInfo reportingTokenVersion.
         * @member {number|null|undefined} reportingTokenVersion
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.reportingTokenVersion = null;

        /**
         * MessageContextInfo messageAddOnExpiryType.
         * @member {E2E.MessageContextInfo.MessageAddonExpiryType|null|undefined} messageAddOnExpiryType
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.messageAddOnExpiryType = null;

        /**
         * MessageContextInfo messageAssociation.
         * @member {E2E.IMessageAssociation|null|undefined} messageAssociation
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.messageAssociation = null;

        /**
         * MessageContextInfo capiCreatedGroup.
         * @member {boolean|null|undefined} capiCreatedGroup
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.capiCreatedGroup = null;

        /**
         * MessageContextInfo supportPayload.
         * @member {string|null|undefined} supportPayload
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.supportPayload = null;

        /**
         * MessageContextInfo limitSharing.
         * @member {Protocol.ILimitSharing|null|undefined} limitSharing
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.limitSharing = null;

        /**
         * MessageContextInfo limitSharingV2.
         * @member {Protocol.ILimitSharing|null|undefined} limitSharingV2
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.limitSharingV2 = null;

        /**
         * MessageContextInfo threadId.
         * @member {Array.<E2E.IThreadID>} threadId
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.threadId = $util.emptyArray;

        /**
         * MessageContextInfo weblinkRenderConfig.
         * @member {E2E.WebLinkRenderConfig|null|undefined} weblinkRenderConfig
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        MessageContextInfo.prototype.weblinkRenderConfig = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * MessageContextInfo _deviceListMetadata.
         * @member {"deviceListMetadata"|undefined} _deviceListMetadata
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        Object.defineProperty(MessageContextInfo.prototype, "_deviceListMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["deviceListMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageContextInfo _deviceListMetadataVersion.
         * @member {"deviceListMetadataVersion"|undefined} _deviceListMetadataVersion
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        Object.defineProperty(MessageContextInfo.prototype, "_deviceListMetadataVersion", {
            get: $util.oneOfGetter($oneOfFields = ["deviceListMetadataVersion"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageContextInfo _messageSecret.
         * @member {"messageSecret"|undefined} _messageSecret
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        Object.defineProperty(MessageContextInfo.prototype, "_messageSecret", {
            get: $util.oneOfGetter($oneOfFields = ["messageSecret"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageContextInfo _paddingBytes.
         * @member {"paddingBytes"|undefined} _paddingBytes
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        Object.defineProperty(MessageContextInfo.prototype, "_paddingBytes", {
            get: $util.oneOfGetter($oneOfFields = ["paddingBytes"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageContextInfo _messageAddOnDurationInSecs.
         * @member {"messageAddOnDurationInSecs"|undefined} _messageAddOnDurationInSecs
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        Object.defineProperty(MessageContextInfo.prototype, "_messageAddOnDurationInSecs", {
            get: $util.oneOfGetter($oneOfFields = ["messageAddOnDurationInSecs"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageContextInfo _botMessageSecret.
         * @member {"botMessageSecret"|undefined} _botMessageSecret
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        Object.defineProperty(MessageContextInfo.prototype, "_botMessageSecret", {
            get: $util.oneOfGetter($oneOfFields = ["botMessageSecret"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageContextInfo _botMetadata.
         * @member {"botMetadata"|undefined} _botMetadata
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        Object.defineProperty(MessageContextInfo.prototype, "_botMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["botMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageContextInfo _reportingTokenVersion.
         * @member {"reportingTokenVersion"|undefined} _reportingTokenVersion
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        Object.defineProperty(MessageContextInfo.prototype, "_reportingTokenVersion", {
            get: $util.oneOfGetter($oneOfFields = ["reportingTokenVersion"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageContextInfo _messageAddOnExpiryType.
         * @member {"messageAddOnExpiryType"|undefined} _messageAddOnExpiryType
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        Object.defineProperty(MessageContextInfo.prototype, "_messageAddOnExpiryType", {
            get: $util.oneOfGetter($oneOfFields = ["messageAddOnExpiryType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageContextInfo _messageAssociation.
         * @member {"messageAssociation"|undefined} _messageAssociation
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        Object.defineProperty(MessageContextInfo.prototype, "_messageAssociation", {
            get: $util.oneOfGetter($oneOfFields = ["messageAssociation"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageContextInfo _capiCreatedGroup.
         * @member {"capiCreatedGroup"|undefined} _capiCreatedGroup
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        Object.defineProperty(MessageContextInfo.prototype, "_capiCreatedGroup", {
            get: $util.oneOfGetter($oneOfFields = ["capiCreatedGroup"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageContextInfo _supportPayload.
         * @member {"supportPayload"|undefined} _supportPayload
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        Object.defineProperty(MessageContextInfo.prototype, "_supportPayload", {
            get: $util.oneOfGetter($oneOfFields = ["supportPayload"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageContextInfo _limitSharing.
         * @member {"limitSharing"|undefined} _limitSharing
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        Object.defineProperty(MessageContextInfo.prototype, "_limitSharing", {
            get: $util.oneOfGetter($oneOfFields = ["limitSharing"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageContextInfo _limitSharingV2.
         * @member {"limitSharingV2"|undefined} _limitSharingV2
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        Object.defineProperty(MessageContextInfo.prototype, "_limitSharingV2", {
            get: $util.oneOfGetter($oneOfFields = ["limitSharingV2"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageContextInfo _weblinkRenderConfig.
         * @member {"weblinkRenderConfig"|undefined} _weblinkRenderConfig
         * @memberof E2E.MessageContextInfo
         * @instance
         */
        Object.defineProperty(MessageContextInfo.prototype, "_weblinkRenderConfig", {
            get: $util.oneOfGetter($oneOfFields = ["weblinkRenderConfig"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new MessageContextInfo instance using the specified properties.
         * @function create
         * @memberof E2E.MessageContextInfo
         * @static
         * @param {E2E.IMessageContextInfo=} [properties] Properties to set
         * @returns {E2E.MessageContextInfo} MessageContextInfo instance
         */
        MessageContextInfo.create = function create(properties) {
            return new MessageContextInfo(properties);
        };

        /**
         * Encodes the specified MessageContextInfo message. Does not implicitly {@link E2E.MessageContextInfo.verify|verify} messages.
         * @function encode
         * @memberof E2E.MessageContextInfo
         * @static
         * @param {E2E.IMessageContextInfo} message MessageContextInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MessageContextInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.deviceListMetadata != null && Object.hasOwnProperty.call(message, "deviceListMetadata"))
                $root.E2E.DeviceListMetadata.encode(message.deviceListMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.deviceListMetadataVersion != null && Object.hasOwnProperty.call(message, "deviceListMetadataVersion"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.deviceListMetadataVersion);
            if (message.messageSecret != null && Object.hasOwnProperty.call(message, "messageSecret"))
                writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.messageSecret);
            if (message.paddingBytes != null && Object.hasOwnProperty.call(message, "paddingBytes"))
                writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.paddingBytes);
            if (message.messageAddOnDurationInSecs != null && Object.hasOwnProperty.call(message, "messageAddOnDurationInSecs"))
                writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.messageAddOnDurationInSecs);
            if (message.botMessageSecret != null && Object.hasOwnProperty.call(message, "botMessageSecret"))
                writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.botMessageSecret);
            if (message.botMetadata != null && Object.hasOwnProperty.call(message, "botMetadata"))
                $root.AICommon.BotMetadata.encode(message.botMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
            if (message.reportingTokenVersion != null && Object.hasOwnProperty.call(message, "reportingTokenVersion"))
                writer.uint32(/* id 8, wireType 0 =*/64).int32(message.reportingTokenVersion);
            if (message.messageAddOnExpiryType != null && Object.hasOwnProperty.call(message, "messageAddOnExpiryType"))
                writer.uint32(/* id 9, wireType 0 =*/72).int32(message.messageAddOnExpiryType);
            if (message.messageAssociation != null && Object.hasOwnProperty.call(message, "messageAssociation"))
                $root.E2E.MessageAssociation.encode(message.messageAssociation, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
            if (message.capiCreatedGroup != null && Object.hasOwnProperty.call(message, "capiCreatedGroup"))
                writer.uint32(/* id 11, wireType 0 =*/88).bool(message.capiCreatedGroup);
            if (message.supportPayload != null && Object.hasOwnProperty.call(message, "supportPayload"))
                writer.uint32(/* id 12, wireType 2 =*/98).string(message.supportPayload);
            if (message.limitSharing != null && Object.hasOwnProperty.call(message, "limitSharing"))
                $root.Protocol.LimitSharing.encode(message.limitSharing, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
            if (message.limitSharingV2 != null && Object.hasOwnProperty.call(message, "limitSharingV2"))
                $root.Protocol.LimitSharing.encode(message.limitSharingV2, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
            if (message.threadId != null && message.threadId.length)
                for (var i = 0; i < message.threadId.length; ++i)
                    $root.E2E.ThreadID.encode(message.threadId[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
            if (message.weblinkRenderConfig != null && Object.hasOwnProperty.call(message, "weblinkRenderConfig"))
                writer.uint32(/* id 16, wireType 0 =*/128).int32(message.weblinkRenderConfig);
            return writer;
        };

        /**
         * Encodes the specified MessageContextInfo message, length delimited. Does not implicitly {@link E2E.MessageContextInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.MessageContextInfo
         * @static
         * @param {E2E.IMessageContextInfo} message MessageContextInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MessageContextInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a MessageContextInfo message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.MessageContextInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.MessageContextInfo} MessageContextInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MessageContextInfo.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.E2E.MessageContextInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.deviceListMetadata = $root.E2E.DeviceListMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.deviceListMetadataVersion = reader.int32();
                        break;
                    }
                case 3: {
                        message.messageSecret = reader.bytes();
                        break;
                    }
                case 4: {
                        message.paddingBytes = reader.bytes();
                        break;
                    }
                case 5: {
                        message.messageAddOnDurationInSecs = reader.uint32();
                        break;
                    }
                case 6: {
                        message.botMessageSecret = reader.bytes();
                        break;
                    }
                case 7: {
                        message.botMetadata = $root.AICommon.BotMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 8: {
                        message.reportingTokenVersion = reader.int32();
                        break;
                    }
                case 9: {
                        message.messageAddOnExpiryType = reader.int32();
                        break;
                    }
                case 10: {
                        message.messageAssociation = $root.E2E.MessageAssociation.decode(reader, reader.uint32());
                        break;
                    }
                case 11: {
                        message.capiCreatedGroup = reader.bool();
                        break;
                    }
                case 12: {
                        message.supportPayload = reader.string();
                        break;
                    }
                case 13: {
                        message.limitSharing = $root.Protocol.LimitSharing.decode(reader, reader.uint32());
                        break;
                    }
                case 14: {
                        message.limitSharingV2 = $root.Protocol.LimitSharing.decode(reader, reader.uint32());
                        break;
                    }
                case 15: {
                        if (!(message.threadId && message.threadId.length))
                            message.threadId = [];
                        message.threadId.push($root.E2E.ThreadID.decode(reader, reader.uint32()));
                        break;
                    }
                case 16: {
                        message.weblinkRenderConfig = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a MessageContextInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.MessageContextInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.MessageContextInfo} MessageContextInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MessageContextInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a MessageContextInfo message.
         * @function verify
         * @memberof E2E.MessageContextInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        MessageContextInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.deviceListMetadata != null && message.hasOwnProperty("deviceListMetadata")) {
                properties._deviceListMetadata = 1;
                {
                    var error = $root.E2E.DeviceListMetadata.verify(message.deviceListMetadata);
                    if (error)
                        return "deviceListMetadata." + error;
                }
            }
            if (message.deviceListMetadataVersion != null && message.hasOwnProperty("deviceListMetadataVersion")) {
                properties._deviceListMetadataVersion = 1;
                if (!$util.isInteger(message.deviceListMetadataVersion))
                    return "deviceListMetadataVersion: 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.paddingBytes != null && message.hasOwnProperty("paddingBytes")) {
                properties._paddingBytes = 1;
                if (!(message.paddingBytes && typeof message.paddingBytes.length === "number" || $util.isString(message.paddingBytes)))
                    return "paddingBytes: buffer expected";
            }
            if (message.messageAddOnDurationInSecs != null && message.hasOwnProperty("messageAddOnDurationInSecs")) {
                properties._messageAddOnDurationInSecs = 1;
                if (!$util.isInteger(message.messageAddOnDurationInSecs))
                    return "messageAddOnDurationInSecs: integer 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.botMetadata != null && message.hasOwnProperty("botMetadata")) {
                properties._botMetadata = 1;
                {
                    var error = $root.AICommon.BotMetadata.verify(message.botMetadata);
                    if (error)
                        return "botMetadata." + error;
                }
            }
            if (message.reportingTokenVersion != null && message.hasOwnProperty("reportingTokenVersion")) {
                properties._reportingTokenVersion = 1;
                if (!$util.isInteger(message.reportingTokenVersion))
                    return "reportingTokenVersion: integer expected";
            }
            if (message.messageAddOnExpiryType != null && message.hasOwnProperty("messageAddOnExpiryType")) {
                properties._messageAddOnExpiryType = 1;
                switch (message.messageAddOnExpiryType) {
                default:
                    return "messageAddOnExpiryType: enum value expected";
                case 1:
                case 2:
                    break;
                }
            }
            if (message.messageAssociation != null && message.hasOwnProperty("messageAssociation")) {
                properties._messageAssociation = 1;
                {
                    var error = $root.E2E.MessageAssociation.verify(message.messageAssociation);
                    if (error)
                        return "messageAssociation." + error;
                }
            }
            if (message.capiCreatedGroup != null && message.hasOwnProperty("capiCreatedGroup")) {
                properties._capiCreatedGroup = 1;
                if (typeof message.capiCreatedGroup !== "boolean")
                    return "capiCreatedGroup: boolean expected";
            }
            if (message.supportPayload != null && message.hasOwnProperty("supportPayload")) {
                properties._supportPayload = 1;
                if (!$util.isString(message.supportPayload))
                    return "supportPayload: string expected";
            }
            if (message.limitSharing != null && message.hasOwnProperty("limitSharing")) {
                properties._limitSharing = 1;
                {
                    var error = $root.Protocol.LimitSharing.verify(message.limitSharing);
                    if (error)
                        return "limitSharing." + error;
                }
            }
            if (message.limitSharingV2 != null && message.hasOwnProperty("limitSharingV2")) {
                properties._limitSharingV2 = 1;
                {
                    var error = $root.Protocol.LimitSharing.verify(message.limitSharingV2);
                    if (error)
                        return "limitSharingV2." + error;
                }
            }
            if (message.threadId != null && message.hasOwnProperty("threadId")) {
                if (!Array.isArray(message.threadId))
                    return "threadId: array expected";
                for (var i = 0; i < message.threadId.length; ++i) {
                    var error = $root.E2E.ThreadID.verify(message.threadId[i]);
                    if (error)
                        return "threadId." + error;
                }
            }
            if (message.weblinkRenderConfig != null && message.hasOwnProperty("weblinkRenderConfig")) {
                properties._weblinkRenderConfig = 1;
                switch (message.weblinkRenderConfig) {
                default:
                    return "weblinkRenderConfig: enum value expected";
                case 0:
                case 1:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a MessageContextInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.MessageContextInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.MessageContextInfo} MessageContextInfo
         */
        MessageContextInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.MessageContextInfo)
                return object;
            var message = new $root.E2E.MessageContextInfo();
            if (object.deviceListMetadata != null) {
                if (typeof object.deviceListMetadata !== "object")
                    throw TypeError(".E2E.MessageContextInfo.deviceListMetadata: object expected");
                message.deviceListMetadata = $root.E2E.DeviceListMetadata.fromObject(object.deviceListMetadata);
            }
            if (object.deviceListMetadataVersion != null)
                message.deviceListMetadataVersion = object.deviceListMetadataVersion | 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.paddingBytes != null)
                if (typeof object.paddingBytes === "string")
                    $util.base64.decode(object.paddingBytes, message.paddingBytes = $util.newBuffer($util.base64.length(object.paddingBytes)), 0);
                else if (object.paddingBytes.length >= 0)
                    message.paddingBytes = object.paddingBytes;
            if (object.messageAddOnDurationInSecs != null)
                message.messageAddOnDurationInSecs = object.messageAddOnDurationInSecs >>> 0;
            if (object.botMessageSecret != null)
                if (typeof object.botMessageSecret === "string")
                    $util.base64.decode(object.botMessageSecret, message.botMessageSecret = $util.newBuffer($util.base64.length(object.botMessageSecret)), 0);
                else if (object.botMessageSecret.length >= 0)
                    message.botMessageSecret = object.botMessageSecret;
            if (object.botMetadata != null) {
                if (typeof object.botMetadata !== "object")
                    throw TypeError(".E2E.MessageContextInfo.botMetadata: object expected");
                message.botMetadata = $root.AICommon.BotMetadata.fromObject(object.botMetadata);
            }
            if (object.reportingTokenVersion != null)
                message.reportingTokenVersion = object.reportingTokenVersion | 0;
            switch (object.messageAddOnExpiryType) {
            default:
                if (typeof object.messageAddOnExpiryType === "number") {
                    message.messageAddOnExpiryType = object.messageAddOnExpiryType;
                    break;
                }
                break;
            case "STATIC":
            case 1:
                message.messageAddOnExpiryType = 1;
                break;
            case "DEPENDENT_ON_PARENT":
            case 2:
                message.messageAddOnExpiryType = 2;
                break;
            }
            if (object.messageAssociation != null) {
                if (typeof object.messageAssociation !== "object")
                    throw TypeError(".E2E.MessageContextInfo.messageAssociation: object expected");
                message.messageAssociation = $root.E2E.MessageAssociation.fromObject(object.messageAssociation);
            }
            if (object.capiCreatedGroup != null)
                message.capiCreatedGroup = Boolean(object.capiCreatedGroup);
            if (object.supportPayload != null)
                message.supportPayload = String(object.supportPayload);
            if (object.limitSharing != null) {
                if (typeof object.limitSharing !== "object")
                    throw TypeError(".E2E.MessageContextInfo.limitSharing: object expected");
                message.limitSharing = $root.Protocol.LimitSharing.fromObject(object.limitSharing);
            }
            if (object.limitSharingV2 != null) {
                if (typeof object.limitSharingV2 !== "object")
                    throw TypeError(".E2E.MessageContextInfo.limitSharingV2: object expected");
                message.limitSharingV2 = $root.Protocol.LimitSharing.fromObject(object.limitSharingV2);
            }
            if (object.threadId) {
                if (!Array.isArray(object.threadId))
                    throw TypeError(".E2E.MessageContextInfo.threadId: array expected");
                message.threadId = [];
                for (var i = 0; i < object.threadId.length; ++i) {
                    if (typeof object.threadId[i] !== "object")
                        throw TypeError(".E2E.MessageContextInfo.threadId: object expected");
                    message.threadId[i] = $root.E2E.ThreadID.fromObject(object.threadId[i]);
                }
            }
            switch (object.weblinkRenderConfig) {
            default:
                if (typeof object.weblinkRenderConfig === "number") {
                    message.weblinkRenderConfig = object.weblinkRenderConfig;
                    break;
                }
                break;
            case "WEBVIEW":
            case 0:
                message.weblinkRenderConfig = 0;
                break;
            case "SYSTEM":
            case 1:
                message.weblinkRenderConfig = 1;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a MessageContextInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.MessageContextInfo
         * @static
         * @param {E2E.MessageContextInfo} message MessageContextInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        MessageContextInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.threadId = [];
            if (message.deviceListMetadata != null && message.hasOwnProperty("deviceListMetadata")) {
                object.deviceListMetadata = $root.E2E.DeviceListMetadata.toObject(message.deviceListMetadata, options);
                if (options.oneofs)
                    object._deviceListMetadata = "deviceListMetadata";
            }
            if (message.deviceListMetadataVersion != null && message.hasOwnProperty("deviceListMetadataVersion")) {
                object.deviceListMetadataVersion = message.deviceListMetadataVersion;
                if (options.oneofs)
                    object._deviceListMetadataVersion = "deviceListMetadataVersion";
            }
            if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) {
                object.messageSecret = options.bytes === String ? $util.base64.encode(message.messageSecret, 0, message.messageSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSecret) : message.messageSecret;
                if (options.oneofs)
                    object._messageSecret = "messageSecret";
            }
            if (message.paddingBytes != null && message.hasOwnProperty("paddingBytes")) {
                object.paddingBytes = options.bytes === String ? $util.base64.encode(message.paddingBytes, 0, message.paddingBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.paddingBytes) : message.paddingBytes;
                if (options.oneofs)
                    object._paddingBytes = "paddingBytes";
            }
            if (message.messageAddOnDurationInSecs != null && message.hasOwnProperty("messageAddOnDurationInSecs")) {
                object.messageAddOnDurationInSecs = message.messageAddOnDurationInSecs;
                if (options.oneofs)
                    object._messageAddOnDurationInSecs = "messageAddOnDurationInSecs";
            }
            if (message.botMessageSecret != null && message.hasOwnProperty("botMessageSecret")) {
                object.botMessageSecret = options.bytes === String ? $util.base64.encode(message.botMessageSecret, 0, message.botMessageSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.botMessageSecret) : message.botMessageSecret;
                if (options.oneofs)
                    object._botMessageSecret = "botMessageSecret";
            }
            if (message.botMetadata != null && message.hasOwnProperty("botMetadata")) {
                object.botMetadata = $root.AICommon.BotMetadata.toObject(message.botMetadata, options);
                if (options.oneofs)
                    object._botMetadata = "botMetadata";
            }
            if (message.reportingTokenVersion != null && message.hasOwnProperty("reportingTokenVersion")) {
                object.reportingTokenVersion = message.reportingTokenVersion;
                if (options.oneofs)
                    object._reportingTokenVersion = "reportingTokenVersion";
            }
            if (message.messageAddOnExpiryType != null && message.hasOwnProperty("messageAddOnExpiryType")) {
                object.messageAddOnExpiryType = options.enums === String ? $root.E2E.MessageContextInfo.MessageAddonExpiryType[message.messageAddOnExpiryType] === undefined ? message.messageAddOnExpiryType : $root.E2E.MessageContextInfo.MessageAddonExpiryType[message.messageAddOnExpiryType] : message.messageAddOnExpiryType;
                if (options.oneofs)
                    object._messageAddOnExpiryType = "messageAddOnExpiryType";
            }
            if (message.messageAssociation != null && message.hasOwnProperty("messageAssociation")) {
                object.messageAssociation = $root.E2E.MessageAssociation.toObject(message.messageAssociation, options);
                if (options.oneofs)
                    object._messageAssociation = "messageAssociation";
            }
            if (message.capiCreatedGroup != null && message.hasOwnProperty("capiCreatedGroup")) {
                object.capiCreatedGroup = message.capiCreatedGroup;
                if (options.oneofs)
                    object._capiCreatedGroup = "capiCreatedGroup";
            }
            if (message.supportPayload != null && message.hasOwnProperty("supportPayload")) {
                object.supportPayload = message.supportPayload;
                if (options.oneofs)
                    object._supportPayload = "supportPayload";
            }
            if (message.limitSharing != null && message.hasOwnProperty("limitSharing")) {
                object.limitSharing = $root.Protocol.LimitSharing.toObject(message.limitSharing, options);
                if (options.oneofs)
                    object._limitSharing = "limitSharing";
            }
            if (message.limitSharingV2 != null && message.hasOwnProperty("limitSharingV2")) {
                object.limitSharingV2 = $root.Protocol.LimitSharing.toObject(message.limitSharingV2, options);
                if (options.oneofs)
                    object._limitSharingV2 = "limitSharingV2";
            }
            if (message.threadId && message.threadId.length) {
                object.threadId = [];
                for (var j = 0; j < message.threadId.length; ++j)
                    object.threadId[j] = $root.E2E.ThreadID.toObject(message.threadId[j], options);
            }
            if (message.weblinkRenderConfig != null && message.hasOwnProperty("weblinkRenderConfig")) {
                object.weblinkRenderConfig = options.enums === String ? $root.E2E.WebLinkRenderConfig[message.weblinkRenderConfig] === undefined ? message.weblinkRenderConfig : $root.E2E.WebLinkRenderConfig[message.weblinkRenderConfig] : message.weblinkRenderConfig;
                if (options.oneofs)
                    object._weblinkRenderConfig = "weblinkRenderConfig";
            }
            return object;
        };

        /**
         * Converts this MessageContextInfo to JSON.
         * @function toJSON
         * @memberof E2E.MessageContextInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        MessageContextInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for MessageContextInfo
         * @function getTypeUrl
         * @memberof E2E.MessageContextInfo
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        MessageContextInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.MessageContextInfo";
        };

        /**
         * MessageAddonExpiryType enum.
         * @name E2E.MessageContextInfo.MessageAddonExpiryType
         * @enum {number}
         * @property {number} STATIC=1 STATIC value
         * @property {number} DEPENDENT_ON_PARENT=2 DEPENDENT_ON_PARENT value
         */
        MessageContextInfo.MessageAddonExpiryType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[1] = "STATIC"] = 1;
            values[valuesById[2] = "DEPENDENT_ON_PARENT"] = 2;
            return values;
        })();

        return MessageContextInfo;
    })();

    E2E.ThreadID = (function() {

        /**
         * Properties of a ThreadID.
         * @memberof E2E
         * @interface IThreadID
         * @property {E2E.ThreadID.ThreadType|null} [threadType] ThreadID threadType
         * @property {Protocol.IMessageKey|null} [threadKey] ThreadID threadKey
         */

        /**
         * Constructs a new ThreadID.
         * @memberof E2E
         * @classdesc Represents a ThreadID.
         * @implements IThreadID
         * @constructor
         * @param {E2E.IThreadID=} [properties] Properties to set
         */
        function ThreadID(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]];
        }

        /**
         * ThreadID threadType.
         * @member {E2E.ThreadID.ThreadType|null|undefined} threadType
         * @memberof E2E.ThreadID
         * @instance
         */
        ThreadID.prototype.threadType = null;

        /**
         * ThreadID threadKey.
         * @member {Protocol.IMessageKey|null|undefined} threadKey
         * @memberof E2E.ThreadID
         * @instance
         */
        ThreadID.prototype.threadKey = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * ThreadID _threadType.
         * @member {"threadType"|undefined} _threadType
         * @memberof E2E.ThreadID
         * @instance
         */
        Object.defineProperty(ThreadID.prototype, "_threadType", {
            get: $util.oneOfGetter($oneOfFields = ["threadType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ThreadID _threadKey.
         * @member {"threadKey"|undefined} _threadKey
         * @memberof E2E.ThreadID
         * @instance
         */
        Object.defineProperty(ThreadID.prototype, "_threadKey", {
            get: $util.oneOfGetter($oneOfFields = ["threadKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new ThreadID instance using the specified properties.
         * @function create
         * @memberof E2E.ThreadID
         * @static
         * @param {E2E.IThreadID=} [properties] Properties to set
         * @returns {E2E.ThreadID} ThreadID instance
         */
        ThreadID.create = function create(properties) {
            return new ThreadID(properties);
        };

        /**
         * Encodes the specified ThreadID message. Does not implicitly {@link E2E.ThreadID.verify|verify} messages.
         * @function encode
         * @memberof E2E.ThreadID
         * @static
         * @param {E2E.IThreadID} message ThreadID message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ThreadID.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.threadType != null && Object.hasOwnProperty.call(message, "threadType"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.threadType);
            if (message.threadKey != null && Object.hasOwnProperty.call(message, "threadKey"))
                $root.Protocol.MessageKey.encode(message.threadKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified ThreadID message, length delimited. Does not implicitly {@link E2E.ThreadID.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.ThreadID
         * @static
         * @param {E2E.IThreadID} message ThreadID message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ThreadID.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ThreadID message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.ThreadID
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.ThreadID} ThreadID
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ThreadID.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.E2E.ThreadID();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.threadType = reader.int32();
                        break;
                    }
                case 2: {
                        message.threadKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ThreadID message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.ThreadID
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.ThreadID} ThreadID
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ThreadID.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ThreadID message.
         * @function verify
         * @memberof E2E.ThreadID
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ThreadID.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.threadType != null && message.hasOwnProperty("threadType")) {
                properties._threadType = 1;
                switch (message.threadType) {
                default:
                    return "threadType: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            }
            if (message.threadKey != null && message.hasOwnProperty("threadKey")) {
                properties._threadKey = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.threadKey);
                    if (error)
                        return "threadKey." + error;
                }
            }
            return null;
        };

        /**
         * Creates a ThreadID message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.ThreadID
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.ThreadID} ThreadID
         */
        ThreadID.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.ThreadID)
                return object;
            var message = new $root.E2E.ThreadID();
            switch (object.threadType) {
            default:
                if (typeof object.threadType === "number") {
                    message.threadType = object.threadType;
                    break;
                }
                break;
            case "UNKNOWN":
            case 0:
                message.threadType = 0;
                break;
            case "VIEW_REPLIES":
            case 1:
                message.threadType = 1;
                break;
            case "AI_THREAD":
            case 2:
                message.threadType = 2;
                break;
            }
            if (object.threadKey != null) {
                if (typeof object.threadKey !== "object")
                    throw TypeError(".E2E.ThreadID.threadKey: object expected");
                message.threadKey = $root.Protocol.MessageKey.fromObject(object.threadKey);
            }
            return message;
        };

        /**
         * Creates a plain object from a ThreadID message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.ThreadID
         * @static
         * @param {E2E.ThreadID} message ThreadID
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        ThreadID.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.threadType != null && message.hasOwnProperty("threadType")) {
                object.threadType = options.enums === String ? $root.E2E.ThreadID.ThreadType[message.threadType] === undefined ? message.threadType : $root.E2E.ThreadID.ThreadType[message.threadType] : message.threadType;
                if (options.oneofs)
                    object._threadType = "threadType";
            }
            if (message.threadKey != null && message.hasOwnProperty("threadKey")) {
                object.threadKey = $root.Protocol.MessageKey.toObject(message.threadKey, options);
                if (options.oneofs)
                    object._threadKey = "threadKey";
            }
            return object;
        };

        /**
         * Converts this ThreadID to JSON.
         * @function toJSON
         * @memberof E2E.ThreadID
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        ThreadID.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for ThreadID
         * @function getTypeUrl
         * @memberof E2E.ThreadID
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        ThreadID.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.ThreadID";
        };

        /**
         * ThreadType enum.
         * @name E2E.ThreadID.ThreadType
         * @enum {number}
         * @property {number} UNKNOWN=0 UNKNOWN value
         * @property {number} VIEW_REPLIES=1 VIEW_REPLIES value
         * @property {number} AI_THREAD=2 AI_THREAD value
         */
        ThreadID.ThreadType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "VIEW_REPLIES"] = 1;
            values[valuesById[2] = "AI_THREAD"] = 2;
            return values;
        })();

        return ThreadID;
    })();

    E2E.MessageAssociation = (function() {

        /**
         * Properties of a MessageAssociation.
         * @memberof E2E
         * @interface IMessageAssociation
         * @property {E2E.MessageAssociation.AssociationType|null} [associationType] MessageAssociation associationType
         * @property {Protocol.IMessageKey|null} [parentMessageKey] MessageAssociation parentMessageKey
         * @property {number|null} [messageIndex] MessageAssociation messageIndex
         */

        /**
         * Constructs a new MessageAssociation.
         * @memberof E2E
         * @classdesc Represents a MessageAssociation.
         * @implements IMessageAssociation
         * @constructor
         * @param {E2E.IMessageAssociation=} [properties] Properties to set
         */
        function MessageAssociation(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]];
        }

        /**
         * MessageAssociation associationType.
         * @member {E2E.MessageAssociation.AssociationType|null|undefined} associationType
         * @memberof E2E.MessageAssociation
         * @instance
         */
        MessageAssociation.prototype.associationType = null;

        /**
         * MessageAssociation parentMessageKey.
         * @member {Protocol.IMessageKey|null|undefined} parentMessageKey
         * @memberof E2E.MessageAssociation
         * @instance
         */
        MessageAssociation.prototype.parentMessageKey = null;

        /**
         * MessageAssociation messageIndex.
         * @member {number|null|undefined} messageIndex
         * @memberof E2E.MessageAssociation
         * @instance
         */
        MessageAssociation.prototype.messageIndex = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * MessageAssociation _associationType.
         * @member {"associationType"|undefined} _associationType
         * @memberof E2E.MessageAssociation
         * @instance
         */
        Object.defineProperty(MessageAssociation.prototype, "_associationType", {
            get: $util.oneOfGetter($oneOfFields = ["associationType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageAssociation _parentMessageKey.
         * @member {"parentMessageKey"|undefined} _parentMessageKey
         * @memberof E2E.MessageAssociation
         * @instance
         */
        Object.defineProperty(MessageAssociation.prototype, "_parentMessageKey", {
            get: $util.oneOfGetter($oneOfFields = ["parentMessageKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageAssociation _messageIndex.
         * @member {"messageIndex"|undefined} _messageIndex
         * @memberof E2E.MessageAssociation
         * @instance
         */
        Object.defineProperty(MessageAssociation.prototype, "_messageIndex", {
            get: $util.oneOfGetter($oneOfFields = ["messageIndex"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new MessageAssociation instance using the specified properties.
         * @function create
         * @memberof E2E.MessageAssociation
         * @static
         * @param {E2E.IMessageAssociation=} [properties] Properties to set
         * @returns {E2E.MessageAssociation} MessageAssociation instance
         */
        MessageAssociation.create = function create(properties) {
            return new MessageAssociation(properties);
        };

        /**
         * Encodes the specified MessageAssociation message. Does not implicitly {@link E2E.MessageAssociation.verify|verify} messages.
         * @function encode
         * @memberof E2E.MessageAssociation
         * @static
         * @param {E2E.IMessageAssociation} message MessageAssociation message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MessageAssociation.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.associationType != null && Object.hasOwnProperty.call(message, "associationType"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.associationType);
            if (message.parentMessageKey != null && Object.hasOwnProperty.call(message, "parentMessageKey"))
                $root.Protocol.MessageKey.encode(message.parentMessageKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.messageIndex != null && Object.hasOwnProperty.call(message, "messageIndex"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.messageIndex);
            return writer;
        };

        /**
         * Encodes the specified MessageAssociation message, length delimited. Does not implicitly {@link E2E.MessageAssociation.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.MessageAssociation
         * @static
         * @param {E2E.IMessageAssociation} message MessageAssociation message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MessageAssociation.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a MessageAssociation message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.MessageAssociation
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.MessageAssociation} MessageAssociation
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MessageAssociation.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.E2E.MessageAssociation();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.associationType = reader.int32();
                        break;
                    }
                case 2: {
                        message.parentMessageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 3: {
                        message.messageIndex = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a MessageAssociation message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.MessageAssociation
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.MessageAssociation} MessageAssociation
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MessageAssociation.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a MessageAssociation message.
         * @function verify
         * @memberof E2E.MessageAssociation
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        MessageAssociation.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.associationType != null && message.hasOwnProperty("associationType")) {
                properties._associationType = 1;
                switch (message.associationType) {
                default:
                    return "associationType: 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:
                case 11:
                case 12:
                case 13:
                case 14:
                case 15:
                case 16:
                case 17:
                case 18:
                case 19:
                    break;
                }
            }
            if (message.parentMessageKey != null && message.hasOwnProperty("parentMessageKey")) {
                properties._parentMessageKey = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.parentMessageKey);
                    if (error)
                        return "parentMessageKey." + error;
                }
            }
            if (message.messageIndex != null && message.hasOwnProperty("messageIndex")) {
                properties._messageIndex = 1;
                if (!$util.isInteger(message.messageIndex))
                    return "messageIndex: integer expected";
            }
            return null;
        };

        /**
         * Creates a MessageAssociation message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.MessageAssociation
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.MessageAssociation} MessageAssociation
         */
        MessageAssociation.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.MessageAssociation)
                return object;
            var message = new $root.E2E.MessageAssociation();
            switch (object.associationType) {
            default:
                if (typeof object.associationType === "number") {
                    message.associationType = object.associationType;
                    break;
                }
                break;
            case "UNKNOWN":
            case 0:
                message.associationType = 0;
                break;
            case "MEDIA_ALBUM":
            case 1:
                message.associationType = 1;
                break;
            case "BOT_PLUGIN":
            case 2:
                message.associationType = 2;
                break;
            case "EVENT_COVER_IMAGE":
            case 3:
                message.associationType = 3;
                break;
            case "STATUS_POLL":
            case 4:
                message.associationType = 4;
                break;
            case "HD_VIDEO_DUAL_UPLOAD":
            case 5:
                message.associationType = 5;
                break;
            case "STATUS_EXTERNAL_RESHARE":
            case 6:
                message.associationType = 6;
                break;
            case "MEDIA_POLL":
            case 7:
                message.associationType = 7;
                break;
            case "STATUS_ADD_YOURS":
            case 8:
                message.associationType = 8;
                break;
            case "STATUS_NOTIFICATION":
            case 9:
                message.associationType = 9;
                break;
            case "HD_IMAGE_DUAL_UPLOAD":
            case 10:
                message.associationType = 10;
                break;
            case "STICKER_ANNOTATION":
            case 11:
                message.associationType = 11;
                break;
            case "MOTION_PHOTO":
            case 12:
                message.associationType = 12;
                break;
            case "STATUS_LINK_ACTION":
            case 13:
                message.associationType = 13;
                break;
            case "VIEW_ALL_REPLIES":
            case 14:
                message.associationType = 14;
                break;
            case "STATUS_ADD_YOURS_AI_IMAGINE":
            case 15:
                message.associationType = 15;
                break;
            case "STATUS_QUESTION":
            case 16:
                message.associationType = 16;
                break;
            case "STATUS_ADD_YOURS_DIWALI":
            case 17:
                message.associationType = 17;
                break;
            case "STATUS_REACTION":
            case 18:
                message.associationType = 18;
                break;
            case "HEVC_VIDEO_DUAL_UPLOAD":
            case 19:
                message.associationType = 19;
                break;
            }
            if (object.parentMessageKey != null) {
                if (typeof object.parentMessageKey !== "object")
                    throw TypeError(".E2E.MessageAssociation.parentMessageKey: object expected");
                message.parentMessageKey = $root.Protocol.MessageKey.fromObject(object.parentMessageKey);
            }
            if (object.messageIndex != null)
                message.messageIndex = object.messageIndex | 0;
            return message;
        };

        /**
         * Creates a plain object from a MessageAssociation message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.MessageAssociation
         * @static
         * @param {E2E.MessageAssociation} message MessageAssociation
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        MessageAssociation.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.associationType != null && message.hasOwnProperty("associationType")) {
                object.associationType = options.enums === String ? $root.E2E.MessageAssociation.AssociationType[message.associationType] === undefined ? message.associationType : $root.E2E.MessageAssociation.AssociationType[message.associationType] : message.associationType;
                if (options.oneofs)
                    object._associationType = "associationType";
            }
            if (message.parentMessageKey != null && message.hasOwnProperty("parentMessageKey")) {
                object.parentMessageKey = $root.Protocol.MessageKey.toObject(message.parentMessageKey, options);
                if (options.oneofs)
                    object._parentMessageKey = "parentMessageKey";
            }
            if (message.messageIndex != null && message.hasOwnProperty("messageIndex")) {
                object.messageIndex = message.messageIndex;
                if (options.oneofs)
                    object._messageIndex = "messageIndex";
            }
            return object;
        };

        /**
         * Converts this MessageAssociation to JSON.
         * @function toJSON
         * @memberof E2E.MessageAssociation
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        MessageAssociation.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for MessageAssociation
         * @function getTypeUrl
         * @memberof E2E.MessageAssociation
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        MessageAssociation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.MessageAssociation";
        };

        /**
         * AssociationType enum.
         * @name E2E.MessageAssociation.AssociationType
         * @enum {number}
         * @property {number} UNKNOWN=0 UNKNOWN value
         * @property {number} MEDIA_ALBUM=1 MEDIA_ALBUM value
         * @property {number} BOT_PLUGIN=2 BOT_PLUGIN value
         * @property {number} EVENT_COVER_IMAGE=3 EVENT_COVER_IMAGE value
         * @property {number} STATUS_POLL=4 STATUS_POLL value
         * @property {number} HD_VIDEO_DUAL_UPLOAD=5 HD_VIDEO_DUAL_UPLOAD value
         * @property {number} STATUS_EXTERNAL_RESHARE=6 STATUS_EXTERNAL_RESHARE value
         * @property {number} MEDIA_POLL=7 MEDIA_POLL value
         * @property {number} STATUS_ADD_YOURS=8 STATUS_ADD_YOURS value
         * @property {number} STATUS_NOTIFICATION=9 STATUS_NOTIFICATION value
         * @property {number} HD_IMAGE_DUAL_UPLOAD=10 HD_IMAGE_DUAL_UPLOAD value
         * @property {number} STICKER_ANNOTATION=11 STICKER_ANNOTATION value
         * @property {number} MOTION_PHOTO=12 MOTION_PHOTO value
         * @property {number} STATUS_LINK_ACTION=13 STATUS_LINK_ACTION value
         * @property {number} VIEW_ALL_REPLIES=14 VIEW_ALL_REPLIES value
         * @property {number} STATUS_ADD_YOURS_AI_IMAGINE=15 STATUS_ADD_YOURS_AI_IMAGINE value
         * @property {number} STATUS_QUESTION=16 STATUS_QUESTION value
         * @property {number} STATUS_ADD_YOURS_DIWALI=17 STATUS_ADD_YOURS_DIWALI value
         * @property {number} STATUS_REACTION=18 STATUS_REACTION value
         * @property {number} HEVC_VIDEO_DUAL_UPLOAD=19 HEVC_VIDEO_DUAL_UPLOAD value
         */
        MessageAssociation.AssociationType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "MEDIA_ALBUM"] = 1;
            values[valuesById[2] = "BOT_PLUGIN"] = 2;
            values[valuesById[3] = "EVENT_COVER_IMAGE"] = 3;
            values[valuesById[4] = "STATUS_POLL"] = 4;
            values[valuesById[5] = "HD_VIDEO_DUAL_UPLOAD"] = 5;
            values[valuesById[6] = "STATUS_EXTERNAL_RESHARE"] = 6;
            values[valuesById[7] = "MEDIA_POLL"] = 7;
            values[valuesById[8] = "STATUS_ADD_YOURS"] = 8;
            values[valuesById[9] = "STATUS_NOTIFICATION"] = 9;
            values[valuesById[10] = "HD_IMAGE_DUAL_UPLOAD"] = 10;
            values[valuesById[11] = "STICKER_ANNOTATION"] = 11;
            values[valuesById[12] = "MOTION_PHOTO"] = 12;
            values[valuesById[13] = "STATUS_LINK_ACTION"] = 13;
            values[valuesById[14] = "VIEW_ALL_REPLIES"] = 14;
            values[valuesById[15] = "STATUS_ADD_YOURS_AI_IMAGINE"] = 15;
            values[valuesById[16] = "STATUS_QUESTION"] = 16;
            values[valuesById[17] = "STATUS_ADD_YOURS_DIWALI"] = 17;
            values[valuesById[18] = "STATUS_REACTION"] = 18;
            values[valuesById[19] = "HEVC_VIDEO_DUAL_UPLOAD"] = 19;
            return values;
        })();

        return MessageAssociation;
    })();

    E2E.ContextInfo = (function() {

        /**
         * Properties of a ContextInfo.
         * @memberof E2E
         * @interface IContextInfo
         * @property {string|null} [stanzaId] ContextInfo stanzaId
         * @property {string|null} [participant] ContextInfo participant
         * @property {E2E.IMessage|null} [quotedMessage] ContextInfo quotedMessage
         * @property {string|null} [remoteJid] ContextInfo remoteJid
         * @property {Array.<string>|null} [mentionedJid] ContextInfo mentionedJid
         * @property {string|null} [conversionSource] ContextInfo conversionSource
         * @property {Uint8Array|null} [conversionData] ContextInfo conversionData
         * @property {number|null} [conversionDelaySeconds] ContextInfo conversionDelaySeconds
         * @property {number|null} [forwardingScore] ContextInfo forwardingScore
         * @property {boolean|null} [isForwarded] ContextInfo isForwarded
         * @property {E2E.ContextInfo.IAdReplyInfo|null} [quotedAd] ContextInfo quotedAd
         * @property {Protocol.IMessageKey|null} [placeholderKey] ContextInfo placeholderKey
         * @property {number|null} [expiration] ContextInfo expiration
         * @property {number|Long|null} [ephemeralSettingTimestamp] ContextInfo ephemeralSettingTimestamp
         * @property {Uint8Array|null} [ephemeralSharedSecret] ContextInfo ephemeralSharedSecret
         * @property {E2E.ContextInfo.IExternalAdReplyInfo|null} [externalAdReply] ContextInfo externalAdReply
         * @property {string|null} [entryPointConversionSource] ContextInfo entryPointConversionSource
         * @property {string|null} [entryPointConversionApp] ContextInfo entryPointConversionApp
         * @property {number|null} [entryPointConversionDelaySeconds] ContextInfo entryPointConversionDelaySeconds
         * @property {E2E.IDisappearingMode|null} [disappearingMode] ContextInfo disappearingMode
         * @property {E2E.IActionLink|null} [actionLink] ContextInfo actionLink
         * @property {string|null} [groupSubject] ContextInfo groupSubject
         * @property {string|null} [parentGroupJid] ContextInfo parentGroupJid
         * @property {string|null} [trustBannerType] ContextInfo trustBannerType
         * @property {number|null} [trustBannerAction] ContextInfo trustBannerAction
         * @property {boolean|null} [isSampled] ContextInfo isSampled
         * @property {Array.<E2E.IGroupMention>|null} [groupMentions] ContextInfo groupMentions
         * @property {E2E.ContextInfo.IUTMInfo|null} [utm] ContextInfo utm
         * @property {E2E.ContextInfo.IForwardedNewsletterMessageInfo|null} [forwardedNewsletterMessageInfo] ContextInfo forwardedNewsletterMessageInfo
         * @property {E2E.ContextInfo.IBusinessMessageForwardInfo|null} [businessMessageForwardInfo] ContextInfo businessMessageForwardInfo
         * @property {string|null} [smbClientCampaignId] ContextInfo smbClientCampaignId
         * @property {string|null} [smbServerCampaignId] ContextInfo smbServerCampaignId
         * @property {E2E.ContextInfo.IDataSharingContext|null} [dataSharingContext] ContextInfo dataSharingContext
         * @property {boolean|null} [alwaysShowAdAttribution] ContextInfo alwaysShowAdAttribution
         * @property {E2E.ContextInfo.IFeatureEligibilities|null} [featureEligibilities] ContextInfo featureEligibilities
         * @property {string|null} [entryPointConversionExternalSource] ContextInfo entryPointConversionExternalSource
         * @property {string|null} [entryPointConversionExternalMedium] ContextInfo entryPointConversionExternalMedium
         * @property {string|null} [ctwaSignals] ContextInfo ctwaSignals
         * @property {Uint8Array|null} [ctwaPayload] ContextInfo ctwaPayload
         * @property {AICommon.IForwardedAIBotMessageInfo|null} [forwardedAiBotMessageInfo] ContextInfo forwardedAiBotMessageInfo
         * @property {E2E.ContextInfo.StatusAttributionType|null} [statusAttributionType] ContextInfo statusAttributionType
         * @property {E2E.IUrlTrackingMap|null} [urlTrackingMap] ContextInfo urlTrackingMap
         * @property {E2E.ContextInfo.PairedMediaType|null} [pairedMediaType] ContextInfo pairedMediaType
         * @property {number|null} [rankingVersion] ContextInfo rankingVersion
         * @property {E2E.IMemberLabel|null} [memberLabel] ContextInfo memberLabel
         * @property {boolean|null} [isQuestion] ContextInfo isQuestion
         * @property {E2E.ContextInfo.StatusSourceType|null} [statusSourceType] ContextInfo statusSourceType
         * @property {Array.<StatusAttributions.IStatusAttribution>|null} [statusAttributions] ContextInfo statusAttributions
         * @property {boolean|null} [isGroupStatus] ContextInfo isGroupStatus
         * @property {E2E.ContextInfo.ForwardOrigin|null} [forwardOrigin] ContextInfo forwardOrigin
         * @property {E2E.ContextInfo.IQuestionReplyQuotedMessage|null} [questionReplyQuotedMessage] ContextInfo questionReplyQuotedMessage
         * @property {E2E.ContextInfo.IStatusAudienceMetadata|null} [statusAudienceMetadata] ContextInfo statusAudienceMetadata
         * @property {number|null} [nonJidMentions] ContextInfo nonJidMentions
         * @property {E2E.ContextInfo.QuotedType|null} [quotedType] ContextInfo quotedType
         * @property {AICommon.IBotMessageSharingInfo|null} [botMessageSharingInfo] ContextInfo botMessageSharingInfo
         */

        /**
         * Constructs a new ContextInfo.
         * @memberof E2E
         * @classdesc Represents a ContextInfo.
         * @implements IContextInfo
         * @constructor
         * @param {E2E.IContextInfo=} [properties] Properties to set
         */
        function ContextInfo(properties) {
            this.mentionedJid = [];
            this.groupMentions = [];
            this.statusAttributions = [];
            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]];
        }

        /**
         * ContextInfo stanzaId.
         * @member {string|null|undefined} stanzaId
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.stanzaId = null;

        /**
         * ContextInfo participant.
         * @member {string|null|undefined} participant
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.participant = null;

        /**
         * ContextInfo quotedMessage.
         * @member {E2E.IMessage|null|undefined} quotedMessage
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.quotedMessage = null;

        /**
         * ContextInfo remoteJid.
         * @member {string|null|undefined} remoteJid
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.remoteJid = null;

        /**
         * ContextInfo mentionedJid.
         * @member {Array.<string>} mentionedJid
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.mentionedJid = $util.emptyArray;

        /**
         * ContextInfo conversionSource.
         * @member {string|null|undefined} conversionSource
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.conversionSource = null;

        /**
         * ContextInfo conversionData.
         * @member {Uint8Array|null|undefined} conversionData
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.conversionData = null;

        /**
         * ContextInfo conversionDelaySeconds.
         * @member {number|null|undefined} conversionDelaySeconds
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.conversionDelaySeconds = null;

        /**
         * ContextInfo forwardingScore.
         * @member {number|null|undefined} forwardingScore
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.forwardingScore = null;

        /**
         * ContextInfo isForwarded.
         * @member {boolean|null|undefined} isForwarded
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.isForwarded = null;

        /**
         * ContextInfo quotedAd.
         * @member {E2E.ContextInfo.IAdReplyInfo|null|undefined} quotedAd
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.quotedAd = null;

        /**
         * ContextInfo placeholderKey.
         * @member {Protocol.IMessageKey|null|undefined} placeholderKey
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.placeholderKey = null;

        /**
         * ContextInfo expiration.
         * @member {number|null|undefined} expiration
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.expiration = null;

        /**
         * ContextInfo ephemeralSettingTimestamp.
         * @member {number|Long|null|undefined} ephemeralSettingTimestamp
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.ephemeralSettingTimestamp = null;

        /**
         * ContextInfo ephemeralSharedSecret.
         * @member {Uint8Array|null|undefined} ephemeralSharedSecret
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.ephemeralSharedSecret = null;

        /**
         * ContextInfo externalAdReply.
         * @member {E2E.ContextInfo.IExternalAdReplyInfo|null|undefined} externalAdReply
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.externalAdReply = null;

        /**
         * ContextInfo entryPointConversionSource.
         * @member {string|null|undefined} entryPointConversionSource
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.entryPointConversionSource = null;

        /**
         * ContextInfo entryPointConversionApp.
         * @member {string|null|undefined} entryPointConversionApp
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.entryPointConversionApp = null;

        /**
         * ContextInfo entryPointConversionDelaySeconds.
         * @member {number|null|undefined} entryPointConversionDelaySeconds
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.entryPointConversionDelaySeconds = null;

        /**
         * ContextInfo disappearingMode.
         * @member {E2E.IDisappearingMode|null|undefined} disappearingMode
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.disappearingMode = null;

        /**
         * ContextInfo actionLink.
         * @member {E2E.IActionLink|null|undefined} actionLink
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.actionLink = null;

        /**
         * ContextInfo groupSubject.
         * @member {string|null|undefined} groupSubject
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.groupSubject = null;

        /**
         * ContextInfo parentGroupJid.
         * @member {string|null|undefined} parentGroupJid
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.parentGroupJid = null;

        /**
         * ContextInfo trustBannerType.
         * @member {string|null|undefined} trustBannerType
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.trustBannerType = null;

        /**
         * ContextInfo trustBannerAction.
         * @member {number|null|undefined} trustBannerAction
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.trustBannerAction = null;

        /**
         * ContextInfo isSampled.
         * @member {boolean|null|undefined} isSampled
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.isSampled = null;

        /**
         * ContextInfo groupMentions.
         * @member {Array.<E2E.IGroupMention>} groupMentions
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.groupMentions = $util.emptyArray;

        /**
         * ContextInfo utm.
         * @member {E2E.ContextInfo.IUTMInfo|null|undefined} utm
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.utm = null;

        /**
         * ContextInfo forwardedNewsletterMessageInfo.
         * @member {E2E.ContextInfo.IForwardedNewsletterMessageInfo|null|undefined} forwardedNewsletterMessageInfo
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.forwardedNewsletterMessageInfo = null;

        /**
         * ContextInfo businessMessageForwardInfo.
         * @member {E2E.ContextInfo.IBusinessMessageForwardInfo|null|undefined} businessMessageForwardInfo
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.businessMessageForwardInfo = null;

        /**
         * ContextInfo smbClientCampaignId.
         * @member {string|null|undefined} smbClientCampaignId
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.smbClientCampaignId = null;

        /**
         * ContextInfo smbServerCampaignId.
         * @member {string|null|undefined} smbServerCampaignId
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.smbServerCampaignId = null;

        /**
         * ContextInfo dataSharingContext.
         * @member {E2E.ContextInfo.IDataSharingContext|null|undefined} dataSharingContext
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.dataSharingContext = null;

        /**
         * ContextInfo alwaysShowAdAttribution.
         * @member {boolean|null|undefined} alwaysShowAdAttribution
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.alwaysShowAdAttribution = null;

        /**
         * ContextInfo featureEligibilities.
         * @member {E2E.ContextInfo.IFeatureEligibilities|null|undefined} featureEligibilities
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.featureEligibilities = null;

        /**
         * ContextInfo entryPointConversionExternalSource.
         * @member {string|null|undefined} entryPointConversionExternalSource
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.entryPointConversionExternalSource = null;

        /**
         * ContextInfo entryPointConversionExternalMedium.
         * @member {string|null|undefined} entryPointConversionExternalMedium
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.entryPointConversionExternalMedium = null;

        /**
         * ContextInfo ctwaSignals.
         * @member {string|null|undefined} ctwaSignals
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.ctwaSignals = null;

        /**
         * ContextInfo ctwaPayload.
         * @member {Uint8Array|null|undefined} ctwaPayload
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.ctwaPayload = null;

        /**
         * ContextInfo forwardedAiBotMessageInfo.
         * @member {AICommon.IForwardedAIBotMessageInfo|null|undefined} forwardedAiBotMessageInfo
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.forwardedAiBotMessageInfo = null;

        /**
         * ContextInfo statusAttributionType.
         * @member {E2E.ContextInfo.StatusAttributionType|null|undefined} statusAttributionType
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.statusAttributionType = null;

        /**
         * ContextInfo urlTrackingMap.
         * @member {E2E.IUrlTrackingMap|null|undefined} urlTrackingMap
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.urlTrackingMap = null;

        /**
         * ContextInfo pairedMediaType.
         * @member {E2E.ContextInfo.PairedMediaType|null|undefined} pairedMediaType
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.pairedMediaType = null;

        /**
         * ContextInfo rankingVersion.
         * @member {number|null|undefined} rankingVersion
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.rankingVersion = null;

        /**
         * ContextInfo memberLabel.
         * @member {E2E.IMemberLabel|null|undefined} memberLabel
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.memberLabel = null;

        /**
         * ContextInfo isQuestion.
         * @member {boolean|null|undefined} isQuestion
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.isQuestion = null;

        /**
         * ContextInfo statusSourceType.
         * @member {E2E.ContextInfo.StatusSourceType|null|undefined} statusSourceType
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.statusSourceType = null;

        /**
         * ContextInfo statusAttributions.
         * @member {Array.<StatusAttributions.IStatusAttribution>} statusAttributions
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.statusAttributions = $util.emptyArray;

        /**
         * ContextInfo isGroupStatus.
         * @member {boolean|null|undefined} isGroupStatus
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.isGroupStatus = null;

        /**
         * ContextInfo forwardOrigin.
         * @member {E2E.ContextInfo.ForwardOrigin|null|undefined} forwardOrigin
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.forwardOrigin = null;

        /**
         * ContextInfo questionReplyQuotedMessage.
         * @member {E2E.ContextInfo.IQuestionReplyQuotedMessage|null|undefined} questionReplyQuotedMessage
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.questionReplyQuotedMessage = null;

        /**
         * ContextInfo statusAudienceMetadata.
         * @member {E2E.ContextInfo.IStatusAudienceMetadata|null|undefined} statusAudienceMetadata
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.statusAudienceMetadata = null;

        /**
         * ContextInfo nonJidMentions.
         * @member {number|null|undefined} nonJidMentions
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.nonJidMentions = null;

        /**
         * ContextInfo quotedType.
         * @member {E2E.ContextInfo.QuotedType|null|undefined} quotedType
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.quotedType = null;

        /**
         * ContextInfo botMessageSharingInfo.
         * @member {AICommon.IBotMessageSharingInfo|null|undefined} botMessageSharingInfo
         * @memberof E2E.ContextInfo
         * @instance
         */
        ContextInfo.prototype.botMessageSharingInfo = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * ContextInfo _stanzaId.
         * @member {"stanzaId"|undefined} _stanzaId
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_stanzaId", {
            get: $util.oneOfGetter($oneOfFields = ["stanzaId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _participant.
         * @member {"participant"|undefined} _participant
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_participant", {
            get: $util.oneOfGetter($oneOfFields = ["participant"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _quotedMessage.
         * @member {"quotedMessage"|undefined} _quotedMessage
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_quotedMessage", {
            get: $util.oneOfGetter($oneOfFields = ["quotedMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _remoteJid.
         * @member {"remoteJid"|undefined} _remoteJid
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_remoteJid", {
            get: $util.oneOfGetter($oneOfFields = ["remoteJid"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _conversionSource.
         * @member {"conversionSource"|undefined} _conversionSource
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_conversionSource", {
            get: $util.oneOfGetter($oneOfFields = ["conversionSource"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _conversionData.
         * @member {"conversionData"|undefined} _conversionData
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_conversionData", {
            get: $util.oneOfGetter($oneOfFields = ["conversionData"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _conversionDelaySeconds.
         * @member {"conversionDelaySeconds"|undefined} _conversionDelaySeconds
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_conversionDelaySeconds", {
            get: $util.oneOfGetter($oneOfFields = ["conversionDelaySeconds"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _forwardingScore.
         * @member {"forwardingScore"|undefined} _forwardingScore
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_forwardingScore", {
            get: $util.oneOfGetter($oneOfFields = ["forwardingScore"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _isForwarded.
         * @member {"isForwarded"|undefined} _isForwarded
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_isForwarded", {
            get: $util.oneOfGetter($oneOfFields = ["isForwarded"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _quotedAd.
         * @member {"quotedAd"|undefined} _quotedAd
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_quotedAd", {
            get: $util.oneOfGetter($oneOfFields = ["quotedAd"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _placeholderKey.
         * @member {"placeholderKey"|undefined} _placeholderKey
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_placeholderKey", {
            get: $util.oneOfGetter($oneOfFields = ["placeholderKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _expiration.
         * @member {"expiration"|undefined} _expiration
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_expiration", {
            get: $util.oneOfGetter($oneOfFields = ["expiration"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _ephemeralSettingTimestamp.
         * @member {"ephemeralSettingTimestamp"|undefined} _ephemeralSettingTimestamp
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_ephemeralSettingTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["ephemeralSettingTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _ephemeralSharedSecret.
         * @member {"ephemeralSharedSecret"|undefined} _ephemeralSharedSecret
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_ephemeralSharedSecret", {
            get: $util.oneOfGetter($oneOfFields = ["ephemeralSharedSecret"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _externalAdReply.
         * @member {"externalAdReply"|undefined} _externalAdReply
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_externalAdReply", {
            get: $util.oneOfGetter($oneOfFields = ["externalAdReply"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _entryPointConversionSource.
         * @member {"entryPointConversionSource"|undefined} _entryPointConversionSource
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_entryPointConversionSource", {
            get: $util.oneOfGetter($oneOfFields = ["entryPointConversionSource"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _entryPointConversionApp.
         * @member {"entryPointConversionApp"|undefined} _entryPointConversionApp
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_entryPointConversionApp", {
            get: $util.oneOfGetter($oneOfFields = ["entryPointConversionApp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _entryPointConversionDelaySeconds.
         * @member {"entryPointConversionDelaySeconds"|undefined} _entryPointConversionDelaySeconds
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_entryPointConversionDelaySeconds", {
            get: $util.oneOfGetter($oneOfFields = ["entryPointConversionDelaySeconds"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _disappearingMode.
         * @member {"disappearingMode"|undefined} _disappearingMode
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_disappearingMode", {
            get: $util.oneOfGetter($oneOfFields = ["disappearingMode"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _actionLink.
         * @member {"actionLink"|undefined} _actionLink
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_actionLink", {
            get: $util.oneOfGetter($oneOfFields = ["actionLink"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _groupSubject.
         * @member {"groupSubject"|undefined} _groupSubject
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_groupSubject", {
            get: $util.oneOfGetter($oneOfFields = ["groupSubject"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _parentGroupJid.
         * @member {"parentGroupJid"|undefined} _parentGroupJid
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_parentGroupJid", {
            get: $util.oneOfGetter($oneOfFields = ["parentGroupJid"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _trustBannerType.
         * @member {"trustBannerType"|undefined} _trustBannerType
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_trustBannerType", {
            get: $util.oneOfGetter($oneOfFields = ["trustBannerType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _trustBannerAction.
         * @member {"trustBannerAction"|undefined} _trustBannerAction
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_trustBannerAction", {
            get: $util.oneOfGetter($oneOfFields = ["trustBannerAction"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _isSampled.
         * @member {"isSampled"|undefined} _isSampled
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_isSampled", {
            get: $util.oneOfGetter($oneOfFields = ["isSampled"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _utm.
         * @member {"utm"|undefined} _utm
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_utm", {
            get: $util.oneOfGetter($oneOfFields = ["utm"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _forwardedNewsletterMessageInfo.
         * @member {"forwardedNewsletterMessageInfo"|undefined} _forwardedNewsletterMessageInfo
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_forwardedNewsletterMessageInfo", {
            get: $util.oneOfGetter($oneOfFields = ["forwardedNewsletterMessageInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _businessMessageForwardInfo.
         * @member {"businessMessageForwardInfo"|undefined} _businessMessageForwardInfo
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_businessMessageForwardInfo", {
            get: $util.oneOfGetter($oneOfFields = ["businessMessageForwardInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _smbClientCampaignId.
         * @member {"smbClientCampaignId"|undefined} _smbClientCampaignId
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_smbClientCampaignId", {
            get: $util.oneOfGetter($oneOfFields = ["smbClientCampaignId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _smbServerCampaignId.
         * @member {"smbServerCampaignId"|undefined} _smbServerCampaignId
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_smbServerCampaignId", {
            get: $util.oneOfGetter($oneOfFields = ["smbServerCampaignId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _dataSharingContext.
         * @member {"dataSharingContext"|undefined} _dataSharingContext
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_dataSharingContext", {
            get: $util.oneOfGetter($oneOfFields = ["dataSharingContext"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _alwaysShowAdAttribution.
         * @member {"alwaysShowAdAttribution"|undefined} _alwaysShowAdAttribution
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_alwaysShowAdAttribution", {
            get: $util.oneOfGetter($oneOfFields = ["alwaysShowAdAttribution"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _featureEligibilities.
         * @member {"featureEligibilities"|undefined} _featureEligibilities
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_featureEligibilities", {
            get: $util.oneOfGetter($oneOfFields = ["featureEligibilities"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _entryPointConversionExternalSource.
         * @member {"entryPointConversionExternalSource"|undefined} _entryPointConversionExternalSource
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_entryPointConversionExternalSource", {
            get: $util.oneOfGetter($oneOfFields = ["entryPointConversionExternalSource"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _entryPointConversionExternalMedium.
         * @member {"entryPointConversionExternalMedium"|undefined} _entryPointConversionExternalMedium
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_entryPointConversionExternalMedium", {
            get: $util.oneOfGetter($oneOfFields = ["entryPointConversionExternalMedium"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _ctwaSignals.
         * @member {"ctwaSignals"|undefined} _ctwaSignals
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_ctwaSignals", {
            get: $util.oneOfGetter($oneOfFields = ["ctwaSignals"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _ctwaPayload.
         * @member {"ctwaPayload"|undefined} _ctwaPayload
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_ctwaPayload", {
            get: $util.oneOfGetter($oneOfFields = ["ctwaPayload"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _forwardedAiBotMessageInfo.
         * @member {"forwardedAiBotMessageInfo"|undefined} _forwardedAiBotMessageInfo
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_forwardedAiBotMessageInfo", {
            get: $util.oneOfGetter($oneOfFields = ["forwardedAiBotMessageInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _statusAttributionType.
         * @member {"statusAttributionType"|undefined} _statusAttributionType
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_statusAttributionType", {
            get: $util.oneOfGetter($oneOfFields = ["statusAttributionType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _urlTrackingMap.
         * @member {"urlTrackingMap"|undefined} _urlTrackingMap
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_urlTrackingMap", {
            get: $util.oneOfGetter($oneOfFields = ["urlTrackingMap"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _pairedMediaType.
         * @member {"pairedMediaType"|undefined} _pairedMediaType
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_pairedMediaType", {
            get: $util.oneOfGetter($oneOfFields = ["pairedMediaType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _rankingVersion.
         * @member {"rankingVersion"|undefined} _rankingVersion
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_rankingVersion", {
            get: $util.oneOfGetter($oneOfFields = ["rankingVersion"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _memberLabel.
         * @member {"memberLabel"|undefined} _memberLabel
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_memberLabel", {
            get: $util.oneOfGetter($oneOfFields = ["memberLabel"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _isQuestion.
         * @member {"isQuestion"|undefined} _isQuestion
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_isQuestion", {
            get: $util.oneOfGetter($oneOfFields = ["isQuestion"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _statusSourceType.
         * @member {"statusSourceType"|undefined} _statusSourceType
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_statusSourceType", {
            get: $util.oneOfGetter($oneOfFields = ["statusSourceType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _isGroupStatus.
         * @member {"isGroupStatus"|undefined} _isGroupStatus
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_isGroupStatus", {
            get: $util.oneOfGetter($oneOfFields = ["isGroupStatus"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _forwardOrigin.
         * @member {"forwardOrigin"|undefined} _forwardOrigin
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_forwardOrigin", {
            get: $util.oneOfGetter($oneOfFields = ["forwardOrigin"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _questionReplyQuotedMessage.
         * @member {"questionReplyQuotedMessage"|undefined} _questionReplyQuotedMessage
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_questionReplyQuotedMessage", {
            get: $util.oneOfGetter($oneOfFields = ["questionReplyQuotedMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _statusAudienceMetadata.
         * @member {"statusAudienceMetadata"|undefined} _statusAudienceMetadata
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_statusAudienceMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["statusAudienceMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _nonJidMentions.
         * @member {"nonJidMentions"|undefined} _nonJidMentions
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_nonJidMentions", {
            get: $util.oneOfGetter($oneOfFields = ["nonJidMentions"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _quotedType.
         * @member {"quotedType"|undefined} _quotedType
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_quotedType", {
            get: $util.oneOfGetter($oneOfFields = ["quotedType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ContextInfo _botMessageSharingInfo.
         * @member {"botMessageSharingInfo"|undefined} _botMessageSharingInfo
         * @memberof E2E.ContextInfo
         * @instance
         */
        Object.defineProperty(ContextInfo.prototype, "_botMessageSharingInfo", {
            get: $util.oneOfGetter($oneOfFields = ["botMessageSharingInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new ContextInfo instance using the specified properties.
         * @function create
         * @memberof E2E.ContextInfo
         * @static
         * @param {E2E.IContextInfo=} [properties] Properties to set
         * @returns {E2E.ContextInfo} ContextInfo instance
         */
        ContextInfo.create = function create(properties) {
            return new ContextInfo(properties);
        };

        /**
         * Encodes the specified ContextInfo message. Does not implicitly {@link E2E.ContextInfo.verify|verify} messages.
         * @function encode
         * @memberof E2E.ContextInfo
         * @static
         * @param {E2E.IContextInfo} message ContextInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ContextInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.stanzaId);
            if (message.participant != null && Object.hasOwnProperty.call(message, "participant"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.participant);
            if (message.quotedMessage != null && Object.hasOwnProperty.call(message, "quotedMessage"))
                $root.E2E.Message.encode(message.quotedMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.remoteJid != null && Object.hasOwnProperty.call(message, "remoteJid"))
                writer.uint32(/* id 4, wireType 2 =*/34).string(message.remoteJid);
            if (message.mentionedJid != null && message.mentionedJid.length)
                for (var i = 0; i < message.mentionedJid.length; ++i)
                    writer.uint32(/* id 15, wireType 2 =*/122).string(message.mentionedJid[i]);
            if (message.conversionSource != null && Object.hasOwnProperty.call(message, "conversionSource"))
                writer.uint32(/* id 18, wireType 2 =*/146).string(message.conversionSource);
            if (message.conversionData != null && Object.hasOwnProperty.call(message, "conversionData"))
                writer.uint32(/* id 19, wireType 2 =*/154).bytes(message.conversionData);
            if (message.conversionDelaySeconds != null && Object.hasOwnProperty.call(message, "conversionDelaySeconds"))
                writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.conversionDelaySeconds);
            if (message.forwardingScore != null && Object.hasOwnProperty.call(message, "forwardingScore"))
                writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.forwardingScore);
            if (message.isForwarded != null && Object.hasOwnProperty.call(message, "isForwarded"))
                writer.uint32(/* id 22, wireType 0 =*/176).bool(message.isForwarded);
            if (message.quotedAd != null && Object.hasOwnProperty.call(message, "quotedAd"))
                $root.E2E.ContextInfo.AdReplyInfo.encode(message.quotedAd, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
            if (message.placeholderKey != null && Object.hasOwnProperty.call(message, "placeholderKey"))
                $root.Protocol.MessageKey.encode(message.placeholderKey, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim();
            if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration"))
                writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.expiration);
            if (message.ephemeralSettingTimestamp != null && Object.hasOwnProperty.call(message, "ephemeralSettingTimestamp"))
                writer.uint32(/* id 26, wireType 0 =*/208).int64(message.ephemeralSettingTimestamp);
            if (message.ephemeralSharedSecret != null && Object.hasOwnProperty.call(message, "ephemeralSharedSecret"))
                writer.uint32(/* id 27, wireType 2 =*/218).bytes(message.ephemeralSharedSecret);
            if (message.externalAdReply != null && Object.hasOwnProperty.call(message, "externalAdReply"))
                $root.E2E.ContextInfo.ExternalAdReplyInfo.encode(message.externalAdReply, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim();
            if (message.entryPointConversionSource != null && Object.hasOwnProperty.call(message, "entryPointConversionSource"))
                writer.uint32(/* id 29, wireType 2 =*/234).string(message.entryPointConversionSource);
            if (message.entryPointConversionApp != null && Object.hasOwnProperty.call(message, "entryPointConversionApp"))
                writer.uint32(/* id 30, wireType 2 =*/242).string(message.entryPointConversionApp);
            if (message.entryPointConversionDelaySeconds != null && Object.hasOwnProperty.call(message, "entryPointConversionDelaySeconds"))
                writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.entryPointConversionDelaySeconds);
            if (message.disappearingMode != null && Object.hasOwnProperty.call(message, "disappearingMode"))
                $root.E2E.DisappearingMode.encode(message.disappearingMode, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim();
            if (message.actionLink != null && Object.hasOwnProperty.call(message, "actionLink"))
                $root.E2E.ActionLink.encode(message.actionLink, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim();
            if (message.groupSubject != null && Object.hasOwnProperty.call(message, "groupSubject"))
                writer.uint32(/* id 34, wireType 2 =*/274).string(message.groupSubject);
            if (message.parentGroupJid != null && Object.hasOwnProperty.call(message, "parentGroupJid"))
                writer.uint32(/* id 35, wireType 2 =*/282).string(message.parentGroupJid);
            if (message.trustBannerType != null && Object.hasOwnProperty.call(message, "trustBannerType"))
                writer.uint32(/* id 37, wireType 2 =*/298).string(message.trustBannerType);
            if (message.trustBannerAction != null && Object.hasOwnProperty.call(message, "trustBannerAction"))
                writer.uint32(/* id 38, wireType 0 =*/304).uint32(message.trustBannerAction);
            if (message.isSampled != null && Object.hasOwnProperty.call(message, "isSampled"))
                writer.uint32(/* id 39, wireType 0 =*/312).bool(message.isSampled);
            if (message.groupMentions != null && message.groupMentions.length)
                for (var i = 0; i < message.groupMentions.length; ++i)
                    $root.E2E.GroupMention.encode(message.groupMentions[i], writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim();
            if (message.utm != null && Object.hasOwnProperty.call(message, "utm"))
                $root.E2E.ContextInfo.UTMInfo.encode(message.utm, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim();
            if (message.forwardedNewsletterMessageInfo != null && Object.hasOwnProperty.call(message, "forwardedNewsletterMessageInfo"))
                $root.E2E.ContextInfo.ForwardedNewsletterMessageInfo.encode(message.forwardedNewsletterMessageInfo, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim();
            if (message.businessMessageForwardInfo != null && Object.hasOwnProperty.call(message, "businessMessageForwardInfo"))
                $root.E2E.ContextInfo.BusinessMessageForwardInfo.encode(message.businessMessageForwardInfo, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim();
            if (message.smbClientCampaignId != null && Object.hasOwnProperty.call(message, "smbClientCampaignId"))
                writer.uint32(/* id 45, wireType 2 =*/362).string(message.smbClientCampaignId);
            if (message.smbServerCampaignId != null && Object.hasOwnProperty.call(message, "smbServerCampaignId"))
                writer.uint32(/* id 46, wireType 2 =*/370).string(message.smbServerCampaignId);
            if (message.dataSharingContext != null && Object.hasOwnProperty.call(message, "dataSharingContext"))
                $root.E2E.ContextInfo.DataSharingContext.encode(message.dataSharingContext, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim();
            if (message.alwaysShowAdAttribution != null && Object.hasOwnProperty.call(message, "alwaysShowAdAttribution"))
                writer.uint32(/* id 48, wireType 0 =*/384).bool(message.alwaysShowAdAttribution);
            if (message.featureEligibilities != null && Object.hasOwnProperty.call(message, "featureEligibilities"))
                $root.E2E.ContextInfo.FeatureEligibilities.encode(message.featureEligibilities, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim();
            if (message.entryPointConversionExternalSource != null && Object.hasOwnProperty.call(message, "entryPointConversionExternalSource"))
                writer.uint32(/* id 50, wireType 2 =*/402).string(message.entryPointConversionExternalSource);
            if (message.entryPointConversionExternalMedium != null && Object.hasOwnProperty.call(message, "entryPointConversionExternalMedium"))
                writer.uint32(/* id 51, wireType 2 =*/410).string(message.entryPointConversionExternalMedium);
            if (message.ctwaSignals != null && Object.hasOwnProperty.call(message, "ctwaSignals"))
                writer.uint32(/* id 54, wireType 2 =*/434).string(message.ctwaSignals);
            if (message.ctwaPayload != null && Object.hasOwnProperty.call(message, "ctwaPayload"))
                writer.uint32(/* id 55, wireType 2 =*/442).bytes(message.ctwaPayload);
            if (message.forwardedAiBotMessageInfo != null && Object.hasOwnProperty.call(message, "forwardedAiBotMessageInfo"))
                $root.AICommon.ForwardedAIBotMessageInfo.encode(message.forwardedAiBotMessageInfo, writer.uint32(/* id 56, wireType 2 =*/450).fork()).ldelim();
            if (message.statusAttributionType != null && Object.hasOwnProperty.call(message, "statusAttributionType"))
                writer.uint32(/* id 57, wireType 0 =*/456).int32(message.statusAttributionType);
            if (message.urlTrackingMap != null && Object.hasOwnProperty.call(message, "urlTrackingMap"))
                $root.E2E.UrlTrackingMap.encode(message.urlTrackingMap, writer.uint32(/* id 58, wireType 2 =*/466).fork()).ldelim();
            if (message.pairedMediaType != null && Object.hasOwnProperty.call(message, "pairedMediaType"))
                writer.uint32(/* id 59, wireType 0 =*/472).int32(message.pairedMediaType);
            if (message.rankingVersion != null && Object.hasOwnProperty.call(message, "rankingVersion"))
                writer.uint32(/* id 60, wireType 0 =*/480).uint32(message.rankingVersion);
            if (message.memberLabel != null && Object.hasOwnProperty.call(message, "memberLabel"))
                $root.E2E.MemberLabel.encode(message.memberLabel, writer.uint32(/* id 62, wireType 2 =*/498).fork()).ldelim();
            if (message.isQuestion != null && Object.hasOwnProperty.call(message, "isQuestion"))
                writer.uint32(/* id 63, wireType 0 =*/504).bool(message.isQuestion);
            if (message.statusSourceType != null && Object.hasOwnProperty.call(message, "statusSourceType"))
                writer.uint32(/* id 64, wireType 0 =*/512).int32(message.statusSourceType);
            if (message.statusAttributions != null && message.statusAttributions.length)
                for (var i = 0; i < message.statusAttributions.length; ++i)
                    $root.StatusAttributions.StatusAttribution.encode(message.statusAttributions[i], writer.uint32(/* id 65, wireType 2 =*/522).fork()).ldelim();
            if (message.isGroupStatus != null && Object.hasOwnProperty.call(message, "isGroupStatus"))
                writer.uint32(/* id 66, wireType 0 =*/528).bool(message.isGroupStatus);
            if (message.forwardOrigin != null && Object.hasOwnProperty.call(message, "forwardOrigin"))
                writer.uint32(/* id 67, wireType 0 =*/536).int32(message.forwardOrigin);
            if (message.questionReplyQuotedMessage != null && Object.hasOwnProperty.call(message, "questionReplyQuotedMessage"))
                $root.E2E.ContextInfo.QuestionReplyQuotedMessage.encode(message.questionReplyQuotedMessage, writer.uint32(/* id 68, wireType 2 =*/546).fork()).ldelim();
            if (message.statusAudienceMetadata != null && Object.hasOwnProperty.call(message, "statusAudienceMetadata"))
                $root.E2E.ContextInfo.StatusAudienceMetadata.encode(message.statusAudienceMetadata, writer.uint32(/* id 69, wireType 2 =*/554).fork()).ldelim();
            if (message.nonJidMentions != null && Object.hasOwnProperty.call(message, "nonJidMentions"))
                writer.uint32(/* id 70, wireType 0 =*/560).uint32(message.nonJidMentions);
            if (message.quotedType != null && Object.hasOwnProperty.call(message, "quotedType"))
                writer.uint32(/* id 71, wireType 0 =*/568).int32(message.quotedType);
            if (message.botMessageSharingInfo != null && Object.hasOwnProperty.call(message, "botMessageSharingInfo"))
                $root.AICommon.BotMessageSharingInfo.encode(message.botMessageSharingInfo, writer.uint32(/* id 72, wireType 2 =*/578).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified ContextInfo message, length delimited. Does not implicitly {@link E2E.ContextInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.ContextInfo
         * @static
         * @param {E2E.IContextInfo} message ContextInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ContextInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ContextInfo message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.ContextInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.ContextInfo} ContextInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ContextInfo.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.E2E.ContextInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.stanzaId = reader.string();
                        break;
                    }
                case 2: {
                        message.participant = reader.string();
                        break;
                    }
                case 3: {
                        message.quotedMessage = $root.E2E.Message.decode(reader, reader.uint32());
                        break;
                    }
                case 4: {
                        message.remoteJid = reader.string();
                        break;
                    }
                case 15: {
                        if (!(message.mentionedJid && message.mentionedJid.length))
                            message.mentionedJid = [];
                        message.mentionedJid.push(reader.string());
                        break;
                    }
                case 18: {
                        message.conversionSource = reader.string();
                        break;
                    }
                case 19: {
                        message.conversionData = reader.bytes();
                        break;
                    }
                case 20: {
                        message.conversionDelaySeconds = reader.uint32();
                        break;
                    }
                case 21: {
                        message.forwardingScore = reader.uint32();
                        break;
                    }
                case 22: {
                        message.isForwarded = reader.bool();
                        break;
                    }
                case 23: {
                        message.quotedAd = $root.E2E.ContextInfo.AdReplyInfo.decode(reader, reader.uint32());
                        break;
                    }
                case 24: {
                        message.placeholderKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 25: {
                        message.expiration = reader.uint32();
                        break;
                    }
                case 26: {
                        message.ephemeralSettingTimestamp = reader.int64();
                        break;
                    }
                case 27: {
                        message.ephemeralSharedSecret = reader.bytes();
                        break;
                    }
                case 28: {
                        message.externalAdReply = $root.E2E.ContextInfo.ExternalAdReplyInfo.decode(reader, reader.uint32());
                        break;
                    }
                case 29: {
                        message.entryPointConversionSource = reader.string();
                        break;
                    }
                case 30: {
                        message.entryPointConversionApp = reader.string();
                        break;
                    }
                case 31: {
                        message.entryPointConversionDelaySeconds = reader.uint32();
                        break;
                    }
                case 32: {
                        message.disappearingMode = $root.E2E.DisappearingMode.decode(reader, reader.uint32());
                        break;
                    }
                case 33: {
                        message.actionLink = $root.E2E.ActionLink.decode(reader, reader.uint32());
                        break;
                    }
                case 34: {
                        message.groupSubject = reader.string();
                        break;
                    }
                case 35: {
                        message.parentGroupJid = reader.string();
                        break;
                    }
                case 37: {
                        message.trustBannerType = reader.string();
                        break;
                    }
                case 38: {
                        message.trustBannerAction = reader.uint32();
                        break;
                    }
                case 39: {
                        message.isSampled = reader.bool();
                        break;
                    }
                case 40: {
                        if (!(message.groupMentions && message.groupMentions.length))
                            message.groupMentions = [];
                        message.groupMentions.push($root.E2E.GroupMention.decode(reader, reader.uint32()));
                        break;
                    }
                case 41: {
                        message.utm = $root.E2E.ContextInfo.UTMInfo.decode(reader, reader.uint32());
                        break;
                    }
                case 43: {
                        message.forwardedNewsletterMessageInfo = $root.E2E.ContextInfo.ForwardedNewsletterMessageInfo.decode(reader, reader.uint32());
                        break;
                    }
                case 44: {
                        message.businessMessageForwardInfo = $root.E2E.ContextInfo.BusinessMessageForwardInfo.decode(reader, reader.uint32());
                        break;
                    }
                case 45: {
                        message.smbClientCampaignId = reader.string();
                        break;
                    }
                case 46: {
                        message.smbServerCampaignId = reader.string();
                        break;
                    }
                case 47: {
                        message.dataSharingContext = $root.E2E.ContextInfo.DataSharingContext.decode(reader, reader.uint32());
                        break;
                    }
                case 48: {
                        message.alwaysShowAdAttribution = reader.bool();
                        break;
                    }
                case 49: {
                        message.featureEligibilities = $root.E2E.ContextInfo.FeatureEligibilities.decode(reader, reader.uint32());
                        break;
                    }
                case 50: {
                        message.entryPointConversionExternalSource = reader.string();
                        break;
                    }
                case 51: {
                        message.entryPointConversionExternalMedium = reader.string();
                        break;
                    }
                case 54: {
                        message.ctwaSignals = reader.string();
                        break;
                    }
                case 55: {
                        message.ctwaPayload = reader.bytes();
                        break;
                    }
                case 56: {
                        message.forwardedAiBotMessageInfo = $root.AICommon.ForwardedAIBotMessageInfo.decode(reader, reader.uint32());
                        break;
                    }
                case 57: {
                        message.statusAttributionType = reader.int32();
                        break;
                    }
                case 58: {
                        message.urlTrackingMap = $root.E2E.UrlTrackingMap.decode(reader, reader.uint32());
                        break;
                    }
                case 59: {
                        message.pairedMediaType = reader.int32();
                        break;
                    }
                case 60: {
                        message.rankingVersion = reader.uint32();
                        break;
                    }
                case 62: {
                        message.memberLabel = $root.E2E.MemberLabel.decode(reader, reader.uint32());
                        break;
                    }
                case 63: {
                        message.isQuestion = reader.bool();
                        break;
                    }
                case 64: {
                        message.statusSourceType = reader.int32();
                        break;
                    }
                case 65: {
                        if (!(message.statusAttributions && message.statusAttributions.length))
                            message.statusAttributions = [];
                        message.statusAttributions.push($root.StatusAttributions.StatusAttribution.decode(reader, reader.uint32()));
                        break;
                    }
                case 66: {
                        message.isGroupStatus = reader.bool();
                        break;
                    }
                case 67: {
                        message.forwardOrigin = reader.int32();
                        break;
                    }
                case 68: {
                        message.questionReplyQuotedMessage = $root.E2E.ContextInfo.QuestionReplyQuotedMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 69: {
                        message.statusAudienceMetadata = $root.E2E.ContextInfo.StatusAudienceMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 70: {
                        message.nonJidMentions = reader.uint32();
                        break;
                    }
                case 71: {
                        message.quotedType = reader.int32();
                        break;
                    }
                case 72: {
                        message.botMessageSharingInfo = $root.AICommon.BotMessageSharingInfo.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ContextInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.ContextInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.ContextInfo} ContextInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ContextInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ContextInfo message.
         * @function verify
         * @memberof E2E.ContextInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ContextInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) {
                properties._stanzaId = 1;
                if (!$util.isString(message.stanzaId))
                    return "stanzaId: string expected";
            }
            if (message.participant != null && message.hasOwnProperty("participant")) {
                properties._participant = 1;
                if (!$util.isString(message.participant))
                    return "participant: string expected";
            }
            if (message.quotedMessage != null && message.hasOwnProperty("quotedMessage")) {
                properties._quotedMessage = 1;
                {
                    var error = $root.E2E.Message.verify(message.quotedMessage);
                    if (error)
                        return "quotedMessage." + error;
                }
            }
            if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) {
                properties._remoteJid = 1;
                if (!$util.isString(message.remoteJid))
                    return "remoteJid: string expected";
            }
            if (message.mentionedJid != null && message.hasOwnProperty("mentionedJid")) {
                if (!Array.isArray(message.mentionedJid))
                    return "mentionedJid: array expected";
                for (var i = 0; i < message.mentionedJid.length; ++i)
                    if (!$util.isString(message.mentionedJid[i]))
                        return "mentionedJid: string[] expected";
            }
            if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) {
                properties._conversionSource = 1;
                if (!$util.isString(message.conversionSource))
                    return "conversionSource: string expected";
            }
            if (message.conversionData != null && message.hasOwnProperty("conversionData")) {
                properties._conversionData = 1;
                if (!(message.conversionData && typeof message.conversionData.length === "number" || $util.isString(message.conversionData)))
                    return "conversionData: buffer expected";
            }
            if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) {
                properties._conversionDelaySeconds = 1;
                if (!$util.isInteger(message.conversionDelaySeconds))
                    return "conversionDelaySeconds: integer expected";
            }
            if (message.forwardingScore != null && message.hasOwnProperty("forwardingScore")) {
                properties._forwardingScore = 1;
                if (!$util.isInteger(message.forwardingScore))
                    return "forwardingScore: integer expected";
            }
            if (message.isForwarded != null && message.hasOwnProperty("isForwarded")) {
                properties._isForwarded = 1;
                if (typeof message.isForwarded !== "boolean")
                    return "isForwarded: boolean expected";
            }
            if (message.quotedAd != null && message.hasOwnProperty("quotedAd")) {
                properties._quotedAd = 1;
                {
                    var error = $root.E2E.ContextInfo.AdReplyInfo.verify(message.quotedAd);
                    if (error)
                        return "quotedAd." + error;
                }
            }
            if (message.placeholderKey != null && message.hasOwnProperty("placeholderKey")) {
                properties._placeholderKey = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.placeholderKey);
                    if (error)
                        return "placeholderKey." + error;
                }
            }
            if (message.expiration != null && message.hasOwnProperty("expiration")) {
                properties._expiration = 1;
                if (!$util.isInteger(message.expiration))
                    return "expiration: integer expected";
            }
            if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) {
                properties._ephemeralSettingTimestamp = 1;
                if (!$util.isInteger(message.ephemeralSettingTimestamp) && !(message.ephemeralSettingTimestamp && $util.isInteger(message.ephemeralSettingTimestamp.low) && $util.isInteger(message.ephemeralSettingTimestamp.high)))
                    return "ephemeralSettingTimestamp: integer|Long expected";
            }
            if (message.ephemeralSharedSecret != null && message.hasOwnProperty("ephemeralSharedSecret")) {
                properties._ephemeralSharedSecret = 1;
                if (!(message.ephemeralSharedSecret && typeof message.ephemeralSharedSecret.length === "number" || $util.isString(message.ephemeralSharedSecret)))
                    return "ephemeralSharedSecret: buffer expected";
            }
            if (message.externalAdReply != null && message.hasOwnProperty("externalAdReply")) {
                properties._externalAdReply = 1;
                {
                    var error = $root.E2E.ContextInfo.ExternalAdReplyInfo.verify(message.externalAdReply);
                    if (error)
                        return "externalAdReply." + error;
                }
            }
            if (message.entryPointConversionSource != null && message.hasOwnProperty("entryPointConversionSource")) {
                properties._entryPointConversionSource = 1;
                if (!$util.isString(message.entryPointConversionSource))
                    return "entryPointConversionSource: string expected";
            }
            if (message.entryPointConversionApp != null && message.hasOwnProperty("entryPointConversionApp")) {
                properties._entryPointConversionApp = 1;
                if (!$util.isString(message.entryPointConversionApp))
                    return "entryPointConversionApp: string expected";
            }
            if (message.entryPointConversionDelaySeconds != null && message.hasOwnProperty("entryPointConversionDelaySeconds")) {
                properties._entryPointConversionDelaySeconds = 1;
                if (!$util.isInteger(message.entryPointConversionDelaySeconds))
                    return "entryPointConversionDelaySeconds: integer expected";
            }
            if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) {
                properties._disappearingMode = 1;
                {
                    var error = $root.E2E.DisappearingMode.verify(message.disappearingMode);
                    if (error)
                        return "disappearingMode." + error;
                }
            }
            if (message.actionLink != null && message.hasOwnProperty("actionLink")) {
                properties._actionLink = 1;
                {
                    var error = $root.E2E.ActionLink.verify(message.actionLink);
                    if (error)
                        return "actionLink." + error;
                }
            }
            if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) {
                properties._groupSubject = 1;
                if (!$util.isString(message.groupSubject))
                    return "groupSubject: string expected";
            }
            if (message.parentGroupJid != null && message.hasOwnProperty("parentGroupJid")) {
                properties._parentGroupJid = 1;
                if (!$util.isString(message.parentGroupJid))
                    return "parentGroupJid: string expected";
            }
            if (message.trustBannerType != null && message.hasOwnProperty("trustBannerType")) {
                properties._trustBannerType = 1;
                if (!$util.isString(message.trustBannerType))
                    return "trustBannerType: string expected";
            }
            if (message.trustBannerAction != null && message.hasOwnProperty("trustBannerAction")) {
                properties._trustBannerAction = 1;
                if (!$util.isInteger(message.trustBannerAction))
                    return "trustBannerAction: integer expected";
            }
            if (message.isSampled != null && message.hasOwnProperty("isSampled")) {
                properties._isSampled = 1;
                if (typeof message.isSampled !== "boolean")
                    return "isSampled: boolean expected";
            }
            if (message.groupMentions != null && message.hasOwnProperty("groupMentions")) {
                if (!Array.isArray(message.groupMentions))
                    return "groupMentions: array expected";
                for (var i = 0; i < message.groupMentions.length; ++i) {
                    var error = $root.E2E.GroupMention.verify(message.groupMentions[i]);
                    if (error)
                        return "groupMentions." + error;
                }
            }
            if (message.utm != null && message.hasOwnProperty("utm")) {
                properties._utm = 1;
                {
                    var error = $root.E2E.ContextInfo.UTMInfo.verify(message.utm);
                    if (error)
                        return "utm." + error;
                }
            }
            if (message.forwardedNewsletterMessageInfo != null && message.hasOwnProperty("forwardedNewsletterMessageInfo")) {
                properties._forwardedNewsletterMessageInfo = 1;
                {
                    var error = $root.E2E.ContextInfo.ForwardedNewsletterMessageInfo.verify(message.forwardedNewsletterMessageInfo);
                    if (error)
                        return "forwardedNewsletterMessageInfo." + error;
                }
            }
            if (message.businessMessageForwardInfo != null && message.hasOwnProperty("businessMessageForwardInfo")) {
                properties._businessMessageForwardInfo = 1;
                {
                    var error = $root.E2E.ContextInfo.BusinessMessageForwardInfo.verify(message.businessMessageForwardInfo);
                    if (error)
                        return "businessMessageForwardInfo." + error;
                }
            }
            if (message.smbClientCampaignId != null && message.hasOwnProperty("smbClientCampaignId")) {
                properties._smbClientCampaignId = 1;
                if (!$util.isString(message.smbClientCampaignId))
                    return "smbClientCampaignId: string expected";
            }
            if (message.smbServerCampaignId != null && message.hasOwnProperty("smbServerCampaignId")) {
                properties._smbServerCampaignId = 1;
                if (!$util.isString(message.smbServerCampaignId))
                    return "smbServerCampaignId: string expected";
            }
            if (message.dataSharingContext != null && message.hasOwnProperty("dataSharingContext")) {
                properties._dataSharingContext = 1;
                {
                    var error = $root.E2E.ContextInfo.DataSharingContext.verify(message.dataSharingContext);
                    if (error)
                        return "dataSharingContext." + error;
                }
            }
            if (message.alwaysShowAdAttribution != null && message.hasOwnProperty("alwaysShowAdAttribution")) {
                properties._alwaysShowAdAttribution = 1;
                if (typeof message.alwaysShowAdAttribution !== "boolean")
                    return "alwaysShowAdAttribution: boolean expected";
            }
            if (message.featureEligibilities != null && message.hasOwnProperty("featureEligibilities")) {
                properties._featureEligibilities = 1;
                {
                    var error = $root.E2E.ContextInfo.FeatureEligibilities.verify(message.featureEligibilities);
                    if (error)
                        return "featureEligibilities." + error;
                }
            }
            if (message.entryPointConversionExternalSource != null && message.hasOwnProperty("entryPointConversionExternalSource")) {
                properties._entryPointConversionExternalSource = 1;
                if (!$util.isString(message.entryPointConversionExternalSource))
                    return "entryPointConversionExternalSource: string expected";
            }
            if (message.entryPointConversionExternalMedium != null && message.hasOwnProperty("entryPointConversionExternalMedium")) {
                properties._entryPointConversionExternalMedium = 1;
                if (!$util.isString(message.entryPointConversionExternalMedium))
                    return "entryPointConversionExternalMedium: string expected";
            }
            if (message.ctwaSignals != null && message.hasOwnProperty("ctwaSignals")) {
                properties._ctwaSignals = 1;
                if (!$util.isString(message.ctwaSignals))
                    return "ctwaSignals: string expected";
            }
            if (message.ctwaPayload != null && message.hasOwnProperty("ctwaPayload")) {
                properties._ctwaPayload = 1;
                if (!(message.ctwaPayload && typeof message.ctwaPayload.length === "number" || $util.isString(message.ctwaPayload)))
                    return "ctwaPayload: buffer expected";
            }
            if (message.forwardedAiBotMessageInfo != null && message.hasOwnProperty("forwardedAiBotMessageInfo")) {
                properties._forwardedAiBotMessageInfo = 1;
                {
                    var error = $root.AICommon.ForwardedAIBotMessageInfo.verify(message.forwardedAiBotMessageInfo);
                    if (error)
                        return "forwardedAiBotMessageInfo." + error;
                }
            }
            if (message.statusAttributionType != null && message.hasOwnProperty("statusAttributionType")) {
                properties._statusAttributionType = 1;
                switch (message.statusAttributionType) {
                default:
                    return "statusAttributionType: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                    break;
                }
            }
            if (message.urlTrackingMap != null && message.hasOwnProperty("urlTrackingMap")) {
                properties._urlTrackingMap = 1;
                {
                    var error = $root.E2E.UrlTrackingMap.verify(message.urlTrackingMap);
                    if (error)
                        return "urlTrackingMap." + error;
                }
            }
            if (message.pairedMediaType != null && message.hasOwnProperty("pairedMediaType")) {
                properties._pairedMediaType = 1;
                switch (message.pairedMediaType) {
                default:
                    return "pairedMediaType: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                case 6:
                case 7:
                case 8:
                    break;
                }
            }
            if (message.rankingVersion != null && message.hasOwnProperty("rankingVersion")) {
                properties._rankingVersion = 1;
                if (!$util.isInteger(message.rankingVersion))
                    return "rankingVersion: integer expected";
            }
            if (message.memberLabel != null && message.hasOwnProperty("memberLabel")) {
                properties._memberLabel = 1;
                {
                    var error = $root.E2E.MemberLabel.verify(message.memberLabel);
                    if (error)
                        return "memberLabel." + error;
                }
            }
            if (message.isQuestion != null && message.hasOwnProperty("isQuestion")) {
                properties._isQuestion = 1;
                if (typeof message.isQuestion !== "boolean")
                    return "isQuestion: boolean expected";
            }
            if (message.statusSourceType != null && message.hasOwnProperty("statusSourceType")) {
                properties._statusSourceType = 1;
                switch (message.statusSourceType) {
                default:
                    return "statusSourceType: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                    break;
                }
            }
            if (message.statusAttributions != null && message.hasOwnProperty("statusAttributions")) {
                if (!Array.isArray(message.statusAttributions))
                    return "statusAttributions: array expected";
                for (var i = 0; i < message.statusAttributions.length; ++i) {
                    var error = $root.StatusAttributions.StatusAttribution.verify(message.statusAttributions[i]);
                    if (error)
                        return "statusAttributions." + error;
                }
            }
            if (message.isGroupStatus != null && message.hasOwnProperty("isGroupStatus")) {
                properties._isGroupStatus = 1;
                if (typeof message.isGroupStatus !== "boolean")
                    return "isGroupStatus: boolean expected";
            }
            if (message.forwardOrigin != null && message.hasOwnProperty("forwardOrigin")) {
                properties._forwardOrigin = 1;
                switch (message.forwardOrigin) {
                default:
                    return "forwardOrigin: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                    break;
                }
            }
            if (message.questionReplyQuotedMessage != null && message.hasOwnProperty("questionReplyQuotedMessage")) {
                properties._questionReplyQuotedMessage = 1;
                {
                    var error = $root.E2E.ContextInfo.QuestionReplyQuotedMessage.verify(message.questionReplyQuotedMessage);
                    if (error)
                        return "questionReplyQuotedMessage." + error;
                }
            }
            if (message.statusAudienceMetadata != null && message.hasOwnProperty("statusAudienceMetadata")) {
                properties._statusAudienceMetadata = 1;
                {
                    var error = $root.E2E.ContextInfo.StatusAudienceMetadata.verify(message.statusAudienceMetadata);
                    if (error)
                        return "statusAudienceMetadata." + error;
                }
            }
            if (message.nonJidMentions != null && message.hasOwnProperty("nonJidMentions")) {
                properties._nonJidMentions = 1;
                if (!$util.isInteger(message.nonJidMentions))
                    return "nonJidMentions: integer expected";
            }
            if (message.quotedType != null && message.hasOwnProperty("quotedType")) {
                properties._quotedType = 1;
                switch (message.quotedType) {
                default:
                    return "quotedType: enum value expected";
                case 0:
                case 1:
                    break;
                }
            }
            if (message.botMessageSharingInfo != null && message.hasOwnProperty("botMessageSharingInfo")) {
                properties._botMessageSharingInfo = 1;
                {
                    var error = $root.AICommon.BotMessageSharingInfo.verify(message.botMessageSharingInfo);
                    if (error)
                        return "botMessageSharingInfo." + error;
                }
            }
            return null;
        };

        /**
         * Creates a ContextInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.ContextInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.ContextInfo} ContextInfo
         */
        ContextInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.ContextInfo)
                return object;
            var message = new $root.E2E.ContextInfo();
            if (object.stanzaId != null)
                message.stanzaId = String(object.stanzaId);
            if (object.participant != null)
                message.participant = String(object.participant);
            if (object.quotedMessage != null) {
                if (typeof object.quotedMessage !== "object")
                    throw TypeError(".E2E.ContextInfo.quotedMessage: object expected");
                message.quotedMessage = $root.E2E.Message.fromObject(object.quotedMessage);
            }
            if (object.remoteJid != null)
                message.remoteJid = String(object.remoteJid);
            if (object.mentionedJid) {
                if (!Array.isArray(object.mentionedJid))
                    throw TypeError(".E2E.ContextInfo.mentionedJid: array expected");
                message.mentionedJid = [];
                for (var i = 0; i < object.mentionedJid.length; ++i)
                    message.mentionedJid[i] = String(object.mentionedJid[i]);
            }
            if (object.conversionSource != null)
                message.conversionSource = String(object.conversionSource);
            if (object.conversionData != null)
                if (typeof object.conversionData === "string")
                    $util.base64.decode(object.conversionData, message.conversionData = $util.newBuffer($util.base64.length(object.conversionData)), 0);
                else if (object.conversionData.length >= 0)
                    message.conversionData = object.conversionData;
            if (object.conversionDelaySeconds != null)
                message.conversionDelaySeconds = object.conversionDelaySeconds >>> 0;
            if (object.forwardingScore != null)
                message.forwardingScore = object.forwardingScore >>> 0;
            if (object.isForwarded != null)
                message.isForwarded = Boolean(object.isForwarded);
            if (object.quotedAd != null) {
                if (typeof object.quotedAd !== "object")
                    throw TypeError(".E2E.ContextInfo.quotedAd: object expected");
                message.quotedAd = $root.E2E.ContextInfo.AdReplyInfo.fromObject(object.quotedAd);
            }
            if (object.placeholderKey != null) {
                if (typeof object.placeholderKey !== "object")
                    throw TypeError(".E2E.ContextInfo.placeholderKey: object expected");
                message.placeholderKey = $root.Protocol.MessageKey.fromObject(object.placeholderKey);
            }
            if (object.expiration != null)
                message.expiration = object.expiration >>> 0;
            if (object.ephemeralSettingTimestamp != null)
                if ($util.Long)
                    (message.ephemeralSettingTimestamp = $util.Long.fromValue(object.ephemeralSettingTimestamp)).unsigned = false;
                else if (typeof object.ephemeralSettingTimestamp === "string")
                    message.ephemeralSettingTimestamp = parseInt(object.ephemeralSettingTimestamp, 10);
                else if (typeof object.ephemeralSettingTimestamp === "number")
                    message.ephemeralSettingTimestamp = object.ephemeralSettingTimestamp;
                else if (typeof object.ephemeralSettingTimestamp === "object")
                    message.ephemeralSettingTimestamp = new $util.LongBits(object.ephemeralSettingTimestamp.low >>> 0, object.ephemeralSettingTimestamp.high >>> 0).toNumber();
            if (object.ephemeralSharedSecret != null)
                if (typeof object.ephemeralSharedSecret === "string")
                    $util.base64.decode(object.ephemeralSharedSecret, message.ephemeralSharedSecret = $util.newBuffer($util.base64.length(object.ephemeralSharedSecret)), 0);
                else if (object.ephemeralSharedSecret.length >= 0)
                    message.ephemeralSharedSecret = object.ephemeralSharedSecret;
            if (object.externalAdReply != null) {
                if (typeof object.externalAdReply !== "object")
                    throw TypeError(".E2E.ContextInfo.externalAdReply: object expected");
                message.externalAdReply = $root.E2E.ContextInfo.ExternalAdReplyInfo.fromObject(object.externalAdReply);
            }
            if (object.entryPointConversionSource != null)
                message.entryPointConversionSource = String(object.entryPointConversionSource);
            if (object.entryPointConversionApp != null)
                message.entryPointConversionApp = String(object.entryPointConversionApp);
            if (object.entryPointConversionDelaySeconds != null)
                message.entryPointConversionDelaySeconds = object.entryPointConversionDelaySeconds >>> 0;
            if (object.disappearingMode != null) {
                if (typeof object.disappearingMode !== "object")
                    throw TypeError(".E2E.ContextInfo.disappearingMode: object expected");
                message.disappearingMode = $root.E2E.DisappearingMode.fromObject(object.disappearingMode);
            }
            if (object.actionLink != null) {
                if (typeof object.actionLink !== "object")
                    throw TypeError(".E2E.ContextInfo.actionLink: object expected");
                message.actionLink = $root.E2E.ActionLink.fromObject(object.actionLink);
            }
            if (object.groupSubject != null)
                message.groupSubject = String(object.groupSubject);
            if (object.parentGroupJid != null)
                message.parentGroupJid = String(object.parentGroupJid);
            if (object.trustBannerType != null)
                message.trustBannerType = String(object.trustBannerType);
            if (object.trustBannerAction != null)
                message.trustBannerAction = object.trustBannerAction >>> 0;
            if (object.isSampled != null)
                message.isSampled = Boolean(object.isSampled);
            if (object.groupMentions) {
                if (!Array.isArray(object.groupMentions))
                    throw TypeError(".E2E.ContextInfo.groupMentions: array expected");
                message.groupMentions = [];
                for (var i = 0; i < object.groupMentions.length; ++i) {
                    if (typeof object.groupMentions[i] !== "object")
                        throw TypeError(".E2E.ContextInfo.groupMentions: object expected");
                    message.groupMentions[i] = $root.E2E.GroupMention.fromObject(object.groupMentions[i]);
                }
            }
            if (object.utm != null) {
                if (typeof object.utm !== "object")
                    throw TypeError(".E2E.ContextInfo.utm: object expected");
                message.utm = $root.E2E.ContextInfo.UTMInfo.fromObject(object.utm);
            }
            if (object.forwardedNewsletterMessageInfo != null) {
                if (typeof object.forwardedNewsletterMessageInfo !== "object")
                    throw TypeError(".E2E.ContextInfo.forwardedNewsletterMessageInfo: object expected");
                message.forwardedNewsletterMessageInfo = $root.E2E.ContextInfo.ForwardedNewsletterMessageInfo.fromObject(object.forwardedNewsletterMessageInfo);
            }
            if (object.businessMessageForwardInfo != null) {
                if (typeof object.businessMessageForwardInfo !== "object")
                    throw TypeError(".E2E.ContextInfo.businessMessageForwardInfo: object expected");
                message.businessMessageForwardInfo = $root.E2E.ContextInfo.BusinessMessageForwardInfo.fromObject(object.businessMessageForwardInfo);
            }
            if (object.smbClientCampaignId != null)
                message.smbClientCampaignId = String(object.smbClientCampaignId);
            if (object.smbServerCampaignId != null)
                message.smbServerCampaignId = String(object.smbServerCampaignId);
            if (object.dataSharingContext != null) {
                if (typeof object.dataSharingContext !== "object")
                    throw TypeError(".E2E.ContextInfo.dataSharingContext: object expected");
                message.dataSharingContext = $root.E2E.ContextInfo.DataSharingContext.fromObject(object.dataSharingContext);
            }
            if (object.alwaysShowAdAttribution != null)
                message.alwaysShowAdAttribution = Boolean(object.alwaysShowAdAttribution);
            if (object.featureEligibilities != null) {
                if (typeof object.featureEligibilities !== "object")
                    throw TypeError(".E2E.ContextInfo.featureEligibilities: object expected");
                message.featureEligibilities = $root.E2E.ContextInfo.FeatureEligibilities.fromObject(object.featureEligibilities);
            }
            if (object.entryPointConversionExternalSource != null)
                message.entryPointConversionExternalSource = String(object.entryPointConversionExternalSource);
            if (object.entryPointConversionExternalMedium != null)
                message.entryPointConversionExternalMedium = String(object.entryPointConversionExternalMedium);
            if (object.ctwaSignals != null)
                message.ctwaSignals = String(object.ctwaSignals);
            if (object.ctwaPayload != null)
                if (typeof object.ctwaPayload === "string")
                    $util.base64.decode(object.ctwaPayload, message.ctwaPayload = $util.newBuffer($util.base64.length(object.ctwaPayload)), 0);
                else if (object.ctwaPayload.length >= 0)
                    message.ctwaPayload = object.ctwaPayload;
            if (object.forwardedAiBotMessageInfo != null) {
                if (typeof object.forwardedAiBotMessageInfo !== "object")
                    throw TypeError(".E2E.ContextInfo.forwardedAiBotMessageInfo: object expected");
                message.forwardedAiBotMessageInfo = $root.AICommon.ForwardedAIBotMessageInfo.fromObject(object.forwardedAiBotMessageInfo);
            }
            switch (object.statusAttributionType) {
            default:
                if (typeof object.statusAttributionType === "number") {
                    message.statusAttributionType = object.statusAttributionType;
                    break;
                }
                break;
            case "NONE":
            case 0:
                message.statusAttributionType = 0;
                break;
            case "RESHARED_FROM_MENTION":
            case 1:
                message.statusAttributionType = 1;
                break;
            case "RESHARED_FROM_POST":
            case 2:
                message.statusAttributionType = 2;
                break;
            case "RESHARED_FROM_POST_MANY_TIMES":
            case 3:
                message.statusAttributionType = 3;
                break;
            case "FORWARDED_FROM_STATUS":
            case 4:
                message.statusAttributionType = 4;
                break;
            }
            if (object.urlTrackingMap != null) {
                if (typeof object.urlTrackingMap !== "object")
                    throw TypeError(".E2E.ContextInfo.urlTrackingMap: object expected");
                message.urlTrackingMap = $root.E2E.UrlTrackingMap.fromObject(object.urlTrackingMap);
            }
            switch (object.pairedMediaType) {
            default:
                if (typeof object.pairedMediaType === "number") {
                    message.pairedMediaType = object.pairedMediaType;
                    break;
                }
                break;
            case "NOT_PAIRED_MEDIA":
            case 0:
                message.pairedMediaType = 0;
                break;
            case "SD_VIDEO_PARENT":
            case 1:
                message.pairedMediaType = 1;
                break;
            case "HD_VIDEO_CHILD":
            case 2:
                message.pairedMediaType = 2;
                break;
            case "SD_IMAGE_PARENT":
            case 3:
                message.pairedMediaType = 3;
                break;
            case "HD_IMAGE_CHILD":
            case 4:
                message.pairedMediaType = 4;
                break;
            case "MOTION_PHOTO_PARENT":
            case 5:
                message.pairedMediaType = 5;
                break;
            case "MOTION_PHOTO_CHILD":
            case 6:
                message.pairedMediaType = 6;
                break;
            case "HEVC_VIDEO_PARENT":
            case 7:
                message.pairedMediaType = 7;
                break;
            case "HEVC_VIDEO_CHILD":
            case 8:
                message.pairedMediaType = 8;
                break;
            }
            if (object.rankingVersion != null)
                message.rankingVersion = object.rankingVersion >>> 0;
            if (object.memberLabel != null) {
                if (typeof object.memberLabel !== "object")
                    throw TypeError(".E2E.ContextInfo.memberLabel: object expected");
                message.memberLabel = $root.E2E.MemberLabel.fromObject(object.memberLabel);
            }
            if (object.isQuestion != null)
                message.isQuestion = Boolean(object.isQuestion);
            switch (object.statusSourceType) {
            default:
                if (typeof object.statusSourceType === "number") {
                    message.statusSourceType = object.statusSourceType;
                    break;
                }
                break;
            case "IMAGE":
            case 0:
                message.statusSourceType = 0;
                break;
            case "VIDEO":
            case 1:
                message.statusSourceType = 1;
                break;
            case "GIF":
            case 2:
                message.statusSourceType = 2;
                break;
            case "AUDIO":
            case 3:
                message.statusSourceType = 3;
                break;
            case "TEXT":
            case 4:
                message.statusSourceType = 4;
                break;
            case "MUSIC_STANDALONE":
            case 5:
                message.statusSourceType = 5;
                break;
            }
            if (object.statusAttributions) {
                if (!Array.isArray(object.statusAttributions))
                    throw TypeError(".E2E.ContextInfo.statusAttributions: array expected");
                message.statusAttributions = [];
                for (var i = 0; i < object.statusAttributions.length; ++i) {
                    if (typeof object.statusAttributions[i] !== "object")
                        throw TypeError(".E2E.ContextInfo.statusAttributions: object expected");
                    message.statusAttributions[i] = $root.StatusAttributions.StatusAttribution.fromObject(object.statusAttributions[i]);
                }
            }
            if (object.isGroupStatus != null)
                message.isGroupStatus = Boolean(object.isGroupStatus);
            switch (object.forwardOrigin) {
            default:
                if (typeof object.forwardOrigin === "number") {
                    message.forwardOrigin = object.forwardOrigin;
                    break;
                }
                break;
            case "UNKNOWN":
            case 0:
                message.forwardOrigin = 0;
                break;
            case "CHAT":
            case 1:
                message.forwardOrigin = 1;
                break;
            case "STATUS":
            case 2:
                message.forwardOrigin = 2;
                break;
            case "CHANNELS":
            case 3:
                message.forwardOrigin = 3;
                break;
            case "META_AI":
            case 4:
                message.forwardOrigin = 4;
                break;
            case "UGC":
            case 5:
                message.forwardOrigin = 5;
                break;
            }
            if (object.questionReplyQuotedMessage != null) {
                if (typeof object.questionReplyQuotedMessage !== "object")
                    throw TypeError(".E2E.ContextInfo.questionReplyQuotedMessage: object expected");
                message.questionReplyQuotedMessage = $root.E2E.ContextInfo.QuestionReplyQuotedMessage.fromObject(object.questionReplyQuotedMessage);
            }
            if (object.statusAudienceMetadata != null) {
                if (typeof object.statusAudienceMetadata !== "object")
                    throw TypeError(".E2E.ContextInfo.statusAudienceMetadata: object expected");
                message.statusAudienceMetadata = $root.E2E.ContextInfo.StatusAudienceMetadata.fromObject(object.statusAudienceMetadata);
            }
            if (object.nonJidMentions != null)
                message.nonJidMentions = object.nonJidMentions >>> 0;
            switch (object.quotedType) {
            default:
                if (typeof object.quotedType === "number") {
                    message.quotedType = object.quotedType;
                    break;
                }
                break;
            case "EXPLICIT":
            case 0:
                message.quotedType = 0;
                break;
            case "AUTO":
            case 1:
                message.quotedType = 1;
                break;
            }
            if (object.botMessageSharingInfo != null) {
                if (typeof object.botMessageSharingInfo !== "object")
                    throw TypeError(".E2E.ContextInfo.botMessageSharingInfo: object expected");
                message.botMessageSharingInfo = $root.AICommon.BotMessageSharingInfo.fromObject(object.botMessageSharingInfo);
            }
            return message;
        };

        /**
         * Creates a plain object from a ContextInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.ContextInfo
         * @static
         * @param {E2E.ContextInfo} message ContextInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        ContextInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults) {
                object.mentionedJid = [];
                object.groupMentions = [];
                object.statusAttributions = [];
            }
            if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) {
                object.stanzaId = message.stanzaId;
                if (options.oneofs)
                    object._stanzaId = "stanzaId";
            }
            if (message.participant != null && message.hasOwnProperty("participant")) {
                object.participant = message.participant;
                if (options.oneofs)
                    object._participant = "participant";
            }
            if (message.quotedMessage != null && message.hasOwnProperty("quotedMessage")) {
                object.quotedMessage = $root.E2E.Message.toObject(message.quotedMessage, options);
                if (options.oneofs)
                    object._quotedMessage = "quotedMessage";
            }
            if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) {
                object.remoteJid = message.remoteJid;
                if (options.oneofs)
                    object._remoteJid = "remoteJid";
            }
            if (message.mentionedJid && message.mentionedJid.length) {
                object.mentionedJid = [];
                for (var j = 0; j < message.mentionedJid.length; ++j)
                    object.mentionedJid[j] = message.mentionedJid[j];
            }
            if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) {
                object.conversionSource = message.conversionSource;
                if (options.oneofs)
                    object._conversionSource = "conversionSource";
            }
            if (message.conversionData != null && message.hasOwnProperty("conversionData")) {
                object.conversionData = options.bytes === String ? $util.base64.encode(message.conversionData, 0, message.conversionData.length) : options.bytes === Array ? Array.prototype.slice.call(message.conversionData) : message.conversionData;
                if (options.oneofs)
                    object._conversionData = "conversionData";
            }
            if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) {
                object.conversionDelaySeconds = message.conversionDelaySeconds;
                if (options.oneofs)
                    object._conversionDelaySeconds = "conversionDelaySeconds";
            }
            if (message.forwardingScore != null && message.hasOwnProperty("forwardingScore")) {
                object.forwardingScore = message.forwardingScore;
                if (options.oneofs)
                    object._forwardingScore = "forwardingScore";
            }
            if (message.isForwarded != null && message.hasOwnProperty("isForwarded")) {
                object.isForwarded = message.isForwarded;
                if (options.oneofs)
                    object._isForwarded = "isForwarded";
            }
            if (message.quotedAd != null && message.hasOwnProperty("quotedAd")) {
                object.quotedAd = $root.E2E.ContextInfo.AdReplyInfo.toObject(message.quotedAd, options);
                if (options.oneofs)
                    object._quotedAd = "quotedAd";
            }
            if (message.placeholderKey != null && message.hasOwnProperty("placeholderKey")) {
                object.placeholderKey = $root.Protocol.MessageKey.toObject(message.placeholderKey, options);
                if (options.oneofs)
                    object._placeholderKey = "placeholderKey";
            }
            if (message.expiration != null && message.hasOwnProperty("expiration")) {
                object.expiration = message.expiration;
                if (options.oneofs)
                    object._expiration = "expiration";
            }
            if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) {
                if (typeof message.ephemeralSettingTimestamp === "number")
                    object.ephemeralSettingTimestamp = options.longs === String ? String(message.ephemeralSettingTimestamp) : message.ephemeralSettingTimestamp;
                else
                    object.ephemeralSettingTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.ephemeralSettingTimestamp) : options.longs === Number ? new $util.LongBits(message.ephemeralSettingTimestamp.low >>> 0, message.ephemeralSettingTimestamp.high >>> 0).toNumber() : message.ephemeralSettingTimestamp;
                if (options.oneofs)
                    object._ephemeralSettingTimestamp = "ephemeralSettingTimestamp";
            }
            if (message.ephemeralSharedSecret != null && message.hasOwnProperty("ephemeralSharedSecret")) {
                object.ephemeralSharedSecret = options.bytes === String ? $util.base64.encode(message.ephemeralSharedSecret, 0, message.ephemeralSharedSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.ephemeralSharedSecret) : message.ephemeralSharedSecret;
                if (options.oneofs)
                    object._ephemeralSharedSecret = "ephemeralSharedSecret";
            }
            if (message.externalAdReply != null && message.hasOwnProperty("externalAdReply")) {
                object.externalAdReply = $root.E2E.ContextInfo.ExternalAdReplyInfo.toObject(message.externalAdReply, options);
                if (options.oneofs)
                    object._externalAdReply = "externalAdReply";
            }
            if (message.entryPointConversionSource != null && message.hasOwnProperty("entryPointConversionSource")) {
                object.entryPointConversionSource = message.entryPointConversionSource;
                if (options.oneofs)
                    object._entryPointConversionSource = "entryPointConversionSource";
            }
            if (message.entryPointConversionApp != null && message.hasOwnProperty("entryPointConversionApp")) {
                object.entryPointConversionApp = message.entryPointConversionApp;
                if (options.oneofs)
                    object._entryPointConversionApp = "entryPointConversionApp";
            }
            if (message.entryPointConversionDelaySeconds != null && message.hasOwnProperty("entryPointConversionDelaySeconds")) {
                object.entryPointConversionDelaySeconds = message.entryPointConversionDelaySeconds;
                if (options.oneofs)
                    object._entryPointConversionDelaySeconds = "entryPointConversionDelaySeconds";
            }
            if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) {
                object.disappearingMode = $root.E2E.DisappearingMode.toObject(message.disappearingMode, options);
                if (options.oneofs)
                    object._disappearingMode = "disappearingMode";
            }
            if (message.actionLink != null && message.hasOwnProperty("actionLink")) {
                object.actionLink = $root.E2E.ActionLink.toObject(message.actionLink, options);
                if (options.oneofs)
                    object._actionLink = "actionLink";
            }
            if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) {
                object.groupSubject = message.groupSubject;
                if (options.oneofs)
                    object._groupSubject = "groupSubject";
            }
            if (message.parentGroupJid != null && message.hasOwnProperty("parentGroupJid")) {
                object.parentGroupJid = message.parentGroupJid;
                if (options.oneofs)
                    object._parentGroupJid = "parentGroupJid";
            }
            if (message.trustBannerType != null && message.hasOwnProperty("trustBannerType")) {
                object.trustBannerType = message.trustBannerType;
                if (options.oneofs)
                    object._trustBannerType = "trustBannerType";
            }
            if (message.trustBannerAction != null && message.hasOwnProperty("trustBannerAction")) {
                object.trustBannerAction = message.trustBannerAction;
                if (options.oneofs)
                    object._trustBannerAction = "trustBannerAction";
            }
            if (message.isSampled != null && message.hasOwnProperty("isSampled")) {
                object.isSampled = message.isSampled;
                if (options.oneofs)
                    object._isSampled = "isSampled";
            }
            if (message.groupMentions && message.groupMentions.length) {
                object.groupMentions = [];
                for (var j = 0; j < message.groupMentions.length; ++j)
                    object.groupMentions[j] = $root.E2E.GroupMention.toObject(message.groupMentions[j], options);
            }
            if (message.utm != null && message.hasOwnProperty("utm")) {
                object.utm = $root.E2E.ContextInfo.UTMInfo.toObject(message.utm, options);
                if (options.oneofs)
                    object._utm = "utm";
            }
            if (message.forwardedNewsletterMessageInfo != null && message.hasOwnProperty("forwardedNewsletterMessageInfo")) {
                object.forwardedNewsletterMessageInfo = $root.E2E.ContextInfo.ForwardedNewsletterMessageInfo.toObject(message.forwardedNewsletterMessageInfo, options);
                if (options.oneofs)
                    object._forwardedNewsletterMessageInfo = "forwardedNewsletterMessageInfo";
            }
            if (message.businessMessageForwardInfo != null && message.hasOwnProperty("businessMessageForwardInfo")) {
                object.businessMessageForwardInfo = $root.E2E.ContextInfo.BusinessMessageForwardInfo.toObject(message.businessMessageForwardInfo, options);
                if (options.oneofs)
                    object._businessMessageForwardInfo = "businessMessageForwardInfo";
            }
            if (message.smbClientCampaignId != null && message.hasOwnProperty("smbClientCampaignId")) {
                object.smbClientCampaignId = message.smbClientCampaignId;
                if (options.oneofs)
                    object._smbClientCampaignId = "smbClientCampaignId";
            }
            if (message.smbServerCampaignId != null && message.hasOwnProperty("smbServerCampaignId")) {
                object.smbServerCampaignId = message.smbServerCampaignId;
                if (options.oneofs)
                    object._smbServerCampaignId = "smbServerCampaignId";
            }
            if (message.dataSharingContext != null && message.hasOwnProperty("dataSharingContext")) {
                object.dataSharingContext = $root.E2E.ContextInfo.DataSharingContext.toObject(message.dataSharingContext, options);
                if (options.oneofs)
                    object._dataSharingContext = "dataSharingContext";
            }
            if (message.alwaysShowAdAttribution != null && message.hasOwnProperty("alwaysShowAdAttribution")) {
                object.alwaysShowAdAttribution = message.alwaysShowAdAttribution;
                if (options.oneofs)
                    object._alwaysShowAdAttribution = "alwaysShowAdAttribution";
            }
            if (message.featureEligibilities != null && message.hasOwnProperty("featureEligibilities")) {
                object.featureEligibilities = $root.E2E.ContextInfo.FeatureEligibilities.toObject(message.featureEligibilities, options);
                if (options.oneofs)
                    object._featureEligibilities = "featureEligibilities";
            }
            if (message.entryPointConversionExternalSource != null && message.hasOwnProperty("entryPointConversionExternalSource")) {
                object.entryPointConversionExternalSource = message.entryPointConversionExternalSource;
                if (options.oneofs)
                    object._entryPointConversionExternalSource = "entryPointConversionExternalSource";
            }
            if (message.entryPointConversionExternalMedium != null && message.hasOwnProperty("entryPointConversionExternalMedium")) {
                object.entryPointConversionExternalMedium = message.entryPointConversionExternalMedium;
                if (options.oneofs)
                    object._entryPointConversionExternalMedium = "entryPointConversionExternalMedium";
            }
            if (message.ctwaSignals != null && message.hasOwnProperty("ctwaSignals")) {
                object.ctwaSignals = message.ctwaSignals;
                if (options.oneofs)
                    object._ctwaSignals = "ctwaSignals";
            }
            if (message.ctwaPayload != null && message.hasOwnProperty("ctwaPayload")) {
                object.ctwaPayload = options.bytes === String ? $util.base64.encode(message.ctwaPayload, 0, message.ctwaPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.ctwaPayload) : message.ctwaPayload;
                if (options.oneofs)
                    object._ctwaPayload = "ctwaPayload";
            }
            if (message.forwardedAiBotMessageInfo != null && message.hasOwnProperty("forwardedAiBotMessageInfo")) {
                object.forwardedAiBotMessageInfo = $root.AICommon.ForwardedAIBotMessageInfo.toObject(message.forwardedAiBotMessageInfo, options);
                if (options.oneofs)
                    object._forwardedAiBotMessageInfo = "forwardedAiBotMessageInfo";
            }
            if (message.statusAttributionType != null && message.hasOwnProperty("statusAttributionType")) {
                object.statusAttributionType = options.enums === String ? $root.E2E.ContextInfo.StatusAttributionType[message.statusAttributionType] === undefined ? message.statusAttributionType : $root.E2E.ContextInfo.StatusAttributionType[message.statusAttributionType] : message.statusAttributionType;
                if (options.oneofs)
                    object._statusAttributionType = "statusAttributionType";
            }
            if (message.urlTrackingMap != null && message.hasOwnProperty("urlTrackingMap")) {
                object.urlTrackingMap = $root.E2E.UrlTrackingMap.toObject(message.urlTrackingMap, options);
                if (options.oneofs)
                    object._urlTrackingMap = "urlTrackingMap";
            }
            if (message.pairedMediaType != null && message.hasOwnProperty("pairedMediaType")) {
                object.pairedMediaType = options.enums === String ? $root.E2E.ContextInfo.PairedMediaType[message.pairedMediaType] === undefined ? message.pairedMediaType : $root.E2E.ContextInfo.PairedMediaType[message.pairedMediaType] : message.pairedMediaType;
                if (options.oneofs)
                    object._pairedMediaType = "pairedMediaType";
            }
            if (message.rankingVersion != null && message.hasOwnProperty("rankingVersion")) {
                object.rankingVersion = message.rankingVersion;
                if (options.oneofs)
                    object._rankingVersion = "rankingVersion";
            }
            if (message.memberLabel != null && message.hasOwnProperty("memberLabel")) {
                object.memberLabel = $root.E2E.MemberLabel.toObject(message.memberLabel, options);
                if (options.oneofs)
                    object._memberLabel = "memberLabel";
            }
            if (message.isQuestion != null && message.hasOwnProperty("isQuestion")) {
                object.isQuestion = message.isQuestion;
                if (options.oneofs)
                    object._isQuestion = "isQuestion";
            }
            if (message.statusSourceType != null && message.hasOwnProperty("statusSourceType")) {
                object.statusSourceType = options.enums === String ? $root.E2E.ContextInfo.StatusSourceType[message.statusSourceType] === undefined ? message.statusSourceType : $root.E2E.ContextInfo.StatusSourceType[message.statusSourceType] : message.statusSourceType;
                if (options.oneofs)
                    object._statusSourceType = "statusSourceType";
            }
            if (message.statusAttributions && message.statusAttributions.length) {
                object.statusAttributions = [];
                for (var j = 0; j < message.statusAttributions.length; ++j)
                    object.statusAttributions[j] = $root.StatusAttributions.StatusAttribution.toObject(message.statusAttributions[j], options);
            }
            if (message.isGroupStatus != null && message.hasOwnProperty("isGroupStatus")) {
                object.isGroupStatus = message.isGroupStatus;
                if (options.oneofs)
                    object._isGroupStatus = "isGroupStatus";
            }
            if (message.forwardOrigin != null && message.hasOwnProperty("forwardOrigin")) {
                object.forwardOrigin = options.enums === String ? $root.E2E.ContextInfo.ForwardOrigin[message.forwardOrigin] === undefined ? message.forwardOrigin : $root.E2E.ContextInfo.ForwardOrigin[message.forwardOrigin] : message.forwardOrigin;
                if (options.oneofs)
                    object._forwardOrigin = "forwardOrigin";
            }
            if (message.questionReplyQuotedMessage != null && message.hasOwnProperty("questionReplyQuotedMessage")) {
                object.questionReplyQuotedMessage = $root.E2E.ContextInfo.QuestionReplyQuotedMessage.toObject(message.questionReplyQuotedMessage, options);
                if (options.oneofs)
                    object._questionReplyQuotedMessage = "questionReplyQuotedMessage";
            }
            if (message.statusAudienceMetadata != null && message.hasOwnProperty("statusAudienceMetadata")) {
                object.statusAudienceMetadata = $root.E2E.ContextInfo.StatusAudienceMetadata.toObject(message.statusAudienceMetadata, options);
                if (options.oneofs)
                    object._statusAudienceMetadata = "statusAudienceMetadata";
            }
            if (message.nonJidMentions != null && message.hasOwnProperty("nonJidMentions")) {
                object.nonJidMentions = message.nonJidMentions;
                if (options.oneofs)
                    object._nonJidMentions = "nonJidMentions";
            }
            if (message.quotedType != null && message.hasOwnProperty("quotedType")) {
                object.quotedType = options.enums === String ? $root.E2E.ContextInfo.QuotedType[message.quotedType] === undefined ? message.quotedType : $root.E2E.ContextInfo.QuotedType[message.quotedType] : message.quotedType;
                if (options.oneofs)
                    object._quotedType = "quotedType";
            }
            if (message.botMessageSharingInfo != null && message.hasOwnProperty("botMessageSharingInfo")) {
                object.botMessageSharingInfo = $root.AICommon.BotMessageSharingInfo.toObject(message.botMessageSharingInfo, options);
                if (options.oneofs)
                    object._botMessageSharingInfo = "botMessageSharingInfo";
            }
            return object;
        };

        /**
         * Converts this ContextInfo to JSON.
         * @function toJSON
         * @memberof E2E.ContextInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        ContextInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for ContextInfo
         * @function getTypeUrl
         * @memberof E2E.ContextInfo
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        ContextInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.ContextInfo";
        };

        ContextInfo.AdReplyInfo = (function() {

            /**
             * Properties of an AdReplyInfo.
             * @memberof E2E.ContextInfo
             * @interface IAdReplyInfo
             * @property {string|null} [advertiserName] AdReplyInfo advertiserName
             * @property {E2E.ContextInfo.AdReplyInfo.MediaType|null} [mediaType] AdReplyInfo mediaType
             * @property {Uint8Array|null} [jpegThumbnail] AdReplyInfo jpegThumbnail
             * @property {string|null} [caption] AdReplyInfo caption
             */

            /**
             * Constructs a new AdReplyInfo.
             * @memberof E2E.ContextInfo
             * @classdesc Represents an AdReplyInfo.
             * @implements IAdReplyInfo
             * @constructor
             * @param {E2E.ContextInfo.IAdReplyInfo=} [properties] Properties to set
             */
            function AdReplyInfo(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]];
            }

            /**
             * AdReplyInfo advertiserName.
             * @member {string|null|undefined} advertiserName
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @instance
             */
            AdReplyInfo.prototype.advertiserName = null;

            /**
             * AdReplyInfo mediaType.
             * @member {E2E.ContextInfo.AdReplyInfo.MediaType|null|undefined} mediaType
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @instance
             */
            AdReplyInfo.prototype.mediaType = null;

            /**
             * AdReplyInfo jpegThumbnail.
             * @member {Uint8Array|null|undefined} jpegThumbnail
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @instance
             */
            AdReplyInfo.prototype.jpegThumbnail = null;

            /**
             * AdReplyInfo caption.
             * @member {string|null|undefined} caption
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @instance
             */
            AdReplyInfo.prototype.caption = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * AdReplyInfo _advertiserName.
             * @member {"advertiserName"|undefined} _advertiserName
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @instance
             */
            Object.defineProperty(AdReplyInfo.prototype, "_advertiserName", {
                get: $util.oneOfGetter($oneOfFields = ["advertiserName"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AdReplyInfo _mediaType.
             * @member {"mediaType"|undefined} _mediaType
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @instance
             */
            Object.defineProperty(AdReplyInfo.prototype, "_mediaType", {
                get: $util.oneOfGetter($oneOfFields = ["mediaType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AdReplyInfo _jpegThumbnail.
             * @member {"jpegThumbnail"|undefined} _jpegThumbnail
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @instance
             */
            Object.defineProperty(AdReplyInfo.prototype, "_jpegThumbnail", {
                get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AdReplyInfo _caption.
             * @member {"caption"|undefined} _caption
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @instance
             */
            Object.defineProperty(AdReplyInfo.prototype, "_caption", {
                get: $util.oneOfGetter($oneOfFields = ["caption"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new AdReplyInfo instance using the specified properties.
             * @function create
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @static
             * @param {E2E.ContextInfo.IAdReplyInfo=} [properties] Properties to set
             * @returns {E2E.ContextInfo.AdReplyInfo} AdReplyInfo instance
             */
            AdReplyInfo.create = function create(properties) {
                return new AdReplyInfo(properties);
            };

            /**
             * Encodes the specified AdReplyInfo message. Does not implicitly {@link E2E.ContextInfo.AdReplyInfo.verify|verify} messages.
             * @function encode
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @static
             * @param {E2E.ContextInfo.IAdReplyInfo} message AdReplyInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AdReplyInfo.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.advertiserName != null && Object.hasOwnProperty.call(message, "advertiserName"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.advertiserName);
                if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mediaType);
                if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail"))
                    writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.jpegThumbnail);
                if (message.caption != null && Object.hasOwnProperty.call(message, "caption"))
                    writer.uint32(/* id 17, wireType 2 =*/138).string(message.caption);
                return writer;
            };

            /**
             * Encodes the specified AdReplyInfo message, length delimited. Does not implicitly {@link E2E.ContextInfo.AdReplyInfo.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @static
             * @param {E2E.ContextInfo.IAdReplyInfo} message AdReplyInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AdReplyInfo.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AdReplyInfo message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.ContextInfo.AdReplyInfo} AdReplyInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AdReplyInfo.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.E2E.ContextInfo.AdReplyInfo();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.advertiserName = reader.string();
                            break;
                        }
                    case 2: {
                            message.mediaType = reader.int32();
                            break;
                        }
                    case 16: {
                            message.jpegThumbnail = reader.bytes();
                            break;
                        }
                    case 17: {
                            message.caption = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an AdReplyInfo message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.ContextInfo.AdReplyInfo} AdReplyInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AdReplyInfo.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AdReplyInfo message.
             * @function verify
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AdReplyInfo.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.advertiserName != null && message.hasOwnProperty("advertiserName")) {
                    properties._advertiserName = 1;
                    if (!$util.isString(message.advertiserName))
                        return "advertiserName: string expected";
                }
                if (message.mediaType != null && message.hasOwnProperty("mediaType")) {
                    properties._mediaType = 1;
                    switch (message.mediaType) {
                    default:
                        return "mediaType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    properties._jpegThumbnail = 1;
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    properties._caption = 1;
                    if (!$util.isString(message.caption))
                        return "caption: string expected";
                }
                return null;
            };

            /**
             * Creates an AdReplyInfo message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.ContextInfo.AdReplyInfo} AdReplyInfo
             */
            AdReplyInfo.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.ContextInfo.AdReplyInfo)
                    return object;
                var message = new $root.E2E.ContextInfo.AdReplyInfo();
                if (object.advertiserName != null)
                    message.advertiserName = String(object.advertiserName);
                switch (object.mediaType) {
                default:
                    if (typeof object.mediaType === "number") {
                        message.mediaType = object.mediaType;
                        break;
                    }
                    break;
                case "NONE":
                case 0:
                    message.mediaType = 0;
                    break;
                case "IMAGE":
                case 1:
                    message.mediaType = 1;
                    break;
                case "VIDEO":
                case 2:
                    message.mediaType = 2;
                    break;
                }
                if (object.jpegThumbnail != null)
                    if (typeof object.jpegThumbnail === "string")
                        $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0);
                    else if (object.jpegThumbnail.length >= 0)
                        message.jpegThumbnail = object.jpegThumbnail;
                if (object.caption != null)
                    message.caption = String(object.caption);
                return message;
            };

            /**
             * Creates a plain object from an AdReplyInfo message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @static
             * @param {E2E.ContextInfo.AdReplyInfo} message AdReplyInfo
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AdReplyInfo.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.advertiserName != null && message.hasOwnProperty("advertiserName")) {
                    object.advertiserName = message.advertiserName;
                    if (options.oneofs)
                        object._advertiserName = "advertiserName";
                }
                if (message.mediaType != null && message.hasOwnProperty("mediaType")) {
                    object.mediaType = options.enums === String ? $root.E2E.ContextInfo.AdReplyInfo.MediaType[message.mediaType] === undefined ? message.mediaType : $root.E2E.ContextInfo.AdReplyInfo.MediaType[message.mediaType] : message.mediaType;
                    if (options.oneofs)
                        object._mediaType = "mediaType";
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail;
                    if (options.oneofs)
                        object._jpegThumbnail = "jpegThumbnail";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    object.caption = message.caption;
                    if (options.oneofs)
                        object._caption = "caption";
                }
                return object;
            };

            /**
             * Converts this AdReplyInfo to JSON.
             * @function toJSON
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AdReplyInfo.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AdReplyInfo
             * @function getTypeUrl
             * @memberof E2E.ContextInfo.AdReplyInfo
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AdReplyInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.ContextInfo.AdReplyInfo";
            };

            /**
             * MediaType enum.
             * @name E2E.ContextInfo.AdReplyInfo.MediaType
             * @enum {number}
             * @property {number} NONE=0 NONE value
             * @property {number} IMAGE=1 IMAGE value
             * @property {number} VIDEO=2 VIDEO value
             */
            AdReplyInfo.MediaType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "NONE"] = 0;
                values[valuesById[1] = "IMAGE"] = 1;
                values[valuesById[2] = "VIDEO"] = 2;
                return values;
            })();

            return AdReplyInfo;
        })();

        ContextInfo.BusinessMessageForwardInfo = (function() {

            /**
             * Properties of a BusinessMessageForwardInfo.
             * @memberof E2E.ContextInfo
             * @interface IBusinessMessageForwardInfo
             * @property {string|null} [businessOwnerJid] BusinessMessageForwardInfo businessOwnerJid
             */

            /**
             * Constructs a new BusinessMessageForwardInfo.
             * @memberof E2E.ContextInfo
             * @classdesc Represents a BusinessMessageForwardInfo.
             * @implements IBusinessMessageForwardInfo
             * @constructor
             * @param {E2E.ContextInfo.IBusinessMessageForwardInfo=} [properties] Properties to set
             */
            function BusinessMessageForwardInfo(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]];
            }

            /**
             * BusinessMessageForwardInfo businessOwnerJid.
             * @member {string|null|undefined} businessOwnerJid
             * @memberof E2E.ContextInfo.BusinessMessageForwardInfo
             * @instance
             */
            BusinessMessageForwardInfo.prototype.businessOwnerJid = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * BusinessMessageForwardInfo _businessOwnerJid.
             * @member {"businessOwnerJid"|undefined} _businessOwnerJid
             * @memberof E2E.ContextInfo.BusinessMessageForwardInfo
             * @instance
             */
            Object.defineProperty(BusinessMessageForwardInfo.prototype, "_businessOwnerJid", {
                get: $util.oneOfGetter($oneOfFields = ["businessOwnerJid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new BusinessMessageForwardInfo instance using the specified properties.
             * @function create
             * @memberof E2E.ContextInfo.BusinessMessageForwardInfo
             * @static
             * @param {E2E.ContextInfo.IBusinessMessageForwardInfo=} [properties] Properties to set
             * @returns {E2E.ContextInfo.BusinessMessageForwardInfo} BusinessMessageForwardInfo instance
             */
            BusinessMessageForwardInfo.create = function create(properties) {
                return new BusinessMessageForwardInfo(properties);
            };

            /**
             * Encodes the specified BusinessMessageForwardInfo message. Does not implicitly {@link E2E.ContextInfo.BusinessMessageForwardInfo.verify|verify} messages.
             * @function encode
             * @memberof E2E.ContextInfo.BusinessMessageForwardInfo
             * @static
             * @param {E2E.ContextInfo.IBusinessMessageForwardInfo} message BusinessMessageForwardInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BusinessMessageForwardInfo.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.businessOwnerJid != null && Object.hasOwnProperty.call(message, "businessOwnerJid"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.businessOwnerJid);
                return writer;
            };

            /**
             * Encodes the specified BusinessMessageForwardInfo message, length delimited. Does not implicitly {@link E2E.ContextInfo.BusinessMessageForwardInfo.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.ContextInfo.BusinessMessageForwardInfo
             * @static
             * @param {E2E.ContextInfo.IBusinessMessageForwardInfo} message BusinessMessageForwardInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BusinessMessageForwardInfo.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BusinessMessageForwardInfo message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.ContextInfo.BusinessMessageForwardInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.ContextInfo.BusinessMessageForwardInfo} BusinessMessageForwardInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BusinessMessageForwardInfo.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.E2E.ContextInfo.BusinessMessageForwardInfo();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.businessOwnerJid = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a BusinessMessageForwardInfo message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.ContextInfo.BusinessMessageForwardInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.ContextInfo.BusinessMessageForwardInfo} BusinessMessageForwardInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BusinessMessageForwardInfo.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BusinessMessageForwardInfo message.
             * @function verify
             * @memberof E2E.ContextInfo.BusinessMessageForwardInfo
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BusinessMessageForwardInfo.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) {
                    properties._businessOwnerJid = 1;
                    if (!$util.isString(message.businessOwnerJid))
                        return "businessOwnerJid: string expected";
                }
                return null;
            };

            /**
             * Creates a BusinessMessageForwardInfo message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.ContextInfo.BusinessMessageForwardInfo
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.ContextInfo.BusinessMessageForwardInfo} BusinessMessageForwardInfo
             */
            BusinessMessageForwardInfo.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.ContextInfo.BusinessMessageForwardInfo)
                    return object;
                var message = new $root.E2E.ContextInfo.BusinessMessageForwardInfo();
                if (object.businessOwnerJid != null)
                    message.businessOwnerJid = String(object.businessOwnerJid);
                return message;
            };

            /**
             * Creates a plain object from a BusinessMessageForwardInfo message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.ContextInfo.BusinessMessageForwardInfo
             * @static
             * @param {E2E.ContextInfo.BusinessMessageForwardInfo} message BusinessMessageForwardInfo
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BusinessMessageForwardInfo.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) {
                    object.businessOwnerJid = message.businessOwnerJid;
                    if (options.oneofs)
                        object._businessOwnerJid = "businessOwnerJid";
                }
                return object;
            };

            /**
             * Converts this BusinessMessageForwardInfo to JSON.
             * @function toJSON
             * @memberof E2E.ContextInfo.BusinessMessageForwardInfo
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BusinessMessageForwardInfo.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for BusinessMessageForwardInfo
             * @function getTypeUrl
             * @memberof E2E.ContextInfo.BusinessMessageForwardInfo
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            BusinessMessageForwardInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.ContextInfo.BusinessMessageForwardInfo";
            };

            return BusinessMessageForwardInfo;
        })();

        ContextInfo.DataSharingContext = (function() {

            /**
             * Properties of a DataSharingContext.
             * @memberof E2E.ContextInfo
             * @interface IDataSharingContext
             * @property {boolean|null} [showMmDisclosure] DataSharingContext showMmDisclosure
             * @property {string|null} [encryptedSignalTokenConsented] DataSharingContext encryptedSignalTokenConsented
             * @property {Array.<E2E.ContextInfo.DataSharingContext.IParameters>|null} [parameters] DataSharingContext parameters
             * @property {number|null} [dataSharingFlags] DataSharingContext dataSharingFlags
             */

            /**
             * Constructs a new DataSharingContext.
             * @memberof E2E.ContextInfo
             * @classdesc Represents a DataSharingContext.
             * @implements IDataSharingContext
             * @constructor
             * @param {E2E.ContextInfo.IDataSharingContext=} [properties] Properties to set
             */
            function DataSharingContext(properties) {
                this.parameters = [];
                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]];
            }

            /**
             * DataSharingContext showMmDisclosure.
             * @member {boolean|null|undefined} showMmDisclosure
             * @memberof E2E.ContextInfo.DataSharingContext
             * @instance
             */
            DataSharingContext.prototype.showMmDisclosure = null;

            /**
             * DataSharingContext encryptedSignalTokenConsented.
             * @member {string|null|undefined} encryptedSignalTokenConsented
             * @memberof E2E.ContextInfo.DataSharingContext
             * @instance
             */
            DataSharingContext.prototype.encryptedSignalTokenConsented = null;

            /**
             * DataSharingContext parameters.
             * @member {Array.<E2E.ContextInfo.DataSharingContext.IParameters>} parameters
             * @memberof E2E.ContextInfo.DataSharingContext
             * @instance
             */
            DataSharingContext.prototype.parameters = $util.emptyArray;

            /**
             * DataSharingContext dataSharingFlags.
             * @member {number|null|undefined} dataSharingFlags
             * @memberof E2E.ContextInfo.DataSharingContext
             * @instance
             */
            DataSharingContext.prototype.dataSharingFlags = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * DataSharingContext _showMmDisclosure.
             * @member {"showMmDisclosure"|undefined} _showMmDisclosure
             * @memberof E2E.ContextInfo.DataSharingContext
             * @instance
             */
            Object.defineProperty(DataSharingContext.prototype, "_showMmDisclosure", {
                get: $util.oneOfGetter($oneOfFields = ["showMmDisclosure"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DataSharingContext _encryptedSignalTokenConsented.
             * @member {"encryptedSignalTokenConsented"|undefined} _encryptedSignalTokenConsented
             * @memberof E2E.ContextInfo.DataSharingContext
             * @instance
             */
            Object.defineProperty(DataSharingContext.prototype, "_encryptedSignalTokenConsented", {
                get: $util.oneOfGetter($oneOfFields = ["encryptedSignalTokenConsented"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DataSharingContext _dataSharingFlags.
             * @member {"dataSharingFlags"|undefined} _dataSharingFlags
             * @memberof E2E.ContextInfo.DataSharingContext
             * @instance
             */
            Object.defineProperty(DataSharingContext.prototype, "_dataSharingFlags", {
                get: $util.oneOfGetter($oneOfFields = ["dataSharingFlags"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new DataSharingContext instance using the specified properties.
             * @function create
             * @memberof E2E.ContextInfo.DataSharingContext
             * @static
             * @param {E2E.ContextInfo.IDataSharingContext=} [properties] Properties to set
             * @returns {E2E.ContextInfo.DataSharingContext} DataSharingContext instance
             */
            DataSharingContext.create = function create(properties) {
                return new DataSharingContext(properties);
            };

            /**
             * Encodes the specified DataSharingContext message. Does not implicitly {@link E2E.ContextInfo.DataSharingContext.verify|verify} messages.
             * @function encode
             * @memberof E2E.ContextInfo.DataSharingContext
             * @static
             * @param {E2E.ContextInfo.IDataSharingContext} message DataSharingContext message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DataSharingContext.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.showMmDisclosure != null && Object.hasOwnProperty.call(message, "showMmDisclosure"))
                    writer.uint32(/* id 1, wireType 0 =*/8).bool(message.showMmDisclosure);
                if (message.encryptedSignalTokenConsented != null && Object.hasOwnProperty.call(message, "encryptedSignalTokenConsented"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.encryptedSignalTokenConsented);
                if (message.parameters != null && message.parameters.length)
                    for (var i = 0; i < message.parameters.length; ++i)
                        $root.E2E.ContextInfo.DataSharingContext.Parameters.encode(message.parameters[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                if (message.dataSharingFlags != null && Object.hasOwnProperty.call(message, "dataSharingFlags"))
                    writer.uint32(/* id 4, wireType 0 =*/32).int32(message.dataSharingFlags);
                return writer;
            };

            /**
             * Encodes the specified DataSharingContext message, length delimited. Does not implicitly {@link E2E.ContextInfo.DataSharingContext.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.ContextInfo.DataSharingContext
             * @static
             * @param {E2E.ContextInfo.IDataSharingContext} message DataSharingContext message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DataSharingContext.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DataSharingContext message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.ContextInfo.DataSharingContext
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.ContextInfo.DataSharingContext} DataSharingContext
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DataSharingContext.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.E2E.ContextInfo.DataSharingContext();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.showMmDisclosure = reader.bool();
                            break;
                        }
                    case 2: {
                            message.encryptedSignalTokenConsented = reader.string();
                            break;
                        }
                    case 3: {
                            if (!(message.parameters && message.parameters.length))
                                message.parameters = [];
                            message.parameters.push($root.E2E.ContextInfo.DataSharingContext.Parameters.decode(reader, reader.uint32()));
                            break;
                        }
                    case 4: {
                            message.dataSharingFlags = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a DataSharingContext message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.ContextInfo.DataSharingContext
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.ContextInfo.DataSharingContext} DataSharingContext
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DataSharingContext.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DataSharingContext message.
             * @function verify
             * @memberof E2E.ContextInfo.DataSharingContext
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DataSharingContext.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.showMmDisclosure != null && message.hasOwnProperty("showMmDisclosure")) {
                    properties._showMmDisclosure = 1;
                    if (typeof message.showMmDisclosure !== "boolean")
                        return "showMmDisclosure: boolean expected";
                }
                if (message.encryptedSignalTokenConsented != null && message.hasOwnProperty("encryptedSignalTokenConsented")) {
                    properties._encryptedSignalTokenConsented = 1;
                    if (!$util.isString(message.encryptedSignalTokenConsented))
                        return "encryptedSignalTokenConsented: string expected";
                }
                if (message.parameters != null && message.hasOwnProperty("parameters")) {
                    if (!Array.isArray(message.parameters))
                        return "parameters: array expected";
                    for (var i = 0; i < message.parameters.length; ++i) {
                        var error = $root.E2E.ContextInfo.DataSharingContext.Parameters.verify(message.parameters[i]);
                        if (error)
                            return "parameters." + error;
                    }
                }
                if (message.dataSharingFlags != null && message.hasOwnProperty("dataSharingFlags")) {
                    properties._dataSharingFlags = 1;
                    if (!$util.isInteger(message.dataSharingFlags))
                        return "dataSharingFlags: integer expected";
                }
                return null;
            };

            /**
             * Creates a DataSharingContext message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.ContextInfo.DataSharingContext
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.ContextInfo.DataSharingContext} DataSharingContext
             */
            DataSharingContext.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.ContextInfo.DataSharingContext)
                    return object;
                var message = new $root.E2E.ContextInfo.DataSharingContext();
                if (object.showMmDisclosure != null)
                    message.showMmDisclosure = Boolean(object.showMmDisclosure);
                if (object.encryptedSignalTokenConsented != null)
                    message.encryptedSignalTokenConsented = String(object.encryptedSignalTokenConsented);
                if (object.parameters) {
                    if (!Array.isArray(object.parameters))
                        throw TypeError(".E2E.ContextInfo.DataSharingContext.parameters: array expected");
                    message.parameters = [];
                    for (var i = 0; i < object.parameters.length; ++i) {
                        if (typeof object.parameters[i] !== "object")
                            throw TypeError(".E2E.ContextInfo.DataSharingContext.parameters: object expected");
                        message.parameters[i] = $root.E2E.ContextInfo.DataSharingContext.Parameters.fromObject(object.parameters[i]);
                    }
                }
                if (object.dataSharingFlags != null)
                    message.dataSharingFlags = object.dataSharingFlags | 0;
                return message;
            };

            /**
             * Creates a plain object from a DataSharingContext message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.ContextInfo.DataSharingContext
             * @static
             * @param {E2E.ContextInfo.DataSharingContext} message DataSharingContext
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DataSharingContext.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.parameters = [];
                if (message.showMmDisclosure != null && message.hasOwnProperty("showMmDisclosure")) {
                    object.showMmDisclosure = message.showMmDisclosure;
                    if (options.oneofs)
                        object._showMmDisclosure = "showMmDisclosure";
                }
                if (message.encryptedSignalTokenConsented != null && message.hasOwnProperty("encryptedSignalTokenConsented")) {
                    object.encryptedSignalTokenConsented = message.encryptedSignalTokenConsented;
                    if (options.oneofs)
                        object._encryptedSignalTokenConsented = "encryptedSignalTokenConsented";
                }
                if (message.parameters && message.parameters.length) {
                    object.parameters = [];
                    for (var j = 0; j < message.parameters.length; ++j)
                        object.parameters[j] = $root.E2E.ContextInfo.DataSharingContext.Parameters.toObject(message.parameters[j], options);
                }
                if (message.dataSharingFlags != null && message.hasOwnProperty("dataSharingFlags")) {
                    object.dataSharingFlags = message.dataSharingFlags;
                    if (options.oneofs)
                        object._dataSharingFlags = "dataSharingFlags";
                }
                return object;
            };

            /**
             * Converts this DataSharingContext to JSON.
             * @function toJSON
             * @memberof E2E.ContextInfo.DataSharingContext
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DataSharingContext.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for DataSharingContext
             * @function getTypeUrl
             * @memberof E2E.ContextInfo.DataSharingContext
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            DataSharingContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.ContextInfo.DataSharingContext";
            };

            /**
             * DataSharingFlags enum.
             * @name E2E.ContextInfo.DataSharingContext.DataSharingFlags
             * @enum {number}
             * @property {number} SHOW_MM_DISCLOSURE_ON_CLICK=1 SHOW_MM_DISCLOSURE_ON_CLICK value
             * @property {number} SHOW_MM_DISCLOSURE_ON_READ=2 SHOW_MM_DISCLOSURE_ON_READ value
             */
            DataSharingContext.DataSharingFlags = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[1] = "SHOW_MM_DISCLOSURE_ON_CLICK"] = 1;
                values[valuesById[2] = "SHOW_MM_DISCLOSURE_ON_READ"] = 2;
                return values;
            })();

            DataSharingContext.Parameters = (function() {

                /**
                 * Properties of a Parameters.
                 * @memberof E2E.ContextInfo.DataSharingContext
                 * @interface IParameters
                 * @property {string|null} [key] Parameters key
                 * @property {string|null} [stringData] Parameters stringData
                 * @property {number|Long|null} [intData] Parameters intData
                 * @property {number|null} [floatData] Parameters floatData
                 * @property {E2E.ContextInfo.DataSharingContext.IParameters|null} [contents] Parameters contents
                 */

                /**
                 * Constructs a new Parameters.
                 * @memberof E2E.ContextInfo.DataSharingContext
                 * @classdesc Represents a Parameters.
                 * @implements IParameters
                 * @constructor
                 * @param {E2E.ContextInfo.DataSharingContext.IParameters=} [properties] Properties to set
                 */
                function Parameters(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]];
                }

                /**
                 * Parameters key.
                 * @member {string|null|undefined} key
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @instance
                 */
                Parameters.prototype.key = null;

                /**
                 * Parameters stringData.
                 * @member {string|null|undefined} stringData
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @instance
                 */
                Parameters.prototype.stringData = null;

                /**
                 * Parameters intData.
                 * @member {number|Long|null|undefined} intData
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @instance
                 */
                Parameters.prototype.intData = null;

                /**
                 * Parameters floatData.
                 * @member {number|null|undefined} floatData
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @instance
                 */
                Parameters.prototype.floatData = null;

                /**
                 * Parameters contents.
                 * @member {E2E.ContextInfo.DataSharingContext.IParameters|null|undefined} contents
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @instance
                 */
                Parameters.prototype.contents = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * Parameters _key.
                 * @member {"key"|undefined} _key
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @instance
                 */
                Object.defineProperty(Parameters.prototype, "_key", {
                    get: $util.oneOfGetter($oneOfFields = ["key"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Parameters _stringData.
                 * @member {"stringData"|undefined} _stringData
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @instance
                 */
                Object.defineProperty(Parameters.prototype, "_stringData", {
                    get: $util.oneOfGetter($oneOfFields = ["stringData"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Parameters _intData.
                 * @member {"intData"|undefined} _intData
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @instance
                 */
                Object.defineProperty(Parameters.prototype, "_intData", {
                    get: $util.oneOfGetter($oneOfFields = ["intData"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Parameters _floatData.
                 * @member {"floatData"|undefined} _floatData
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @instance
                 */
                Object.defineProperty(Parameters.prototype, "_floatData", {
                    get: $util.oneOfGetter($oneOfFields = ["floatData"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Parameters _contents.
                 * @member {"contents"|undefined} _contents
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @instance
                 */
                Object.defineProperty(Parameters.prototype, "_contents", {
                    get: $util.oneOfGetter($oneOfFields = ["contents"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new Parameters instance using the specified properties.
                 * @function create
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @static
                 * @param {E2E.ContextInfo.DataSharingContext.IParameters=} [properties] Properties to set
                 * @returns {E2E.ContextInfo.DataSharingContext.Parameters} Parameters instance
                 */
                Parameters.create = function create(properties) {
                    return new Parameters(properties);
                };

                /**
                 * Encodes the specified Parameters message. Does not implicitly {@link E2E.ContextInfo.DataSharingContext.Parameters.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @static
                 * @param {E2E.ContextInfo.DataSharingContext.IParameters} message Parameters message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Parameters.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.key != null && Object.hasOwnProperty.call(message, "key"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.key);
                    if (message.stringData != null && Object.hasOwnProperty.call(message, "stringData"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.stringData);
                    if (message.intData != null && Object.hasOwnProperty.call(message, "intData"))
                        writer.uint32(/* id 3, wireType 0 =*/24).int64(message.intData);
                    if (message.floatData != null && Object.hasOwnProperty.call(message, "floatData"))
                        writer.uint32(/* id 4, wireType 5 =*/37).float(message.floatData);
                    if (message.contents != null && Object.hasOwnProperty.call(message, "contents"))
                        $root.E2E.ContextInfo.DataSharingContext.Parameters.encode(message.contents, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                    return writer;
                };

                /**
                 * Encodes the specified Parameters message, length delimited. Does not implicitly {@link E2E.ContextInfo.DataSharingContext.Parameters.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @static
                 * @param {E2E.ContextInfo.DataSharingContext.IParameters} message Parameters message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Parameters.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Parameters message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.ContextInfo.DataSharingContext.Parameters} Parameters
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Parameters.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.E2E.ContextInfo.DataSharingContext.Parameters();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.key = reader.string();
                                break;
                            }
                        case 2: {
                                message.stringData = reader.string();
                                break;
                            }
                        case 3: {
                                message.intData = reader.int64();
                                break;
                            }
                        case 4: {
                                message.floatData = reader.float();
                                break;
                            }
                        case 5: {
                                message.contents = $root.E2E.ContextInfo.DataSharingContext.Parameters.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a Parameters message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.ContextInfo.DataSharingContext.Parameters} Parameters
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Parameters.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Parameters message.
                 * @function verify
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Parameters.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.key != null && message.hasOwnProperty("key")) {
                        properties._key = 1;
                        if (!$util.isString(message.key))
                            return "key: string expected";
                    }
                    if (message.stringData != null && message.hasOwnProperty("stringData")) {
                        properties._stringData = 1;
                        if (!$util.isString(message.stringData))
                            return "stringData: string expected";
                    }
                    if (message.intData != null && message.hasOwnProperty("intData")) {
                        properties._intData = 1;
                        if (!$util.isInteger(message.intData) && !(message.intData && $util.isInteger(message.intData.low) && $util.isInteger(message.intData.high)))
                            return "intData: integer|Long expected";
                    }
                    if (message.floatData != null && message.hasOwnProperty("floatData")) {
                        properties._floatData = 1;
                        if (typeof message.floatData !== "number")
                            return "floatData: number expected";
                    }
                    if (message.contents != null && message.hasOwnProperty("contents")) {
                        properties._contents = 1;
                        {
                            var error = $root.E2E.ContextInfo.DataSharingContext.Parameters.verify(message.contents);
                            if (error)
                                return "contents." + error;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Parameters message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.ContextInfo.DataSharingContext.Parameters} Parameters
                 */
                Parameters.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.ContextInfo.DataSharingContext.Parameters)
                        return object;
                    var message = new $root.E2E.ContextInfo.DataSharingContext.Parameters();
                    if (object.key != null)
                        message.key = String(object.key);
                    if (object.stringData != null)
                        message.stringData = String(object.stringData);
                    if (object.intData != null)
                        if ($util.Long)
                            (message.intData = $util.Long.fromValue(object.intData)).unsigned = false;
                        else if (typeof object.intData === "string")
                            message.intData = parseInt(object.intData, 10);
                        else if (typeof object.intData === "number")
                            message.intData = object.intData;
                        else if (typeof object.intData === "object")
                            message.intData = new $util.LongBits(object.intData.low >>> 0, object.intData.high >>> 0).toNumber();
                    if (object.floatData != null)
                        message.floatData = Number(object.floatData);
                    if (object.contents != null) {
                        if (typeof object.contents !== "object")
                            throw TypeError(".E2E.ContextInfo.DataSharingContext.Parameters.contents: object expected");
                        message.contents = $root.E2E.ContextInfo.DataSharingContext.Parameters.fromObject(object.contents);
                    }
                    return message;
                };

                /**
                 * Creates a plain object from a Parameters message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @static
                 * @param {E2E.ContextInfo.DataSharingContext.Parameters} message Parameters
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Parameters.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.key != null && message.hasOwnProperty("key")) {
                        object.key = message.key;
                        if (options.oneofs)
                            object._key = "key";
                    }
                    if (message.stringData != null && message.hasOwnProperty("stringData")) {
                        object.stringData = message.stringData;
                        if (options.oneofs)
                            object._stringData = "stringData";
                    }
                    if (message.intData != null && message.hasOwnProperty("intData")) {
                        if (typeof message.intData === "number")
                            object.intData = options.longs === String ? String(message.intData) : message.intData;
                        else
                            object.intData = options.longs === String ? $util.Long.prototype.toString.call(message.intData) : options.longs === Number ? new $util.LongBits(message.intData.low >>> 0, message.intData.high >>> 0).toNumber() : message.intData;
                        if (options.oneofs)
                            object._intData = "intData";
                    }
                    if (message.floatData != null && message.hasOwnProperty("floatData")) {
                        object.floatData = options.json && !isFinite(message.floatData) ? String(message.floatData) : message.floatData;
                        if (options.oneofs)
                            object._floatData = "floatData";
                    }
                    if (message.contents != null && message.hasOwnProperty("contents")) {
                        object.contents = $root.E2E.ContextInfo.DataSharingContext.Parameters.toObject(message.contents, options);
                        if (options.oneofs)
                            object._contents = "contents";
                    }
                    return object;
                };

                /**
                 * Converts this Parameters to JSON.
                 * @function toJSON
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Parameters.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for Parameters
                 * @function getTypeUrl
                 * @memberof E2E.ContextInfo.DataSharingContext.Parameters
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Parameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.ContextInfo.DataSharingContext.Parameters";
                };

                return Parameters;
            })();

            return DataSharingContext;
        })();

        ContextInfo.ExternalAdReplyInfo = (function() {

            /**
             * Properties of an ExternalAdReplyInfo.
             * @memberof E2E.ContextInfo
             * @interface IExternalAdReplyInfo
             * @property {string|null} [title] ExternalAdReplyInfo title
             * @property {string|null} [body] ExternalAdReplyInfo body
             * @property {E2E.ContextInfo.ExternalAdReplyInfo.MediaType|null} [mediaType] ExternalAdReplyInfo mediaType
             * @property {string|null} [thumbnailUrl] ExternalAdReplyInfo thumbnailUrl
             * @property {string|null} [mediaUrl] ExternalAdReplyInfo mediaUrl
             * @property {Uint8Array|null} [thumbnail] ExternalAdReplyInfo thumbnail
             * @property {string|null} [sourceType] ExternalAdReplyInfo sourceType
             * @property {string|null} [sourceId] ExternalAdReplyInfo sourceId
             * @property {string|null} [sourceUrl] ExternalAdReplyInfo sourceUrl
             * @property {boolean|null} [containsAutoReply] ExternalAdReplyInfo containsAutoReply
             * @property {boolean|null} [renderLargerThumbnail] ExternalAdReplyInfo renderLargerThumbnail
             * @property {boolean|null} [showAdAttribution] ExternalAdReplyInfo showAdAttribution
             * @property {string|null} [ctwaClid] ExternalAdReplyInfo ctwaClid
             * @property {string|null} [ref] ExternalAdReplyInfo ref
             * @property {boolean|null} [clickToWhatsappCall] ExternalAdReplyInfo clickToWhatsappCall
             * @property {boolean|null} [adContextPreviewDismissed] ExternalAdReplyInfo adContextPreviewDismissed
             * @property {string|null} [sourceApp] ExternalAdReplyInfo sourceApp
             * @property {boolean|null} [automatedGreetingMessageShown] ExternalAdReplyInfo automatedGreetingMessageShown
             * @property {string|null} [greetingMessageBody] ExternalAdReplyInfo greetingMessageBody
             * @property {string|null} [ctaPayload] ExternalAdReplyInfo ctaPayload
             * @property {boolean|null} [disableNudge] ExternalAdReplyInfo disableNudge
             * @property {string|null} [originalImageUrl] ExternalAdReplyInfo originalImageUrl
             * @property {string|null} [automatedGreetingMessageCtaType] ExternalAdReplyInfo automatedGreetingMessageCtaType
             * @property {boolean|null} [wtwaAdFormat] ExternalAdReplyInfo wtwaAdFormat
             * @property {E2E.ContextInfo.ExternalAdReplyInfo.AdType|null} [adType] ExternalAdReplyInfo adType
             * @property {string|null} [wtwaWebsiteUrl] ExternalAdReplyInfo wtwaWebsiteUrl
             * @property {string|null} [adPreviewUrl] ExternalAdReplyInfo adPreviewUrl
             */

            /**
             * Constructs a new ExternalAdReplyInfo.
             * @memberof E2E.ContextInfo
             * @classdesc Represents an ExternalAdReplyInfo.
             * @implements IExternalAdReplyInfo
             * @constructor
             * @param {E2E.ContextInfo.IExternalAdReplyInfo=} [properties] Properties to set
             */
            function ExternalAdReplyInfo(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]];
            }

            /**
             * ExternalAdReplyInfo title.
             * @member {string|null|undefined} title
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.title = null;

            /**
             * ExternalAdReplyInfo body.
             * @member {string|null|undefined} body
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.body = null;

            /**
             * ExternalAdReplyInfo mediaType.
             * @member {E2E.ContextInfo.ExternalAdReplyInfo.MediaType|null|undefined} mediaType
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.mediaType = null;

            /**
             * ExternalAdReplyInfo thumbnailUrl.
             * @member {string|null|undefined} thumbnailUrl
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.thumbnailUrl = null;

            /**
             * ExternalAdReplyInfo mediaUrl.
             * @member {string|null|undefined} mediaUrl
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.mediaUrl = null;

            /**
             * ExternalAdReplyInfo thumbnail.
             * @member {Uint8Array|null|undefined} thumbnail
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.thumbnail = null;

            /**
             * ExternalAdReplyInfo sourceType.
             * @member {string|null|undefined} sourceType
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.sourceType = null;

            /**
             * ExternalAdReplyInfo sourceId.
             * @member {string|null|undefined} sourceId
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.sourceId = null;

            /**
             * ExternalAdReplyInfo sourceUrl.
             * @member {string|null|undefined} sourceUrl
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.sourceUrl = null;

            /**
             * ExternalAdReplyInfo containsAutoReply.
             * @member {boolean|null|undefined} containsAutoReply
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.containsAutoReply = null;

            /**
             * ExternalAdReplyInfo renderLargerThumbnail.
             * @member {boolean|null|undefined} renderLargerThumbnail
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.renderLargerThumbnail = null;

            /**
             * ExternalAdReplyInfo showAdAttribution.
             * @member {boolean|null|undefined} showAdAttribution
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.showAdAttribution = null;

            /**
             * ExternalAdReplyInfo ctwaClid.
             * @member {string|null|undefined} ctwaClid
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.ctwaClid = null;

            /**
             * ExternalAdReplyInfo ref.
             * @member {string|null|undefined} ref
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.ref = null;

            /**
             * ExternalAdReplyInfo clickToWhatsappCall.
             * @member {boolean|null|undefined} clickToWhatsappCall
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.clickToWhatsappCall = null;

            /**
             * ExternalAdReplyInfo adContextPreviewDismissed.
             * @member {boolean|null|undefined} adContextPreviewDismissed
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.adContextPreviewDismissed = null;

            /**
             * ExternalAdReplyInfo sourceApp.
             * @member {string|null|undefined} sourceApp
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.sourceApp = null;

            /**
             * ExternalAdReplyInfo automatedGreetingMessageShown.
             * @member {boolean|null|undefined} automatedGreetingMessageShown
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.automatedGreetingMessageShown = null;

            /**
             * ExternalAdReplyInfo greetingMessageBody.
             * @member {string|null|undefined} greetingMessageBody
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.greetingMessageBody = null;

            /**
             * ExternalAdReplyInfo ctaPayload.
             * @member {string|null|undefined} ctaPayload
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.ctaPayload = null;

            /**
             * ExternalAdReplyInfo disableNudge.
             * @member {boolean|null|undefined} disableNudge
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.disableNudge = null;

            /**
             * ExternalAdReplyInfo originalImageUrl.
             * @member {string|null|undefined} originalImageUrl
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.originalImageUrl = null;

            /**
             * ExternalAdReplyInfo automatedGreetingMessageCtaType.
             * @member {string|null|undefined} automatedGreetingMessageCtaType
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.automatedGreetingMessageCtaType = null;

            /**
             * ExternalAdReplyInfo wtwaAdFormat.
             * @member {boolean|null|undefined} wtwaAdFormat
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.wtwaAdFormat = null;

            /**
             * ExternalAdReplyInfo adType.
             * @member {E2E.ContextInfo.ExternalAdReplyInfo.AdType|null|undefined} adType
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.adType = null;

            /**
             * ExternalAdReplyInfo wtwaWebsiteUrl.
             * @member {string|null|undefined} wtwaWebsiteUrl
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.wtwaWebsiteUrl = null;

            /**
             * ExternalAdReplyInfo adPreviewUrl.
             * @member {string|null|undefined} adPreviewUrl
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            ExternalAdReplyInfo.prototype.adPreviewUrl = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * ExternalAdReplyInfo _title.
             * @member {"title"|undefined} _title
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_title", {
                get: $util.oneOfGetter($oneOfFields = ["title"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _body.
             * @member {"body"|undefined} _body
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_body", {
                get: $util.oneOfGetter($oneOfFields = ["body"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _mediaType.
             * @member {"mediaType"|undefined} _mediaType
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_mediaType", {
                get: $util.oneOfGetter($oneOfFields = ["mediaType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _thumbnailUrl.
             * @member {"thumbnailUrl"|undefined} _thumbnailUrl
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_thumbnailUrl", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _mediaUrl.
             * @member {"mediaUrl"|undefined} _mediaUrl
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_mediaUrl", {
                get: $util.oneOfGetter($oneOfFields = ["mediaUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _thumbnail.
             * @member {"thumbnail"|undefined} _thumbnail
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_thumbnail", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnail"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _sourceType.
             * @member {"sourceType"|undefined} _sourceType
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_sourceType", {
                get: $util.oneOfGetter($oneOfFields = ["sourceType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _sourceId.
             * @member {"sourceId"|undefined} _sourceId
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_sourceId", {
                get: $util.oneOfGetter($oneOfFields = ["sourceId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _sourceUrl.
             * @member {"sourceUrl"|undefined} _sourceUrl
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_sourceUrl", {
                get: $util.oneOfGetter($oneOfFields = ["sourceUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _containsAutoReply.
             * @member {"containsAutoReply"|undefined} _containsAutoReply
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_containsAutoReply", {
                get: $util.oneOfGetter($oneOfFields = ["containsAutoReply"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _renderLargerThumbnail.
             * @member {"renderLargerThumbnail"|undefined} _renderLargerThumbnail
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_renderLargerThumbnail", {
                get: $util.oneOfGetter($oneOfFields = ["renderLargerThumbnail"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _showAdAttribution.
             * @member {"showAdAttribution"|undefined} _showAdAttribution
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_showAdAttribution", {
                get: $util.oneOfGetter($oneOfFields = ["showAdAttribution"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _ctwaClid.
             * @member {"ctwaClid"|undefined} _ctwaClid
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_ctwaClid", {
                get: $util.oneOfGetter($oneOfFields = ["ctwaClid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _ref.
             * @member {"ref"|undefined} _ref
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_ref", {
                get: $util.oneOfGetter($oneOfFields = ["ref"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _clickToWhatsappCall.
             * @member {"clickToWhatsappCall"|undefined} _clickToWhatsappCall
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_clickToWhatsappCall", {
                get: $util.oneOfGetter($oneOfFields = ["clickToWhatsappCall"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _adContextPreviewDismissed.
             * @member {"adContextPreviewDismissed"|undefined} _adContextPreviewDismissed
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_adContextPreviewDismissed", {
                get: $util.oneOfGetter($oneOfFields = ["adContextPreviewDismissed"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _sourceApp.
             * @member {"sourceApp"|undefined} _sourceApp
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_sourceApp", {
                get: $util.oneOfGetter($oneOfFields = ["sourceApp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _automatedGreetingMessageShown.
             * @member {"automatedGreetingMessageShown"|undefined} _automatedGreetingMessageShown
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_automatedGreetingMessageShown", {
                get: $util.oneOfGetter($oneOfFields = ["automatedGreetingMessageShown"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _greetingMessageBody.
             * @member {"greetingMessageBody"|undefined} _greetingMessageBody
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_greetingMessageBody", {
                get: $util.oneOfGetter($oneOfFields = ["greetingMessageBody"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _ctaPayload.
             * @member {"ctaPayload"|undefined} _ctaPayload
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_ctaPayload", {
                get: $util.oneOfGetter($oneOfFields = ["ctaPayload"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _disableNudge.
             * @member {"disableNudge"|undefined} _disableNudge
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_disableNudge", {
                get: $util.oneOfGetter($oneOfFields = ["disableNudge"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _originalImageUrl.
             * @member {"originalImageUrl"|undefined} _originalImageUrl
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_originalImageUrl", {
                get: $util.oneOfGetter($oneOfFields = ["originalImageUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _automatedGreetingMessageCtaType.
             * @member {"automatedGreetingMessageCtaType"|undefined} _automatedGreetingMessageCtaType
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_automatedGreetingMessageCtaType", {
                get: $util.oneOfGetter($oneOfFields = ["automatedGreetingMessageCtaType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _wtwaAdFormat.
             * @member {"wtwaAdFormat"|undefined} _wtwaAdFormat
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_wtwaAdFormat", {
                get: $util.oneOfGetter($oneOfFields = ["wtwaAdFormat"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _adType.
             * @member {"adType"|undefined} _adType
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_adType", {
                get: $util.oneOfGetter($oneOfFields = ["adType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _wtwaWebsiteUrl.
             * @member {"wtwaWebsiteUrl"|undefined} _wtwaWebsiteUrl
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_wtwaWebsiteUrl", {
                get: $util.oneOfGetter($oneOfFields = ["wtwaWebsiteUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalAdReplyInfo _adPreviewUrl.
             * @member {"adPreviewUrl"|undefined} _adPreviewUrl
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             */
            Object.defineProperty(ExternalAdReplyInfo.prototype, "_adPreviewUrl", {
                get: $util.oneOfGetter($oneOfFields = ["adPreviewUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new ExternalAdReplyInfo instance using the specified properties.
             * @function create
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @static
             * @param {E2E.ContextInfo.IExternalAdReplyInfo=} [properties] Properties to set
             * @returns {E2E.ContextInfo.ExternalAdReplyInfo} ExternalAdReplyInfo instance
             */
            ExternalAdReplyInfo.create = function create(properties) {
                return new ExternalAdReplyInfo(properties);
            };

            /**
             * Encodes the specified ExternalAdReplyInfo message. Does not implicitly {@link E2E.ContextInfo.ExternalAdReplyInfo.verify|verify} messages.
             * @function encode
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @static
             * @param {E2E.ContextInfo.IExternalAdReplyInfo} message ExternalAdReplyInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ExternalAdReplyInfo.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.title);
                if (message.body != null && Object.hasOwnProperty.call(message, "body"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.body);
                if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType"))
                    writer.uint32(/* id 3, wireType 0 =*/24).int32(message.mediaType);
                if (message.thumbnailUrl != null && Object.hasOwnProperty.call(message, "thumbnailUrl"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.thumbnailUrl);
                if (message.mediaUrl != null && Object.hasOwnProperty.call(message, "mediaUrl"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.mediaUrl);
                if (message.thumbnail != null && Object.hasOwnProperty.call(message, "thumbnail"))
                    writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.thumbnail);
                if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType"))
                    writer.uint32(/* id 7, wireType 2 =*/58).string(message.sourceType);
                if (message.sourceId != null && Object.hasOwnProperty.call(message, "sourceId"))
                    writer.uint32(/* id 8, wireType 2 =*/66).string(message.sourceId);
                if (message.sourceUrl != null && Object.hasOwnProperty.call(message, "sourceUrl"))
                    writer.uint32(/* id 9, wireType 2 =*/74).string(message.sourceUrl);
                if (message.containsAutoReply != null && Object.hasOwnProperty.call(message, "containsAutoReply"))
                    writer.uint32(/* id 10, wireType 0 =*/80).bool(message.containsAutoReply);
                if (message.renderLargerThumbnail != null && Object.hasOwnProperty.call(message, "renderLargerThumbnail"))
                    writer.uint32(/* id 11, wireType 0 =*/88).bool(message.renderLargerThumbnail);
                if (message.showAdAttribution != null && Object.hasOwnProperty.call(message, "showAdAttribution"))
                    writer.uint32(/* id 12, wireType 0 =*/96).bool(message.showAdAttribution);
                if (message.ctwaClid != null && Object.hasOwnProperty.call(message, "ctwaClid"))
                    writer.uint32(/* id 13, wireType 2 =*/106).string(message.ctwaClid);
                if (message.ref != null && Object.hasOwnProperty.call(message, "ref"))
                    writer.uint32(/* id 14, wireType 2 =*/114).string(message.ref);
                if (message.clickToWhatsappCall != null && Object.hasOwnProperty.call(message, "clickToWhatsappCall"))
                    writer.uint32(/* id 15, wireType 0 =*/120).bool(message.clickToWhatsappCall);
                if (message.adContextPreviewDismissed != null && Object.hasOwnProperty.call(message, "adContextPreviewDismissed"))
                    writer.uint32(/* id 16, wireType 0 =*/128).bool(message.adContextPreviewDismissed);
                if (message.sourceApp != null && Object.hasOwnProperty.call(message, "sourceApp"))
                    writer.uint32(/* id 17, wireType 2 =*/138).string(message.sourceApp);
                if (message.automatedGreetingMessageShown != null && Object.hasOwnProperty.call(message, "automatedGreetingMessageShown"))
                    writer.uint32(/* id 18, wireType 0 =*/144).bool(message.automatedGreetingMessageShown);
                if (message.greetingMessageBody != null && Object.hasOwnProperty.call(message, "greetingMessageBody"))
                    writer.uint32(/* id 19, wireType 2 =*/154).string(message.greetingMessageBody);
                if (message.ctaPayload != null && Object.hasOwnProperty.call(message, "ctaPayload"))
                    writer.uint32(/* id 20, wireType 2 =*/162).string(message.ctaPayload);
                if (message.disableNudge != null && Object.hasOwnProperty.call(message, "disableNudge"))
                    writer.uint32(/* id 21, wireType 0 =*/168).bool(message.disableNudge);
                if (message.originalImageUrl != null && Object.hasOwnProperty.call(message, "originalImageUrl"))
                    writer.uint32(/* id 22, wireType 2 =*/178).string(message.originalImageUrl);
                if (message.automatedGreetingMessageCtaType != null && Object.hasOwnProperty.call(message, "automatedGreetingMessageCtaType"))
                    writer.uint32(/* id 23, wireType 2 =*/186).string(message.automatedGreetingMessageCtaType);
                if (message.wtwaAdFormat != null && Object.hasOwnProperty.call(message, "wtwaAdFormat"))
                    writer.uint32(/* id 24, wireType 0 =*/192).bool(message.wtwaAdFormat);
                if (message.adType != null && Object.hasOwnProperty.call(message, "adType"))
                    writer.uint32(/* id 25, wireType 0 =*/200).int32(message.adType);
                if (message.wtwaWebsiteUrl != null && Object.hasOwnProperty.call(message, "wtwaWebsiteUrl"))
                    writer.uint32(/* id 26, wireType 2 =*/210).string(message.wtwaWebsiteUrl);
                if (message.adPreviewUrl != null && Object.hasOwnProperty.call(message, "adPreviewUrl"))
                    writer.uint32(/* id 27, wireType 2 =*/218).string(message.adPreviewUrl);
                return writer;
            };

            /**
             * Encodes the specified ExternalAdReplyInfo message, length delimited. Does not implicitly {@link E2E.ContextInfo.ExternalAdReplyInfo.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @static
             * @param {E2E.ContextInfo.IExternalAdReplyInfo} message ExternalAdReplyInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ExternalAdReplyInfo.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an ExternalAdReplyInfo message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.ContextInfo.ExternalAdReplyInfo} ExternalAdReplyInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ExternalAdReplyInfo.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.E2E.ContextInfo.ExternalAdReplyInfo();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.title = reader.string();
                            break;
                        }
                    case 2: {
                            message.body = reader.string();
                            break;
                        }
                    case 3: {
                            message.mediaType = reader.int32();
                            break;
                        }
                    case 4: {
                            message.thumbnailUrl = reader.string();
                            break;
                        }
                    case 5: {
                            message.mediaUrl = reader.string();
                            break;
                        }
                    case 6: {
                            message.thumbnail = reader.bytes();
                            break;
                        }
                    case 7: {
                            message.sourceType = reader.string();
                            break;
                        }
                    case 8: {
                            message.sourceId = reader.string();
                            break;
                        }
                    case 9: {
                            message.sourceUrl = reader.string();
                            break;
                        }
                    case 10: {
                            message.containsAutoReply = reader.bool();
                            break;
                        }
                    case 11: {
                            message.renderLargerThumbnail = reader.bool();
                            break;
                        }
                    case 12: {
                            message.showAdAttribution = reader.bool();
                            break;
                        }
                    case 13: {
                            message.ctwaClid = reader.string();
                            break;
                        }
                    case 14: {
                            message.ref = reader.string();
                            break;
                        }
                    case 15: {
                            message.clickToWhatsappCall = reader.bool();
                            break;
                        }
                    case 16: {
                            message.adContextPreviewDismissed = reader.bool();
                            break;
                        }
                    case 17: {
                            message.sourceApp = reader.string();
                            break;
                        }
                    case 18: {
                            message.automatedGreetingMessageShown = reader.bool();
                            break;
                        }
                    case 19: {
                            message.greetingMessageBody = reader.string();
                            break;
                        }
                    case 20: {
                            message.ctaPayload = reader.string();
                            break;
                        }
                    case 21: {
                            message.disableNudge = reader.bool();
                            break;
                        }
                    case 22: {
                            message.originalImageUrl = reader.string();
                            break;
                        }
                    case 23: {
                            message.automatedGreetingMessageCtaType = reader.string();
                            break;
                        }
                    case 24: {
                            message.wtwaAdFormat = reader.bool();
                            break;
                        }
                    case 25: {
                            message.adType = reader.int32();
                            break;
                        }
                    case 26: {
                            message.wtwaWebsiteUrl = reader.string();
                            break;
                        }
                    case 27: {
                            message.adPreviewUrl = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an ExternalAdReplyInfo message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.ContextInfo.ExternalAdReplyInfo} ExternalAdReplyInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ExternalAdReplyInfo.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an ExternalAdReplyInfo message.
             * @function verify
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ExternalAdReplyInfo.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.title != null && message.hasOwnProperty("title")) {
                    properties._title = 1;
                    if (!$util.isString(message.title))
                        return "title: string expected";
                }
                if (message.body != null && message.hasOwnProperty("body")) {
                    properties._body = 1;
                    if (!$util.isString(message.body))
                        return "body: string expected";
                }
                if (message.mediaType != null && message.hasOwnProperty("mediaType")) {
                    properties._mediaType = 1;
                    switch (message.mediaType) {
                    default:
                        return "mediaType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) {
                    properties._thumbnailUrl = 1;
                    if (!$util.isString(message.thumbnailUrl))
                        return "thumbnailUrl: string expected";
                }
                if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) {
                    properties._mediaUrl = 1;
                    if (!$util.isString(message.mediaUrl))
                        return "mediaUrl: string expected";
                }
                if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) {
                    properties._thumbnail = 1;
                    if (!(message.thumbnail && typeof message.thumbnail.length === "number" || $util.isString(message.thumbnail)))
                        return "thumbnail: buffer expected";
                }
                if (message.sourceType != null && message.hasOwnProperty("sourceType")) {
                    properties._sourceType = 1;
                    if (!$util.isString(message.sourceType))
                        return "sourceType: string expected";
                }
                if (message.sourceId != null && message.hasOwnProperty("sourceId")) {
                    properties._sourceId = 1;
                    if (!$util.isString(message.sourceId))
                        return "sourceId: string expected";
                }
                if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) {
                    properties._sourceUrl = 1;
                    if (!$util.isString(message.sourceUrl))
                        return "sourceUrl: string expected";
                }
                if (message.containsAutoReply != null && message.hasOwnProperty("containsAutoReply")) {
                    properties._containsAutoReply = 1;
                    if (typeof message.containsAutoReply !== "boolean")
                        return "containsAutoReply: boolean expected";
                }
                if (message.renderLargerThumbnail != null && message.hasOwnProperty("renderLargerThumbnail")) {
                    properties._renderLargerThumbnail = 1;
                    if (typeof message.renderLargerThumbnail !== "boolean")
                        return "renderLargerThumbnail: boolean expected";
                }
                if (message.showAdAttribution != null && message.hasOwnProperty("showAdAttribution")) {
                    properties._showAdAttribution = 1;
                    if (typeof message.showAdAttribution !== "boolean")
                        return "showAdAttribution: boolean expected";
                }
                if (message.ctwaClid != null && message.hasOwnProperty("ctwaClid")) {
                    properties._ctwaClid = 1;
                    if (!$util.isString(message.ctwaClid))
                        return "ctwaClid: string expected";
                }
                if (message.ref != null && message.hasOwnProperty("ref")) {
                    properties._ref = 1;
                    if (!$util.isString(message.ref))
                        return "ref: string expected";
                }
                if (message.clickToWhatsappCall != null && message.hasOwnProperty("clickToWhatsappCall")) {
                    properties._clickToWhatsappCall = 1;
                    if (typeof message.clickToWhatsappCall !== "boolean")
                        return "clickToWhatsappCall: boolean expected";
                }
                if (message.adContextPreviewDismissed != null && message.hasOwnProperty("adContextPreviewDismissed")) {
                    properties._adContextPreviewDismissed = 1;
                    if (typeof message.adContextPreviewDismissed !== "boolean")
                        return "adContextPreviewDismissed: boolean expected";
                }
                if (message.sourceApp != null && message.hasOwnProperty("sourceApp")) {
                    properties._sourceApp = 1;
                    if (!$util.isString(message.sourceApp))
                        return "sourceApp: string expected";
                }
                if (message.automatedGreetingMessageShown != null && message.hasOwnProperty("automatedGreetingMessageShown")) {
                    properties._automatedGreetingMessageShown = 1;
                    if (typeof message.automatedGreetingMessageShown !== "boolean")
                        return "automatedGreetingMessageShown: boolean expected";
                }
                if (message.greetingMessageBody != null && message.hasOwnProperty("greetingMessageBody")) {
                    properties._greetingMessageBody = 1;
                    if (!$util.isString(message.greetingMessageBody))
                        return "greetingMessageBody: string expected";
                }
                if (message.ctaPayload != null && message.hasOwnProperty("ctaPayload")) {
                    properties._ctaPayload = 1;
                    if (!$util.isString(message.ctaPayload))
                        return "ctaPayload: string expected";
                }
                if (message.disableNudge != null && message.hasOwnProperty("disableNudge")) {
                    properties._disableNudge = 1;
                    if (typeof message.disableNudge !== "boolean")
                        return "disableNudge: boolean expected";
                }
                if (message.originalImageUrl != null && message.hasOwnProperty("originalImageUrl")) {
                    properties._originalImageUrl = 1;
                    if (!$util.isString(message.originalImageUrl))
                        return "originalImageUrl: string expected";
                }
                if (message.automatedGreetingMessageCtaType != null && message.hasOwnProperty("automatedGreetingMessageCtaType")) {
                    properties._automatedGreetingMessageCtaType = 1;
                    if (!$util.isString(message.automatedGreetingMessageCtaType))
                        return "automatedGreetingMessageCtaType: string expected";
                }
                if (message.wtwaAdFormat != null && message.hasOwnProperty("wtwaAdFormat")) {
                    properties._wtwaAdFormat = 1;
                    if (typeof message.wtwaAdFormat !== "boolean")
                        return "wtwaAdFormat: boolean expected";
                }
                if (message.adType != null && message.hasOwnProperty("adType")) {
                    properties._adType = 1;
                    switch (message.adType) {
                    default:
                        return "adType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                if (message.wtwaWebsiteUrl != null && message.hasOwnProperty("wtwaWebsiteUrl")) {
                    properties._wtwaWebsiteUrl = 1;
                    if (!$util.isString(message.wtwaWebsiteUrl))
                        return "wtwaWebsiteUrl: string expected";
                }
                if (message.adPreviewUrl != null && message.hasOwnProperty("adPreviewUrl")) {
                    properties._adPreviewUrl = 1;
                    if (!$util.isString(message.adPreviewUrl))
                        return "adPreviewUrl: string expected";
                }
                return null;
            };

            /**
             * Creates an ExternalAdReplyInfo message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.ContextInfo.ExternalAdReplyInfo} ExternalAdReplyInfo
             */
            ExternalAdReplyInfo.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.ContextInfo.ExternalAdReplyInfo)
                    return object;
                var message = new $root.E2E.ContextInfo.ExternalAdReplyInfo();
                if (object.title != null)
                    message.title = String(object.title);
                if (object.body != null)
                    message.body = String(object.body);
                switch (object.mediaType) {
                default:
                    if (typeof object.mediaType === "number") {
                        message.mediaType = object.mediaType;
                        break;
                    }
                    break;
                case "NONE":
                case 0:
                    message.mediaType = 0;
                    break;
                case "IMAGE":
                case 1:
                    message.mediaType = 1;
                    break;
                case "VIDEO":
                case 2:
                    message.mediaType = 2;
                    break;
                }
                if (object.thumbnailUrl != null)
                    message.thumbnailUrl = String(object.thumbnailUrl);
                if (object.mediaUrl != null)
                    message.mediaUrl = String(object.mediaUrl);
                if (object.thumbnail != null)
                    if (typeof object.thumbnail === "string")
                        $util.base64.decode(object.thumbnail, message.thumbnail = $util.newBuffer($util.base64.length(object.thumbnail)), 0);
                    else if (object.thumbnail.length >= 0)
                        message.thumbnail = object.thumbnail;
                if (object.sourceType != null)
                    message.sourceType = String(object.sourceType);
                if (object.sourceId != null)
                    message.sourceId = String(object.sourceId);
                if (object.sourceUrl != null)
                    message.sourceUrl = String(object.sourceUrl);
                if (object.containsAutoReply != null)
                    message.containsAutoReply = Boolean(object.containsAutoReply);
                if (object.renderLargerThumbnail != null)
                    message.renderLargerThumbnail = Boolean(object.renderLargerThumbnail);
                if (object.showAdAttribution != null)
                    message.showAdAttribution = Boolean(object.showAdAttribution);
                if (object.ctwaClid != null)
                    message.ctwaClid = String(object.ctwaClid);
                if (object.ref != null)
                    message.ref = String(object.ref);
                if (object.clickToWhatsappCall != null)
                    message.clickToWhatsappCall = Boolean(object.clickToWhatsappCall);
                if (object.adContextPreviewDismissed != null)
                    message.adContextPreviewDismissed = Boolean(object.adContextPreviewDismissed);
                if (object.sourceApp != null)
                    message.sourceApp = String(object.sourceApp);
                if (object.automatedGreetingMessageShown != null)
                    message.automatedGreetingMessageShown = Boolean(object.automatedGreetingMessageShown);
                if (object.greetingMessageBody != null)
                    message.greetingMessageBody = String(object.greetingMessageBody);
                if (object.ctaPayload != null)
                    message.ctaPayload = String(object.ctaPayload);
                if (object.disableNudge != null)
                    message.disableNudge = Boolean(object.disableNudge);
                if (object.originalImageUrl != null)
                    message.originalImageUrl = String(object.originalImageUrl);
                if (object.automatedGreetingMessageCtaType != null)
                    message.automatedGreetingMessageCtaType = String(object.automatedGreetingMessageCtaType);
                if (object.wtwaAdFormat != null)
                    message.wtwaAdFormat = Boolean(object.wtwaAdFormat);
                switch (object.adType) {
                default:
                    if (typeof object.adType === "number") {
                        message.adType = object.adType;
                        break;
                    }
                    break;
                case "CTWA":
                case 0:
                    message.adType = 0;
                    break;
                case "CAWC":
                case 1:
                    message.adType = 1;
                    break;
                }
                if (object.wtwaWebsiteUrl != null)
                    message.wtwaWebsiteUrl = String(object.wtwaWebsiteUrl);
                if (object.adPreviewUrl != null)
                    message.adPreviewUrl = String(object.adPreviewUrl);
                return message;
            };

            /**
             * Creates a plain object from an ExternalAdReplyInfo message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @static
             * @param {E2E.ContextInfo.ExternalAdReplyInfo} message ExternalAdReplyInfo
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ExternalAdReplyInfo.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.title != null && message.hasOwnProperty("title")) {
                    object.title = message.title;
                    if (options.oneofs)
                        object._title = "title";
                }
                if (message.body != null && message.hasOwnProperty("body")) {
                    object.body = message.body;
                    if (options.oneofs)
                        object._body = "body";
                }
                if (message.mediaType != null && message.hasOwnProperty("mediaType")) {
                    object.mediaType = options.enums === String ? $root.E2E.ContextInfo.ExternalAdReplyInfo.MediaType[message.mediaType] === undefined ? message.mediaType : $root.E2E.ContextInfo.ExternalAdReplyInfo.MediaType[message.mediaType] : message.mediaType;
                    if (options.oneofs)
                        object._mediaType = "mediaType";
                }
                if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) {
                    object.thumbnailUrl = message.thumbnailUrl;
                    if (options.oneofs)
                        object._thumbnailUrl = "thumbnailUrl";
                }
                if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) {
                    object.mediaUrl = message.mediaUrl;
                    if (options.oneofs)
                        object._mediaUrl = "mediaUrl";
                }
                if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) {
                    object.thumbnail = options.bytes === String ? $util.base64.encode(message.thumbnail, 0, message.thumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnail) : message.thumbnail;
                    if (options.oneofs)
                        object._thumbnail = "thumbnail";
                }
                if (message.sourceType != null && message.hasOwnProperty("sourceType")) {
                    object.sourceType = message.sourceType;
                    if (options.oneofs)
                        object._sourceType = "sourceType";
                }
                if (message.sourceId != null && message.hasOwnProperty("sourceId")) {
                    object.sourceId = message.sourceId;
                    if (options.oneofs)
                        object._sourceId = "sourceId";
                }
                if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) {
                    object.sourceUrl = message.sourceUrl;
                    if (options.oneofs)
                        object._sourceUrl = "sourceUrl";
                }
                if (message.containsAutoReply != null && message.hasOwnProperty("containsAutoReply")) {
                    object.containsAutoReply = message.containsAutoReply;
                    if (options.oneofs)
                        object._containsAutoReply = "containsAutoReply";
                }
                if (message.renderLargerThumbnail != null && message.hasOwnProperty("renderLargerThumbnail")) {
                    object.renderLargerThumbnail = message.renderLargerThumbnail;
                    if (options.oneofs)
                        object._renderLargerThumbnail = "renderLargerThumbnail";
                }
                if (message.showAdAttribution != null && message.hasOwnProperty("showAdAttribution")) {
                    object.showAdAttribution = message.showAdAttribution;
                    if (options.oneofs)
                        object._showAdAttribution = "showAdAttribution";
                }
                if (message.ctwaClid != null && message.hasOwnProperty("ctwaClid")) {
                    object.ctwaClid = message.ctwaClid;
                    if (options.oneofs)
                        object._ctwaClid = "ctwaClid";
                }
                if (message.ref != null && message.hasOwnProperty("ref")) {
                    object.ref = message.ref;
                    if (options.oneofs)
                        object._ref = "ref";
                }
                if (message.clickToWhatsappCall != null && message.hasOwnProperty("clickToWhatsappCall")) {
                    object.clickToWhatsappCall = message.clickToWhatsappCall;
                    if (options.oneofs)
                        object._clickToWhatsappCall = "clickToWhatsappCall";
                }
                if (message.adContextPreviewDismissed != null && message.hasOwnProperty("adContextPreviewDismissed")) {
                    object.adContextPreviewDismissed = message.adContextPreviewDismissed;
                    if (options.oneofs)
                        object._adContextPreviewDismissed = "adContextPreviewDismissed";
                }
                if (message.sourceApp != null && message.hasOwnProperty("sourceApp")) {
                    object.sourceApp = message.sourceApp;
                    if (options.oneofs)
                        object._sourceApp = "sourceApp";
                }
                if (message.automatedGreetingMessageShown != null && message.hasOwnProperty("automatedGreetingMessageShown")) {
                    object.automatedGreetingMessageShown = message.automatedGreetingMessageShown;
                    if (options.oneofs)
                        object._automatedGreetingMessageShown = "automatedGreetingMessageShown";
                }
                if (message.greetingMessageBody != null && message.hasOwnProperty("greetingMessageBody")) {
                    object.greetingMessageBody = message.greetingMessageBody;
                    if (options.oneofs)
                        object._greetingMessageBody = "greetingMessageBody";
                }
                if (message.ctaPayload != null && message.hasOwnProperty("ctaPayload")) {
                    object.ctaPayload = message.ctaPayload;
                    if (options.oneofs)
                        object._ctaPayload = "ctaPayload";
                }
                if (message.disableNudge != null && message.hasOwnProperty("disableNudge")) {
                    object.disableNudge = message.disableNudge;
                    if (options.oneofs)
                        object._disableNudge = "disableNudge";
                }
                if (message.originalImageUrl != null && message.hasOwnProperty("originalImageUrl")) {
                    object.originalImageUrl = message.originalImageUrl;
                    if (options.oneofs)
                        object._originalImageUrl = "originalImageUrl";
                }
                if (message.automatedGreetingMessageCtaType != null && message.hasOwnProperty("automatedGreetingMessageCtaType")) {
                    object.automatedGreetingMessageCtaType = message.automatedGreetingMessageCtaType;
                    if (options.oneofs)
                        object._automatedGreetingMessageCtaType = "automatedGreetingMessageCtaType";
                }
                if (message.wtwaAdFormat != null && message.hasOwnProperty("wtwaAdFormat")) {
                    object.wtwaAdFormat = message.wtwaAdFormat;
                    if (options.oneofs)
                        object._wtwaAdFormat = "wtwaAdFormat";
                }
                if (message.adType != null && message.hasOwnProperty("adType")) {
                    object.adType = options.enums === String ? $root.E2E.ContextInfo.ExternalAdReplyInfo.AdType[message.adType] === undefined ? message.adType : $root.E2E.ContextInfo.ExternalAdReplyInfo.AdType[message.adType] : message.adType;
                    if (options.oneofs)
                        object._adType = "adType";
                }
                if (message.wtwaWebsiteUrl != null && message.hasOwnProperty("wtwaWebsiteUrl")) {
                    object.wtwaWebsiteUrl = message.wtwaWebsiteUrl;
                    if (options.oneofs)
                        object._wtwaWebsiteUrl = "wtwaWebsiteUrl";
                }
                if (message.adPreviewUrl != null && message.hasOwnProperty("adPreviewUrl")) {
                    object.adPreviewUrl = message.adPreviewUrl;
                    if (options.oneofs)
                        object._adPreviewUrl = "adPreviewUrl";
                }
                return object;
            };

            /**
             * Converts this ExternalAdReplyInfo to JSON.
             * @function toJSON
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ExternalAdReplyInfo.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for ExternalAdReplyInfo
             * @function getTypeUrl
             * @memberof E2E.ContextInfo.ExternalAdReplyInfo
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            ExternalAdReplyInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.ContextInfo.ExternalAdReplyInfo";
            };

            /**
             * AdType enum.
             * @name E2E.ContextInfo.ExternalAdReplyInfo.AdType
             * @enum {number}
             * @property {number} CTWA=0 CTWA value
             * @property {number} CAWC=1 CAWC value
             */
            ExternalAdReplyInfo.AdType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "CTWA"] = 0;
                values[valuesById[1] = "CAWC"] = 1;
                return values;
            })();

            /**
             * MediaType enum.
             * @name E2E.ContextInfo.ExternalAdReplyInfo.MediaType
             * @enum {number}
             * @property {number} NONE=0 NONE value
             * @property {number} IMAGE=1 IMAGE value
             * @property {number} VIDEO=2 VIDEO value
             */
            ExternalAdReplyInfo.MediaType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "NONE"] = 0;
                values[valuesById[1] = "IMAGE"] = 1;
                values[valuesById[2] = "VIDEO"] = 2;
                return values;
            })();

            return ExternalAdReplyInfo;
        })();

        ContextInfo.FeatureEligibilities = (function() {

            /**
             * Properties of a FeatureEligibilities.
             * @memberof E2E.ContextInfo
             * @interface IFeatureEligibilities
             * @property {boolean|null} [cannotBeReactedTo] FeatureEligibilities cannotBeReactedTo
             * @property {boolean|null} [cannotBeRanked] FeatureEligibilities cannotBeRanked
             * @property {boolean|null} [canRequestFeedback] FeatureEligibilities canRequestFeedback
             * @property {boolean|null} [canBeReshared] FeatureEligibilities canBeReshared
             * @property {boolean|null} [canReceiveMultiReact] FeatureEligibilities canReceiveMultiReact
             */

            /**
             * Constructs a new FeatureEligibilities.
             * @memberof E2E.ContextInfo
             * @classdesc Represents a FeatureEligibilities.
             * @implements IFeatureEligibilities
             * @constructor
             * @param {E2E.ContextInfo.IFeatureEligibilities=} [properties] Properties to set
             */
            function FeatureEligibilities(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]];
            }

            /**
             * FeatureEligibilities cannotBeReactedTo.
             * @member {boolean|null|undefined} cannotBeReactedTo
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @instance
             */
            FeatureEligibilities.prototype.cannotBeReactedTo = null;

            /**
             * FeatureEligibilities cannotBeRanked.
             * @member {boolean|null|undefined} cannotBeRanked
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @instance
             */
            FeatureEligibilities.prototype.cannotBeRanked = null;

            /**
             * FeatureEligibilities canRequestFeedback.
             * @member {boolean|null|undefined} canRequestFeedback
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @instance
             */
            FeatureEligibilities.prototype.canRequestFeedback = null;

            /**
             * FeatureEligibilities canBeReshared.
             * @member {boolean|null|undefined} canBeReshared
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @instance
             */
            FeatureEligibilities.prototype.canBeReshared = null;

            /**
             * FeatureEligibilities canReceiveMultiReact.
             * @member {boolean|null|undefined} canReceiveMultiReact
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @instance
             */
            FeatureEligibilities.prototype.canReceiveMultiReact = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * FeatureEligibilities _cannotBeReactedTo.
             * @member {"cannotBeReactedTo"|undefined} _cannotBeReactedTo
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @instance
             */
            Object.defineProperty(FeatureEligibilities.prototype, "_cannotBeReactedTo", {
                get: $util.oneOfGetter($oneOfFields = ["cannotBeReactedTo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * FeatureEligibilities _cannotBeRanked.
             * @member {"cannotBeRanked"|undefined} _cannotBeRanked
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @instance
             */
            Object.defineProperty(FeatureEligibilities.prototype, "_cannotBeRanked", {
                get: $util.oneOfGetter($oneOfFields = ["cannotBeRanked"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * FeatureEligibilities _canRequestFeedback.
             * @member {"canRequestFeedback"|undefined} _canRequestFeedback
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @instance
             */
            Object.defineProperty(FeatureEligibilities.prototype, "_canRequestFeedback", {
                get: $util.oneOfGetter($oneOfFields = ["canRequestFeedback"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * FeatureEligibilities _canBeReshared.
             * @member {"canBeReshared"|undefined} _canBeReshared
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @instance
             */
            Object.defineProperty(FeatureEligibilities.prototype, "_canBeReshared", {
                get: $util.oneOfGetter($oneOfFields = ["canBeReshared"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * FeatureEligibilities _canReceiveMultiReact.
             * @member {"canReceiveMultiReact"|undefined} _canReceiveMultiReact
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @instance
             */
            Object.defineProperty(FeatureEligibilities.prototype, "_canReceiveMultiReact", {
                get: $util.oneOfGetter($oneOfFields = ["canReceiveMultiReact"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new FeatureEligibilities instance using the specified properties.
             * @function create
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @static
             * @param {E2E.ContextInfo.IFeatureEligibilities=} [properties] Properties to set
             * @returns {E2E.ContextInfo.FeatureEligibilities} FeatureEligibilities instance
             */
            FeatureEligibilities.create = function create(properties) {
                return new FeatureEligibilities(properties);
            };

            /**
             * Encodes the specified FeatureEligibilities message. Does not implicitly {@link E2E.ContextInfo.FeatureEligibilities.verify|verify} messages.
             * @function encode
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @static
             * @param {E2E.ContextInfo.IFeatureEligibilities} message FeatureEligibilities message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FeatureEligibilities.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.cannotBeReactedTo != null && Object.hasOwnProperty.call(message, "cannotBeReactedTo"))
                    writer.uint32(/* id 1, wireType 0 =*/8).bool(message.cannotBeReactedTo);
                if (message.cannotBeRanked != null && Object.hasOwnProperty.call(message, "cannotBeRanked"))
                    writer.uint32(/* id 2, wireType 0 =*/16).bool(message.cannotBeRanked);
                if (message.canRequestFeedback != null && Object.hasOwnProperty.call(message, "canRequestFeedback"))
                    writer.uint32(/* id 3, wireType 0 =*/24).bool(message.canRequestFeedback);
                if (message.canBeReshared != null && Object.hasOwnProperty.call(message, "canBeReshared"))
                    writer.uint32(/* id 4, wireType 0 =*/32).bool(message.canBeReshared);
                if (message.canReceiveMultiReact != null && Object.hasOwnProperty.call(message, "canReceiveMultiReact"))
                    writer.uint32(/* id 5, wireType 0 =*/40).bool(message.canReceiveMultiReact);
                return writer;
            };

            /**
             * Encodes the specified FeatureEligibilities message, length delimited. Does not implicitly {@link E2E.ContextInfo.FeatureEligibilities.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @static
             * @param {E2E.ContextInfo.IFeatureEligibilities} message FeatureEligibilities message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FeatureEligibilities.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FeatureEligibilities message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.ContextInfo.FeatureEligibilities} FeatureEligibilities
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FeatureEligibilities.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.E2E.ContextInfo.FeatureEligibilities();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.cannotBeReactedTo = reader.bool();
                            break;
                        }
                    case 2: {
                            message.cannotBeRanked = reader.bool();
                            break;
                        }
                    case 3: {
                            message.canRequestFeedback = reader.bool();
                            break;
                        }
                    case 4: {
                            message.canBeReshared = reader.bool();
                            break;
                        }
                    case 5: {
                            message.canReceiveMultiReact = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a FeatureEligibilities message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.ContextInfo.FeatureEligibilities} FeatureEligibilities
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FeatureEligibilities.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FeatureEligibilities message.
             * @function verify
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FeatureEligibilities.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.cannotBeReactedTo != null && message.hasOwnProperty("cannotBeReactedTo")) {
                    properties._cannotBeReactedTo = 1;
                    if (typeof message.cannotBeReactedTo !== "boolean")
                        return "cannotBeReactedTo: boolean expected";
                }
                if (message.cannotBeRanked != null && message.hasOwnProperty("cannotBeRanked")) {
                    properties._cannotBeRanked = 1;
                    if (typeof message.cannotBeRanked !== "boolean")
                        return "cannotBeRanked: boolean expected";
                }
                if (message.canRequestFeedback != null && message.hasOwnProperty("canRequestFeedback")) {
                    properties._canRequestFeedback = 1;
                    if (typeof message.canRequestFeedback !== "boolean")
                        return "canRequestFeedback: boolean expected";
                }
                if (message.canBeReshared != null && message.hasOwnProperty("canBeReshared")) {
                    properties._canBeReshared = 1;
                    if (typeof message.canBeReshared !== "boolean")
                        return "canBeReshared: boolean expected";
                }
                if (message.canReceiveMultiReact != null && message.hasOwnProperty("canReceiveMultiReact")) {
                    properties._canReceiveMultiReact = 1;
                    if (typeof message.canReceiveMultiReact !== "boolean")
                        return "canReceiveMultiReact: boolean expected";
                }
                return null;
            };

            /**
             * Creates a FeatureEligibilities message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.ContextInfo.FeatureEligibilities} FeatureEligibilities
             */
            FeatureEligibilities.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.ContextInfo.FeatureEligibilities)
                    return object;
                var message = new $root.E2E.ContextInfo.FeatureEligibilities();
                if (object.cannotBeReactedTo != null)
                    message.cannotBeReactedTo = Boolean(object.cannotBeReactedTo);
                if (object.cannotBeRanked != null)
                    message.cannotBeRanked = Boolean(object.cannotBeRanked);
                if (object.canRequestFeedback != null)
                    message.canRequestFeedback = Boolean(object.canRequestFeedback);
                if (object.canBeReshared != null)
                    message.canBeReshared = Boolean(object.canBeReshared);
                if (object.canReceiveMultiReact != null)
                    message.canReceiveMultiReact = Boolean(object.canReceiveMultiReact);
                return message;
            };

            /**
             * Creates a plain object from a FeatureEligibilities message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @static
             * @param {E2E.ContextInfo.FeatureEligibilities} message FeatureEligibilities
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FeatureEligibilities.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.cannotBeReactedTo != null && message.hasOwnProperty("cannotBeReactedTo")) {
                    object.cannotBeReactedTo = message.cannotBeReactedTo;
                    if (options.oneofs)
                        object._cannotBeReactedTo = "cannotBeReactedTo";
                }
                if (message.cannotBeRanked != null && message.hasOwnProperty("cannotBeRanked")) {
                    object.cannotBeRanked = message.cannotBeRanked;
                    if (options.oneofs)
                        object._cannotBeRanked = "cannotBeRanked";
                }
                if (message.canRequestFeedback != null && message.hasOwnProperty("canRequestFeedback")) {
                    object.canRequestFeedback = message.canRequestFeedback;
                    if (options.oneofs)
                        object._canRequestFeedback = "canRequestFeedback";
                }
                if (message.canBeReshared != null && message.hasOwnProperty("canBeReshared")) {
                    object.canBeReshared = message.canBeReshared;
                    if (options.oneofs)
                        object._canBeReshared = "canBeReshared";
                }
                if (message.canReceiveMultiReact != null && message.hasOwnProperty("canReceiveMultiReact")) {
                    object.canReceiveMultiReact = message.canReceiveMultiReact;
                    if (options.oneofs)
                        object._canReceiveMultiReact = "canReceiveMultiReact";
                }
                return object;
            };

            /**
             * Converts this FeatureEligibilities to JSON.
             * @function toJSON
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FeatureEligibilities.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for FeatureEligibilities
             * @function getTypeUrl
             * @memberof E2E.ContextInfo.FeatureEligibilities
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            FeatureEligibilities.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.ContextInfo.FeatureEligibilities";
            };

            return FeatureEligibilities;
        })();

        /**
         * ForwardOrigin enum.
         * @name E2E.ContextInfo.ForwardOrigin
         * @enum {number}
         * @property {number} UNKNOWN=0 UNKNOWN value
         * @property {number} CHAT=1 CHAT value
         * @property {number} STATUS=2 STATUS value
         * @property {number} CHANNELS=3 CHANNELS value
         * @property {number} META_AI=4 META_AI value
         * @property {number} UGC=5 UGC value
         */
        ContextInfo.ForwardOrigin = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "CHAT"] = 1;
            values[valuesById[2] = "STATUS"] = 2;
            values[valuesById[3] = "CHANNELS"] = 3;
            values[valuesById[4] = "META_AI"] = 4;
            values[valuesById[5] = "UGC"] = 5;
            return values;
        })();

        ContextInfo.ForwardedNewsletterMessageInfo = (function() {

            /**
             * Properties of a ForwardedNewsletterMessageInfo.
             * @memberof E2E.ContextInfo
             * @interface IForwardedNewsletterMessageInfo
             * @property {string|null} [newsletterJid] ForwardedNewsletterMessageInfo newsletterJid
             * @property {number|null} [serverMessageId] ForwardedNewsletterMessageInfo serverMessageId
             * @property {string|null} [newsletterName] ForwardedNewsletterMessageInfo newsletterName
             * @property {E2E.ContextInfo.ForwardedNewsletterMessageInfo.ContentType|null} [contentType] ForwardedNewsletterMessageInfo contentType
             * @property {string|null} [accessibilityText] ForwardedNewsletterMessageInfo accessibilityText
             */

            /**
             * Constructs a new ForwardedNewsletterMessageInfo.
             * @memberof E2E.ContextInfo
             * @classdesc Represents a ForwardedNewsletterMessageInfo.
             * @implements IForwardedNewsletterMessageInfo
             * @constructor
             * @param {E2E.ContextInfo.IForwardedNewsletterMessageInfo=} [properties] Properties to set
             */
            function ForwardedNewsletterMessageInfo(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]];
            }

            /**
             * ForwardedNewsletterMessageInfo newsletterJid.
             * @member {string|null|undefined} newsletterJid
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @instance
             */
            ForwardedNewsletterMessageInfo.prototype.newsletterJid = null;

            /**
             * ForwardedNewsletterMessageInfo serverMessageId.
             * @member {number|null|undefined} serverMessageId
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @instance
             */
            ForwardedNewsletterMessageInfo.prototype.serverMessageId = null;

            /**
             * ForwardedNewsletterMessageInfo newsletterName.
             * @member {string|null|undefined} newsletterName
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @instance
             */
            ForwardedNewsletterMessageInfo.prototype.newsletterName = null;

            /**
             * ForwardedNewsletterMessageInfo contentType.
             * @member {E2E.ContextInfo.ForwardedNewsletterMessageInfo.ContentType|null|undefined} contentType
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @instance
             */
            ForwardedNewsletterMessageInfo.prototype.contentType = null;

            /**
             * ForwardedNewsletterMessageInfo accessibilityText.
             * @member {string|null|undefined} accessibilityText
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @instance
             */
            ForwardedNewsletterMessageInfo.prototype.accessibilityText = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * ForwardedNewsletterMessageInfo _newsletterJid.
             * @member {"newsletterJid"|undefined} _newsletterJid
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @instance
             */
            Object.defineProperty(ForwardedNewsletterMessageInfo.prototype, "_newsletterJid", {
                get: $util.oneOfGetter($oneOfFields = ["newsletterJid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ForwardedNewsletterMessageInfo _serverMessageId.
             * @member {"serverMessageId"|undefined} _serverMessageId
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @instance
             */
            Object.defineProperty(ForwardedNewsletterMessageInfo.prototype, "_serverMessageId", {
                get: $util.oneOfGetter($oneOfFields = ["serverMessageId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ForwardedNewsletterMessageInfo _newsletterName.
             * @member {"newsletterName"|undefined} _newsletterName
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @instance
             */
            Object.defineProperty(ForwardedNewsletterMessageInfo.prototype, "_newsletterName", {
                get: $util.oneOfGetter($oneOfFields = ["newsletterName"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ForwardedNewsletterMessageInfo _contentType.
             * @member {"contentType"|undefined} _contentType
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @instance
             */
            Object.defineProperty(ForwardedNewsletterMessageInfo.prototype, "_contentType", {
                get: $util.oneOfGetter($oneOfFields = ["contentType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ForwardedNewsletterMessageInfo _accessibilityText.
             * @member {"accessibilityText"|undefined} _accessibilityText
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @instance
             */
            Object.defineProperty(ForwardedNewsletterMessageInfo.prototype, "_accessibilityText", {
                get: $util.oneOfGetter($oneOfFields = ["accessibilityText"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new ForwardedNewsletterMessageInfo instance using the specified properties.
             * @function create
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @static
             * @param {E2E.ContextInfo.IForwardedNewsletterMessageInfo=} [properties] Properties to set
             * @returns {E2E.ContextInfo.ForwardedNewsletterMessageInfo} ForwardedNewsletterMessageInfo instance
             */
            ForwardedNewsletterMessageInfo.create = function create(properties) {
                return new ForwardedNewsletterMessageInfo(properties);
            };

            /**
             * Encodes the specified ForwardedNewsletterMessageInfo message. Does not implicitly {@link E2E.ContextInfo.ForwardedNewsletterMessageInfo.verify|verify} messages.
             * @function encode
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @static
             * @param {E2E.ContextInfo.IForwardedNewsletterMessageInfo} message ForwardedNewsletterMessageInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ForwardedNewsletterMessageInfo.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.newsletterJid != null && Object.hasOwnProperty.call(message, "newsletterJid"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.newsletterJid);
                if (message.serverMessageId != null && Object.hasOwnProperty.call(message, "serverMessageId"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int32(message.serverMessageId);
                if (message.newsletterName != null && Object.hasOwnProperty.call(message, "newsletterName"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.newsletterName);
                if (message.contentType != null && Object.hasOwnProperty.call(message, "contentType"))
                    writer.uint32(/* id 4, wireType 0 =*/32).int32(message.contentType);
                if (message.accessibilityText != null && Object.hasOwnProperty.call(message, "accessibilityText"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.accessibilityText);
                return writer;
            };

            /**
             * Encodes the specified ForwardedNewsletterMessageInfo message, length delimited. Does not implicitly {@link E2E.ContextInfo.ForwardedNewsletterMessageInfo.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @static
             * @param {E2E.ContextInfo.IForwardedNewsletterMessageInfo} message ForwardedNewsletterMessageInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ForwardedNewsletterMessageInfo.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ForwardedNewsletterMessageInfo message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.ContextInfo.ForwardedNewsletterMessageInfo} ForwardedNewsletterMessageInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ForwardedNewsletterMessageInfo.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.E2E.ContextInfo.ForwardedNewsletterMessageInfo();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.newsletterJid = reader.string();
                            break;
                        }
                    case 2: {
                            message.serverMessageId = reader.int32();
                            break;
                        }
                    case 3: {
                            message.newsletterName = reader.string();
                            break;
                        }
                    case 4: {
                            message.contentType = reader.int32();
                            break;
                        }
                    case 5: {
                            message.accessibilityText = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a ForwardedNewsletterMessageInfo message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.ContextInfo.ForwardedNewsletterMessageInfo} ForwardedNewsletterMessageInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ForwardedNewsletterMessageInfo.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ForwardedNewsletterMessageInfo message.
             * @function verify
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ForwardedNewsletterMessageInfo.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) {
                    properties._newsletterJid = 1;
                    if (!$util.isString(message.newsletterJid))
                        return "newsletterJid: string expected";
                }
                if (message.serverMessageId != null && message.hasOwnProperty("serverMessageId")) {
                    properties._serverMessageId = 1;
                    if (!$util.isInteger(message.serverMessageId))
                        return "serverMessageId: integer expected";
                }
                if (message.newsletterName != null && message.hasOwnProperty("newsletterName")) {
                    properties._newsletterName = 1;
                    if (!$util.isString(message.newsletterName))
                        return "newsletterName: string expected";
                }
                if (message.contentType != null && message.hasOwnProperty("contentType")) {
                    properties._contentType = 1;
                    switch (message.contentType) {
                    default:
                        return "contentType: enum value expected";
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                if (message.accessibilityText != null && message.hasOwnProperty("accessibilityText")) {
                    properties._accessibilityText = 1;
                    if (!$util.isString(message.accessibilityText))
                        return "accessibilityText: string expected";
                }
                return null;
            };

            /**
             * Creates a ForwardedNewsletterMessageInfo message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.ContextInfo.ForwardedNewsletterMessageInfo} ForwardedNewsletterMessageInfo
             */
            ForwardedNewsletterMessageInfo.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.ContextInfo.ForwardedNewsletterMessageInfo)
                    return object;
                var message = new $root.E2E.ContextInfo.ForwardedNewsletterMessageInfo();
                if (object.newsletterJid != null)
                    message.newsletterJid = String(object.newsletterJid);
                if (object.serverMessageId != null)
                    message.serverMessageId = object.serverMessageId | 0;
                if (object.newsletterName != null)
                    message.newsletterName = String(object.newsletterName);
                switch (object.contentType) {
                default:
                    if (typeof object.contentType === "number") {
                        message.contentType = object.contentType;
                        break;
                    }
                    break;
                case "UPDATE":
                case 1:
                    message.contentType = 1;
                    break;
                case "UPDATE_CARD":
                case 2:
                    message.contentType = 2;
                    break;
                case "LINK_CARD":
                case 3:
                    message.contentType = 3;
                    break;
                }
                if (object.accessibilityText != null)
                    message.accessibilityText = String(object.accessibilityText);
                return message;
            };

            /**
             * Creates a plain object from a ForwardedNewsletterMessageInfo message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @static
             * @param {E2E.ContextInfo.ForwardedNewsletterMessageInfo} message ForwardedNewsletterMessageInfo
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ForwardedNewsletterMessageInfo.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) {
                    object.newsletterJid = message.newsletterJid;
                    if (options.oneofs)
                        object._newsletterJid = "newsletterJid";
                }
                if (message.serverMessageId != null && message.hasOwnProperty("serverMessageId")) {
                    object.serverMessageId = message.serverMessageId;
                    if (options.oneofs)
                        object._serverMessageId = "serverMessageId";
                }
                if (message.newsletterName != null && message.hasOwnProperty("newsletterName")) {
                    object.newsletterName = message.newsletterName;
                    if (options.oneofs)
                        object._newsletterName = "newsletterName";
                }
                if (message.contentType != null && message.hasOwnProperty("contentType")) {
                    object.contentType = options.enums === String ? $root.E2E.ContextInfo.ForwardedNewsletterMessageInfo.ContentType[message.contentType] === undefined ? message.contentType : $root.E2E.ContextInfo.ForwardedNewsletterMessageInfo.ContentType[message.contentType] : message.contentType;
                    if (options.oneofs)
                        object._contentType = "contentType";
                }
                if (message.accessibilityText != null && message.hasOwnProperty("accessibilityText")) {
                    object.accessibilityText = message.accessibilityText;
                    if (options.oneofs)
                        object._accessibilityText = "accessibilityText";
                }
                return object;
            };

            /**
             * Converts this ForwardedNewsletterMessageInfo to JSON.
             * @function toJSON
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ForwardedNewsletterMessageInfo.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for ForwardedNewsletterMessageInfo
             * @function getTypeUrl
             * @memberof E2E.ContextInfo.ForwardedNewsletterMessageInfo
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            ForwardedNewsletterMessageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.ContextInfo.ForwardedNewsletterMessageInfo";
            };

            /**
             * ContentType enum.
             * @name E2E.ContextInfo.ForwardedNewsletterMessageInfo.ContentType
             * @enum {number}
             * @property {number} UPDATE=1 UPDATE value
             * @property {number} UPDATE_CARD=2 UPDATE_CARD value
             * @property {number} LINK_CARD=3 LINK_CARD value
             */
            ForwardedNewsletterMessageInfo.ContentType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[1] = "UPDATE"] = 1;
                values[valuesById[2] = "UPDATE_CARD"] = 2;
                values[valuesById[3] = "LINK_CARD"] = 3;
                return values;
            })();

            return ForwardedNewsletterMessageInfo;
        })();

        /**
         * PairedMediaType enum.
         * @name E2E.ContextInfo.PairedMediaType
         * @enum {number}
         * @property {number} NOT_PAIRED_MEDIA=0 NOT_PAIRED_MEDIA value
         * @property {number} SD_VIDEO_PARENT=1 SD_VIDEO_PARENT value
         * @property {number} HD_VIDEO_CHILD=2 HD_VIDEO_CHILD value
         * @property {number} SD_IMAGE_PARENT=3 SD_IMAGE_PARENT value
         * @property {number} HD_IMAGE_CHILD=4 HD_IMAGE_CHILD value
         * @property {number} MOTION_PHOTO_PARENT=5 MOTION_PHOTO_PARENT value
         * @property {number} MOTION_PHOTO_CHILD=6 MOTION_PHOTO_CHILD value
         * @property {number} HEVC_VIDEO_PARENT=7 HEVC_VIDEO_PARENT value
         * @property {number} HEVC_VIDEO_CHILD=8 HEVC_VIDEO_CHILD value
         */
        ContextInfo.PairedMediaType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "NOT_PAIRED_MEDIA"] = 0;
            values[valuesById[1] = "SD_VIDEO_PARENT"] = 1;
            values[valuesById[2] = "HD_VIDEO_CHILD"] = 2;
            values[valuesById[3] = "SD_IMAGE_PARENT"] = 3;
            values[valuesById[4] = "HD_IMAGE_CHILD"] = 4;
            values[valuesById[5] = "MOTION_PHOTO_PARENT"] = 5;
            values[valuesById[6] = "MOTION_PHOTO_CHILD"] = 6;
            values[valuesById[7] = "HEVC_VIDEO_PARENT"] = 7;
            values[valuesById[8] = "HEVC_VIDEO_CHILD"] = 8;
            return values;
        })();

        ContextInfo.QuestionReplyQuotedMessage = (function() {

            /**
             * Properties of a QuestionReplyQuotedMessage.
             * @memberof E2E.ContextInfo
             * @interface IQuestionReplyQuotedMessage
             * @property {number|null} [serverQuestionId] QuestionReplyQuotedMessage serverQuestionId
             * @property {E2E.IMessage|null} [quotedQuestion] QuestionReplyQuotedMessage quotedQuestion
             * @property {E2E.IMessage|null} [quotedResponse] QuestionReplyQuotedMessage quotedResponse
             */

            /**
             * Constructs a new QuestionReplyQuotedMessage.
             * @memberof E2E.ContextInfo
             * @classdesc Represents a QuestionReplyQuotedMessage.
             * @implements IQuestionReplyQuotedMessage
             * @constructor
             * @param {E2E.ContextInfo.IQuestionReplyQuotedMessage=} [properties] Properties to set
             */
            function QuestionReplyQuotedMessage(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]];
            }

            /**
             * QuestionReplyQuotedMessage serverQuestionId.
             * @member {number|null|undefined} serverQuestionId
             * @memberof E2E.ContextInfo.QuestionReplyQuotedMessage
             * @instance
             */
            QuestionReplyQuotedMessage.prototype.serverQuestionId = null;

            /**
             * QuestionReplyQuotedMessage quotedQuestion.
             * @member {E2E.IMessage|null|undefined} quotedQuestion
             * @memberof E2E.ContextInfo.QuestionReplyQuotedMessage
             * @instance
             */
            QuestionReplyQuotedMessage.prototype.quotedQuestion = null;

            /**
             * QuestionReplyQuotedMessage quotedResponse.
             * @member {E2E.IMessage|null|undefined} quotedResponse
             * @memberof E2E.ContextInfo.QuestionReplyQuotedMessage
             * @instance
             */
            QuestionReplyQuotedMessage.prototype.quotedResponse = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * QuestionReplyQuotedMessage _serverQuestionId.
             * @member {"serverQuestionId"|undefined} _serverQuestionId
             * @memberof E2E.ContextInfo.QuestionReplyQuotedMessage
             * @instance
             */
            Object.defineProperty(QuestionReplyQuotedMessage.prototype, "_serverQuestionId", {
                get: $util.oneOfGetter($oneOfFields = ["serverQuestionId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * QuestionReplyQuotedMessage _quotedQuestion.
             * @member {"quotedQuestion"|undefined} _quotedQuestion
             * @memberof E2E.ContextInfo.QuestionReplyQuotedMessage
             * @instance
             */
            Object.defineProperty(QuestionReplyQuotedMessage.prototype, "_quotedQuestion", {
                get: $util.oneOfGetter($oneOfFields = ["quotedQuestion"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * QuestionReplyQuotedMessage _quotedResponse.
             * @member {"quotedResponse"|undefined} _quotedResponse
             * @memberof E2E.ContextInfo.QuestionReplyQuotedMessage
             * @instance
             */
            Object.defineProperty(QuestionReplyQuotedMessage.prototype, "_quotedResponse", {
                get: $util.oneOfGetter($oneOfFields = ["quotedResponse"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new QuestionReplyQuotedMessage instance using the specified properties.
             * @function create
             * @memberof E2E.ContextInfo.QuestionReplyQuotedMessage
             * @static
             * @param {E2E.ContextInfo.IQuestionReplyQuotedMessage=} [properties] Properties to set
             * @returns {E2E.ContextInfo.QuestionReplyQuotedMessage} QuestionReplyQuotedMessage instance
             */
            QuestionReplyQuotedMessage.create = function create(properties) {
                return new QuestionReplyQuotedMessage(properties);
            };

            /**
             * Encodes the specified QuestionReplyQuotedMessage message. Does not implicitly {@link E2E.ContextInfo.QuestionReplyQuotedMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.ContextInfo.QuestionReplyQuotedMessage
             * @static
             * @param {E2E.ContextInfo.IQuestionReplyQuotedMessage} message QuestionReplyQuotedMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            QuestionReplyQuotedMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.serverQuestionId != null && Object.hasOwnProperty.call(message, "serverQuestionId"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.serverQuestionId);
                if (message.quotedQuestion != null && Object.hasOwnProperty.call(message, "quotedQuestion"))
                    $root.E2E.Message.encode(message.quotedQuestion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                if (message.quotedResponse != null && Object.hasOwnProperty.call(message, "quotedResponse"))
                    $root.E2E.Message.encode(message.quotedResponse, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified QuestionReplyQuotedMessage message, length delimited. Does not implicitly {@link E2E.ContextInfo.QuestionReplyQuotedMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.ContextInfo.QuestionReplyQuotedMessage
             * @static
             * @param {E2E.ContextInfo.IQuestionReplyQuotedMessage} message QuestionReplyQuotedMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            QuestionReplyQuotedMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a QuestionReplyQuotedMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.ContextInfo.QuestionReplyQuotedMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.ContextInfo.QuestionReplyQuotedMessage} QuestionReplyQuotedMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            QuestionReplyQuotedMessage.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.E2E.ContextInfo.QuestionReplyQuotedMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.serverQuestionId = reader.int32();
                            break;
                        }
                    case 2: {
                            message.quotedQuestion = $root.E2E.Message.decode(reader, reader.uint32());
                            break;
                        }
                    case 3: {
                            message.quotedResponse = $root.E2E.Message.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a QuestionReplyQuotedMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.ContextInfo.QuestionReplyQuotedMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.ContextInfo.QuestionReplyQuotedMessage} QuestionReplyQuotedMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            QuestionReplyQuotedMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a QuestionReplyQuotedMessage message.
             * @function verify
             * @memberof E2E.ContextInfo.QuestionReplyQuotedMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            QuestionReplyQuotedMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.serverQuestionId != null && message.hasOwnProperty("serverQuestionId")) {
                    properties._serverQuestionId = 1;
                    if (!$util.isInteger(message.serverQuestionId))
                        return "serverQuestionId: integer expected";
                }
                if (message.quotedQuestion != null && message.hasOwnProperty("quotedQuestion")) {
                    properties._quotedQuestion = 1;
                    {
                        var error = $root.E2E.Message.verify(message.quotedQuestion);
                        if (error)
                            return "quotedQuestion." + error;
                    }
                }
                if (message.quotedResponse != null && message.hasOwnProperty("quotedResponse")) {
                    properties._quotedResponse = 1;
                    {
                        var error = $root.E2E.Message.verify(message.quotedResponse);
                        if (error)
                            return "quotedResponse." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a QuestionReplyQuotedMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.ContextInfo.QuestionReplyQuotedMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.ContextInfo.QuestionReplyQuotedMessage} QuestionReplyQuotedMessage
             */
            QuestionReplyQuotedMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.ContextInfo.QuestionReplyQuotedMessage)
                    return object;
                var message = new $root.E2E.ContextInfo.QuestionReplyQuotedMessage();
                if (object.serverQuestionId != null)
                    message.serverQuestionId = object.serverQuestionId | 0;
                if (object.quotedQuestion != null) {
                    if (typeof object.quotedQuestion !== "object")
                        throw TypeError(".E2E.ContextInfo.QuestionReplyQuotedMessage.quotedQuestion: object expected");
                    message.quotedQuestion = $root.E2E.Message.fromObject(object.quotedQuestion);
                }
                if (object.quotedResponse != null) {
                    if (typeof object.quotedResponse !== "object")
                        throw TypeError(".E2E.ContextInfo.QuestionReplyQuotedMessage.quotedResponse: object expected");
                    message.quotedResponse = $root.E2E.Message.fromObject(object.quotedResponse);
                }
                return message;
            };

            /**
             * Creates a plain object from a QuestionReplyQuotedMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.ContextInfo.QuestionReplyQuotedMessage
             * @static
             * @param {E2E.ContextInfo.QuestionReplyQuotedMessage} message QuestionReplyQuotedMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            QuestionReplyQuotedMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.serverQuestionId != null && message.hasOwnProperty("serverQuestionId")) {
                    object.serverQuestionId = message.serverQuestionId;
                    if (options.oneofs)
                        object._serverQuestionId = "serverQuestionId";
                }
                if (message.quotedQuestion != null && message.hasOwnProperty("quotedQuestion")) {
                    object.quotedQuestion = $root.E2E.Message.toObject(message.quotedQuestion, options);
                    if (options.oneofs)
                        object._quotedQuestion = "quotedQuestion";
                }
                if (message.quotedResponse != null && message.hasOwnProperty("quotedResponse")) {
                    object.quotedResponse = $root.E2E.Message.toObject(message.quotedResponse, options);
                    if (options.oneofs)
                        object._quotedResponse = "quotedResponse";
                }
                return object;
            };

            /**
             * Converts this QuestionReplyQuotedMessage to JSON.
             * @function toJSON
             * @memberof E2E.ContextInfo.QuestionReplyQuotedMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            QuestionReplyQuotedMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for QuestionReplyQuotedMessage
             * @function getTypeUrl
             * @memberof E2E.ContextInfo.QuestionReplyQuotedMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            QuestionReplyQuotedMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.ContextInfo.QuestionReplyQuotedMessage";
            };

            return QuestionReplyQuotedMessage;
        })();

        /**
         * QuotedType enum.
         * @name E2E.ContextInfo.QuotedType
         * @enum {number}
         * @property {number} EXPLICIT=0 EXPLICIT value
         * @property {number} AUTO=1 AUTO value
         */
        ContextInfo.QuotedType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "EXPLICIT"] = 0;
            values[valuesById[1] = "AUTO"] = 1;
            return values;
        })();

        /**
         * StatusAttributionType enum.
         * @name E2E.ContextInfo.StatusAttributionType
         * @enum {number}
         * @property {number} NONE=0 NONE value
         * @property {number} RESHARED_FROM_MENTION=1 RESHARED_FROM_MENTION value
         * @property {number} RESHARED_FROM_POST=2 RESHARED_FROM_POST value
         * @property {number} RESHARED_FROM_POST_MANY_TIMES=3 RESHARED_FROM_POST_MANY_TIMES value
         * @property {number} FORWARDED_FROM_STATUS=4 FORWARDED_FROM_STATUS value
         */
        ContextInfo.StatusAttributionType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "NONE"] = 0;
            values[valuesById[1] = "RESHARED_FROM_MENTION"] = 1;
            values[valuesById[2] = "RESHARED_FROM_POST"] = 2;
            values[valuesById[3] = "RESHARED_FROM_POST_MANY_TIMES"] = 3;
            values[valuesById[4] = "FORWARDED_FROM_STATUS"] = 4;
            return values;
        })();

        ContextInfo.StatusAudienceMetadata = (function() {

            /**
             * Properties of a StatusAudienceMetadata.
             * @memberof E2E.ContextInfo
             * @interface IStatusAudienceMetadata
             * @property {E2E.ContextInfo.StatusAudienceMetadata.AudienceType|null} [audienceType] StatusAudienceMetadata audienceType
             */

            /**
             * Constructs a new StatusAudienceMetadata.
             * @memberof E2E.ContextInfo
             * @classdesc Represents a StatusAudienceMetadata.
             * @implements IStatusAudienceMetadata
             * @constructor
             * @param {E2E.ContextInfo.IStatusAudienceMetadata=} [properties] Properties to set
             */
            function StatusAudienceMetadata(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]];
            }

            /**
             * StatusAudienceMetadata audienceType.
             * @member {E2E.ContextInfo.StatusAudienceMetadata.AudienceType|null|undefined} audienceType
             * @memberof E2E.ContextInfo.StatusAudienceMetadata
             * @instance
             */
            StatusAudienceMetadata.prototype.audienceType = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * StatusAudienceMetadata _audienceType.
             * @member {"audienceType"|undefined} _audienceType
             * @memberof E2E.ContextInfo.StatusAudienceMetadata
             * @instance
             */
            Object.defineProperty(StatusAudienceMetadata.prototype, "_audienceType", {
                get: $util.oneOfGetter($oneOfFields = ["audienceType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new StatusAudienceMetadata instance using the specified properties.
             * @function create
             * @memberof E2E.ContextInfo.StatusAudienceMetadata
             * @static
             * @param {E2E.ContextInfo.IStatusAudienceMetadata=} [properties] Properties to set
             * @returns {E2E.ContextInfo.StatusAudienceMetadata} StatusAudienceMetadata instance
             */
            StatusAudienceMetadata.create = function create(properties) {
                return new StatusAudienceMetadata(properties);
            };

            /**
             * Encodes the specified StatusAudienceMetadata message. Does not implicitly {@link E2E.ContextInfo.StatusAudienceMetadata.verify|verify} messages.
             * @function encode
             * @memberof E2E.ContextInfo.StatusAudienceMetadata
             * @static
             * @param {E2E.ContextInfo.IStatusAudienceMetadata} message StatusAudienceMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatusAudienceMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.audienceType != null && Object.hasOwnProperty.call(message, "audienceType"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audienceType);
                return writer;
            };

            /**
             * Encodes the specified StatusAudienceMetadata message, length delimited. Does not implicitly {@link E2E.ContextInfo.StatusAudienceMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.ContextInfo.StatusAudienceMetadata
             * @static
             * @param {E2E.ContextInfo.IStatusAudienceMetadata} message StatusAudienceMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatusAudienceMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StatusAudienceMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.ContextInfo.StatusAudienceMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.ContextInfo.StatusAudienceMetadata} StatusAudienceMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusAudienceMetadata.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.E2E.ContextInfo.StatusAudienceMetadata();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.audienceType = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a StatusAudienceMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.ContextInfo.StatusAudienceMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.ContextInfo.StatusAudienceMetadata} StatusAudienceMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusAudienceMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StatusAudienceMetadata message.
             * @function verify
             * @memberof E2E.ContextInfo.StatusAudienceMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StatusAudienceMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.audienceType != null && message.hasOwnProperty("audienceType")) {
                    properties._audienceType = 1;
                    switch (message.audienceType) {
                    default:
                        return "audienceType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a StatusAudienceMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.ContextInfo.StatusAudienceMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.ContextInfo.StatusAudienceMetadata} StatusAudienceMetadata
             */
            StatusAudienceMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.ContextInfo.StatusAudienceMetadata)
                    return object;
                var message = new $root.E2E.ContextInfo.StatusAudienceMetadata();
                switch (object.audienceType) {
                default:
                    if (typeof object.audienceType === "number") {
                        message.audienceType = object.audienceType;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.audienceType = 0;
                    break;
                case "CLOSE_FRIENDS":
                case 1:
                    message.audienceType = 1;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a StatusAudienceMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.ContextInfo.StatusAudienceMetadata
             * @static
             * @param {E2E.ContextInfo.StatusAudienceMetadata} message StatusAudienceMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StatusAudienceMetadata.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.audienceType != null && message.hasOwnProperty("audienceType")) {
                    object.audienceType = options.enums === String ? $root.E2E.ContextInfo.StatusAudienceMetadata.AudienceType[message.audienceType] === undefined ? message.audienceType : $root.E2E.ContextInfo.StatusAudienceMetadata.AudienceType[message.audienceType] : message.audienceType;
                    if (options.oneofs)
                        object._audienceType = "audienceType";
                }
                return object;
            };

            /**
             * Converts this StatusAudienceMetadata to JSON.
             * @function toJSON
             * @memberof E2E.ContextInfo.StatusAudienceMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StatusAudienceMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for StatusAudienceMetadata
             * @function getTypeUrl
             * @memberof E2E.ContextInfo.StatusAudienceMetadata
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            StatusAudienceMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.ContextInfo.StatusAudienceMetadata";
            };

            /**
             * AudienceType enum.
             * @name E2E.ContextInfo.StatusAudienceMetadata.AudienceType
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} CLOSE_FRIENDS=1 CLOSE_FRIENDS value
             */
            StatusAudienceMetadata.AudienceType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "CLOSE_FRIENDS"] = 1;
                return values;
            })();

            return StatusAudienceMetadata;
        })();

        /**
         * StatusSourceType enum.
         * @name E2E.ContextInfo.StatusSourceType
         * @enum {number}
         * @property {number} IMAGE=0 IMAGE value
         * @property {number} VIDEO=1 VIDEO value
         * @property {number} GIF=2 GIF value
         * @property {number} AUDIO=3 AUDIO value
         * @property {number} TEXT=4 TEXT value
         * @property {number} MUSIC_STANDALONE=5 MUSIC_STANDALONE value
         */
        ContextInfo.StatusSourceType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "IMAGE"] = 0;
            values[valuesById[1] = "VIDEO"] = 1;
            values[valuesById[2] = "GIF"] = 2;
            values[valuesById[3] = "AUDIO"] = 3;
            values[valuesById[4] = "TEXT"] = 4;
            values[valuesById[5] = "MUSIC_STANDALONE"] = 5;
            return values;
        })();

        ContextInfo.UTMInfo = (function() {

            /**
             * Properties of a UTMInfo.
             * @memberof E2E.ContextInfo
             * @interface IUTMInfo
             * @property {string|null} [utmSource] UTMInfo utmSource
             * @property {string|null} [utmCampaign] UTMInfo utmCampaign
             */

            /**
             * Constructs a new UTMInfo.
             * @memberof E2E.ContextInfo
             * @classdesc Represents a UTMInfo.
             * @implements IUTMInfo
             * @constructor
             * @param {E2E.ContextInfo.IUTMInfo=} [properties] Properties to set
             */
            function UTMInfo(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]];
            }

            /**
             * UTMInfo utmSource.
             * @member {string|null|undefined} utmSource
             * @memberof E2E.ContextInfo.UTMInfo
             * @instance
             */
            UTMInfo.prototype.utmSource = null;

            /**
             * UTMInfo utmCampaign.
             * @member {string|null|undefined} utmCampaign
             * @memberof E2E.ContextInfo.UTMInfo
             * @instance
             */
            UTMInfo.prototype.utmCampaign = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * UTMInfo _utmSource.
             * @member {"utmSource"|undefined} _utmSource
             * @memberof E2E.ContextInfo.UTMInfo
             * @instance
             */
            Object.defineProperty(UTMInfo.prototype, "_utmSource", {
                get: $util.oneOfGetter($oneOfFields = ["utmSource"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * UTMInfo _utmCampaign.
             * @member {"utmCampaign"|undefined} _utmCampaign
             * @memberof E2E.ContextInfo.UTMInfo
             * @instance
             */
            Object.defineProperty(UTMInfo.prototype, "_utmCampaign", {
                get: $util.oneOfGetter($oneOfFields = ["utmCampaign"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new UTMInfo instance using the specified properties.
             * @function create
             * @memberof E2E.ContextInfo.UTMInfo
             * @static
             * @param {E2E.ContextInfo.IUTMInfo=} [properties] Properties to set
             * @returns {E2E.ContextInfo.UTMInfo} UTMInfo instance
             */
            UTMInfo.create = function create(properties) {
                return new UTMInfo(properties);
            };

            /**
             * Encodes the specified UTMInfo message. Does not implicitly {@link E2E.ContextInfo.UTMInfo.verify|verify} messages.
             * @function encode
             * @memberof E2E.ContextInfo.UTMInfo
             * @static
             * @param {E2E.ContextInfo.IUTMInfo} message UTMInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            UTMInfo.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.utmSource != null && Object.hasOwnProperty.call(message, "utmSource"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.utmSource);
                if (message.utmCampaign != null && Object.hasOwnProperty.call(message, "utmCampaign"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.utmCampaign);
                return writer;
            };

            /**
             * Encodes the specified UTMInfo message, length delimited. Does not implicitly {@link E2E.ContextInfo.UTMInfo.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.ContextInfo.UTMInfo
             * @static
             * @param {E2E.ContextInfo.IUTMInfo} message UTMInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            UTMInfo.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a UTMInfo message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.ContextInfo.UTMInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.ContextInfo.UTMInfo} UTMInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            UTMInfo.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.E2E.ContextInfo.UTMInfo();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.utmSource = reader.string();
                            break;
                        }
                    case 2: {
                            message.utmCampaign = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a UTMInfo message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.ContextInfo.UTMInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.ContextInfo.UTMInfo} UTMInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            UTMInfo.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a UTMInfo message.
             * @function verify
             * @memberof E2E.ContextInfo.UTMInfo
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            UTMInfo.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.utmSource != null && message.hasOwnProperty("utmSource")) {
                    properties._utmSource = 1;
                    if (!$util.isString(message.utmSource))
                        return "utmSource: string expected";
                }
                if (message.utmCampaign != null && message.hasOwnProperty("utmCampaign")) {
                    properties._utmCampaign = 1;
                    if (!$util.isString(message.utmCampaign))
                        return "utmCampaign: string expected";
                }
                return null;
            };

            /**
             * Creates a UTMInfo message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.ContextInfo.UTMInfo
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.ContextInfo.UTMInfo} UTMInfo
             */
            UTMInfo.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.ContextInfo.UTMInfo)
                    return object;
                var message = new $root.E2E.ContextInfo.UTMInfo();
                if (object.utmSource != null)
                    message.utmSource = String(object.utmSource);
                if (object.utmCampaign != null)
                    message.utmCampaign = String(object.utmCampaign);
                return message;
            };

            /**
             * Creates a plain object from a UTMInfo message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.ContextInfo.UTMInfo
             * @static
             * @param {E2E.ContextInfo.UTMInfo} message UTMInfo
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            UTMInfo.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.utmSource != null && message.hasOwnProperty("utmSource")) {
                    object.utmSource = message.utmSource;
                    if (options.oneofs)
                        object._utmSource = "utmSource";
                }
                if (message.utmCampaign != null && message.hasOwnProperty("utmCampaign")) {
                    object.utmCampaign = message.utmCampaign;
                    if (options.oneofs)
                        object._utmCampaign = "utmCampaign";
                }
                return object;
            };

            /**
             * Converts this UTMInfo to JSON.
             * @function toJSON
             * @memberof E2E.ContextInfo.UTMInfo
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            UTMInfo.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for UTMInfo
             * @function getTypeUrl
             * @memberof E2E.ContextInfo.UTMInfo
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            UTMInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.ContextInfo.UTMInfo";
            };

            return UTMInfo;
        })();

        return ContextInfo;
    })();

    E2E.Message = (function() {

        /**
         * Properties of a Message.
         * @memberof E2E
         * @interface IMessage
         * @property {string|null} [conversation] Message conversation
         * @property {E2E.Message.ISenderKeyDistributionMessage|null} [senderKeyDistributionMessage] Message senderKeyDistributionMessage
         * @property {E2E.Message.IImageMessage|null} [imageMessage] Message imageMessage
         * @property {E2E.Message.IContactMessage|null} [contactMessage] Message contactMessage
         * @property {E2E.Message.ILocationMessage|null} [locationMessage] Message locationMessage
         * @property {E2E.Message.IExtendedTextMessage|null} [extendedTextMessage] Message extendedTextMessage
         * @property {E2E.Message.IDocumentMessage|null} [documentMessage] Message documentMessage
         * @property {E2E.Message.IAudioMessage|null} [audioMessage] Message audioMessage
         * @property {E2E.Message.IVideoMessage|null} [videoMessage] Message videoMessage
         * @property {E2E.Message.ICall|null} [call] Message call
         * @property {E2E.Message.IChat|null} [chat] Message chat
         * @property {E2E.Message.IProtocolMessage|null} [protocolMessage] Message protocolMessage
         * @property {E2E.Message.IContactsArrayMessage|null} [contactsArrayMessage] Message contactsArrayMessage
         * @property {E2E.Message.IHighlyStructuredMessage|null} [highlyStructuredMessage] Message highlyStructuredMessage
         * @property {E2E.Message.ISenderKeyDistributionMessage|null} [fastRatchetKeySenderKeyDistributionMessage] Message fastRatchetKeySenderKeyDistributionMessage
         * @property {E2E.Message.ISendPaymentMessage|null} [sendPaymentMessage] Message sendPaymentMessage
         * @property {E2E.Message.ILiveLocationMessage|null} [liveLocationMessage] Message liveLocationMessage
         * @property {E2E.Message.IRequestPaymentMessage|null} [requestPaymentMessage] Message requestPaymentMessage
         * @property {E2E.Message.IDeclinePaymentRequestMessage|null} [declinePaymentRequestMessage] Message declinePaymentRequestMessage
         * @property {E2E.Message.ICancelPaymentRequestMessage|null} [cancelPaymentRequestMessage] Message cancelPaymentRequestMessage
         * @property {E2E.Message.ITemplateMessage|null} [templateMessage] Message templateMessage
         * @property {E2E.Message.IStickerMessage|null} [stickerMessage] Message stickerMessage
         * @property {E2E.Message.IGroupInviteMessage|null} [groupInviteMessage] Message groupInviteMessage
         * @property {E2E.Message.ITemplateButtonReplyMessage|null} [templateButtonReplyMessage] Message templateButtonReplyMessage
         * @property {E2E.Message.IProductMessage|null} [productMessage] Message productMessage
         * @property {E2E.Message.IDeviceSentMessage|null} [deviceSentMessage] Message deviceSentMessage
         * @property {E2E.IMessageContextInfo|null} [messageContextInfo] Message messageContextInfo
         * @property {E2E.Message.IListMessage|null} [listMessage] Message listMessage
         * @property {E2E.Message.IFutureProofMessage|null} [viewOnceMessage] Message viewOnceMessage
         * @property {E2E.Message.IOrderMessage|null} [orderMessage] Message orderMessage
         * @property {E2E.Message.IListResponseMessage|null} [listResponseMessage] Message listResponseMessage
         * @property {E2E.Message.IFutureProofMessage|null} [ephemeralMessage] Message ephemeralMessage
         * @property {E2E.Message.IInvoiceMessage|null} [invoiceMessage] Message invoiceMessage
         * @property {E2E.Message.IButtonsMessage|null} [buttonsMessage] Message buttonsMessage
         * @property {E2E.Message.IButtonsResponseMessage|null} [buttonsResponseMessage] Message buttonsResponseMessage
         * @property {E2E.Message.IPaymentInviteMessage|null} [paymentInviteMessage] Message paymentInviteMessage
         * @property {E2E.Message.IInteractiveMessage|null} [interactiveMessage] Message interactiveMessage
         * @property {E2E.Message.IReactionMessage|null} [reactionMessage] Message reactionMessage
         * @property {E2E.Message.IStickerSyncRMRMessage|null} [stickerSyncRmrMessage] Message stickerSyncRmrMessage
         * @property {E2E.Message.IInteractiveResponseMessage|null} [interactiveResponseMessage] Message interactiveResponseMessage
         * @property {E2E.Message.IPollCreationMessage|null} [pollCreationMessage] Message pollCreationMessage
         * @property {E2E.Message.IPollUpdateMessage|null} [pollUpdateMessage] Message pollUpdateMessage
         * @property {E2E.Message.IKeepInChatMessage|null} [keepInChatMessage] Message keepInChatMessage
         * @property {E2E.Message.IFutureProofMessage|null} [documentWithCaptionMessage] Message documentWithCaptionMessage
         * @property {E2E.Message.IRequestPhoneNumberMessage|null} [requestPhoneNumberMessage] Message requestPhoneNumberMessage
         * @property {E2E.Message.IFutureProofMessage|null} [viewOnceMessageV2] Message viewOnceMessageV2
         * @property {E2E.Message.IEncReactionMessage|null} [encReactionMessage] Message encReactionMessage
         * @property {E2E.Message.IFutureProofMessage|null} [editedMessage] Message editedMessage
         * @property {E2E.Message.IFutureProofMessage|null} [viewOnceMessageV2Extension] Message viewOnceMessageV2Extension
         * @property {E2E.Message.IPollCreationMessage|null} [pollCreationMessageV2] Message pollCreationMessageV2
         * @property {E2E.Message.IScheduledCallCreationMessage|null} [scheduledCallCreationMessage] Message scheduledCallCreationMessage
         * @property {E2E.Message.IFutureProofMessage|null} [groupMentionedMessage] Message groupMentionedMessage
         * @property {E2E.Message.IPinInChatMessage|null} [pinInChatMessage] Message pinInChatMessage
         * @property {E2E.Message.IPollCreationMessage|null} [pollCreationMessageV3] Message pollCreationMessageV3
         * @property {E2E.Message.IScheduledCallEditMessage|null} [scheduledCallEditMessage] Message scheduledCallEditMessage
         * @property {E2E.Message.IVideoMessage|null} [ptvMessage] Message ptvMessage
         * @property {E2E.Message.IFutureProofMessage|null} [botInvokeMessage] Message botInvokeMessage
         * @property {E2E.Message.ICallLogMessage|null} [callLogMesssage] Message callLogMesssage
         * @property {E2E.Message.IMessageHistoryBundle|null} [messageHistoryBundle] Message messageHistoryBundle
         * @property {E2E.Message.IEncCommentMessage|null} [encCommentMessage] Message encCommentMessage
         * @property {E2E.Message.IBCallMessage|null} [bcallMessage] Message bcallMessage
         * @property {E2E.Message.IFutureProofMessage|null} [lottieStickerMessage] Message lottieStickerMessage
         * @property {E2E.Message.IEventMessage|null} [eventMessage] Message eventMessage
         * @property {E2E.Message.IEncEventResponseMessage|null} [encEventResponseMessage] Message encEventResponseMessage
         * @property {E2E.Message.ICommentMessage|null} [commentMessage] Message commentMessage
         * @property {E2E.Message.INewsletterAdminInviteMessage|null} [newsletterAdminInviteMessage] Message newsletterAdminInviteMessage
         * @property {E2E.Message.IPlaceholderMessage|null} [placeholderMessage] Message placeholderMessage
         * @property {E2E.Message.ISecretEncryptedMessage|null} [secretEncryptedMessage] Message secretEncryptedMessage
         * @property {E2E.Message.IAlbumMessage|null} [albumMessage] Message albumMessage
         * @property {E2E.Message.IFutureProofMessage|null} [eventCoverImage] Message eventCoverImage
         * @property {E2E.Message.IStickerPackMessage|null} [stickerPackMessage] Message stickerPackMessage
         * @property {E2E.Message.IFutureProofMessage|null} [statusMentionMessage] Message statusMentionMessage
         * @property {E2E.Message.IPollResultSnapshotMessage|null} [pollResultSnapshotMessage] Message pollResultSnapshotMessage
         * @property {E2E.Message.IFutureProofMessage|null} [pollCreationOptionImageMessage] Message pollCreationOptionImageMessage
         * @property {E2E.Message.IFutureProofMessage|null} [associatedChildMessage] Message associatedChildMessage
         * @property {E2E.Message.IFutureProofMessage|null} [groupStatusMentionMessage] Message groupStatusMentionMessage
         * @property {E2E.Message.IFutureProofMessage|null} [pollCreationMessageV4] Message pollCreationMessageV4
         * @property {E2E.Message.IFutureProofMessage|null} [statusAddYours] Message statusAddYours
         * @property {E2E.Message.IFutureProofMessage|null} [groupStatusMessage] Message groupStatusMessage
         * @property {E2E.IAIRichResponseMessage|null} [richResponseMessage] Message richResponseMessage
         * @property {E2E.Message.IStatusNotificationMessage|null} [statusNotificationMessage] Message statusNotificationMessage
         * @property {E2E.Message.IFutureProofMessage|null} [limitSharingMessage] Message limitSharingMessage
         * @property {E2E.Message.IFutureProofMessage|null} [botTaskMessage] Message botTaskMessage
         * @property {E2E.Message.IFutureProofMessage|null} [questionMessage] Message questionMessage
         * @property {E2E.Message.IMessageHistoryNotice|null} [messageHistoryNotice] Message messageHistoryNotice
         * @property {E2E.Message.IFutureProofMessage|null} [groupStatusMessageV2] Message groupStatusMessageV2
         * @property {E2E.Message.IFutureProofMessage|null} [botForwardedMessage] Message botForwardedMessage
         * @property {E2E.Message.IStatusQuestionAnswerMessage|null} [statusQuestionAnswerMessage] Message statusQuestionAnswerMessage
         * @property {E2E.Message.IFutureProofMessage|null} [questionReplyMessage] Message questionReplyMessage
         * @property {E2E.Message.IQuestionResponseMessage|null} [questionResponseMessage] Message questionResponseMessage
         * @property {E2E.Message.IStatusQuotedMessage|null} [statusQuotedMessage] Message statusQuotedMessage
         * @property {E2E.Message.IStatusStickerInteractionMessage|null} [statusStickerInteractionMessage] Message statusStickerInteractionMessage
         * @property {E2E.Message.IPollCreationMessage|null} [pollCreationMessageV5] Message pollCreationMessageV5
         * @property {E2E.Message.INewsletterFollowerInviteMessage|null} [newsletterFollowerInviteMessageV2] Message newsletterFollowerInviteMessageV2
         * @property {E2E.Message.IPollResultSnapshotMessage|null} [pollResultSnapshotMessageV3] Message pollResultSnapshotMessageV3
         */

        /**
         * Constructs a new Message.
         * @memberof E2E
         * @classdesc Represents a Message.
         * @implements IMessage
         * @constructor
         * @param {E2E.IMessage=} [properties] Properties to set
         */
        function Message(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]];
        }

        /**
         * Message conversation.
         * @member {string|null|undefined} conversation
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.conversation = null;

        /**
         * Message senderKeyDistributionMessage.
         * @member {E2E.Message.ISenderKeyDistributionMessage|null|undefined} senderKeyDistributionMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.senderKeyDistributionMessage = null;

        /**
         * Message imageMessage.
         * @member {E2E.Message.IImageMessage|null|undefined} imageMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.imageMessage = null;

        /**
         * Message contactMessage.
         * @member {E2E.Message.IContactMessage|null|undefined} contactMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.contactMessage = null;

        /**
         * Message locationMessage.
         * @member {E2E.Message.ILocationMessage|null|undefined} locationMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.locationMessage = null;

        /**
         * Message extendedTextMessage.
         * @member {E2E.Message.IExtendedTextMessage|null|undefined} extendedTextMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.extendedTextMessage = null;

        /**
         * Message documentMessage.
         * @member {E2E.Message.IDocumentMessage|null|undefined} documentMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.documentMessage = null;

        /**
         * Message audioMessage.
         * @member {E2E.Message.IAudioMessage|null|undefined} audioMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.audioMessage = null;

        /**
         * Message videoMessage.
         * @member {E2E.Message.IVideoMessage|null|undefined} videoMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.videoMessage = null;

        /**
         * Message call.
         * @member {E2E.Message.ICall|null|undefined} call
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.call = null;

        /**
         * Message chat.
         * @member {E2E.Message.IChat|null|undefined} chat
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.chat = null;

        /**
         * Message protocolMessage.
         * @member {E2E.Message.IProtocolMessage|null|undefined} protocolMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.protocolMessage = null;

        /**
         * Message contactsArrayMessage.
         * @member {E2E.Message.IContactsArrayMessage|null|undefined} contactsArrayMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.contactsArrayMessage = null;

        /**
         * Message highlyStructuredMessage.
         * @member {E2E.Message.IHighlyStructuredMessage|null|undefined} highlyStructuredMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.highlyStructuredMessage = null;

        /**
         * Message fastRatchetKeySenderKeyDistributionMessage.
         * @member {E2E.Message.ISenderKeyDistributionMessage|null|undefined} fastRatchetKeySenderKeyDistributionMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.fastRatchetKeySenderKeyDistributionMessage = null;

        /**
         * Message sendPaymentMessage.
         * @member {E2E.Message.ISendPaymentMessage|null|undefined} sendPaymentMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.sendPaymentMessage = null;

        /**
         * Message liveLocationMessage.
         * @member {E2E.Message.ILiveLocationMessage|null|undefined} liveLocationMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.liveLocationMessage = null;

        /**
         * Message requestPaymentMessage.
         * @member {E2E.Message.IRequestPaymentMessage|null|undefined} requestPaymentMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.requestPaymentMessage = null;

        /**
         * Message declinePaymentRequestMessage.
         * @member {E2E.Message.IDeclinePaymentRequestMessage|null|undefined} declinePaymentRequestMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.declinePaymentRequestMessage = null;

        /**
         * Message cancelPaymentRequestMessage.
         * @member {E2E.Message.ICancelPaymentRequestMessage|null|undefined} cancelPaymentRequestMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.cancelPaymentRequestMessage = null;

        /**
         * Message templateMessage.
         * @member {E2E.Message.ITemplateMessage|null|undefined} templateMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.templateMessage = null;

        /**
         * Message stickerMessage.
         * @member {E2E.Message.IStickerMessage|null|undefined} stickerMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.stickerMessage = null;

        /**
         * Message groupInviteMessage.
         * @member {E2E.Message.IGroupInviteMessage|null|undefined} groupInviteMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.groupInviteMessage = null;

        /**
         * Message templateButtonReplyMessage.
         * @member {E2E.Message.ITemplateButtonReplyMessage|null|undefined} templateButtonReplyMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.templateButtonReplyMessage = null;

        /**
         * Message productMessage.
         * @member {E2E.Message.IProductMessage|null|undefined} productMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.productMessage = null;

        /**
         * Message deviceSentMessage.
         * @member {E2E.Message.IDeviceSentMessage|null|undefined} deviceSentMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.deviceSentMessage = null;

        /**
         * Message messageContextInfo.
         * @member {E2E.IMessageContextInfo|null|undefined} messageContextInfo
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.messageContextInfo = null;

        /**
         * Message listMessage.
         * @member {E2E.Message.IListMessage|null|undefined} listMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.listMessage = null;

        /**
         * Message viewOnceMessage.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} viewOnceMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.viewOnceMessage = null;

        /**
         * Message orderMessage.
         * @member {E2E.Message.IOrderMessage|null|undefined} orderMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.orderMessage = null;

        /**
         * Message listResponseMessage.
         * @member {E2E.Message.IListResponseMessage|null|undefined} listResponseMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.listResponseMessage = null;

        /**
         * Message ephemeralMessage.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} ephemeralMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.ephemeralMessage = null;

        /**
         * Message invoiceMessage.
         * @member {E2E.Message.IInvoiceMessage|null|undefined} invoiceMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.invoiceMessage = null;

        /**
         * Message buttonsMessage.
         * @member {E2E.Message.IButtonsMessage|null|undefined} buttonsMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.buttonsMessage = null;

        /**
         * Message buttonsResponseMessage.
         * @member {E2E.Message.IButtonsResponseMessage|null|undefined} buttonsResponseMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.buttonsResponseMessage = null;

        /**
         * Message paymentInviteMessage.
         * @member {E2E.Message.IPaymentInviteMessage|null|undefined} paymentInviteMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.paymentInviteMessage = null;

        /**
         * Message interactiveMessage.
         * @member {E2E.Message.IInteractiveMessage|null|undefined} interactiveMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.interactiveMessage = null;

        /**
         * Message reactionMessage.
         * @member {E2E.Message.IReactionMessage|null|undefined} reactionMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.reactionMessage = null;

        /**
         * Message stickerSyncRmrMessage.
         * @member {E2E.Message.IStickerSyncRMRMessage|null|undefined} stickerSyncRmrMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.stickerSyncRmrMessage = null;

        /**
         * Message interactiveResponseMessage.
         * @member {E2E.Message.IInteractiveResponseMessage|null|undefined} interactiveResponseMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.interactiveResponseMessage = null;

        /**
         * Message pollCreationMessage.
         * @member {E2E.Message.IPollCreationMessage|null|undefined} pollCreationMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.pollCreationMessage = null;

        /**
         * Message pollUpdateMessage.
         * @member {E2E.Message.IPollUpdateMessage|null|undefined} pollUpdateMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.pollUpdateMessage = null;

        /**
         * Message keepInChatMessage.
         * @member {E2E.Message.IKeepInChatMessage|null|undefined} keepInChatMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.keepInChatMessage = null;

        /**
         * Message documentWithCaptionMessage.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} documentWithCaptionMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.documentWithCaptionMessage = null;

        /**
         * Message requestPhoneNumberMessage.
         * @member {E2E.Message.IRequestPhoneNumberMessage|null|undefined} requestPhoneNumberMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.requestPhoneNumberMessage = null;

        /**
         * Message viewOnceMessageV2.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} viewOnceMessageV2
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.viewOnceMessageV2 = null;

        /**
         * Message encReactionMessage.
         * @member {E2E.Message.IEncReactionMessage|null|undefined} encReactionMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.encReactionMessage = null;

        /**
         * Message editedMessage.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} editedMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.editedMessage = null;

        /**
         * Message viewOnceMessageV2Extension.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} viewOnceMessageV2Extension
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.viewOnceMessageV2Extension = null;

        /**
         * Message pollCreationMessageV2.
         * @member {E2E.Message.IPollCreationMessage|null|undefined} pollCreationMessageV2
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.pollCreationMessageV2 = null;

        /**
         * Message scheduledCallCreationMessage.
         * @member {E2E.Message.IScheduledCallCreationMessage|null|undefined} scheduledCallCreationMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.scheduledCallCreationMessage = null;

        /**
         * Message groupMentionedMessage.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} groupMentionedMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.groupMentionedMessage = null;

        /**
         * Message pinInChatMessage.
         * @member {E2E.Message.IPinInChatMessage|null|undefined} pinInChatMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.pinInChatMessage = null;

        /**
         * Message pollCreationMessageV3.
         * @member {E2E.Message.IPollCreationMessage|null|undefined} pollCreationMessageV3
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.pollCreationMessageV3 = null;

        /**
         * Message scheduledCallEditMessage.
         * @member {E2E.Message.IScheduledCallEditMessage|null|undefined} scheduledCallEditMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.scheduledCallEditMessage = null;

        /**
         * Message ptvMessage.
         * @member {E2E.Message.IVideoMessage|null|undefined} ptvMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.ptvMessage = null;

        /**
         * Message botInvokeMessage.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} botInvokeMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.botInvokeMessage = null;

        /**
         * Message callLogMesssage.
         * @member {E2E.Message.ICallLogMessage|null|undefined} callLogMesssage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.callLogMesssage = null;

        /**
         * Message messageHistoryBundle.
         * @member {E2E.Message.IMessageHistoryBundle|null|undefined} messageHistoryBundle
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.messageHistoryBundle = null;

        /**
         * Message encCommentMessage.
         * @member {E2E.Message.IEncCommentMessage|null|undefined} encCommentMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.encCommentMessage = null;

        /**
         * Message bcallMessage.
         * @member {E2E.Message.IBCallMessage|null|undefined} bcallMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.bcallMessage = null;

        /**
         * Message lottieStickerMessage.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} lottieStickerMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.lottieStickerMessage = null;

        /**
         * Message eventMessage.
         * @member {E2E.Message.IEventMessage|null|undefined} eventMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.eventMessage = null;

        /**
         * Message encEventResponseMessage.
         * @member {E2E.Message.IEncEventResponseMessage|null|undefined} encEventResponseMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.encEventResponseMessage = null;

        /**
         * Message commentMessage.
         * @member {E2E.Message.ICommentMessage|null|undefined} commentMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.commentMessage = null;

        /**
         * Message newsletterAdminInviteMessage.
         * @member {E2E.Message.INewsletterAdminInviteMessage|null|undefined} newsletterAdminInviteMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.newsletterAdminInviteMessage = null;

        /**
         * Message placeholderMessage.
         * @member {E2E.Message.IPlaceholderMessage|null|undefined} placeholderMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.placeholderMessage = null;

        /**
         * Message secretEncryptedMessage.
         * @member {E2E.Message.ISecretEncryptedMessage|null|undefined} secretEncryptedMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.secretEncryptedMessage = null;

        /**
         * Message albumMessage.
         * @member {E2E.Message.IAlbumMessage|null|undefined} albumMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.albumMessage = null;

        /**
         * Message eventCoverImage.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} eventCoverImage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.eventCoverImage = null;

        /**
         * Message stickerPackMessage.
         * @member {E2E.Message.IStickerPackMessage|null|undefined} stickerPackMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.stickerPackMessage = null;

        /**
         * Message statusMentionMessage.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} statusMentionMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.statusMentionMessage = null;

        /**
         * Message pollResultSnapshotMessage.
         * @member {E2E.Message.IPollResultSnapshotMessage|null|undefined} pollResultSnapshotMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.pollResultSnapshotMessage = null;

        /**
         * Message pollCreationOptionImageMessage.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} pollCreationOptionImageMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.pollCreationOptionImageMessage = null;

        /**
         * Message associatedChildMessage.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} associatedChildMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.associatedChildMessage = null;

        /**
         * Message groupStatusMentionMessage.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} groupStatusMentionMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.groupStatusMentionMessage = null;

        /**
         * Message pollCreationMessageV4.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} pollCreationMessageV4
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.pollCreationMessageV4 = null;

        /**
         * Message statusAddYours.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} statusAddYours
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.statusAddYours = null;

        /**
         * Message groupStatusMessage.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} groupStatusMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.groupStatusMessage = null;

        /**
         * Message richResponseMessage.
         * @member {E2E.IAIRichResponseMessage|null|undefined} richResponseMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.richResponseMessage = null;

        /**
         * Message statusNotificationMessage.
         * @member {E2E.Message.IStatusNotificationMessage|null|undefined} statusNotificationMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.statusNotificationMessage = null;

        /**
         * Message limitSharingMessage.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} limitSharingMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.limitSharingMessage = null;

        /**
         * Message botTaskMessage.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} botTaskMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.botTaskMessage = null;

        /**
         * Message questionMessage.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} questionMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.questionMessage = null;

        /**
         * Message messageHistoryNotice.
         * @member {E2E.Message.IMessageHistoryNotice|null|undefined} messageHistoryNotice
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.messageHistoryNotice = null;

        /**
         * Message groupStatusMessageV2.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} groupStatusMessageV2
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.groupStatusMessageV2 = null;

        /**
         * Message botForwardedMessage.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} botForwardedMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.botForwardedMessage = null;

        /**
         * Message statusQuestionAnswerMessage.
         * @member {E2E.Message.IStatusQuestionAnswerMessage|null|undefined} statusQuestionAnswerMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.statusQuestionAnswerMessage = null;

        /**
         * Message questionReplyMessage.
         * @member {E2E.Message.IFutureProofMessage|null|undefined} questionReplyMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.questionReplyMessage = null;

        /**
         * Message questionResponseMessage.
         * @member {E2E.Message.IQuestionResponseMessage|null|undefined} questionResponseMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.questionResponseMessage = null;

        /**
         * Message statusQuotedMessage.
         * @member {E2E.Message.IStatusQuotedMessage|null|undefined} statusQuotedMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.statusQuotedMessage = null;

        /**
         * Message statusStickerInteractionMessage.
         * @member {E2E.Message.IStatusStickerInteractionMessage|null|undefined} statusStickerInteractionMessage
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.statusStickerInteractionMessage = null;

        /**
         * Message pollCreationMessageV5.
         * @member {E2E.Message.IPollCreationMessage|null|undefined} pollCreationMessageV5
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.pollCreationMessageV5 = null;

        /**
         * Message newsletterFollowerInviteMessageV2.
         * @member {E2E.Message.INewsletterFollowerInviteMessage|null|undefined} newsletterFollowerInviteMessageV2
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.newsletterFollowerInviteMessageV2 = null;

        /**
         * Message pollResultSnapshotMessageV3.
         * @member {E2E.Message.IPollResultSnapshotMessage|null|undefined} pollResultSnapshotMessageV3
         * @memberof E2E.Message
         * @instance
         */
        Message.prototype.pollResultSnapshotMessageV3 = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * Message _conversation.
         * @member {"conversation"|undefined} _conversation
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_conversation", {
            get: $util.oneOfGetter($oneOfFields = ["conversation"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _senderKeyDistributionMessage.
         * @member {"senderKeyDistributionMessage"|undefined} _senderKeyDistributionMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_senderKeyDistributionMessage", {
            get: $util.oneOfGetter($oneOfFields = ["senderKeyDistributionMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _imageMessage.
         * @member {"imageMessage"|undefined} _imageMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_imageMessage", {
            get: $util.oneOfGetter($oneOfFields = ["imageMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _contactMessage.
         * @member {"contactMessage"|undefined} _contactMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_contactMessage", {
            get: $util.oneOfGetter($oneOfFields = ["contactMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _locationMessage.
         * @member {"locationMessage"|undefined} _locationMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_locationMessage", {
            get: $util.oneOfGetter($oneOfFields = ["locationMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _extendedTextMessage.
         * @member {"extendedTextMessage"|undefined} _extendedTextMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_extendedTextMessage", {
            get: $util.oneOfGetter($oneOfFields = ["extendedTextMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _documentMessage.
         * @member {"documentMessage"|undefined} _documentMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_documentMessage", {
            get: $util.oneOfGetter($oneOfFields = ["documentMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _audioMessage.
         * @member {"audioMessage"|undefined} _audioMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_audioMessage", {
            get: $util.oneOfGetter($oneOfFields = ["audioMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _videoMessage.
         * @member {"videoMessage"|undefined} _videoMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_videoMessage", {
            get: $util.oneOfGetter($oneOfFields = ["videoMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _call.
         * @member {"call"|undefined} _call
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_call", {
            get: $util.oneOfGetter($oneOfFields = ["call"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _chat.
         * @member {"chat"|undefined} _chat
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_chat", {
            get: $util.oneOfGetter($oneOfFields = ["chat"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _protocolMessage.
         * @member {"protocolMessage"|undefined} _protocolMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_protocolMessage", {
            get: $util.oneOfGetter($oneOfFields = ["protocolMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _contactsArrayMessage.
         * @member {"contactsArrayMessage"|undefined} _contactsArrayMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_contactsArrayMessage", {
            get: $util.oneOfGetter($oneOfFields = ["contactsArrayMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _highlyStructuredMessage.
         * @member {"highlyStructuredMessage"|undefined} _highlyStructuredMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_highlyStructuredMessage", {
            get: $util.oneOfGetter($oneOfFields = ["highlyStructuredMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _fastRatchetKeySenderKeyDistributionMessage.
         * @member {"fastRatchetKeySenderKeyDistributionMessage"|undefined} _fastRatchetKeySenderKeyDistributionMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_fastRatchetKeySenderKeyDistributionMessage", {
            get: $util.oneOfGetter($oneOfFields = ["fastRatchetKeySenderKeyDistributionMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _sendPaymentMessage.
         * @member {"sendPaymentMessage"|undefined} _sendPaymentMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_sendPaymentMessage", {
            get: $util.oneOfGetter($oneOfFields = ["sendPaymentMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _liveLocationMessage.
         * @member {"liveLocationMessage"|undefined} _liveLocationMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_liveLocationMessage", {
            get: $util.oneOfGetter($oneOfFields = ["liveLocationMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _requestPaymentMessage.
         * @member {"requestPaymentMessage"|undefined} _requestPaymentMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_requestPaymentMessage", {
            get: $util.oneOfGetter($oneOfFields = ["requestPaymentMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _declinePaymentRequestMessage.
         * @member {"declinePaymentRequestMessage"|undefined} _declinePaymentRequestMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_declinePaymentRequestMessage", {
            get: $util.oneOfGetter($oneOfFields = ["declinePaymentRequestMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _cancelPaymentRequestMessage.
         * @member {"cancelPaymentRequestMessage"|undefined} _cancelPaymentRequestMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_cancelPaymentRequestMessage", {
            get: $util.oneOfGetter($oneOfFields = ["cancelPaymentRequestMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _templateMessage.
         * @member {"templateMessage"|undefined} _templateMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_templateMessage", {
            get: $util.oneOfGetter($oneOfFields = ["templateMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _stickerMessage.
         * @member {"stickerMessage"|undefined} _stickerMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_stickerMessage", {
            get: $util.oneOfGetter($oneOfFields = ["stickerMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _groupInviteMessage.
         * @member {"groupInviteMessage"|undefined} _groupInviteMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_groupInviteMessage", {
            get: $util.oneOfGetter($oneOfFields = ["groupInviteMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _templateButtonReplyMessage.
         * @member {"templateButtonReplyMessage"|undefined} _templateButtonReplyMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_templateButtonReplyMessage", {
            get: $util.oneOfGetter($oneOfFields = ["templateButtonReplyMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _productMessage.
         * @member {"productMessage"|undefined} _productMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_productMessage", {
            get: $util.oneOfGetter($oneOfFields = ["productMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _deviceSentMessage.
         * @member {"deviceSentMessage"|undefined} _deviceSentMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_deviceSentMessage", {
            get: $util.oneOfGetter($oneOfFields = ["deviceSentMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _messageContextInfo.
         * @member {"messageContextInfo"|undefined} _messageContextInfo
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_messageContextInfo", {
            get: $util.oneOfGetter($oneOfFields = ["messageContextInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _listMessage.
         * @member {"listMessage"|undefined} _listMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_listMessage", {
            get: $util.oneOfGetter($oneOfFields = ["listMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _viewOnceMessage.
         * @member {"viewOnceMessage"|undefined} _viewOnceMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_viewOnceMessage", {
            get: $util.oneOfGetter($oneOfFields = ["viewOnceMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _orderMessage.
         * @member {"orderMessage"|undefined} _orderMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_orderMessage", {
            get: $util.oneOfGetter($oneOfFields = ["orderMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _listResponseMessage.
         * @member {"listResponseMessage"|undefined} _listResponseMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_listResponseMessage", {
            get: $util.oneOfGetter($oneOfFields = ["listResponseMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _ephemeralMessage.
         * @member {"ephemeralMessage"|undefined} _ephemeralMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_ephemeralMessage", {
            get: $util.oneOfGetter($oneOfFields = ["ephemeralMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _invoiceMessage.
         * @member {"invoiceMessage"|undefined} _invoiceMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_invoiceMessage", {
            get: $util.oneOfGetter($oneOfFields = ["invoiceMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _buttonsMessage.
         * @member {"buttonsMessage"|undefined} _buttonsMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_buttonsMessage", {
            get: $util.oneOfGetter($oneOfFields = ["buttonsMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _buttonsResponseMessage.
         * @member {"buttonsResponseMessage"|undefined} _buttonsResponseMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_buttonsResponseMessage", {
            get: $util.oneOfGetter($oneOfFields = ["buttonsResponseMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _paymentInviteMessage.
         * @member {"paymentInviteMessage"|undefined} _paymentInviteMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_paymentInviteMessage", {
            get: $util.oneOfGetter($oneOfFields = ["paymentInviteMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _interactiveMessage.
         * @member {"interactiveMessage"|undefined} _interactiveMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_interactiveMessage", {
            get: $util.oneOfGetter($oneOfFields = ["interactiveMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _reactionMessage.
         * @member {"reactionMessage"|undefined} _reactionMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_reactionMessage", {
            get: $util.oneOfGetter($oneOfFields = ["reactionMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _stickerSyncRmrMessage.
         * @member {"stickerSyncRmrMessage"|undefined} _stickerSyncRmrMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_stickerSyncRmrMessage", {
            get: $util.oneOfGetter($oneOfFields = ["stickerSyncRmrMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _interactiveResponseMessage.
         * @member {"interactiveResponseMessage"|undefined} _interactiveResponseMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_interactiveResponseMessage", {
            get: $util.oneOfGetter($oneOfFields = ["interactiveResponseMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _pollCreationMessage.
         * @member {"pollCreationMessage"|undefined} _pollCreationMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_pollCreationMessage", {
            get: $util.oneOfGetter($oneOfFields = ["pollCreationMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _pollUpdateMessage.
         * @member {"pollUpdateMessage"|undefined} _pollUpdateMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_pollUpdateMessage", {
            get: $util.oneOfGetter($oneOfFields = ["pollUpdateMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _keepInChatMessage.
         * @member {"keepInChatMessage"|undefined} _keepInChatMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_keepInChatMessage", {
            get: $util.oneOfGetter($oneOfFields = ["keepInChatMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _documentWithCaptionMessage.
         * @member {"documentWithCaptionMessage"|undefined} _documentWithCaptionMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_documentWithCaptionMessage", {
            get: $util.oneOfGetter($oneOfFields = ["documentWithCaptionMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _requestPhoneNumberMessage.
         * @member {"requestPhoneNumberMessage"|undefined} _requestPhoneNumberMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_requestPhoneNumberMessage", {
            get: $util.oneOfGetter($oneOfFields = ["requestPhoneNumberMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _viewOnceMessageV2.
         * @member {"viewOnceMessageV2"|undefined} _viewOnceMessageV2
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_viewOnceMessageV2", {
            get: $util.oneOfGetter($oneOfFields = ["viewOnceMessageV2"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _encReactionMessage.
         * @member {"encReactionMessage"|undefined} _encReactionMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_encReactionMessage", {
            get: $util.oneOfGetter($oneOfFields = ["encReactionMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _editedMessage.
         * @member {"editedMessage"|undefined} _editedMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_editedMessage", {
            get: $util.oneOfGetter($oneOfFields = ["editedMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _viewOnceMessageV2Extension.
         * @member {"viewOnceMessageV2Extension"|undefined} _viewOnceMessageV2Extension
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_viewOnceMessageV2Extension", {
            get: $util.oneOfGetter($oneOfFields = ["viewOnceMessageV2Extension"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _pollCreationMessageV2.
         * @member {"pollCreationMessageV2"|undefined} _pollCreationMessageV2
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_pollCreationMessageV2", {
            get: $util.oneOfGetter($oneOfFields = ["pollCreationMessageV2"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _scheduledCallCreationMessage.
         * @member {"scheduledCallCreationMessage"|undefined} _scheduledCallCreationMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_scheduledCallCreationMessage", {
            get: $util.oneOfGetter($oneOfFields = ["scheduledCallCreationMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _groupMentionedMessage.
         * @member {"groupMentionedMessage"|undefined} _groupMentionedMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_groupMentionedMessage", {
            get: $util.oneOfGetter($oneOfFields = ["groupMentionedMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _pinInChatMessage.
         * @member {"pinInChatMessage"|undefined} _pinInChatMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_pinInChatMessage", {
            get: $util.oneOfGetter($oneOfFields = ["pinInChatMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _pollCreationMessageV3.
         * @member {"pollCreationMessageV3"|undefined} _pollCreationMessageV3
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_pollCreationMessageV3", {
            get: $util.oneOfGetter($oneOfFields = ["pollCreationMessageV3"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _scheduledCallEditMessage.
         * @member {"scheduledCallEditMessage"|undefined} _scheduledCallEditMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_scheduledCallEditMessage", {
            get: $util.oneOfGetter($oneOfFields = ["scheduledCallEditMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _ptvMessage.
         * @member {"ptvMessage"|undefined} _ptvMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_ptvMessage", {
            get: $util.oneOfGetter($oneOfFields = ["ptvMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _botInvokeMessage.
         * @member {"botInvokeMessage"|undefined} _botInvokeMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_botInvokeMessage", {
            get: $util.oneOfGetter($oneOfFields = ["botInvokeMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _callLogMesssage.
         * @member {"callLogMesssage"|undefined} _callLogMesssage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_callLogMesssage", {
            get: $util.oneOfGetter($oneOfFields = ["callLogMesssage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _messageHistoryBundle.
         * @member {"messageHistoryBundle"|undefined} _messageHistoryBundle
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_messageHistoryBundle", {
            get: $util.oneOfGetter($oneOfFields = ["messageHistoryBundle"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _encCommentMessage.
         * @member {"encCommentMessage"|undefined} _encCommentMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_encCommentMessage", {
            get: $util.oneOfGetter($oneOfFields = ["encCommentMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _bcallMessage.
         * @member {"bcallMessage"|undefined} _bcallMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_bcallMessage", {
            get: $util.oneOfGetter($oneOfFields = ["bcallMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _lottieStickerMessage.
         * @member {"lottieStickerMessage"|undefined} _lottieStickerMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_lottieStickerMessage", {
            get: $util.oneOfGetter($oneOfFields = ["lottieStickerMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _eventMessage.
         * @member {"eventMessage"|undefined} _eventMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_eventMessage", {
            get: $util.oneOfGetter($oneOfFields = ["eventMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _encEventResponseMessage.
         * @member {"encEventResponseMessage"|undefined} _encEventResponseMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_encEventResponseMessage", {
            get: $util.oneOfGetter($oneOfFields = ["encEventResponseMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _commentMessage.
         * @member {"commentMessage"|undefined} _commentMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_commentMessage", {
            get: $util.oneOfGetter($oneOfFields = ["commentMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _newsletterAdminInviteMessage.
         * @member {"newsletterAdminInviteMessage"|undefined} _newsletterAdminInviteMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_newsletterAdminInviteMessage", {
            get: $util.oneOfGetter($oneOfFields = ["newsletterAdminInviteMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _placeholderMessage.
         * @member {"placeholderMessage"|undefined} _placeholderMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_placeholderMessage", {
            get: $util.oneOfGetter($oneOfFields = ["placeholderMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _secretEncryptedMessage.
         * @member {"secretEncryptedMessage"|undefined} _secretEncryptedMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_secretEncryptedMessage", {
            get: $util.oneOfGetter($oneOfFields = ["secretEncryptedMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _albumMessage.
         * @member {"albumMessage"|undefined} _albumMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_albumMessage", {
            get: $util.oneOfGetter($oneOfFields = ["albumMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _eventCoverImage.
         * @member {"eventCoverImage"|undefined} _eventCoverImage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_eventCoverImage", {
            get: $util.oneOfGetter($oneOfFields = ["eventCoverImage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _stickerPackMessage.
         * @member {"stickerPackMessage"|undefined} _stickerPackMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_stickerPackMessage", {
            get: $util.oneOfGetter($oneOfFields = ["stickerPackMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _statusMentionMessage.
         * @member {"statusMentionMessage"|undefined} _statusMentionMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_statusMentionMessage", {
            get: $util.oneOfGetter($oneOfFields = ["statusMentionMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _pollResultSnapshotMessage.
         * @member {"pollResultSnapshotMessage"|undefined} _pollResultSnapshotMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_pollResultSnapshotMessage", {
            get: $util.oneOfGetter($oneOfFields = ["pollResultSnapshotMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _pollCreationOptionImageMessage.
         * @member {"pollCreationOptionImageMessage"|undefined} _pollCreationOptionImageMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_pollCreationOptionImageMessage", {
            get: $util.oneOfGetter($oneOfFields = ["pollCreationOptionImageMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _associatedChildMessage.
         * @member {"associatedChildMessage"|undefined} _associatedChildMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_associatedChildMessage", {
            get: $util.oneOfGetter($oneOfFields = ["associatedChildMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _groupStatusMentionMessage.
         * @member {"groupStatusMentionMessage"|undefined} _groupStatusMentionMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_groupStatusMentionMessage", {
            get: $util.oneOfGetter($oneOfFields = ["groupStatusMentionMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _pollCreationMessageV4.
         * @member {"pollCreationMessageV4"|undefined} _pollCreationMessageV4
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_pollCreationMessageV4", {
            get: $util.oneOfGetter($oneOfFields = ["pollCreationMessageV4"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _statusAddYours.
         * @member {"statusAddYours"|undefined} _statusAddYours
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_statusAddYours", {
            get: $util.oneOfGetter($oneOfFields = ["statusAddYours"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _groupStatusMessage.
         * @member {"groupStatusMessage"|undefined} _groupStatusMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_groupStatusMessage", {
            get: $util.oneOfGetter($oneOfFields = ["groupStatusMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _richResponseMessage.
         * @member {"richResponseMessage"|undefined} _richResponseMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_richResponseMessage", {
            get: $util.oneOfGetter($oneOfFields = ["richResponseMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _statusNotificationMessage.
         * @member {"statusNotificationMessage"|undefined} _statusNotificationMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_statusNotificationMessage", {
            get: $util.oneOfGetter($oneOfFields = ["statusNotificationMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _limitSharingMessage.
         * @member {"limitSharingMessage"|undefined} _limitSharingMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_limitSharingMessage", {
            get: $util.oneOfGetter($oneOfFields = ["limitSharingMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _botTaskMessage.
         * @member {"botTaskMessage"|undefined} _botTaskMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_botTaskMessage", {
            get: $util.oneOfGetter($oneOfFields = ["botTaskMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _questionMessage.
         * @member {"questionMessage"|undefined} _questionMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_questionMessage", {
            get: $util.oneOfGetter($oneOfFields = ["questionMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _messageHistoryNotice.
         * @member {"messageHistoryNotice"|undefined} _messageHistoryNotice
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_messageHistoryNotice", {
            get: $util.oneOfGetter($oneOfFields = ["messageHistoryNotice"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _groupStatusMessageV2.
         * @member {"groupStatusMessageV2"|undefined} _groupStatusMessageV2
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_groupStatusMessageV2", {
            get: $util.oneOfGetter($oneOfFields = ["groupStatusMessageV2"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _botForwardedMessage.
         * @member {"botForwardedMessage"|undefined} _botForwardedMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_botForwardedMessage", {
            get: $util.oneOfGetter($oneOfFields = ["botForwardedMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _statusQuestionAnswerMessage.
         * @member {"statusQuestionAnswerMessage"|undefined} _statusQuestionAnswerMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_statusQuestionAnswerMessage", {
            get: $util.oneOfGetter($oneOfFields = ["statusQuestionAnswerMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _questionReplyMessage.
         * @member {"questionReplyMessage"|undefined} _questionReplyMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_questionReplyMessage", {
            get: $util.oneOfGetter($oneOfFields = ["questionReplyMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _questionResponseMessage.
         * @member {"questionResponseMessage"|undefined} _questionResponseMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_questionResponseMessage", {
            get: $util.oneOfGetter($oneOfFields = ["questionResponseMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _statusQuotedMessage.
         * @member {"statusQuotedMessage"|undefined} _statusQuotedMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_statusQuotedMessage", {
            get: $util.oneOfGetter($oneOfFields = ["statusQuotedMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _statusStickerInteractionMessage.
         * @member {"statusStickerInteractionMessage"|undefined} _statusStickerInteractionMessage
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_statusStickerInteractionMessage", {
            get: $util.oneOfGetter($oneOfFields = ["statusStickerInteractionMessage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _pollCreationMessageV5.
         * @member {"pollCreationMessageV5"|undefined} _pollCreationMessageV5
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_pollCreationMessageV5", {
            get: $util.oneOfGetter($oneOfFields = ["pollCreationMessageV5"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _newsletterFollowerInviteMessageV2.
         * @member {"newsletterFollowerInviteMessageV2"|undefined} _newsletterFollowerInviteMessageV2
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_newsletterFollowerInviteMessageV2", {
            get: $util.oneOfGetter($oneOfFields = ["newsletterFollowerInviteMessageV2"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Message _pollResultSnapshotMessageV3.
         * @member {"pollResultSnapshotMessageV3"|undefined} _pollResultSnapshotMessageV3
         * @memberof E2E.Message
         * @instance
         */
        Object.defineProperty(Message.prototype, "_pollResultSnapshotMessageV3", {
            get: $util.oneOfGetter($oneOfFields = ["pollResultSnapshotMessageV3"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new Message instance using the specified properties.
         * @function create
         * @memberof E2E.Message
         * @static
         * @param {E2E.IMessage=} [properties] Properties to set
         * @returns {E2E.Message} Message instance
         */
        Message.create = function create(properties) {
            return new Message(properties);
        };

        /**
         * Encodes the specified Message message. Does not implicitly {@link E2E.Message.verify|verify} messages.
         * @function encode
         * @memberof E2E.Message
         * @static
         * @param {E2E.IMessage} message Message message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Message.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.conversation != null && Object.hasOwnProperty.call(message, "conversation"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversation);
            if (message.senderKeyDistributionMessage != null && Object.hasOwnProperty.call(message, "senderKeyDistributionMessage"))
                $root.E2E.Message.SenderKeyDistributionMessage.encode(message.senderKeyDistributionMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage"))
                $root.E2E.Message.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.contactMessage != null && Object.hasOwnProperty.call(message, "contactMessage"))
                $root.E2E.Message.ContactMessage.encode(message.contactMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
            if (message.locationMessage != null && Object.hasOwnProperty.call(message, "locationMessage"))
                $root.E2E.Message.LocationMessage.encode(message.locationMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
            if (message.extendedTextMessage != null && Object.hasOwnProperty.call(message, "extendedTextMessage"))
                $root.E2E.Message.ExtendedTextMessage.encode(message.extendedTextMessage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
            if (message.documentMessage != null && Object.hasOwnProperty.call(message, "documentMessage"))
                $root.E2E.Message.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
            if (message.audioMessage != null && Object.hasOwnProperty.call(message, "audioMessage"))
                $root.E2E.Message.AudioMessage.encode(message.audioMessage, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
            if (message.videoMessage != null && Object.hasOwnProperty.call(message, "videoMessage"))
                $root.E2E.Message.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
            if (message.call != null && Object.hasOwnProperty.call(message, "call"))
                $root.E2E.Message.Call.encode(message.call, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
            if (message.chat != null && Object.hasOwnProperty.call(message, "chat"))
                $root.E2E.Message.Chat.encode(message.chat, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
            if (message.protocolMessage != null && Object.hasOwnProperty.call(message, "protocolMessage"))
                $root.E2E.Message.ProtocolMessage.encode(message.protocolMessage, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
            if (message.contactsArrayMessage != null && Object.hasOwnProperty.call(message, "contactsArrayMessage"))
                $root.E2E.Message.ContactsArrayMessage.encode(message.contactsArrayMessage, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
            if (message.highlyStructuredMessage != null && Object.hasOwnProperty.call(message, "highlyStructuredMessage"))
                $root.E2E.Message.HighlyStructuredMessage.encode(message.highlyStructuredMessage, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
            if (message.fastRatchetKeySenderKeyDistributionMessage != null && Object.hasOwnProperty.call(message, "fastRatchetKeySenderKeyDistributionMessage"))
                $root.E2E.Message.SenderKeyDistributionMessage.encode(message.fastRatchetKeySenderKeyDistributionMessage, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
            if (message.sendPaymentMessage != null && Object.hasOwnProperty.call(message, "sendPaymentMessage"))
                $root.E2E.Message.SendPaymentMessage.encode(message.sendPaymentMessage, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
            if (message.liveLocationMessage != null && Object.hasOwnProperty.call(message, "liveLocationMessage"))
                $root.E2E.Message.LiveLocationMessage.encode(message.liveLocationMessage, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
            if (message.requestPaymentMessage != null && Object.hasOwnProperty.call(message, "requestPaymentMessage"))
                $root.E2E.Message.RequestPaymentMessage.encode(message.requestPaymentMessage, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim();
            if (message.declinePaymentRequestMessage != null && Object.hasOwnProperty.call(message, "declinePaymentRequestMessage"))
                $root.E2E.Message.DeclinePaymentRequestMessage.encode(message.declinePaymentRequestMessage, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
            if (message.cancelPaymentRequestMessage != null && Object.hasOwnProperty.call(message, "cancelPaymentRequestMessage"))
                $root.E2E.Message.CancelPaymentRequestMessage.encode(message.cancelPaymentRequestMessage, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim();
            if (message.templateMessage != null && Object.hasOwnProperty.call(message, "templateMessage"))
                $root.E2E.Message.TemplateMessage.encode(message.templateMessage, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim();
            if (message.stickerMessage != null && Object.hasOwnProperty.call(message, "stickerMessage"))
                $root.E2E.Message.StickerMessage.encode(message.stickerMessage, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim();
            if (message.groupInviteMessage != null && Object.hasOwnProperty.call(message, "groupInviteMessage"))
                $root.E2E.Message.GroupInviteMessage.encode(message.groupInviteMessage, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim();
            if (message.templateButtonReplyMessage != null && Object.hasOwnProperty.call(message, "templateButtonReplyMessage"))
                $root.E2E.Message.TemplateButtonReplyMessage.encode(message.templateButtonReplyMessage, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim();
            if (message.productMessage != null && Object.hasOwnProperty.call(message, "productMessage"))
                $root.E2E.Message.ProductMessage.encode(message.productMessage, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim();
            if (message.deviceSentMessage != null && Object.hasOwnProperty.call(message, "deviceSentMessage"))
                $root.E2E.Message.DeviceSentMessage.encode(message.deviceSentMessage, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim();
            if (message.messageContextInfo != null && Object.hasOwnProperty.call(message, "messageContextInfo"))
                $root.E2E.MessageContextInfo.encode(message.messageContextInfo, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim();
            if (message.listMessage != null && Object.hasOwnProperty.call(message, "listMessage"))
                $root.E2E.Message.ListMessage.encode(message.listMessage, writer.uint32(/* id 36, wireType 2 =*/290).fork()).ldelim();
            if (message.viewOnceMessage != null && Object.hasOwnProperty.call(message, "viewOnceMessage"))
                $root.E2E.Message.FutureProofMessage.encode(message.viewOnceMessage, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim();
            if (message.orderMessage != null && Object.hasOwnProperty.call(message, "orderMessage"))
                $root.E2E.Message.OrderMessage.encode(message.orderMessage, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim();
            if (message.listResponseMessage != null && Object.hasOwnProperty.call(message, "listResponseMessage"))
                $root.E2E.Message.ListResponseMessage.encode(message.listResponseMessage, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim();
            if (message.ephemeralMessage != null && Object.hasOwnProperty.call(message, "ephemeralMessage"))
                $root.E2E.Message.FutureProofMessage.encode(message.ephemeralMessage, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim();
            if (message.invoiceMessage != null && Object.hasOwnProperty.call(message, "invoiceMessage"))
                $root.E2E.Message.InvoiceMessage.encode(message.invoiceMessage, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim();
            if (message.buttonsMessage != null && Object.hasOwnProperty.call(message, "buttonsMessage"))
                $root.E2E.Message.ButtonsMessage.encode(message.buttonsMessage, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim();
            if (message.buttonsResponseMessage != null && Object.hasOwnProperty.call(message, "buttonsResponseMessage"))
                $root.E2E.Message.ButtonsResponseMessage.encode(message.buttonsResponseMessage, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim();
            if (message.paymentInviteMessage != null && Object.hasOwnProperty.call(message, "paymentInviteMessage"))
                $root.E2E.Message.PaymentInviteMessage.encode(message.paymentInviteMessage, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim();
            if (message.interactiveMessage != null && Object.hasOwnProperty.call(message, "interactiveMessage"))
                $root.E2E.Message.InteractiveMessage.encode(message.interactiveMessage, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim();
            if (message.reactionMessage != null && Object.hasOwnProperty.call(message, "reactionMessage"))
                $root.E2E.Message.ReactionMessage.encode(message.reactionMessage, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim();
            if (message.stickerSyncRmrMessage != null && Object.hasOwnProperty.call(message, "stickerSyncRmrMessage"))
                $root.E2E.Message.StickerSyncRMRMessage.encode(message.stickerSyncRmrMessage, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim();
            if (message.interactiveResponseMessage != null && Object.hasOwnProperty.call(message, "interactiveResponseMessage"))
                $root.E2E.Message.InteractiveResponseMessage.encode(message.interactiveResponseMessage, writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim();
            if (message.pollCreationMessage != null && Object.hasOwnProperty.call(message, "pollCreationMessage"))
                $root.E2E.Message.PollCreationMessage.encode(message.pollCreationMessage, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim();
            if (message.pollUpdateMessage != null && Object.hasOwnProperty.call(message, "pollUpdateMessage"))
                $root.E2E.Message.PollUpdateMessage.encode(message.pollUpdateMessage, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim();
            if (message.keepInChatMessage != null && Object.hasOwnProperty.call(message, "keepInChatMessage"))
                $root.E2E.Message.KeepInChatMessage.encode(message.keepInChatMessage, writer.uint32(/* id 51, wireType 2 =*/410).fork()).ldelim();
            if (message.documentWithCaptionMessage != null && Object.hasOwnProperty.call(message, "documentWithCaptionMessage"))
                $root.E2E.Message.FutureProofMessage.encode(message.documentWithCaptionMessage, writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim();
            if (message.requestPhoneNumberMessage != null && Object.hasOwnProperty.call(message, "requestPhoneNumberMessage"))
                $root.E2E.Message.RequestPhoneNumberMessage.encode(message.requestPhoneNumberMessage, writer.uint32(/* id 54, wireType 2 =*/434).fork()).ldelim();
            if (message.viewOnceMessageV2 != null && Object.hasOwnProperty.call(message, "viewOnceMessageV2"))
                $root.E2E.Message.FutureProofMessage.encode(message.viewOnceMessageV2, writer.uint32(/* id 55, wireType 2 =*/442).fork()).ldelim();
            if (message.encReactionMessage != null && Object.hasOwnProperty.call(message, "encReactionMessage"))
                $root.E2E.Message.EncReactionMessage.encode(message.encReactionMessage, writer.uint32(/* id 56, wireType 2 =*/450).fork()).ldelim();
            if (message.editedMessage != null && Object.hasOwnProperty.call(message, "editedMessage"))
                $root.E2E.Message.FutureProofMessage.encode(message.editedMessage, writer.uint32(/* id 58, wireType 2 =*/466).fork()).ldelim();
            if (message.viewOnceMessageV2Extension != null && Object.hasOwnProperty.call(message, "viewOnceMessageV2Extension"))
                $root.E2E.Message.FutureProofMessage.encode(message.viewOnceMessageV2Extension, writer.uint32(/* id 59, wireType 2 =*/474).fork()).ldelim();
            if (message.pollCreationMessageV2 != null && Object.hasOwnProperty.call(message, "pollCreationMessageV2"))
                $root.E2E.Message.PollCreationMessage.encode(message.pollCreationMessageV2, writer.uint32(/* id 60, wireType 2 =*/482).fork()).ldelim();
            if (message.scheduledCallCreationMessage != null && Object.hasOwnProperty.call(message, "scheduledCallCreationMessage"))
                $root.E2E.Message.ScheduledCallCreationMessage.encode(message.scheduledCallCreationMessage, writer.uint32(/* id 61, wireType 2 =*/490).fork()).ldelim();
            if (message.groupMentionedMessage != null && Object.hasOwnProperty.call(message, "groupMentionedMessage"))
                $root.E2E.Message.FutureProofMessage.encode(message.groupMentionedMessage, writer.uint32(/* id 62, wireType 2 =*/498).fork()).ldelim();
            if (message.pinInChatMessage != null && Object.hasOwnProperty.call(message, "pinInChatMessage"))
                $root.E2E.Message.PinInChatMessage.encode(message.pinInChatMessage, writer.uint32(/* id 63, wireType 2 =*/506).fork()).ldelim();
            if (message.pollCreationMessageV3 != null && Object.hasOwnProperty.call(message, "pollCreationMessageV3"))
                $root.E2E.Message.PollCreationMessage.encode(message.pollCreationMessageV3, writer.uint32(/* id 64, wireType 2 =*/514).fork()).ldelim();
            if (message.scheduledCallEditMessage != null && Object.hasOwnProperty.call(message, "scheduledCallEditMessage"))
                $root.E2E.Message.ScheduledCallEditMessage.encode(message.scheduledCallEditMessage, writer.uint32(/* id 65, wireType 2 =*/522).fork()).ldelim();
            if (message.ptvMessage != null && Object.hasOwnProperty.call(message, "ptvMessage"))
                $root.E2E.Message.VideoMessage.encode(message.ptvMessage, writer.uint32(/* id 66, wireType 2 =*/530).fork()).ldelim();
            if (message.botInvokeMessage != null && Object.hasOwnProperty.call(message, "botInvokeMessage"))
                $root.E2E.Message.FutureProofMessage.encode(message.botInvokeMessage, writer.uint32(/* id 67, wireType 2 =*/538).fork()).ldelim();
            if (message.callLogMesssage != null && Object.hasOwnProperty.call(message, "callLogMesssage"))
                $root.E2E.Message.CallLogMessage.encode(message.callLogMesssage, writer.uint32(/* id 69, wireType 2 =*/554).fork()).ldelim();
            if (message.messageHistoryBundle != null && Object.hasOwnProperty.call(message, "messageHistoryBundle"))
                $root.E2E.Message.MessageHistoryBundle.encode(message.messageHistoryBundle, writer.uint32(/* id 70, wireType 2 =*/562).fork()).ldelim();
            if (message.encCommentMessage != null && Object.hasOwnProperty.call(message, "encCommentMessage"))
                $root.E2E.Message.EncCommentMessage.encode(message.encCommentMessage, writer.uint32(/* id 71, wireType 2 =*/570).fork()).ldelim();
            if (message.bcallMessage != null && Object.hasOwnProperty.call(message, "bcallMessage"))
                $root.E2E.Message.BCallMessage.encode(message.bcallMessage, writer.uint32(/* id 72, wireType 2 =*/578).fork()).ldelim();
            if (message.lottieStickerMessage != null && Object.hasOwnProperty.call(message, "lottieStickerMessage"))
                $root.E2E.Message.FutureProofMessage.encode(message.lottieStickerMessage, writer.uint32(/* id 74, wireType 2 =*/594).fork()).ldelim();
            if (message.eventMessage != null && Object.hasOwnProperty.call(message, "eventMessage"))
                $root.E2E.Message.EventMessage.encode(message.eventMessage, writer.uint32(/* id 75, wireType 2 =*/602).fork()).ldelim();
            if (message.encEventResponseMessage != null && Object.hasOwnProperty.call(message, "encEventResponseMessage"))
                $root.E2E.Message.EncEventResponseMessage.encode(message.encEventResponseMessage, writer.uint32(/* id 76, wireType 2 =*/610).fork()).ldelim();
            if (message.commentMessage != null && Object.hasOwnProperty.call(message, "commentMessage"))
                $root.E2E.Message.CommentMessage.encode(message.commentMessage, writer.uint32(/* id 77, wireType 2 =*/618).fork()).ldelim();
            if (message.newsletterAdminInviteMessage != null && Object.hasOwnProperty.call(message, "newsletterAdminInviteMessage"))
                $root.E2E.Message.NewsletterAdminInviteMessage.encode(message.newsletterAdminInviteMessage, writer.uint32(/* id 78, wireType 2 =*/626).fork()).ldelim();
            if (message.placeholderMessage != null && Object.hasOwnProperty.call(message, "placeholderMessage"))
                $root.E2E.Message.PlaceholderMessage.encode(message.placeholderMessage, writer.uint32(/* id 80, wireType 2 =*/642).fork()).ldelim();
            if (message.secretEncryptedMessage != null && Object.hasOwnProperty.call(message, "secretEncryptedMessage"))
                $root.E2E.Message.SecretEncryptedMessage.encode(message.secretEncryptedMessage, writer.uint32(/* id 82, wireType 2 =*/658).fork()).ldelim();
            if (message.albumMessage != null && Object.hasOwnProperty.call(message, "albumMessage"))
                $root.E2E.Message.AlbumMessage.encode(message.albumMessage, writer.uint32(/* id 83, wireType 2 =*/666).fork()).ldelim();
            if (message.eventCoverImage != null && Object.hasOwnProperty.call(message, "eventCoverImage"))
                $root.E2E.Message.FutureProofMessage.encode(message.eventCoverImage, writer.uint32(/* id 85, wireType 2 =*/682).fork()).ldelim();
            if (message.stickerPackMessage != null && Object.hasOwnProperty.call(message, "stickerPackMessage"))
                $root.E2E.Message.StickerPackMessage.encode(message.stickerPackMessage, writer.uint32(/* id 86, wireType 2 =*/690).fork()).ldelim();
            if (message.statusMentionMessage != null && Object.hasOwnProperty.call(message, "statusMentionMessage"))
                $root.E2E.Message.FutureProofMessage.encode(message.statusMentionMessage, writer.uint32(/* id 87, wireType 2 =*/698).fork()).ldelim();
            if (message.pollResultSnapshotMessage != null && Object.hasOwnProperty.call(message, "pollResultSnapshotMessage"))
                $root.E2E.Message.PollResultSnapshotMessage.encode(message.pollResultSnapshotMessage, writer.uint32(/* id 88, wireType 2 =*/706).fork()).ldelim();
            if (message.pollCreationOptionImageMessage != null && Object.hasOwnProperty.call(message, "pollCreationOptionImageMessage"))
                $root.E2E.Message.FutureProofMessage.encode(message.pollCreationOptionImageMessage, writer.uint32(/* id 90, wireType 2 =*/722).fork()).ldelim();
            if (message.associatedChildMessage != null && Object.hasOwnProperty.call(message, "associatedChildMessage"))
                $root.E2E.Message.FutureProofMessage.encode(message.associatedChildMessage, writer.uint32(/* id 91, wireType 2 =*/730).fork()).ldelim();
            if (message.groupStatusMentionMessage != null && Object.hasOwnProperty.call(message, "groupStatusMentionMessage"))
                $root.E2E.Message.FutureProofMessage.encode(message.groupStatusMentionMessage, writer.uint32(/* id 92, wireType 2 =*/738).fork()).ldelim();
            if (message.pollCreationMessageV4 != null && Object.hasOwnProperty.call(message, "pollCreationMessageV4"))
                $root.E2E.Message.FutureProofMessage.encode(message.pollCreationMessageV4, writer.uint32(/* id 93, wireType 2 =*/746).fork()).ldelim();
            if (message.statusAddYours != null && Object.hasOwnProperty.call(message, "statusAddYours"))
                $root.E2E.Message.FutureProofMessage.encode(message.statusAddYours, writer.uint32(/* id 95, wireType 2 =*/762).fork()).ldelim();
            if (message.groupStatusMessage != null && Object.hasOwnProperty.call(message, "groupStatusMessage"))
                $root.E2E.Message.FutureProofMessage.encode(message.groupStatusMessage, writer.uint32(/* id 96, wireType 2 =*/770).fork()).ldelim();
            if (message.richResponseMessage != null && Object.hasOwnProperty.call(message, "richResponseMessage"))
                $root.E2E.AIRichResponseMessage.encode(message.richResponseMessage, writer.uint32(/* id 97, wireType 2 =*/778).fork()).ldelim();
            if (message.statusNotificationMessage != null && Object.hasOwnProperty.call(message, "statusNotificationMessage"))
                $root.E2E.Message.StatusNotificationMessage.encode(message.statusNotificationMessage, writer.uint32(/* id 98, wireType 2 =*/786).fork()).ldelim();
            if (message.limitSharingMessage != null && Object.hasOwnProperty.call(message, "limitSharingMessage"))
                $root.E2E.Message.FutureProofMessage.encode(message.limitSharingMessage, writer.uint32(/* id 99, wireType 2 =*/794).fork()).ldelim();
            if (message.botTaskMessage != null && Object.hasOwnProperty.call(message, "botTaskMessage"))
                $root.E2E.Message.FutureProofMessage.encode(message.botTaskMessage, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim();
            if (message.questionMessage != null && Object.hasOwnProperty.call(message, "questionMessage"))
                $root.E2E.Message.FutureProofMessage.encode(message.questionMessage, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim();
            if (message.messageHistoryNotice != null && Object.hasOwnProperty.call(message, "messageHistoryNotice"))
                $root.E2E.Message.MessageHistoryNotice.encode(message.messageHistoryNotice, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim();
            if (message.groupStatusMessageV2 != null && Object.hasOwnProperty.call(message, "groupStatusMessageV2"))
                $root.E2E.Message.FutureProofMessage.encode(message.groupStatusMessageV2, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim();
            if (message.botForwardedMessage != null && Object.hasOwnProperty.call(message, "botForwardedMessage"))
                $root.E2E.Message.FutureProofMessage.encode(message.botForwardedMessage, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim();
            if (message.statusQuestionAnswerMessage != null && Object.hasOwnProperty.call(message, "statusQuestionAnswerMessage"))
                $root.E2E.Message.StatusQuestionAnswerMessage.encode(message.statusQuestionAnswerMessage, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim();
            if (message.questionReplyMessage != null && Object.hasOwnProperty.call(message, "questionReplyMessage"))
                $root.E2E.Message.FutureProofMessage.encode(message.questionReplyMessage, writer.uint32(/* id 106, wireType 2 =*/850).fork()).ldelim();
            if (message.questionResponseMessage != null && Object.hasOwnProperty.call(message, "questionResponseMessage"))
                $root.E2E.Message.QuestionResponseMessage.encode(message.questionResponseMessage, writer.uint32(/* id 107, wireType 2 =*/858).fork()).ldelim();
            if (message.statusQuotedMessage != null && Object.hasOwnProperty.call(message, "statusQuotedMessage"))
                $root.E2E.Message.StatusQuotedMessage.encode(message.statusQuotedMessage, writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim();
            if (message.statusStickerInteractionMessage != null && Object.hasOwnProperty.call(message, "statusStickerInteractionMessage"))
                $root.E2E.Message.StatusStickerInteractionMessage.encode(message.statusStickerInteractionMessage, writer.uint32(/* id 110, wireType 2 =*/882).fork()).ldelim();
            if (message.pollCreationMessageV5 != null && Object.hasOwnProperty.call(message, "pollCreationMessageV5"))
                $root.E2E.Message.PollCreationMessage.encode(message.pollCreationMessageV5, writer.uint32(/* id 111, wireType 2 =*/890).fork()).ldelim();
            if (message.newsletterFollowerInviteMessageV2 != null && Object.hasOwnProperty.call(message, "newsletterFollowerInviteMessageV2"))
                $root.E2E.Message.NewsletterFollowerInviteMessage.encode(message.newsletterFollowerInviteMessageV2, writer.uint32(/* id 113, wireType 2 =*/906).fork()).ldelim();
            if (message.pollResultSnapshotMessageV3 != null && Object.hasOwnProperty.call(message, "pollResultSnapshotMessageV3"))
                $root.E2E.Message.PollResultSnapshotMessage.encode(message.pollResultSnapshotMessageV3, writer.uint32(/* id 115, wireType 2 =*/922).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified Message message, length delimited. Does not implicitly {@link E2E.Message.verify|verify} messages.
         * @function encodeDelimited
         * @memberof E2E.Message
         * @static
         * @param {E2E.IMessage} message Message message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Message.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Message message from the specified reader or buffer.
         * @function decode
         * @memberof E2E.Message
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {E2E.Message} Message
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Message.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.E2E.Message();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.conversation = reader.string();
                        break;
                    }
                case 2: {
                        message.senderKeyDistributionMessage = $root.E2E.Message.SenderKeyDistributionMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 3: {
                        message.imageMessage = $root.E2E.Message.ImageMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 4: {
                        message.contactMessage = $root.E2E.Message.ContactMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 5: {
                        message.locationMessage = $root.E2E.Message.LocationMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 6: {
                        message.extendedTextMessage = $root.E2E.Message.ExtendedTextMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 7: {
                        message.documentMessage = $root.E2E.Message.DocumentMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 8: {
                        message.audioMessage = $root.E2E.Message.AudioMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 9: {
                        message.videoMessage = $root.E2E.Message.VideoMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 10: {
                        message.call = $root.E2E.Message.Call.decode(reader, reader.uint32());
                        break;
                    }
                case 11: {
                        message.chat = $root.E2E.Message.Chat.decode(reader, reader.uint32());
                        break;
                    }
                case 12: {
                        message.protocolMessage = $root.E2E.Message.ProtocolMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 13: {
                        message.contactsArrayMessage = $root.E2E.Message.ContactsArrayMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 14: {
                        message.highlyStructuredMessage = $root.E2E.Message.HighlyStructuredMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 15: {
                        message.fastRatchetKeySenderKeyDistributionMessage = $root.E2E.Message.SenderKeyDistributionMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 16: {
                        message.sendPaymentMessage = $root.E2E.Message.SendPaymentMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 18: {
                        message.liveLocationMessage = $root.E2E.Message.LiveLocationMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 22: {
                        message.requestPaymentMessage = $root.E2E.Message.RequestPaymentMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 23: {
                        message.declinePaymentRequestMessage = $root.E2E.Message.DeclinePaymentRequestMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 24: {
                        message.cancelPaymentRequestMessage = $root.E2E.Message.CancelPaymentRequestMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 25: {
                        message.templateMessage = $root.E2E.Message.TemplateMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 26: {
                        message.stickerMessage = $root.E2E.Message.StickerMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 28: {
                        message.groupInviteMessage = $root.E2E.Message.GroupInviteMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 29: {
                        message.templateButtonReplyMessage = $root.E2E.Message.TemplateButtonReplyMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 30: {
                        message.productMessage = $root.E2E.Message.ProductMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 31: {
                        message.deviceSentMessage = $root.E2E.Message.DeviceSentMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 35: {
                        message.messageContextInfo = $root.E2E.MessageContextInfo.decode(reader, reader.uint32());
                        break;
                    }
                case 36: {
                        message.listMessage = $root.E2E.Message.ListMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 37: {
                        message.viewOnceMessage = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 38: {
                        message.orderMessage = $root.E2E.Message.OrderMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 39: {
                        message.listResponseMessage = $root.E2E.Message.ListResponseMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 40: {
                        message.ephemeralMessage = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 41: {
                        message.invoiceMessage = $root.E2E.Message.InvoiceMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 42: {
                        message.buttonsMessage = $root.E2E.Message.ButtonsMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 43: {
                        message.buttonsResponseMessage = $root.E2E.Message.ButtonsResponseMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 44: {
                        message.paymentInviteMessage = $root.E2E.Message.PaymentInviteMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 45: {
                        message.interactiveMessage = $root.E2E.Message.InteractiveMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 46: {
                        message.reactionMessage = $root.E2E.Message.ReactionMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 47: {
                        message.stickerSyncRmrMessage = $root.E2E.Message.StickerSyncRMRMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 48: {
                        message.interactiveResponseMessage = $root.E2E.Message.InteractiveResponseMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 49: {
                        message.pollCreationMessage = $root.E2E.Message.PollCreationMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 50: {
                        message.pollUpdateMessage = $root.E2E.Message.PollUpdateMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 51: {
                        message.keepInChatMessage = $root.E2E.Message.KeepInChatMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 53: {
                        message.documentWithCaptionMessage = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 54: {
                        message.requestPhoneNumberMessage = $root.E2E.Message.RequestPhoneNumberMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 55: {
                        message.viewOnceMessageV2 = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 56: {
                        message.encReactionMessage = $root.E2E.Message.EncReactionMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 58: {
                        message.editedMessage = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 59: {
                        message.viewOnceMessageV2Extension = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 60: {
                        message.pollCreationMessageV2 = $root.E2E.Message.PollCreationMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 61: {
                        message.scheduledCallCreationMessage = $root.E2E.Message.ScheduledCallCreationMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 62: {
                        message.groupMentionedMessage = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 63: {
                        message.pinInChatMessage = $root.E2E.Message.PinInChatMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 64: {
                        message.pollCreationMessageV3 = $root.E2E.Message.PollCreationMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 65: {
                        message.scheduledCallEditMessage = $root.E2E.Message.ScheduledCallEditMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 66: {
                        message.ptvMessage = $root.E2E.Message.VideoMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 67: {
                        message.botInvokeMessage = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 69: {
                        message.callLogMesssage = $root.E2E.Message.CallLogMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 70: {
                        message.messageHistoryBundle = $root.E2E.Message.MessageHistoryBundle.decode(reader, reader.uint32());
                        break;
                    }
                case 71: {
                        message.encCommentMessage = $root.E2E.Message.EncCommentMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 72: {
                        message.bcallMessage = $root.E2E.Message.BCallMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 74: {
                        message.lottieStickerMessage = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 75: {
                        message.eventMessage = $root.E2E.Message.EventMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 76: {
                        message.encEventResponseMessage = $root.E2E.Message.EncEventResponseMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 77: {
                        message.commentMessage = $root.E2E.Message.CommentMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 78: {
                        message.newsletterAdminInviteMessage = $root.E2E.Message.NewsletterAdminInviteMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 80: {
                        message.placeholderMessage = $root.E2E.Message.PlaceholderMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 82: {
                        message.secretEncryptedMessage = $root.E2E.Message.SecretEncryptedMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 83: {
                        message.albumMessage = $root.E2E.Message.AlbumMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 85: {
                        message.eventCoverImage = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 86: {
                        message.stickerPackMessage = $root.E2E.Message.StickerPackMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 87: {
                        message.statusMentionMessage = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 88: {
                        message.pollResultSnapshotMessage = $root.E2E.Message.PollResultSnapshotMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 90: {
                        message.pollCreationOptionImageMessage = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 91: {
                        message.associatedChildMessage = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 92: {
                        message.groupStatusMentionMessage = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 93: {
                        message.pollCreationMessageV4 = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 95: {
                        message.statusAddYours = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 96: {
                        message.groupStatusMessage = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 97: {
                        message.richResponseMessage = $root.E2E.AIRichResponseMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 98: {
                        message.statusNotificationMessage = $root.E2E.Message.StatusNotificationMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 99: {
                        message.limitSharingMessage = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 100: {
                        message.botTaskMessage = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 101: {
                        message.questionMessage = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 102: {
                        message.messageHistoryNotice = $root.E2E.Message.MessageHistoryNotice.decode(reader, reader.uint32());
                        break;
                    }
                case 103: {
                        message.groupStatusMessageV2 = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 104: {
                        message.botForwardedMessage = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 105: {
                        message.statusQuestionAnswerMessage = $root.E2E.Message.StatusQuestionAnswerMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 106: {
                        message.questionReplyMessage = $root.E2E.Message.FutureProofMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 107: {
                        message.questionResponseMessage = $root.E2E.Message.QuestionResponseMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 109: {
                        message.statusQuotedMessage = $root.E2E.Message.StatusQuotedMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 110: {
                        message.statusStickerInteractionMessage = $root.E2E.Message.StatusStickerInteractionMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 111: {
                        message.pollCreationMessageV5 = $root.E2E.Message.PollCreationMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 113: {
                        message.newsletterFollowerInviteMessageV2 = $root.E2E.Message.NewsletterFollowerInviteMessage.decode(reader, reader.uint32());
                        break;
                    }
                case 115: {
                        message.pollResultSnapshotMessageV3 = $root.E2E.Message.PollResultSnapshotMessage.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Message message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof E2E.Message
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {E2E.Message} Message
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Message.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Message message.
         * @function verify
         * @memberof E2E.Message
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Message.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.conversation != null && message.hasOwnProperty("conversation")) {
                properties._conversation = 1;
                if (!$util.isString(message.conversation))
                    return "conversation: string expected";
            }
            if (message.senderKeyDistributionMessage != null && message.hasOwnProperty("senderKeyDistributionMessage")) {
                properties._senderKeyDistributionMessage = 1;
                {
                    var error = $root.E2E.Message.SenderKeyDistributionMessage.verify(message.senderKeyDistributionMessage);
                    if (error)
                        return "senderKeyDistributionMessage." + error;
                }
            }
            if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) {
                properties._imageMessage = 1;
                {
                    var error = $root.E2E.Message.ImageMessage.verify(message.imageMessage);
                    if (error)
                        return "imageMessage." + error;
                }
            }
            if (message.contactMessage != null && message.hasOwnProperty("contactMessage")) {
                properties._contactMessage = 1;
                {
                    var error = $root.E2E.Message.ContactMessage.verify(message.contactMessage);
                    if (error)
                        return "contactMessage." + error;
                }
            }
            if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) {
                properties._locationMessage = 1;
                {
                    var error = $root.E2E.Message.LocationMessage.verify(message.locationMessage);
                    if (error)
                        return "locationMessage." + error;
                }
            }
            if (message.extendedTextMessage != null && message.hasOwnProperty("extendedTextMessage")) {
                properties._extendedTextMessage = 1;
                {
                    var error = $root.E2E.Message.ExtendedTextMessage.verify(message.extendedTextMessage);
                    if (error)
                        return "extendedTextMessage." + error;
                }
            }
            if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) {
                properties._documentMessage = 1;
                {
                    var error = $root.E2E.Message.DocumentMessage.verify(message.documentMessage);
                    if (error)
                        return "documentMessage." + error;
                }
            }
            if (message.audioMessage != null && message.hasOwnProperty("audioMessage")) {
                properties._audioMessage = 1;
                {
                    var error = $root.E2E.Message.AudioMessage.verify(message.audioMessage);
                    if (error)
                        return "audioMessage." + error;
                }
            }
            if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) {
                properties._videoMessage = 1;
                {
                    var error = $root.E2E.Message.VideoMessage.verify(message.videoMessage);
                    if (error)
                        return "videoMessage." + error;
                }
            }
            if (message.call != null && message.hasOwnProperty("call")) {
                properties._call = 1;
                {
                    var error = $root.E2E.Message.Call.verify(message.call);
                    if (error)
                        return "call." + error;
                }
            }
            if (message.chat != null && message.hasOwnProperty("chat")) {
                properties._chat = 1;
                {
                    var error = $root.E2E.Message.Chat.verify(message.chat);
                    if (error)
                        return "chat." + error;
                }
            }
            if (message.protocolMessage != null && message.hasOwnProperty("protocolMessage")) {
                properties._protocolMessage = 1;
                {
                    var error = $root.E2E.Message.ProtocolMessage.verify(message.protocolMessage);
                    if (error)
                        return "protocolMessage." + error;
                }
            }
            if (message.contactsArrayMessage != null && message.hasOwnProperty("contactsArrayMessage")) {
                properties._contactsArrayMessage = 1;
                {
                    var error = $root.E2E.Message.ContactsArrayMessage.verify(message.contactsArrayMessage);
                    if (error)
                        return "contactsArrayMessage." + error;
                }
            }
            if (message.highlyStructuredMessage != null && message.hasOwnProperty("highlyStructuredMessage")) {
                properties._highlyStructuredMessage = 1;
                {
                    var error = $root.E2E.Message.HighlyStructuredMessage.verify(message.highlyStructuredMessage);
                    if (error)
                        return "highlyStructuredMessage." + error;
                }
            }
            if (message.fastRatchetKeySenderKeyDistributionMessage != null && message.hasOwnProperty("fastRatchetKeySenderKeyDistributionMessage")) {
                properties._fastRatchetKeySenderKeyDistributionMessage = 1;
                {
                    var error = $root.E2E.Message.SenderKeyDistributionMessage.verify(message.fastRatchetKeySenderKeyDistributionMessage);
                    if (error)
                        return "fastRatchetKeySenderKeyDistributionMessage." + error;
                }
            }
            if (message.sendPaymentMessage != null && message.hasOwnProperty("sendPaymentMessage")) {
                properties._sendPaymentMessage = 1;
                {
                    var error = $root.E2E.Message.SendPaymentMessage.verify(message.sendPaymentMessage);
                    if (error)
                        return "sendPaymentMessage." + error;
                }
            }
            if (message.liveLocationMessage != null && message.hasOwnProperty("liveLocationMessage")) {
                properties._liveLocationMessage = 1;
                {
                    var error = $root.E2E.Message.LiveLocationMessage.verify(message.liveLocationMessage);
                    if (error)
                        return "liveLocationMessage." + error;
                }
            }
            if (message.requestPaymentMessage != null && message.hasOwnProperty("requestPaymentMessage")) {
                properties._requestPaymentMessage = 1;
                {
                    var error = $root.E2E.Message.RequestPaymentMessage.verify(message.requestPaymentMessage);
                    if (error)
                        return "requestPaymentMessage." + error;
                }
            }
            if (message.declinePaymentRequestMessage != null && message.hasOwnProperty("declinePaymentRequestMessage")) {
                properties._declinePaymentRequestMessage = 1;
                {
                    var error = $root.E2E.Message.DeclinePaymentRequestMessage.verify(message.declinePaymentRequestMessage);
                    if (error)
                        return "declinePaymentRequestMessage." + error;
                }
            }
            if (message.cancelPaymentRequestMessage != null && message.hasOwnProperty("cancelPaymentRequestMessage")) {
                properties._cancelPaymentRequestMessage = 1;
                {
                    var error = $root.E2E.Message.CancelPaymentRequestMessage.verify(message.cancelPaymentRequestMessage);
                    if (error)
                        return "cancelPaymentRequestMessage." + error;
                }
            }
            if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) {
                properties._templateMessage = 1;
                {
                    var error = $root.E2E.Message.TemplateMessage.verify(message.templateMessage);
                    if (error)
                        return "templateMessage." + error;
                }
            }
            if (message.stickerMessage != null && message.hasOwnProperty("stickerMessage")) {
                properties._stickerMessage = 1;
                {
                    var error = $root.E2E.Message.StickerMessage.verify(message.stickerMessage);
                    if (error)
                        return "stickerMessage." + error;
                }
            }
            if (message.groupInviteMessage != null && message.hasOwnProperty("groupInviteMessage")) {
                properties._groupInviteMessage = 1;
                {
                    var error = $root.E2E.Message.GroupInviteMessage.verify(message.groupInviteMessage);
                    if (error)
                        return "groupInviteMessage." + error;
                }
            }
            if (message.templateButtonReplyMessage != null && message.hasOwnProperty("templateButtonReplyMessage")) {
                properties._templateButtonReplyMessage = 1;
                {
                    var error = $root.E2E.Message.TemplateButtonReplyMessage.verify(message.templateButtonReplyMessage);
                    if (error)
                        return "templateButtonReplyMessage." + error;
                }
            }
            if (message.productMessage != null && message.hasOwnProperty("productMessage")) {
                properties._productMessage = 1;
                {
                    var error = $root.E2E.Message.ProductMessage.verify(message.productMessage);
                    if (error)
                        return "productMessage." + error;
                }
            }
            if (message.deviceSentMessage != null && message.hasOwnProperty("deviceSentMessage")) {
                properties._deviceSentMessage = 1;
                {
                    var error = $root.E2E.Message.DeviceSentMessage.verify(message.deviceSentMessage);
                    if (error)
                        return "deviceSentMessage." + error;
                }
            }
            if (message.messageContextInfo != null && message.hasOwnProperty("messageContextInfo")) {
                properties._messageContextInfo = 1;
                {
                    var error = $root.E2E.MessageContextInfo.verify(message.messageContextInfo);
                    if (error)
                        return "messageContextInfo." + error;
                }
            }
            if (message.listMessage != null && message.hasOwnProperty("listMessage")) {
                properties._listMessage = 1;
                {
                    var error = $root.E2E.Message.ListMessage.verify(message.listMessage);
                    if (error)
                        return "listMessage." + error;
                }
            }
            if (message.viewOnceMessage != null && message.hasOwnProperty("viewOnceMessage")) {
                properties._viewOnceMessage = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.viewOnceMessage);
                    if (error)
                        return "viewOnceMessage." + error;
                }
            }
            if (message.orderMessage != null && message.hasOwnProperty("orderMessage")) {
                properties._orderMessage = 1;
                {
                    var error = $root.E2E.Message.OrderMessage.verify(message.orderMessage);
                    if (error)
                        return "orderMessage." + error;
                }
            }
            if (message.listResponseMessage != null && message.hasOwnProperty("listResponseMessage")) {
                properties._listResponseMessage = 1;
                {
                    var error = $root.E2E.Message.ListResponseMessage.verify(message.listResponseMessage);
                    if (error)
                        return "listResponseMessage." + error;
                }
            }
            if (message.ephemeralMessage != null && message.hasOwnProperty("ephemeralMessage")) {
                properties._ephemeralMessage = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.ephemeralMessage);
                    if (error)
                        return "ephemeralMessage." + error;
                }
            }
            if (message.invoiceMessage != null && message.hasOwnProperty("invoiceMessage")) {
                properties._invoiceMessage = 1;
                {
                    var error = $root.E2E.Message.InvoiceMessage.verify(message.invoiceMessage);
                    if (error)
                        return "invoiceMessage." + error;
                }
            }
            if (message.buttonsMessage != null && message.hasOwnProperty("buttonsMessage")) {
                properties._buttonsMessage = 1;
                {
                    var error = $root.E2E.Message.ButtonsMessage.verify(message.buttonsMessage);
                    if (error)
                        return "buttonsMessage." + error;
                }
            }
            if (message.buttonsResponseMessage != null && message.hasOwnProperty("buttonsResponseMessage")) {
                properties._buttonsResponseMessage = 1;
                {
                    var error = $root.E2E.Message.ButtonsResponseMessage.verify(message.buttonsResponseMessage);
                    if (error)
                        return "buttonsResponseMessage." + error;
                }
            }
            if (message.paymentInviteMessage != null && message.hasOwnProperty("paymentInviteMessage")) {
                properties._paymentInviteMessage = 1;
                {
                    var error = $root.E2E.Message.PaymentInviteMessage.verify(message.paymentInviteMessage);
                    if (error)
                        return "paymentInviteMessage." + error;
                }
            }
            if (message.interactiveMessage != null && message.hasOwnProperty("interactiveMessage")) {
                properties._interactiveMessage = 1;
                {
                    var error = $root.E2E.Message.InteractiveMessage.verify(message.interactiveMessage);
                    if (error)
                        return "interactiveMessage." + error;
                }
            }
            if (message.reactionMessage != null && message.hasOwnProperty("reactionMessage")) {
                properties._reactionMessage = 1;
                {
                    var error = $root.E2E.Message.ReactionMessage.verify(message.reactionMessage);
                    if (error)
                        return "reactionMessage." + error;
                }
            }
            if (message.stickerSyncRmrMessage != null && message.hasOwnProperty("stickerSyncRmrMessage")) {
                properties._stickerSyncRmrMessage = 1;
                {
                    var error = $root.E2E.Message.StickerSyncRMRMessage.verify(message.stickerSyncRmrMessage);
                    if (error)
                        return "stickerSyncRmrMessage." + error;
                }
            }
            if (message.interactiveResponseMessage != null && message.hasOwnProperty("interactiveResponseMessage")) {
                properties._interactiveResponseMessage = 1;
                {
                    var error = $root.E2E.Message.InteractiveResponseMessage.verify(message.interactiveResponseMessage);
                    if (error)
                        return "interactiveResponseMessage." + error;
                }
            }
            if (message.pollCreationMessage != null && message.hasOwnProperty("pollCreationMessage")) {
                properties._pollCreationMessage = 1;
                {
                    var error = $root.E2E.Message.PollCreationMessage.verify(message.pollCreationMessage);
                    if (error)
                        return "pollCreationMessage." + error;
                }
            }
            if (message.pollUpdateMessage != null && message.hasOwnProperty("pollUpdateMessage")) {
                properties._pollUpdateMessage = 1;
                {
                    var error = $root.E2E.Message.PollUpdateMessage.verify(message.pollUpdateMessage);
                    if (error)
                        return "pollUpdateMessage." + error;
                }
            }
            if (message.keepInChatMessage != null && message.hasOwnProperty("keepInChatMessage")) {
                properties._keepInChatMessage = 1;
                {
                    var error = $root.E2E.Message.KeepInChatMessage.verify(message.keepInChatMessage);
                    if (error)
                        return "keepInChatMessage." + error;
                }
            }
            if (message.documentWithCaptionMessage != null && message.hasOwnProperty("documentWithCaptionMessage")) {
                properties._documentWithCaptionMessage = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.documentWithCaptionMessage);
                    if (error)
                        return "documentWithCaptionMessage." + error;
                }
            }
            if (message.requestPhoneNumberMessage != null && message.hasOwnProperty("requestPhoneNumberMessage")) {
                properties._requestPhoneNumberMessage = 1;
                {
                    var error = $root.E2E.Message.RequestPhoneNumberMessage.verify(message.requestPhoneNumberMessage);
                    if (error)
                        return "requestPhoneNumberMessage." + error;
                }
            }
            if (message.viewOnceMessageV2 != null && message.hasOwnProperty("viewOnceMessageV2")) {
                properties._viewOnceMessageV2 = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.viewOnceMessageV2);
                    if (error)
                        return "viewOnceMessageV2." + error;
                }
            }
            if (message.encReactionMessage != null && message.hasOwnProperty("encReactionMessage")) {
                properties._encReactionMessage = 1;
                {
                    var error = $root.E2E.Message.EncReactionMessage.verify(message.encReactionMessage);
                    if (error)
                        return "encReactionMessage." + error;
                }
            }
            if (message.editedMessage != null && message.hasOwnProperty("editedMessage")) {
                properties._editedMessage = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.editedMessage);
                    if (error)
                        return "editedMessage." + error;
                }
            }
            if (message.viewOnceMessageV2Extension != null && message.hasOwnProperty("viewOnceMessageV2Extension")) {
                properties._viewOnceMessageV2Extension = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.viewOnceMessageV2Extension);
                    if (error)
                        return "viewOnceMessageV2Extension." + error;
                }
            }
            if (message.pollCreationMessageV2 != null && message.hasOwnProperty("pollCreationMessageV2")) {
                properties._pollCreationMessageV2 = 1;
                {
                    var error = $root.E2E.Message.PollCreationMessage.verify(message.pollCreationMessageV2);
                    if (error)
                        return "pollCreationMessageV2." + error;
                }
            }
            if (message.scheduledCallCreationMessage != null && message.hasOwnProperty("scheduledCallCreationMessage")) {
                properties._scheduledCallCreationMessage = 1;
                {
                    var error = $root.E2E.Message.ScheduledCallCreationMessage.verify(message.scheduledCallCreationMessage);
                    if (error)
                        return "scheduledCallCreationMessage." + error;
                }
            }
            if (message.groupMentionedMessage != null && message.hasOwnProperty("groupMentionedMessage")) {
                properties._groupMentionedMessage = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.groupMentionedMessage);
                    if (error)
                        return "groupMentionedMessage." + error;
                }
            }
            if (message.pinInChatMessage != null && message.hasOwnProperty("pinInChatMessage")) {
                properties._pinInChatMessage = 1;
                {
                    var error = $root.E2E.Message.PinInChatMessage.verify(message.pinInChatMessage);
                    if (error)
                        return "pinInChatMessage." + error;
                }
            }
            if (message.pollCreationMessageV3 != null && message.hasOwnProperty("pollCreationMessageV3")) {
                properties._pollCreationMessageV3 = 1;
                {
                    var error = $root.E2E.Message.PollCreationMessage.verify(message.pollCreationMessageV3);
                    if (error)
                        return "pollCreationMessageV3." + error;
                }
            }
            if (message.scheduledCallEditMessage != null && message.hasOwnProperty("scheduledCallEditMessage")) {
                properties._scheduledCallEditMessage = 1;
                {
                    var error = $root.E2E.Message.ScheduledCallEditMessage.verify(message.scheduledCallEditMessage);
                    if (error)
                        return "scheduledCallEditMessage." + error;
                }
            }
            if (message.ptvMessage != null && message.hasOwnProperty("ptvMessage")) {
                properties._ptvMessage = 1;
                {
                    var error = $root.E2E.Message.VideoMessage.verify(message.ptvMessage);
                    if (error)
                        return "ptvMessage." + error;
                }
            }
            if (message.botInvokeMessage != null && message.hasOwnProperty("botInvokeMessage")) {
                properties._botInvokeMessage = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.botInvokeMessage);
                    if (error)
                        return "botInvokeMessage." + error;
                }
            }
            if (message.callLogMesssage != null && message.hasOwnProperty("callLogMesssage")) {
                properties._callLogMesssage = 1;
                {
                    var error = $root.E2E.Message.CallLogMessage.verify(message.callLogMesssage);
                    if (error)
                        return "callLogMesssage." + error;
                }
            }
            if (message.messageHistoryBundle != null && message.hasOwnProperty("messageHistoryBundle")) {
                properties._messageHistoryBundle = 1;
                {
                    var error = $root.E2E.Message.MessageHistoryBundle.verify(message.messageHistoryBundle);
                    if (error)
                        return "messageHistoryBundle." + error;
                }
            }
            if (message.encCommentMessage != null && message.hasOwnProperty("encCommentMessage")) {
                properties._encCommentMessage = 1;
                {
                    var error = $root.E2E.Message.EncCommentMessage.verify(message.encCommentMessage);
                    if (error)
                        return "encCommentMessage." + error;
                }
            }
            if (message.bcallMessage != null && message.hasOwnProperty("bcallMessage")) {
                properties._bcallMessage = 1;
                {
                    var error = $root.E2E.Message.BCallMessage.verify(message.bcallMessage);
                    if (error)
                        return "bcallMessage." + error;
                }
            }
            if (message.lottieStickerMessage != null && message.hasOwnProperty("lottieStickerMessage")) {
                properties._lottieStickerMessage = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.lottieStickerMessage);
                    if (error)
                        return "lottieStickerMessage." + error;
                }
            }
            if (message.eventMessage != null && message.hasOwnProperty("eventMessage")) {
                properties._eventMessage = 1;
                {
                    var error = $root.E2E.Message.EventMessage.verify(message.eventMessage);
                    if (error)
                        return "eventMessage." + error;
                }
            }
            if (message.encEventResponseMessage != null && message.hasOwnProperty("encEventResponseMessage")) {
                properties._encEventResponseMessage = 1;
                {
                    var error = $root.E2E.Message.EncEventResponseMessage.verify(message.encEventResponseMessage);
                    if (error)
                        return "encEventResponseMessage." + error;
                }
            }
            if (message.commentMessage != null && message.hasOwnProperty("commentMessage")) {
                properties._commentMessage = 1;
                {
                    var error = $root.E2E.Message.CommentMessage.verify(message.commentMessage);
                    if (error)
                        return "commentMessage." + error;
                }
            }
            if (message.newsletterAdminInviteMessage != null && message.hasOwnProperty("newsletterAdminInviteMessage")) {
                properties._newsletterAdminInviteMessage = 1;
                {
                    var error = $root.E2E.Message.NewsletterAdminInviteMessage.verify(message.newsletterAdminInviteMessage);
                    if (error)
                        return "newsletterAdminInviteMessage." + error;
                }
            }
            if (message.placeholderMessage != null && message.hasOwnProperty("placeholderMessage")) {
                properties._placeholderMessage = 1;
                {
                    var error = $root.E2E.Message.PlaceholderMessage.verify(message.placeholderMessage);
                    if (error)
                        return "placeholderMessage." + error;
                }
            }
            if (message.secretEncryptedMessage != null && message.hasOwnProperty("secretEncryptedMessage")) {
                properties._secretEncryptedMessage = 1;
                {
                    var error = $root.E2E.Message.SecretEncryptedMessage.verify(message.secretEncryptedMessage);
                    if (error)
                        return "secretEncryptedMessage." + error;
                }
            }
            if (message.albumMessage != null && message.hasOwnProperty("albumMessage")) {
                properties._albumMessage = 1;
                {
                    var error = $root.E2E.Message.AlbumMessage.verify(message.albumMessage);
                    if (error)
                        return "albumMessage." + error;
                }
            }
            if (message.eventCoverImage != null && message.hasOwnProperty("eventCoverImage")) {
                properties._eventCoverImage = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.eventCoverImage);
                    if (error)
                        return "eventCoverImage." + error;
                }
            }
            if (message.stickerPackMessage != null && message.hasOwnProperty("stickerPackMessage")) {
                properties._stickerPackMessage = 1;
                {
                    var error = $root.E2E.Message.StickerPackMessage.verify(message.stickerPackMessage);
                    if (error)
                        return "stickerPackMessage." + error;
                }
            }
            if (message.statusMentionMessage != null && message.hasOwnProperty("statusMentionMessage")) {
                properties._statusMentionMessage = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.statusMentionMessage);
                    if (error)
                        return "statusMentionMessage." + error;
                }
            }
            if (message.pollResultSnapshotMessage != null && message.hasOwnProperty("pollResultSnapshotMessage")) {
                properties._pollResultSnapshotMessage = 1;
                {
                    var error = $root.E2E.Message.PollResultSnapshotMessage.verify(message.pollResultSnapshotMessage);
                    if (error)
                        return "pollResultSnapshotMessage." + error;
                }
            }
            if (message.pollCreationOptionImageMessage != null && message.hasOwnProperty("pollCreationOptionImageMessage")) {
                properties._pollCreationOptionImageMessage = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.pollCreationOptionImageMessage);
                    if (error)
                        return "pollCreationOptionImageMessage." + error;
                }
            }
            if (message.associatedChildMessage != null && message.hasOwnProperty("associatedChildMessage")) {
                properties._associatedChildMessage = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.associatedChildMessage);
                    if (error)
                        return "associatedChildMessage." + error;
                }
            }
            if (message.groupStatusMentionMessage != null && message.hasOwnProperty("groupStatusMentionMessage")) {
                properties._groupStatusMentionMessage = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.groupStatusMentionMessage);
                    if (error)
                        return "groupStatusMentionMessage." + error;
                }
            }
            if (message.pollCreationMessageV4 != null && message.hasOwnProperty("pollCreationMessageV4")) {
                properties._pollCreationMessageV4 = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.pollCreationMessageV4);
                    if (error)
                        return "pollCreationMessageV4." + error;
                }
            }
            if (message.statusAddYours != null && message.hasOwnProperty("statusAddYours")) {
                properties._statusAddYours = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.statusAddYours);
                    if (error)
                        return "statusAddYours." + error;
                }
            }
            if (message.groupStatusMessage != null && message.hasOwnProperty("groupStatusMessage")) {
                properties._groupStatusMessage = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.groupStatusMessage);
                    if (error)
                        return "groupStatusMessage." + error;
                }
            }
            if (message.richResponseMessage != null && message.hasOwnProperty("richResponseMessage")) {
                properties._richResponseMessage = 1;
                {
                    var error = $root.E2E.AIRichResponseMessage.verify(message.richResponseMessage);
                    if (error)
                        return "richResponseMessage." + error;
                }
            }
            if (message.statusNotificationMessage != null && message.hasOwnProperty("statusNotificationMessage")) {
                properties._statusNotificationMessage = 1;
                {
                    var error = $root.E2E.Message.StatusNotificationMessage.verify(message.statusNotificationMessage);
                    if (error)
                        return "statusNotificationMessage." + error;
                }
            }
            if (message.limitSharingMessage != null && message.hasOwnProperty("limitSharingMessage")) {
                properties._limitSharingMessage = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.limitSharingMessage);
                    if (error)
                        return "limitSharingMessage." + error;
                }
            }
            if (message.botTaskMessage != null && message.hasOwnProperty("botTaskMessage")) {
                properties._botTaskMessage = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.botTaskMessage);
                    if (error)
                        return "botTaskMessage." + error;
                }
            }
            if (message.questionMessage != null && message.hasOwnProperty("questionMessage")) {
                properties._questionMessage = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.questionMessage);
                    if (error)
                        return "questionMessage." + error;
                }
            }
            if (message.messageHistoryNotice != null && message.hasOwnProperty("messageHistoryNotice")) {
                properties._messageHistoryNotice = 1;
                {
                    var error = $root.E2E.Message.MessageHistoryNotice.verify(message.messageHistoryNotice);
                    if (error)
                        return "messageHistoryNotice." + error;
                }
            }
            if (message.groupStatusMessageV2 != null && message.hasOwnProperty("groupStatusMessageV2")) {
                properties._groupStatusMessageV2 = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.groupStatusMessageV2);
                    if (error)
                        return "groupStatusMessageV2." + error;
                }
            }
            if (message.botForwardedMessage != null && message.hasOwnProperty("botForwardedMessage")) {
                properties._botForwardedMessage = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.botForwardedMessage);
                    if (error)
                        return "botForwardedMessage." + error;
                }
            }
            if (message.statusQuestionAnswerMessage != null && message.hasOwnProperty("statusQuestionAnswerMessage")) {
                properties._statusQuestionAnswerMessage = 1;
                {
                    var error = $root.E2E.Message.StatusQuestionAnswerMessage.verify(message.statusQuestionAnswerMessage);
                    if (error)
                        return "statusQuestionAnswerMessage." + error;
                }
            }
            if (message.questionReplyMessage != null && message.hasOwnProperty("questionReplyMessage")) {
                properties._questionReplyMessage = 1;
                {
                    var error = $root.E2E.Message.FutureProofMessage.verify(message.questionReplyMessage);
                    if (error)
                        return "questionReplyMessage." + error;
                }
            }
            if (message.questionResponseMessage != null && message.hasOwnProperty("questionResponseMessage")) {
                properties._questionResponseMessage = 1;
                {
                    var error = $root.E2E.Message.QuestionResponseMessage.verify(message.questionResponseMessage);
                    if (error)
                        return "questionResponseMessage." + error;
                }
            }
            if (message.statusQuotedMessage != null && message.hasOwnProperty("statusQuotedMessage")) {
                properties._statusQuotedMessage = 1;
                {
                    var error = $root.E2E.Message.StatusQuotedMessage.verify(message.statusQuotedMessage);
                    if (error)
                        return "statusQuotedMessage." + error;
                }
            }
            if (message.statusStickerInteractionMessage != null && message.hasOwnProperty("statusStickerInteractionMessage")) {
                properties._statusStickerInteractionMessage = 1;
                {
                    var error = $root.E2E.Message.StatusStickerInteractionMessage.verify(message.statusStickerInteractionMessage);
                    if (error)
                        return "statusStickerInteractionMessage." + error;
                }
            }
            if (message.pollCreationMessageV5 != null && message.hasOwnProperty("pollCreationMessageV5")) {
                properties._pollCreationMessageV5 = 1;
                {
                    var error = $root.E2E.Message.PollCreationMessage.verify(message.pollCreationMessageV5);
                    if (error)
                        return "pollCreationMessageV5." + error;
                }
            }
            if (message.newsletterFollowerInviteMessageV2 != null && message.hasOwnProperty("newsletterFollowerInviteMessageV2")) {
                properties._newsletterFollowerInviteMessageV2 = 1;
                {
                    var error = $root.E2E.Message.NewsletterFollowerInviteMessage.verify(message.newsletterFollowerInviteMessageV2);
                    if (error)
                        return "newsletterFollowerInviteMessageV2." + error;
                }
            }
            if (message.pollResultSnapshotMessageV3 != null && message.hasOwnProperty("pollResultSnapshotMessageV3")) {
                properties._pollResultSnapshotMessageV3 = 1;
                {
                    var error = $root.E2E.Message.PollResultSnapshotMessage.verify(message.pollResultSnapshotMessageV3);
                    if (error)
                        return "pollResultSnapshotMessageV3." + error;
                }
            }
            return null;
        };

        /**
         * Creates a Message message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof E2E.Message
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {E2E.Message} Message
         */
        Message.fromObject = function fromObject(object) {
            if (object instanceof $root.E2E.Message)
                return object;
            var message = new $root.E2E.Message();
            if (object.conversation != null)
                message.conversation = String(object.conversation);
            if (object.senderKeyDistributionMessage != null) {
                if (typeof object.senderKeyDistributionMessage !== "object")
                    throw TypeError(".E2E.Message.senderKeyDistributionMessage: object expected");
                message.senderKeyDistributionMessage = $root.E2E.Message.SenderKeyDistributionMessage.fromObject(object.senderKeyDistributionMessage);
            }
            if (object.imageMessage != null) {
                if (typeof object.imageMessage !== "object")
                    throw TypeError(".E2E.Message.imageMessage: object expected");
                message.imageMessage = $root.E2E.Message.ImageMessage.fromObject(object.imageMessage);
            }
            if (object.contactMessage != null) {
                if (typeof object.contactMessage !== "object")
                    throw TypeError(".E2E.Message.contactMessage: object expected");
                message.contactMessage = $root.E2E.Message.ContactMessage.fromObject(object.contactMessage);
            }
            if (object.locationMessage != null) {
                if (typeof object.locationMessage !== "object")
                    throw TypeError(".E2E.Message.locationMessage: object expected");
                message.locationMessage = $root.E2E.Message.LocationMessage.fromObject(object.locationMessage);
            }
            if (object.extendedTextMessage != null) {
                if (typeof object.extendedTextMessage !== "object")
                    throw TypeError(".E2E.Message.extendedTextMessage: object expected");
                message.extendedTextMessage = $root.E2E.Message.ExtendedTextMessage.fromObject(object.extendedTextMessage);
            }
            if (object.documentMessage != null) {
                if (typeof object.documentMessage !== "object")
                    throw TypeError(".E2E.Message.documentMessage: object expected");
                message.documentMessage = $root.E2E.Message.DocumentMessage.fromObject(object.documentMessage);
            }
            if (object.audioMessage != null) {
                if (typeof object.audioMessage !== "object")
                    throw TypeError(".E2E.Message.audioMessage: object expected");
                message.audioMessage = $root.E2E.Message.AudioMessage.fromObject(object.audioMessage);
            }
            if (object.videoMessage != null) {
                if (typeof object.videoMessage !== "object")
                    throw TypeError(".E2E.Message.videoMessage: object expected");
                message.videoMessage = $root.E2E.Message.VideoMessage.fromObject(object.videoMessage);
            }
            if (object.call != null) {
                if (typeof object.call !== "object")
                    throw TypeError(".E2E.Message.call: object expected");
                message.call = $root.E2E.Message.Call.fromObject(object.call);
            }
            if (object.chat != null) {
                if (typeof object.chat !== "object")
                    throw TypeError(".E2E.Message.chat: object expected");
                message.chat = $root.E2E.Message.Chat.fromObject(object.chat);
            }
            if (object.protocolMessage != null) {
                if (typeof object.protocolMessage !== "object")
                    throw TypeError(".E2E.Message.protocolMessage: object expected");
                message.protocolMessage = $root.E2E.Message.ProtocolMessage.fromObject(object.protocolMessage);
            }
            if (object.contactsArrayMessage != null) {
                if (typeof object.contactsArrayMessage !== "object")
                    throw TypeError(".E2E.Message.contactsArrayMessage: object expected");
                message.contactsArrayMessage = $root.E2E.Message.ContactsArrayMessage.fromObject(object.contactsArrayMessage);
            }
            if (object.highlyStructuredMessage != null) {
                if (typeof object.highlyStructuredMessage !== "object")
                    throw TypeError(".E2E.Message.highlyStructuredMessage: object expected");
                message.highlyStructuredMessage = $root.E2E.Message.HighlyStructuredMessage.fromObject(object.highlyStructuredMessage);
            }
            if (object.fastRatchetKeySenderKeyDistributionMessage != null) {
                if (typeof object.fastRatchetKeySenderKeyDistributionMessage !== "object")
                    throw TypeError(".E2E.Message.fastRatchetKeySenderKeyDistributionMessage: object expected");
                message.fastRatchetKeySenderKeyDistributionMessage = $root.E2E.Message.SenderKeyDistributionMessage.fromObject(object.fastRatchetKeySenderKeyDistributionMessage);
            }
            if (object.sendPaymentMessage != null) {
                if (typeof object.sendPaymentMessage !== "object")
                    throw TypeError(".E2E.Message.sendPaymentMessage: object expected");
                message.sendPaymentMessage = $root.E2E.Message.SendPaymentMessage.fromObject(object.sendPaymentMessage);
            }
            if (object.liveLocationMessage != null) {
                if (typeof object.liveLocationMessage !== "object")
                    throw TypeError(".E2E.Message.liveLocationMessage: object expected");
                message.liveLocationMessage = $root.E2E.Message.LiveLocationMessage.fromObject(object.liveLocationMessage);
            }
            if (object.requestPaymentMessage != null) {
                if (typeof object.requestPaymentMessage !== "object")
                    throw TypeError(".E2E.Message.requestPaymentMessage: object expected");
                message.requestPaymentMessage = $root.E2E.Message.RequestPaymentMessage.fromObject(object.requestPaymentMessage);
            }
            if (object.declinePaymentRequestMessage != null) {
                if (typeof object.declinePaymentRequestMessage !== "object")
                    throw TypeError(".E2E.Message.declinePaymentRequestMessage: object expected");
                message.declinePaymentRequestMessage = $root.E2E.Message.DeclinePaymentRequestMessage.fromObject(object.declinePaymentRequestMessage);
            }
            if (object.cancelPaymentRequestMessage != null) {
                if (typeof object.cancelPaymentRequestMessage !== "object")
                    throw TypeError(".E2E.Message.cancelPaymentRequestMessage: object expected");
                message.cancelPaymentRequestMessage = $root.E2E.Message.CancelPaymentRequestMessage.fromObject(object.cancelPaymentRequestMessage);
            }
            if (object.templateMessage != null) {
                if (typeof object.templateMessage !== "object")
                    throw TypeError(".E2E.Message.templateMessage: object expected");
                message.templateMessage = $root.E2E.Message.TemplateMessage.fromObject(object.templateMessage);
            }
            if (object.stickerMessage != null) {
                if (typeof object.stickerMessage !== "object")
                    throw TypeError(".E2E.Message.stickerMessage: object expected");
                message.stickerMessage = $root.E2E.Message.StickerMessage.fromObject(object.stickerMessage);
            }
            if (object.groupInviteMessage != null) {
                if (typeof object.groupInviteMessage !== "object")
                    throw TypeError(".E2E.Message.groupInviteMessage: object expected");
                message.groupInviteMessage = $root.E2E.Message.GroupInviteMessage.fromObject(object.groupInviteMessage);
            }
            if (object.templateButtonReplyMessage != null) {
                if (typeof object.templateButtonReplyMessage !== "object")
                    throw TypeError(".E2E.Message.templateButtonReplyMessage: object expected");
                message.templateButtonReplyMessage = $root.E2E.Message.TemplateButtonReplyMessage.fromObject(object.templateButtonReplyMessage);
            }
            if (object.productMessage != null) {
                if (typeof object.productMessage !== "object")
                    throw TypeError(".E2E.Message.productMessage: object expected");
                message.productMessage = $root.E2E.Message.ProductMessage.fromObject(object.productMessage);
            }
            if (object.deviceSentMessage != null) {
                if (typeof object.deviceSentMessage !== "object")
                    throw TypeError(".E2E.Message.deviceSentMessage: object expected");
                message.deviceSentMessage = $root.E2E.Message.DeviceSentMessage.fromObject(object.deviceSentMessage);
            }
            if (object.messageContextInfo != null) {
                if (typeof object.messageContextInfo !== "object")
                    throw TypeError(".E2E.Message.messageContextInfo: object expected");
                message.messageContextInfo = $root.E2E.MessageContextInfo.fromObject(object.messageContextInfo);
            }
            if (object.listMessage != null) {
                if (typeof object.listMessage !== "object")
                    throw TypeError(".E2E.Message.listMessage: object expected");
                message.listMessage = $root.E2E.Message.ListMessage.fromObject(object.listMessage);
            }
            if (object.viewOnceMessage != null) {
                if (typeof object.viewOnceMessage !== "object")
                    throw TypeError(".E2E.Message.viewOnceMessage: object expected");
                message.viewOnceMessage = $root.E2E.Message.FutureProofMessage.fromObject(object.viewOnceMessage);
            }
            if (object.orderMessage != null) {
                if (typeof object.orderMessage !== "object")
                    throw TypeError(".E2E.Message.orderMessage: object expected");
                message.orderMessage = $root.E2E.Message.OrderMessage.fromObject(object.orderMessage);
            }
            if (object.listResponseMessage != null) {
                if (typeof object.listResponseMessage !== "object")
                    throw TypeError(".E2E.Message.listResponseMessage: object expected");
                message.listResponseMessage = $root.E2E.Message.ListResponseMessage.fromObject(object.listResponseMessage);
            }
            if (object.ephemeralMessage != null) {
                if (typeof object.ephemeralMessage !== "object")
                    throw TypeError(".E2E.Message.ephemeralMessage: object expected");
                message.ephemeralMessage = $root.E2E.Message.FutureProofMessage.fromObject(object.ephemeralMessage);
            }
            if (object.invoiceMessage != null) {
                if (typeof object.invoiceMessage !== "object")
                    throw TypeError(".E2E.Message.invoiceMessage: object expected");
                message.invoiceMessage = $root.E2E.Message.InvoiceMessage.fromObject(object.invoiceMessage);
            }
            if (object.buttonsMessage != null) {
                if (typeof object.buttonsMessage !== "object")
                    throw TypeError(".E2E.Message.buttonsMessage: object expected");
                message.buttonsMessage = $root.E2E.Message.ButtonsMessage.fromObject(object.buttonsMessage);
            }
            if (object.buttonsResponseMessage != null) {
                if (typeof object.buttonsResponseMessage !== "object")
                    throw TypeError(".E2E.Message.buttonsResponseMessage: object expected");
                message.buttonsResponseMessage = $root.E2E.Message.ButtonsResponseMessage.fromObject(object.buttonsResponseMessage);
            }
            if (object.paymentInviteMessage != null) {
                if (typeof object.paymentInviteMessage !== "object")
                    throw TypeError(".E2E.Message.paymentInviteMessage: object expected");
                message.paymentInviteMessage = $root.E2E.Message.PaymentInviteMessage.fromObject(object.paymentInviteMessage);
            }
            if (object.interactiveMessage != null) {
                if (typeof object.interactiveMessage !== "object")
                    throw TypeError(".E2E.Message.interactiveMessage: object expected");
                message.interactiveMessage = $root.E2E.Message.InteractiveMessage.fromObject(object.interactiveMessage);
            }
            if (object.reactionMessage != null) {
                if (typeof object.reactionMessage !== "object")
                    throw TypeError(".E2E.Message.reactionMessage: object expected");
                message.reactionMessage = $root.E2E.Message.ReactionMessage.fromObject(object.reactionMessage);
            }
            if (object.stickerSyncRmrMessage != null) {
                if (typeof object.stickerSyncRmrMessage !== "object")
                    throw TypeError(".E2E.Message.stickerSyncRmrMessage: object expected");
                message.stickerSyncRmrMessage = $root.E2E.Message.StickerSyncRMRMessage.fromObject(object.stickerSyncRmrMessage);
            }
            if (object.interactiveResponseMessage != null) {
                if (typeof object.interactiveResponseMessage !== "object")
                    throw TypeError(".E2E.Message.interactiveResponseMessage: object expected");
                message.interactiveResponseMessage = $root.E2E.Message.InteractiveResponseMessage.fromObject(object.interactiveResponseMessage);
            }
            if (object.pollCreationMessage != null) {
                if (typeof object.pollCreationMessage !== "object")
                    throw TypeError(".E2E.Message.pollCreationMessage: object expected");
                message.pollCreationMessage = $root.E2E.Message.PollCreationMessage.fromObject(object.pollCreationMessage);
            }
            if (object.pollUpdateMessage != null) {
                if (typeof object.pollUpdateMessage !== "object")
                    throw TypeError(".E2E.Message.pollUpdateMessage: object expected");
                message.pollUpdateMessage = $root.E2E.Message.PollUpdateMessage.fromObject(object.pollUpdateMessage);
            }
            if (object.keepInChatMessage != null) {
                if (typeof object.keepInChatMessage !== "object")
                    throw TypeError(".E2E.Message.keepInChatMessage: object expected");
                message.keepInChatMessage = $root.E2E.Message.KeepInChatMessage.fromObject(object.keepInChatMessage);
            }
            if (object.documentWithCaptionMessage != null) {
                if (typeof object.documentWithCaptionMessage !== "object")
                    throw TypeError(".E2E.Message.documentWithCaptionMessage: object expected");
                message.documentWithCaptionMessage = $root.E2E.Message.FutureProofMessage.fromObject(object.documentWithCaptionMessage);
            }
            if (object.requestPhoneNumberMessage != null) {
                if (typeof object.requestPhoneNumberMessage !== "object")
                    throw TypeError(".E2E.Message.requestPhoneNumberMessage: object expected");
                message.requestPhoneNumberMessage = $root.E2E.Message.RequestPhoneNumberMessage.fromObject(object.requestPhoneNumberMessage);
            }
            if (object.viewOnceMessageV2 != null) {
                if (typeof object.viewOnceMessageV2 !== "object")
                    throw TypeError(".E2E.Message.viewOnceMessageV2: object expected");
                message.viewOnceMessageV2 = $root.E2E.Message.FutureProofMessage.fromObject(object.viewOnceMessageV2);
            }
            if (object.encReactionMessage != null) {
                if (typeof object.encReactionMessage !== "object")
                    throw TypeError(".E2E.Message.encReactionMessage: object expected");
                message.encReactionMessage = $root.E2E.Message.EncReactionMessage.fromObject(object.encReactionMessage);
            }
            if (object.editedMessage != null) {
                if (typeof object.editedMessage !== "object")
                    throw TypeError(".E2E.Message.editedMessage: object expected");
                message.editedMessage = $root.E2E.Message.FutureProofMessage.fromObject(object.editedMessage);
            }
            if (object.viewOnceMessageV2Extension != null) {
                if (typeof object.viewOnceMessageV2Extension !== "object")
                    throw TypeError(".E2E.Message.viewOnceMessageV2Extension: object expected");
                message.viewOnceMessageV2Extension = $root.E2E.Message.FutureProofMessage.fromObject(object.viewOnceMessageV2Extension);
            }
            if (object.pollCreationMessageV2 != null) {
                if (typeof object.pollCreationMessageV2 !== "object")
                    throw TypeError(".E2E.Message.pollCreationMessageV2: object expected");
                message.pollCreationMessageV2 = $root.E2E.Message.PollCreationMessage.fromObject(object.pollCreationMessageV2);
            }
            if (object.scheduledCallCreationMessage != null) {
                if (typeof object.scheduledCallCreationMessage !== "object")
                    throw TypeError(".E2E.Message.scheduledCallCreationMessage: object expected");
                message.scheduledCallCreationMessage = $root.E2E.Message.ScheduledCallCreationMessage.fromObject(object.scheduledCallCreationMessage);
            }
            if (object.groupMentionedMessage != null) {
                if (typeof object.groupMentionedMessage !== "object")
                    throw TypeError(".E2E.Message.groupMentionedMessage: object expected");
                message.groupMentionedMessage = $root.E2E.Message.FutureProofMessage.fromObject(object.groupMentionedMessage);
            }
            if (object.pinInChatMessage != null) {
                if (typeof object.pinInChatMessage !== "object")
                    throw TypeError(".E2E.Message.pinInChatMessage: object expected");
                message.pinInChatMessage = $root.E2E.Message.PinInChatMessage.fromObject(object.pinInChatMessage);
            }
            if (object.pollCreationMessageV3 != null) {
                if (typeof object.pollCreationMessageV3 !== "object")
                    throw TypeError(".E2E.Message.pollCreationMessageV3: object expected");
                message.pollCreationMessageV3 = $root.E2E.Message.PollCreationMessage.fromObject(object.pollCreationMessageV3);
            }
            if (object.scheduledCallEditMessage != null) {
                if (typeof object.scheduledCallEditMessage !== "object")
                    throw TypeError(".E2E.Message.scheduledCallEditMessage: object expected");
                message.scheduledCallEditMessage = $root.E2E.Message.ScheduledCallEditMessage.fromObject(object.scheduledCallEditMessage);
            }
            if (object.ptvMessage != null) {
                if (typeof object.ptvMessage !== "object")
                    throw TypeError(".E2E.Message.ptvMessage: object expected");
                message.ptvMessage = $root.E2E.Message.VideoMessage.fromObject(object.ptvMessage);
            }
            if (object.botInvokeMessage != null) {
                if (typeof object.botInvokeMessage !== "object")
                    throw TypeError(".E2E.Message.botInvokeMessage: object expected");
                message.botInvokeMessage = $root.E2E.Message.FutureProofMessage.fromObject(object.botInvokeMessage);
            }
            if (object.callLogMesssage != null) {
                if (typeof object.callLogMesssage !== "object")
                    throw TypeError(".E2E.Message.callLogMesssage: object expected");
                message.callLogMesssage = $root.E2E.Message.CallLogMessage.fromObject(object.callLogMesssage);
            }
            if (object.messageHistoryBundle != null) {
                if (typeof object.messageHistoryBundle !== "object")
                    throw TypeError(".E2E.Message.messageHistoryBundle: object expected");
                message.messageHistoryBundle = $root.E2E.Message.MessageHistoryBundle.fromObject(object.messageHistoryBundle);
            }
            if (object.encCommentMessage != null) {
                if (typeof object.encCommentMessage !== "object")
                    throw TypeError(".E2E.Message.encCommentMessage: object expected");
                message.encCommentMessage = $root.E2E.Message.EncCommentMessage.fromObject(object.encCommentMessage);
            }
            if (object.bcallMessage != null) {
                if (typeof object.bcallMessage !== "object")
                    throw TypeError(".E2E.Message.bcallMessage: object expected");
                message.bcallMessage = $root.E2E.Message.BCallMessage.fromObject(object.bcallMessage);
            }
            if (object.lottieStickerMessage != null) {
                if (typeof object.lottieStickerMessage !== "object")
                    throw TypeError(".E2E.Message.lottieStickerMessage: object expected");
                message.lottieStickerMessage = $root.E2E.Message.FutureProofMessage.fromObject(object.lottieStickerMessage);
            }
            if (object.eventMessage != null) {
                if (typeof object.eventMessage !== "object")
                    throw TypeError(".E2E.Message.eventMessage: object expected");
                message.eventMessage = $root.E2E.Message.EventMessage.fromObject(object.eventMessage);
            }
            if (object.encEventResponseMessage != null) {
                if (typeof object.encEventResponseMessage !== "object")
                    throw TypeError(".E2E.Message.encEventResponseMessage: object expected");
                message.encEventResponseMessage = $root.E2E.Message.EncEventResponseMessage.fromObject(object.encEventResponseMessage);
            }
            if (object.commentMessage != null) {
                if (typeof object.commentMessage !== "object")
                    throw TypeError(".E2E.Message.commentMessage: object expected");
                message.commentMessage = $root.E2E.Message.CommentMessage.fromObject(object.commentMessage);
            }
            if (object.newsletterAdminInviteMessage != null) {
                if (typeof object.newsletterAdminInviteMessage !== "object")
                    throw TypeError(".E2E.Message.newsletterAdminInviteMessage: object expected");
                message.newsletterAdminInviteMessage = $root.E2E.Message.NewsletterAdminInviteMessage.fromObject(object.newsletterAdminInviteMessage);
            }
            if (object.placeholderMessage != null) {
                if (typeof object.placeholderMessage !== "object")
                    throw TypeError(".E2E.Message.placeholderMessage: object expected");
                message.placeholderMessage = $root.E2E.Message.PlaceholderMessage.fromObject(object.placeholderMessage);
            }
            if (object.secretEncryptedMessage != null) {
                if (typeof object.secretEncryptedMessage !== "object")
                    throw TypeError(".E2E.Message.secretEncryptedMessage: object expected");
                message.secretEncryptedMessage = $root.E2E.Message.SecretEncryptedMessage.fromObject(object.secretEncryptedMessage);
            }
            if (object.albumMessage != null) {
                if (typeof object.albumMessage !== "object")
                    throw TypeError(".E2E.Message.albumMessage: object expected");
                message.albumMessage = $root.E2E.Message.AlbumMessage.fromObject(object.albumMessage);
            }
            if (object.eventCoverImage != null) {
                if (typeof object.eventCoverImage !== "object")
                    throw TypeError(".E2E.Message.eventCoverImage: object expected");
                message.eventCoverImage = $root.E2E.Message.FutureProofMessage.fromObject(object.eventCoverImage);
            }
            if (object.stickerPackMessage != null) {
                if (typeof object.stickerPackMessage !== "object")
                    throw TypeError(".E2E.Message.stickerPackMessage: object expected");
                message.stickerPackMessage = $root.E2E.Message.StickerPackMessage.fromObject(object.stickerPackMessage);
            }
            if (object.statusMentionMessage != null) {
                if (typeof object.statusMentionMessage !== "object")
                    throw TypeError(".E2E.Message.statusMentionMessage: object expected");
                message.statusMentionMessage = $root.E2E.Message.FutureProofMessage.fromObject(object.statusMentionMessage);
            }
            if (object.pollResultSnapshotMessage != null) {
                if (typeof object.pollResultSnapshotMessage !== "object")
                    throw TypeError(".E2E.Message.pollResultSnapshotMessage: object expected");
                message.pollResultSnapshotMessage = $root.E2E.Message.PollResultSnapshotMessage.fromObject(object.pollResultSnapshotMessage);
            }
            if (object.pollCreationOptionImageMessage != null) {
                if (typeof object.pollCreationOptionImageMessage !== "object")
                    throw TypeError(".E2E.Message.pollCreationOptionImageMessage: object expected");
                message.pollCreationOptionImageMessage = $root.E2E.Message.FutureProofMessage.fromObject(object.pollCreationOptionImageMessage);
            }
            if (object.associatedChildMessage != null) {
                if (typeof object.associatedChildMessage !== "object")
                    throw TypeError(".E2E.Message.associatedChildMessage: object expected");
                message.associatedChildMessage = $root.E2E.Message.FutureProofMessage.fromObject(object.associatedChildMessage);
            }
            if (object.groupStatusMentionMessage != null) {
                if (typeof object.groupStatusMentionMessage !== "object")
                    throw TypeError(".E2E.Message.groupStatusMentionMessage: object expected");
                message.groupStatusMentionMessage = $root.E2E.Message.FutureProofMessage.fromObject(object.groupStatusMentionMessage);
            }
            if (object.pollCreationMessageV4 != null) {
                if (typeof object.pollCreationMessageV4 !== "object")
                    throw TypeError(".E2E.Message.pollCreationMessageV4: object expected");
                message.pollCreationMessageV4 = $root.E2E.Message.FutureProofMessage.fromObject(object.pollCreationMessageV4);
            }
            if (object.statusAddYours != null) {
                if (typeof object.statusAddYours !== "object")
                    throw TypeError(".E2E.Message.statusAddYours: object expected");
                message.statusAddYours = $root.E2E.Message.FutureProofMessage.fromObject(object.statusAddYours);
            }
            if (object.groupStatusMessage != null) {
                if (typeof object.groupStatusMessage !== "object")
                    throw TypeError(".E2E.Message.groupStatusMessage: object expected");
                message.groupStatusMessage = $root.E2E.Message.FutureProofMessage.fromObject(object.groupStatusMessage);
            }
            if (object.richResponseMessage != null) {
                if (typeof object.richResponseMessage !== "object")
                    throw TypeError(".E2E.Message.richResponseMessage: object expected");
                message.richResponseMessage = $root.E2E.AIRichResponseMessage.fromObject(object.richResponseMessage);
            }
            if (object.statusNotificationMessage != null) {
                if (typeof object.statusNotificationMessage !== "object")
                    throw TypeError(".E2E.Message.statusNotificationMessage: object expected");
                message.statusNotificationMessage = $root.E2E.Message.StatusNotificationMessage.fromObject(object.statusNotificationMessage);
            }
            if (object.limitSharingMessage != null) {
                if (typeof object.limitSharingMessage !== "object")
                    throw TypeError(".E2E.Message.limitSharingMessage: object expected");
                message.limitSharingMessage = $root.E2E.Message.FutureProofMessage.fromObject(object.limitSharingMessage);
            }
            if (object.botTaskMessage != null) {
                if (typeof object.botTaskMessage !== "object")
                    throw TypeError(".E2E.Message.botTaskMessage: object expected");
                message.botTaskMessage = $root.E2E.Message.FutureProofMessage.fromObject(object.botTaskMessage);
            }
            if (object.questionMessage != null) {
                if (typeof object.questionMessage !== "object")
                    throw TypeError(".E2E.Message.questionMessage: object expected");
                message.questionMessage = $root.E2E.Message.FutureProofMessage.fromObject(object.questionMessage);
            }
            if (object.messageHistoryNotice != null) {
                if (typeof object.messageHistoryNotice !== "object")
                    throw TypeError(".E2E.Message.messageHistoryNotice: object expected");
                message.messageHistoryNotice = $root.E2E.Message.MessageHistoryNotice.fromObject(object.messageHistoryNotice);
            }
            if (object.groupStatusMessageV2 != null) {
                if (typeof object.groupStatusMessageV2 !== "object")
                    throw TypeError(".E2E.Message.groupStatusMessageV2: object expected");
                message.groupStatusMessageV2 = $root.E2E.Message.FutureProofMessage.fromObject(object.groupStatusMessageV2);
            }
            if (object.botForwardedMessage != null) {
                if (typeof object.botForwardedMessage !== "object")
                    throw TypeError(".E2E.Message.botForwardedMessage: object expected");
                message.botForwardedMessage = $root.E2E.Message.FutureProofMessage.fromObject(object.botForwardedMessage);
            }
            if (object.statusQuestionAnswerMessage != null) {
                if (typeof object.statusQuestionAnswerMessage !== "object")
                    throw TypeError(".E2E.Message.statusQuestionAnswerMessage: object expected");
                message.statusQuestionAnswerMessage = $root.E2E.Message.StatusQuestionAnswerMessage.fromObject(object.statusQuestionAnswerMessage);
            }
            if (object.questionReplyMessage != null) {
                if (typeof object.questionReplyMessage !== "object")
                    throw TypeError(".E2E.Message.questionReplyMessage: object expected");
                message.questionReplyMessage = $root.E2E.Message.FutureProofMessage.fromObject(object.questionReplyMessage);
            }
            if (object.questionResponseMessage != null) {
                if (typeof object.questionResponseMessage !== "object")
                    throw TypeError(".E2E.Message.questionResponseMessage: object expected");
                message.questionResponseMessage = $root.E2E.Message.QuestionResponseMessage.fromObject(object.questionResponseMessage);
            }
            if (object.statusQuotedMessage != null) {
                if (typeof object.statusQuotedMessage !== "object")
                    throw TypeError(".E2E.Message.statusQuotedMessage: object expected");
                message.statusQuotedMessage = $root.E2E.Message.StatusQuotedMessage.fromObject(object.statusQuotedMessage);
            }
            if (object.statusStickerInteractionMessage != null) {
                if (typeof object.statusStickerInteractionMessage !== "object")
                    throw TypeError(".E2E.Message.statusStickerInteractionMessage: object expected");
                message.statusStickerInteractionMessage = $root.E2E.Message.StatusStickerInteractionMessage.fromObject(object.statusStickerInteractionMessage);
            }
            if (object.pollCreationMessageV5 != null) {
                if (typeof object.pollCreationMessageV5 !== "object")
                    throw TypeError(".E2E.Message.pollCreationMessageV5: object expected");
                message.pollCreationMessageV5 = $root.E2E.Message.PollCreationMessage.fromObject(object.pollCreationMessageV5);
            }
            if (object.newsletterFollowerInviteMessageV2 != null) {
                if (typeof object.newsletterFollowerInviteMessageV2 !== "object")
                    throw TypeError(".E2E.Message.newsletterFollowerInviteMessageV2: object expected");
                message.newsletterFollowerInviteMessageV2 = $root.E2E.Message.NewsletterFollowerInviteMessage.fromObject(object.newsletterFollowerInviteMessageV2);
            }
            if (object.pollResultSnapshotMessageV3 != null) {
                if (typeof object.pollResultSnapshotMessageV3 !== "object")
                    throw TypeError(".E2E.Message.pollResultSnapshotMessageV3: object expected");
                message.pollResultSnapshotMessageV3 = $root.E2E.Message.PollResultSnapshotMessage.fromObject(object.pollResultSnapshotMessageV3);
            }
            return message;
        };

        /**
         * Creates a plain object from a Message message. Also converts values to other types if specified.
         * @function toObject
         * @memberof E2E.Message
         * @static
         * @param {E2E.Message} message Message
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Message.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.conversation != null && message.hasOwnProperty("conversation")) {
                object.conversation = message.conversation;
                if (options.oneofs)
                    object._conversation = "conversation";
            }
            if (message.senderKeyDistributionMessage != null && message.hasOwnProperty("senderKeyDistributionMessage")) {
                object.senderKeyDistributionMessage = $root.E2E.Message.SenderKeyDistributionMessage.toObject(message.senderKeyDistributionMessage, options);
                if (options.oneofs)
                    object._senderKeyDistributionMessage = "senderKeyDistributionMessage";
            }
            if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) {
                object.imageMessage = $root.E2E.Message.ImageMessage.toObject(message.imageMessage, options);
                if (options.oneofs)
                    object._imageMessage = "imageMessage";
            }
            if (message.contactMessage != null && message.hasOwnProperty("contactMessage")) {
                object.contactMessage = $root.E2E.Message.ContactMessage.toObject(message.contactMessage, options);
                if (options.oneofs)
                    object._contactMessage = "contactMessage";
            }
            if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) {
                object.locationMessage = $root.E2E.Message.LocationMessage.toObject(message.locationMessage, options);
                if (options.oneofs)
                    object._locationMessage = "locationMessage";
            }
            if (message.extendedTextMessage != null && message.hasOwnProperty("extendedTextMessage")) {
                object.extendedTextMessage = $root.E2E.Message.ExtendedTextMessage.toObject(message.extendedTextMessage, options);
                if (options.oneofs)
                    object._extendedTextMessage = "extendedTextMessage";
            }
            if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) {
                object.documentMessage = $root.E2E.Message.DocumentMessage.toObject(message.documentMessage, options);
                if (options.oneofs)
                    object._documentMessage = "documentMessage";
            }
            if (message.audioMessage != null && message.hasOwnProperty("audioMessage")) {
                object.audioMessage = $root.E2E.Message.AudioMessage.toObject(message.audioMessage, options);
                if (options.oneofs)
                    object._audioMessage = "audioMessage";
            }
            if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) {
                object.videoMessage = $root.E2E.Message.VideoMessage.toObject(message.videoMessage, options);
                if (options.oneofs)
                    object._videoMessage = "videoMessage";
            }
            if (message.call != null && message.hasOwnProperty("call")) {
                object.call = $root.E2E.Message.Call.toObject(message.call, options);
                if (options.oneofs)
                    object._call = "call";
            }
            if (message.chat != null && message.hasOwnProperty("chat")) {
                object.chat = $root.E2E.Message.Chat.toObject(message.chat, options);
                if (options.oneofs)
                    object._chat = "chat";
            }
            if (message.protocolMessage != null && message.hasOwnProperty("protocolMessage")) {
                object.protocolMessage = $root.E2E.Message.ProtocolMessage.toObject(message.protocolMessage, options);
                if (options.oneofs)
                    object._protocolMessage = "protocolMessage";
            }
            if (message.contactsArrayMessage != null && message.hasOwnProperty("contactsArrayMessage")) {
                object.contactsArrayMessage = $root.E2E.Message.ContactsArrayMessage.toObject(message.contactsArrayMessage, options);
                if (options.oneofs)
                    object._contactsArrayMessage = "contactsArrayMessage";
            }
            if (message.highlyStructuredMessage != null && message.hasOwnProperty("highlyStructuredMessage")) {
                object.highlyStructuredMessage = $root.E2E.Message.HighlyStructuredMessage.toObject(message.highlyStructuredMessage, options);
                if (options.oneofs)
                    object._highlyStructuredMessage = "highlyStructuredMessage";
            }
            if (message.fastRatchetKeySenderKeyDistributionMessage != null && message.hasOwnProperty("fastRatchetKeySenderKeyDistributionMessage")) {
                object.fastRatchetKeySenderKeyDistributionMessage = $root.E2E.Message.SenderKeyDistributionMessage.toObject(message.fastRatchetKeySenderKeyDistributionMessage, options);
                if (options.oneofs)
                    object._fastRatchetKeySenderKeyDistributionMessage = "fastRatchetKeySenderKeyDistributionMessage";
            }
            if (message.sendPaymentMessage != null && message.hasOwnProperty("sendPaymentMessage")) {
                object.sendPaymentMessage = $root.E2E.Message.SendPaymentMessage.toObject(message.sendPaymentMessage, options);
                if (options.oneofs)
                    object._sendPaymentMessage = "sendPaymentMessage";
            }
            if (message.liveLocationMessage != null && message.hasOwnProperty("liveLocationMessage")) {
                object.liveLocationMessage = $root.E2E.Message.LiveLocationMessage.toObject(message.liveLocationMessage, options);
                if (options.oneofs)
                    object._liveLocationMessage = "liveLocationMessage";
            }
            if (message.requestPaymentMessage != null && message.hasOwnProperty("requestPaymentMessage")) {
                object.requestPaymentMessage = $root.E2E.Message.RequestPaymentMessage.toObject(message.requestPaymentMessage, options);
                if (options.oneofs)
                    object._requestPaymentMessage = "requestPaymentMessage";
            }
            if (message.declinePaymentRequestMessage != null && message.hasOwnProperty("declinePaymentRequestMessage")) {
                object.declinePaymentRequestMessage = $root.E2E.Message.DeclinePaymentRequestMessage.toObject(message.declinePaymentRequestMessage, options);
                if (options.oneofs)
                    object._declinePaymentRequestMessage = "declinePaymentRequestMessage";
            }
            if (message.cancelPaymentRequestMessage != null && message.hasOwnProperty("cancelPaymentRequestMessage")) {
                object.cancelPaymentRequestMessage = $root.E2E.Message.CancelPaymentRequestMessage.toObject(message.cancelPaymentRequestMessage, options);
                if (options.oneofs)
                    object._cancelPaymentRequestMessage = "cancelPaymentRequestMessage";
            }
            if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) {
                object.templateMessage = $root.E2E.Message.TemplateMessage.toObject(message.templateMessage, options);
                if (options.oneofs)
                    object._templateMessage = "templateMessage";
            }
            if (message.stickerMessage != null && message.hasOwnProperty("stickerMessage")) {
                object.stickerMessage = $root.E2E.Message.StickerMessage.toObject(message.stickerMessage, options);
                if (options.oneofs)
                    object._stickerMessage = "stickerMessage";
            }
            if (message.groupInviteMessage != null && message.hasOwnProperty("groupInviteMessage")) {
                object.groupInviteMessage = $root.E2E.Message.GroupInviteMessage.toObject(message.groupInviteMessage, options);
                if (options.oneofs)
                    object._groupInviteMessage = "groupInviteMessage";
            }
            if (message.templateButtonReplyMessage != null && message.hasOwnProperty("templateButtonReplyMessage")) {
                object.templateButtonReplyMessage = $root.E2E.Message.TemplateButtonReplyMessage.toObject(message.templateButtonReplyMessage, options);
                if (options.oneofs)
                    object._templateButtonReplyMessage = "templateButtonReplyMessage";
            }
            if (message.productMessage != null && message.hasOwnProperty("productMessage")) {
                object.productMessage = $root.E2E.Message.ProductMessage.toObject(message.productMessage, options);
                if (options.oneofs)
                    object._productMessage = "productMessage";
            }
            if (message.deviceSentMessage != null && message.hasOwnProperty("deviceSentMessage")) {
                object.deviceSentMessage = $root.E2E.Message.DeviceSentMessage.toObject(message.deviceSentMessage, options);
                if (options.oneofs)
                    object._deviceSentMessage = "deviceSentMessage";
            }
            if (message.messageContextInfo != null && message.hasOwnProperty("messageContextInfo")) {
                object.messageContextInfo = $root.E2E.MessageContextInfo.toObject(message.messageContextInfo, options);
                if (options.oneofs)
                    object._messageContextInfo = "messageContextInfo";
            }
            if (message.listMessage != null && message.hasOwnProperty("listMessage")) {
                object.listMessage = $root.E2E.Message.ListMessage.toObject(message.listMessage, options);
                if (options.oneofs)
                    object._listMessage = "listMessage";
            }
            if (message.viewOnceMessage != null && message.hasOwnProperty("viewOnceMessage")) {
                object.viewOnceMessage = $root.E2E.Message.FutureProofMessage.toObject(message.viewOnceMessage, options);
                if (options.oneofs)
                    object._viewOnceMessage = "viewOnceMessage";
            }
            if (message.orderMessage != null && message.hasOwnProperty("orderMessage")) {
                object.orderMessage = $root.E2E.Message.OrderMessage.toObject(message.orderMessage, options);
                if (options.oneofs)
                    object._orderMessage = "orderMessage";
            }
            if (message.listResponseMessage != null && message.hasOwnProperty("listResponseMessage")) {
                object.listResponseMessage = $root.E2E.Message.ListResponseMessage.toObject(message.listResponseMessage, options);
                if (options.oneofs)
                    object._listResponseMessage = "listResponseMessage";
            }
            if (message.ephemeralMessage != null && message.hasOwnProperty("ephemeralMessage")) {
                object.ephemeralMessage = $root.E2E.Message.FutureProofMessage.toObject(message.ephemeralMessage, options);
                if (options.oneofs)
                    object._ephemeralMessage = "ephemeralMessage";
            }
            if (message.invoiceMessage != null && message.hasOwnProperty("invoiceMessage")) {
                object.invoiceMessage = $root.E2E.Message.InvoiceMessage.toObject(message.invoiceMessage, options);
                if (options.oneofs)
                    object._invoiceMessage = "invoiceMessage";
            }
            if (message.buttonsMessage != null && message.hasOwnProperty("buttonsMessage")) {
                object.buttonsMessage = $root.E2E.Message.ButtonsMessage.toObject(message.buttonsMessage, options);
                if (options.oneofs)
                    object._buttonsMessage = "buttonsMessage";
            }
            if (message.buttonsResponseMessage != null && message.hasOwnProperty("buttonsResponseMessage")) {
                object.buttonsResponseMessage = $root.E2E.Message.ButtonsResponseMessage.toObject(message.buttonsResponseMessage, options);
                if (options.oneofs)
                    object._buttonsResponseMessage = "buttonsResponseMessage";
            }
            if (message.paymentInviteMessage != null && message.hasOwnProperty("paymentInviteMessage")) {
                object.paymentInviteMessage = $root.E2E.Message.PaymentInviteMessage.toObject(message.paymentInviteMessage, options);
                if (options.oneofs)
                    object._paymentInviteMessage = "paymentInviteMessage";
            }
            if (message.interactiveMessage != null && message.hasOwnProperty("interactiveMessage")) {
                object.interactiveMessage = $root.E2E.Message.InteractiveMessage.toObject(message.interactiveMessage, options);
                if (options.oneofs)
                    object._interactiveMessage = "interactiveMessage";
            }
            if (message.reactionMessage != null && message.hasOwnProperty("reactionMessage")) {
                object.reactionMessage = $root.E2E.Message.ReactionMessage.toObject(message.reactionMessage, options);
                if (options.oneofs)
                    object._reactionMessage = "reactionMessage";
            }
            if (message.stickerSyncRmrMessage != null && message.hasOwnProperty("stickerSyncRmrMessage")) {
                object.stickerSyncRmrMessage = $root.E2E.Message.StickerSyncRMRMessage.toObject(message.stickerSyncRmrMessage, options);
                if (options.oneofs)
                    object._stickerSyncRmrMessage = "stickerSyncRmrMessage";
            }
            if (message.interactiveResponseMessage != null && message.hasOwnProperty("interactiveResponseMessage")) {
                object.interactiveResponseMessage = $root.E2E.Message.InteractiveResponseMessage.toObject(message.interactiveResponseMessage, options);
                if (options.oneofs)
                    object._interactiveResponseMessage = "interactiveResponseMessage";
            }
            if (message.pollCreationMessage != null && message.hasOwnProperty("pollCreationMessage")) {
                object.pollCreationMessage = $root.E2E.Message.PollCreationMessage.toObject(message.pollCreationMessage, options);
                if (options.oneofs)
                    object._pollCreationMessage = "pollCreationMessage";
            }
            if (message.pollUpdateMessage != null && message.hasOwnProperty("pollUpdateMessage")) {
                object.pollUpdateMessage = $root.E2E.Message.PollUpdateMessage.toObject(message.pollUpdateMessage, options);
                if (options.oneofs)
                    object._pollUpdateMessage = "pollUpdateMessage";
            }
            if (message.keepInChatMessage != null && message.hasOwnProperty("keepInChatMessage")) {
                object.keepInChatMessage = $root.E2E.Message.KeepInChatMessage.toObject(message.keepInChatMessage, options);
                if (options.oneofs)
                    object._keepInChatMessage = "keepInChatMessage";
            }
            if (message.documentWithCaptionMessage != null && message.hasOwnProperty("documentWithCaptionMessage")) {
                object.documentWithCaptionMessage = $root.E2E.Message.FutureProofMessage.toObject(message.documentWithCaptionMessage, options);
                if (options.oneofs)
                    object._documentWithCaptionMessage = "documentWithCaptionMessage";
            }
            if (message.requestPhoneNumberMessage != null && message.hasOwnProperty("requestPhoneNumberMessage")) {
                object.requestPhoneNumberMessage = $root.E2E.Message.RequestPhoneNumberMessage.toObject(message.requestPhoneNumberMessage, options);
                if (options.oneofs)
                    object._requestPhoneNumberMessage = "requestPhoneNumberMessage";
            }
            if (message.viewOnceMessageV2 != null && message.hasOwnProperty("viewOnceMessageV2")) {
                object.viewOnceMessageV2 = $root.E2E.Message.FutureProofMessage.toObject(message.viewOnceMessageV2, options);
                if (options.oneofs)
                    object._viewOnceMessageV2 = "viewOnceMessageV2";
            }
            if (message.encReactionMessage != null && message.hasOwnProperty("encReactionMessage")) {
                object.encReactionMessage = $root.E2E.Message.EncReactionMessage.toObject(message.encReactionMessage, options);
                if (options.oneofs)
                    object._encReactionMessage = "encReactionMessage";
            }
            if (message.editedMessage != null && message.hasOwnProperty("editedMessage")) {
                object.editedMessage = $root.E2E.Message.FutureProofMessage.toObject(message.editedMessage, options);
                if (options.oneofs)
                    object._editedMessage = "editedMessage";
            }
            if (message.viewOnceMessageV2Extension != null && message.hasOwnProperty("viewOnceMessageV2Extension")) {
                object.viewOnceMessageV2Extension = $root.E2E.Message.FutureProofMessage.toObject(message.viewOnceMessageV2Extension, options);
                if (options.oneofs)
                    object._viewOnceMessageV2Extension = "viewOnceMessageV2Extension";
            }
            if (message.pollCreationMessageV2 != null && message.hasOwnProperty("pollCreationMessageV2")) {
                object.pollCreationMessageV2 = $root.E2E.Message.PollCreationMessage.toObject(message.pollCreationMessageV2, options);
                if (options.oneofs)
                    object._pollCreationMessageV2 = "pollCreationMessageV2";
            }
            if (message.scheduledCallCreationMessage != null && message.hasOwnProperty("scheduledCallCreationMessage")) {
                object.scheduledCallCreationMessage = $root.E2E.Message.ScheduledCallCreationMessage.toObject(message.scheduledCallCreationMessage, options);
                if (options.oneofs)
                    object._scheduledCallCreationMessage = "scheduledCallCreationMessage";
            }
            if (message.groupMentionedMessage != null && message.hasOwnProperty("groupMentionedMessage")) {
                object.groupMentionedMessage = $root.E2E.Message.FutureProofMessage.toObject(message.groupMentionedMessage, options);
                if (options.oneofs)
                    object._groupMentionedMessage = "groupMentionedMessage";
            }
            if (message.pinInChatMessage != null && message.hasOwnProperty("pinInChatMessage")) {
                object.pinInChatMessage = $root.E2E.Message.PinInChatMessage.toObject(message.pinInChatMessage, options);
                if (options.oneofs)
                    object._pinInChatMessage = "pinInChatMessage";
            }
            if (message.pollCreationMessageV3 != null && message.hasOwnProperty("pollCreationMessageV3")) {
                object.pollCreationMessageV3 = $root.E2E.Message.PollCreationMessage.toObject(message.pollCreationMessageV3, options);
                if (options.oneofs)
                    object._pollCreationMessageV3 = "pollCreationMessageV3";
            }
            if (message.scheduledCallEditMessage != null && message.hasOwnProperty("scheduledCallEditMessage")) {
                object.scheduledCallEditMessage = $root.E2E.Message.ScheduledCallEditMessage.toObject(message.scheduledCallEditMessage, options);
                if (options.oneofs)
                    object._scheduledCallEditMessage = "scheduledCallEditMessage";
            }
            if (message.ptvMessage != null && message.hasOwnProperty("ptvMessage")) {
                object.ptvMessage = $root.E2E.Message.VideoMessage.toObject(message.ptvMessage, options);
                if (options.oneofs)
                    object._ptvMessage = "ptvMessage";
            }
            if (message.botInvokeMessage != null && message.hasOwnProperty("botInvokeMessage")) {
                object.botInvokeMessage = $root.E2E.Message.FutureProofMessage.toObject(message.botInvokeMessage, options);
                if (options.oneofs)
                    object._botInvokeMessage = "botInvokeMessage";
            }
            if (message.callLogMesssage != null && message.hasOwnProperty("callLogMesssage")) {
                object.callLogMesssage = $root.E2E.Message.CallLogMessage.toObject(message.callLogMesssage, options);
                if (options.oneofs)
                    object._callLogMesssage = "callLogMesssage";
            }
            if (message.messageHistoryBundle != null && message.hasOwnProperty("messageHistoryBundle")) {
                object.messageHistoryBundle = $root.E2E.Message.MessageHistoryBundle.toObject(message.messageHistoryBundle, options);
                if (options.oneofs)
                    object._messageHistoryBundle = "messageHistoryBundle";
            }
            if (message.encCommentMessage != null && message.hasOwnProperty("encCommentMessage")) {
                object.encCommentMessage = $root.E2E.Message.EncCommentMessage.toObject(message.encCommentMessage, options);
                if (options.oneofs)
                    object._encCommentMessage = "encCommentMessage";
            }
            if (message.bcallMessage != null && message.hasOwnProperty("bcallMessage")) {
                object.bcallMessage = $root.E2E.Message.BCallMessage.toObject(message.bcallMessage, options);
                if (options.oneofs)
                    object._bcallMessage = "bcallMessage";
            }
            if (message.lottieStickerMessage != null && message.hasOwnProperty("lottieStickerMessage")) {
                object.lottieStickerMessage = $root.E2E.Message.FutureProofMessage.toObject(message.lottieStickerMessage, options);
                if (options.oneofs)
                    object._lottieStickerMessage = "lottieStickerMessage";
            }
            if (message.eventMessage != null && message.hasOwnProperty("eventMessage")) {
                object.eventMessage = $root.E2E.Message.EventMessage.toObject(message.eventMessage, options);
                if (options.oneofs)
                    object._eventMessage = "eventMessage";
            }
            if (message.encEventResponseMessage != null && message.hasOwnProperty("encEventResponseMessage")) {
                object.encEventResponseMessage = $root.E2E.Message.EncEventResponseMessage.toObject(message.encEventResponseMessage, options);
                if (options.oneofs)
                    object._encEventResponseMessage = "encEventResponseMessage";
            }
            if (message.commentMessage != null && message.hasOwnProperty("commentMessage")) {
                object.commentMessage = $root.E2E.Message.CommentMessage.toObject(message.commentMessage, options);
                if (options.oneofs)
                    object._commentMessage = "commentMessage";
            }
            if (message.newsletterAdminInviteMessage != null && message.hasOwnProperty("newsletterAdminInviteMessage")) {
                object.newsletterAdminInviteMessage = $root.E2E.Message.NewsletterAdminInviteMessage.toObject(message.newsletterAdminInviteMessage, options);
                if (options.oneofs)
                    object._newsletterAdminInviteMessage = "newsletterAdminInviteMessage";
            }
            if (message.placeholderMessage != null && message.hasOwnProperty("placeholderMessage")) {
                object.placeholderMessage = $root.E2E.Message.PlaceholderMessage.toObject(message.placeholderMessage, options);
                if (options.oneofs)
                    object._placeholderMessage = "placeholderMessage";
            }
            if (message.secretEncryptedMessage != null && message.hasOwnProperty("secretEncryptedMessage")) {
                object.secretEncryptedMessage = $root.E2E.Message.SecretEncryptedMessage.toObject(message.secretEncryptedMessage, options);
                if (options.oneofs)
                    object._secretEncryptedMessage = "secretEncryptedMessage";
            }
            if (message.albumMessage != null && message.hasOwnProperty("albumMessage")) {
                object.albumMessage = $root.E2E.Message.AlbumMessage.toObject(message.albumMessage, options);
                if (options.oneofs)
                    object._albumMessage = "albumMessage";
            }
            if (message.eventCoverImage != null && message.hasOwnProperty("eventCoverImage")) {
                object.eventCoverImage = $root.E2E.Message.FutureProofMessage.toObject(message.eventCoverImage, options);
                if (options.oneofs)
                    object._eventCoverImage = "eventCoverImage";
            }
            if (message.stickerPackMessage != null && message.hasOwnProperty("stickerPackMessage")) {
                object.stickerPackMessage = $root.E2E.Message.StickerPackMessage.toObject(message.stickerPackMessage, options);
                if (options.oneofs)
                    object._stickerPackMessage = "stickerPackMessage";
            }
            if (message.statusMentionMessage != null && message.hasOwnProperty("statusMentionMessage")) {
                object.statusMentionMessage = $root.E2E.Message.FutureProofMessage.toObject(message.statusMentionMessage, options);
                if (options.oneofs)
                    object._statusMentionMessage = "statusMentionMessage";
            }
            if (message.pollResultSnapshotMessage != null && message.hasOwnProperty("pollResultSnapshotMessage")) {
                object.pollResultSnapshotMessage = $root.E2E.Message.PollResultSnapshotMessage.toObject(message.pollResultSnapshotMessage, options);
                if (options.oneofs)
                    object._pollResultSnapshotMessage = "pollResultSnapshotMessage";
            }
            if (message.pollCreationOptionImageMessage != null && message.hasOwnProperty("pollCreationOptionImageMessage")) {
                object.pollCreationOptionImageMessage = $root.E2E.Message.FutureProofMessage.toObject(message.pollCreationOptionImageMessage, options);
                if (options.oneofs)
                    object._pollCreationOptionImageMessage = "pollCreationOptionImageMessage";
            }
            if (message.associatedChildMessage != null && message.hasOwnProperty("associatedChildMessage")) {
                object.associatedChildMessage = $root.E2E.Message.FutureProofMessage.toObject(message.associatedChildMessage, options);
                if (options.oneofs)
                    object._associatedChildMessage = "associatedChildMessage";
            }
            if (message.groupStatusMentionMessage != null && message.hasOwnProperty("groupStatusMentionMessage")) {
                object.groupStatusMentionMessage = $root.E2E.Message.FutureProofMessage.toObject(message.groupStatusMentionMessage, options);
                if (options.oneofs)
                    object._groupStatusMentionMessage = "groupStatusMentionMessage";
            }
            if (message.pollCreationMessageV4 != null && message.hasOwnProperty("pollCreationMessageV4")) {
                object.pollCreationMessageV4 = $root.E2E.Message.FutureProofMessage.toObject(message.pollCreationMessageV4, options);
                if (options.oneofs)
                    object._pollCreationMessageV4 = "pollCreationMessageV4";
            }
            if (message.statusAddYours != null && message.hasOwnProperty("statusAddYours")) {
                object.statusAddYours = $root.E2E.Message.FutureProofMessage.toObject(message.statusAddYours, options);
                if (options.oneofs)
                    object._statusAddYours = "statusAddYours";
            }
            if (message.groupStatusMessage != null && message.hasOwnProperty("groupStatusMessage")) {
                object.groupStatusMessage = $root.E2E.Message.FutureProofMessage.toObject(message.groupStatusMessage, options);
                if (options.oneofs)
                    object._groupStatusMessage = "groupStatusMessage";
            }
            if (message.richResponseMessage != null && message.hasOwnProperty("richResponseMessage")) {
                object.richResponseMessage = $root.E2E.AIRichResponseMessage.toObject(message.richResponseMessage, options);
                if (options.oneofs)
                    object._richResponseMessage = "richResponseMessage";
            }
            if (message.statusNotificationMessage != null && message.hasOwnProperty("statusNotificationMessage")) {
                object.statusNotificationMessage = $root.E2E.Message.StatusNotificationMessage.toObject(message.statusNotificationMessage, options);
                if (options.oneofs)
                    object._statusNotificationMessage = "statusNotificationMessage";
            }
            if (message.limitSharingMessage != null && message.hasOwnProperty("limitSharingMessage")) {
                object.limitSharingMessage = $root.E2E.Message.FutureProofMessage.toObject(message.limitSharingMessage, options);
                if (options.oneofs)
                    object._limitSharingMessage = "limitSharingMessage";
            }
            if (message.botTaskMessage != null && message.hasOwnProperty("botTaskMessage")) {
                object.botTaskMessage = $root.E2E.Message.FutureProofMessage.toObject(message.botTaskMessage, options);
                if (options.oneofs)
                    object._botTaskMessage = "botTaskMessage";
            }
            if (message.questionMessage != null && message.hasOwnProperty("questionMessage")) {
                object.questionMessage = $root.E2E.Message.FutureProofMessage.toObject(message.questionMessage, options);
                if (options.oneofs)
                    object._questionMessage = "questionMessage";
            }
            if (message.messageHistoryNotice != null && message.hasOwnProperty("messageHistoryNotice")) {
                object.messageHistoryNotice = $root.E2E.Message.MessageHistoryNotice.toObject(message.messageHistoryNotice, options);
                if (options.oneofs)
                    object._messageHistoryNotice = "messageHistoryNotice";
            }
            if (message.groupStatusMessageV2 != null && message.hasOwnProperty("groupStatusMessageV2")) {
                object.groupStatusMessageV2 = $root.E2E.Message.FutureProofMessage.toObject(message.groupStatusMessageV2, options);
                if (options.oneofs)
                    object._groupStatusMessageV2 = "groupStatusMessageV2";
            }
            if (message.botForwardedMessage != null && message.hasOwnProperty("botForwardedMessage")) {
                object.botForwardedMessage = $root.E2E.Message.FutureProofMessage.toObject(message.botForwardedMessage, options);
                if (options.oneofs)
                    object._botForwardedMessage = "botForwardedMessage";
            }
            if (message.statusQuestionAnswerMessage != null && message.hasOwnProperty("statusQuestionAnswerMessage")) {
                object.statusQuestionAnswerMessage = $root.E2E.Message.StatusQuestionAnswerMessage.toObject(message.statusQuestionAnswerMessage, options);
                if (options.oneofs)
                    object._statusQuestionAnswerMessage = "statusQuestionAnswerMessage";
            }
            if (message.questionReplyMessage != null && message.hasOwnProperty("questionReplyMessage")) {
                object.questionReplyMessage = $root.E2E.Message.FutureProofMessage.toObject(message.questionReplyMessage, options);
                if (options.oneofs)
                    object._questionReplyMessage = "questionReplyMessage";
            }
            if (message.questionResponseMessage != null && message.hasOwnProperty("questionResponseMessage")) {
                object.questionResponseMessage = $root.E2E.Message.QuestionResponseMessage.toObject(message.questionResponseMessage, options);
                if (options.oneofs)
                    object._questionResponseMessage = "questionResponseMessage";
            }
            if (message.statusQuotedMessage != null && message.hasOwnProperty("statusQuotedMessage")) {
                object.statusQuotedMessage = $root.E2E.Message.StatusQuotedMessage.toObject(message.statusQuotedMessage, options);
                if (options.oneofs)
                    object._statusQuotedMessage = "statusQuotedMessage";
            }
            if (message.statusStickerInteractionMessage != null && message.hasOwnProperty("statusStickerInteractionMessage")) {
                object.statusStickerInteractionMessage = $root.E2E.Message.StatusStickerInteractionMessage.toObject(message.statusStickerInteractionMessage, options);
                if (options.oneofs)
                    object._statusStickerInteractionMessage = "statusStickerInteractionMessage";
            }
            if (message.pollCreationMessageV5 != null && message.hasOwnProperty("pollCreationMessageV5")) {
                object.pollCreationMessageV5 = $root.E2E.Message.PollCreationMessage.toObject(message.pollCreationMessageV5, options);
                if (options.oneofs)
                    object._pollCreationMessageV5 = "pollCreationMessageV5";
            }
            if (message.newsletterFollowerInviteMessageV2 != null && message.hasOwnProperty("newsletterFollowerInviteMessageV2")) {
                object.newsletterFollowerInviteMessageV2 = $root.E2E.Message.NewsletterFollowerInviteMessage.toObject(message.newsletterFollowerInviteMessageV2, options);
                if (options.oneofs)
                    object._newsletterFollowerInviteMessageV2 = "newsletterFollowerInviteMessageV2";
            }
            if (message.pollResultSnapshotMessageV3 != null && message.hasOwnProperty("pollResultSnapshotMessageV3")) {
                object.pollResultSnapshotMessageV3 = $root.E2E.Message.PollResultSnapshotMessage.toObject(message.pollResultSnapshotMessageV3, options);
                if (options.oneofs)
                    object._pollResultSnapshotMessageV3 = "pollResultSnapshotMessageV3";
            }
            return object;
        };

        /**
         * Converts this Message to JSON.
         * @function toJSON
         * @memberof E2E.Message
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Message.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for Message
         * @function getTypeUrl
         * @memberof E2E.Message
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        Message.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/E2E.Message";
        };

        Message.AlbumMessage = (function() {

            /**
             * Properties of an AlbumMessage.
             * @memberof E2E.Message
             * @interface IAlbumMessage
             * @property {number|null} [expectedImageCount] AlbumMessage expectedImageCount
             * @property {number|null} [expectedVideoCount] AlbumMessage expectedVideoCount
             * @property {E2E.IContextInfo|null} [contextInfo] AlbumMessage contextInfo
             */

            /**
             * Constructs a new AlbumMessage.
             * @memberof E2E.Message
             * @classdesc Represents an AlbumMessage.
             * @implements IAlbumMessage
             * @constructor
             * @param {E2E.Message.IAlbumMessage=} [properties] Properties to set
             */
            function AlbumMessage(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]];
            }

            /**
             * AlbumMessage expectedImageCount.
             * @member {number|null|undefined} expectedImageCount
             * @memberof E2E.Message.AlbumMessage
             * @instance
             */
            AlbumMessage.prototype.expectedImageCount = null;

            /**
             * AlbumMessage expectedVideoCount.
             * @member {number|null|undefined} expectedVideoCount
             * @memberof E2E.Message.AlbumMessage
             * @instance
             */
            AlbumMessage.prototype.expectedVideoCount = null;

            /**
             * AlbumMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.AlbumMessage
             * @instance
             */
            AlbumMessage.prototype.contextInfo = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * AlbumMessage _expectedImageCount.
             * @member {"expectedImageCount"|undefined} _expectedImageCount
             * @memberof E2E.Message.AlbumMessage
             * @instance
             */
            Object.defineProperty(AlbumMessage.prototype, "_expectedImageCount", {
                get: $util.oneOfGetter($oneOfFields = ["expectedImageCount"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AlbumMessage _expectedVideoCount.
             * @member {"expectedVideoCount"|undefined} _expectedVideoCount
             * @memberof E2E.Message.AlbumMessage
             * @instance
             */
            Object.defineProperty(AlbumMessage.prototype, "_expectedVideoCount", {
                get: $util.oneOfGetter($oneOfFields = ["expectedVideoCount"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AlbumMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.AlbumMessage
             * @instance
             */
            Object.defineProperty(AlbumMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new AlbumMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.AlbumMessage
             * @static
             * @param {E2E.Message.IAlbumMessage=} [properties] Properties to set
             * @returns {E2E.Message.AlbumMessage} AlbumMessage instance
             */
            AlbumMessage.create = function create(properties) {
                return new AlbumMessage(properties);
            };

            /**
             * Encodes the specified AlbumMessage message. Does not implicitly {@link E2E.Message.AlbumMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.AlbumMessage
             * @static
             * @param {E2E.Message.IAlbumMessage} message AlbumMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AlbumMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.expectedImageCount != null && Object.hasOwnProperty.call(message, "expectedImageCount"))
                    writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.expectedImageCount);
                if (message.expectedVideoCount != null && Object.hasOwnProperty.call(message, "expectedVideoCount"))
                    writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.expectedVideoCount);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified AlbumMessage message, length delimited. Does not implicitly {@link E2E.Message.AlbumMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.AlbumMessage
             * @static
             * @param {E2E.Message.IAlbumMessage} message AlbumMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AlbumMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AlbumMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.AlbumMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.AlbumMessage} AlbumMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AlbumMessage.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.E2E.Message.AlbumMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 2: {
                            message.expectedImageCount = reader.uint32();
                            break;
                        }
                    case 3: {
                            message.expectedVideoCount = reader.uint32();
                            break;
                        }
                    case 17: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an AlbumMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.AlbumMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.AlbumMessage} AlbumMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AlbumMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AlbumMessage message.
             * @function verify
             * @memberof E2E.Message.AlbumMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AlbumMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.expectedImageCount != null && message.hasOwnProperty("expectedImageCount")) {
                    properties._expectedImageCount = 1;
                    if (!$util.isInteger(message.expectedImageCount))
                        return "expectedImageCount: integer expected";
                }
                if (message.expectedVideoCount != null && message.hasOwnProperty("expectedVideoCount")) {
                    properties._expectedVideoCount = 1;
                    if (!$util.isInteger(message.expectedVideoCount))
                        return "expectedVideoCount: integer expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                return null;
            };

            /**
             * Creates an AlbumMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.AlbumMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.AlbumMessage} AlbumMessage
             */
            AlbumMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.AlbumMessage)
                    return object;
                var message = new $root.E2E.Message.AlbumMessage();
                if (object.expectedImageCount != null)
                    message.expectedImageCount = object.expectedImageCount >>> 0;
                if (object.expectedVideoCount != null)
                    message.expectedVideoCount = object.expectedVideoCount >>> 0;
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.AlbumMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                return message;
            };

            /**
             * Creates a plain object from an AlbumMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.AlbumMessage
             * @static
             * @param {E2E.Message.AlbumMessage} message AlbumMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AlbumMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.expectedImageCount != null && message.hasOwnProperty("expectedImageCount")) {
                    object.expectedImageCount = message.expectedImageCount;
                    if (options.oneofs)
                        object._expectedImageCount = "expectedImageCount";
                }
                if (message.expectedVideoCount != null && message.hasOwnProperty("expectedVideoCount")) {
                    object.expectedVideoCount = message.expectedVideoCount;
                    if (options.oneofs)
                        object._expectedVideoCount = "expectedVideoCount";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                return object;
            };

            /**
             * Converts this AlbumMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.AlbumMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AlbumMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AlbumMessage
             * @function getTypeUrl
             * @memberof E2E.Message.AlbumMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AlbumMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.AlbumMessage";
            };

            return AlbumMessage;
        })();

        Message.AppStateFatalExceptionNotification = (function() {

            /**
             * Properties of an AppStateFatalExceptionNotification.
             * @memberof E2E.Message
             * @interface IAppStateFatalExceptionNotification
             * @property {Array.<string>|null} [collectionNames] AppStateFatalExceptionNotification collectionNames
             * @property {number|Long|null} [timestamp] AppStateFatalExceptionNotification timestamp
             */

            /**
             * Constructs a new AppStateFatalExceptionNotification.
             * @memberof E2E.Message
             * @classdesc Represents an AppStateFatalExceptionNotification.
             * @implements IAppStateFatalExceptionNotification
             * @constructor
             * @param {E2E.Message.IAppStateFatalExceptionNotification=} [properties] Properties to set
             */
            function AppStateFatalExceptionNotification(properties) {
                this.collectionNames = [];
                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]];
            }

            /**
             * AppStateFatalExceptionNotification collectionNames.
             * @member {Array.<string>} collectionNames
             * @memberof E2E.Message.AppStateFatalExceptionNotification
             * @instance
             */
            AppStateFatalExceptionNotification.prototype.collectionNames = $util.emptyArray;

            /**
             * AppStateFatalExceptionNotification timestamp.
             * @member {number|Long|null|undefined} timestamp
             * @memberof E2E.Message.AppStateFatalExceptionNotification
             * @instance
             */
            AppStateFatalExceptionNotification.prototype.timestamp = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * AppStateFatalExceptionNotification _timestamp.
             * @member {"timestamp"|undefined} _timestamp
             * @memberof E2E.Message.AppStateFatalExceptionNotification
             * @instance
             */
            Object.defineProperty(AppStateFatalExceptionNotification.prototype, "_timestamp", {
                get: $util.oneOfGetter($oneOfFields = ["timestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new AppStateFatalExceptionNotification instance using the specified properties.
             * @function create
             * @memberof E2E.Message.AppStateFatalExceptionNotification
             * @static
             * @param {E2E.Message.IAppStateFatalExceptionNotification=} [properties] Properties to set
             * @returns {E2E.Message.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification instance
             */
            AppStateFatalExceptionNotification.create = function create(properties) {
                return new AppStateFatalExceptionNotification(properties);
            };

            /**
             * Encodes the specified AppStateFatalExceptionNotification message. Does not implicitly {@link E2E.Message.AppStateFatalExceptionNotification.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.AppStateFatalExceptionNotification
             * @static
             * @param {E2E.Message.IAppStateFatalExceptionNotification} message AppStateFatalExceptionNotification message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AppStateFatalExceptionNotification.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.collectionNames != null && message.collectionNames.length)
                    for (var i = 0; i < message.collectionNames.length; ++i)
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.collectionNames[i]);
                if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestamp);
                return writer;
            };

            /**
             * Encodes the specified AppStateFatalExceptionNotification message, length delimited. Does not implicitly {@link E2E.Message.AppStateFatalExceptionNotification.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.AppStateFatalExceptionNotification
             * @static
             * @param {E2E.Message.IAppStateFatalExceptionNotification} message AppStateFatalExceptionNotification message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AppStateFatalExceptionNotification.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AppStateFatalExceptionNotification message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.AppStateFatalExceptionNotification
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AppStateFatalExceptionNotification.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.E2E.Message.AppStateFatalExceptionNotification();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            if (!(message.collectionNames && message.collectionNames.length))
                                message.collectionNames = [];
                            message.collectionNames.push(reader.string());
                            break;
                        }
                    case 2: {
                            message.timestamp = reader.int64();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an AppStateFatalExceptionNotification message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.AppStateFatalExceptionNotification
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AppStateFatalExceptionNotification.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AppStateFatalExceptionNotification message.
             * @function verify
             * @memberof E2E.Message.AppStateFatalExceptionNotification
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AppStateFatalExceptionNotification.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.collectionNames != null && message.hasOwnProperty("collectionNames")) {
                    if (!Array.isArray(message.collectionNames))
                        return "collectionNames: array expected";
                    for (var i = 0; i < message.collectionNames.length; ++i)
                        if (!$util.isString(message.collectionNames[i]))
                            return "collectionNames: string[] expected";
                }
                if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
                    properties._timestamp = 1;
                    if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
                        return "timestamp: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an AppStateFatalExceptionNotification message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.AppStateFatalExceptionNotification
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification
             */
            AppStateFatalExceptionNotification.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.AppStateFatalExceptionNotification)
                    return object;
                var message = new $root.E2E.Message.AppStateFatalExceptionNotification();
                if (object.collectionNames) {
                    if (!Array.isArray(object.collectionNames))
                        throw TypeError(".E2E.Message.AppStateFatalExceptionNotification.collectionNames: array expected");
                    message.collectionNames = [];
                    for (var i = 0; i < object.collectionNames.length; ++i)
                        message.collectionNames[i] = String(object.collectionNames[i]);
                }
                if (object.timestamp != null)
                    if ($util.Long)
                        (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false;
                    else if (typeof object.timestamp === "string")
                        message.timestamp = parseInt(object.timestamp, 10);
                    else if (typeof object.timestamp === "number")
                        message.timestamp = object.timestamp;
                    else if (typeof object.timestamp === "object")
                        message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber();
                return message;
            };

            /**
             * Creates a plain object from an AppStateFatalExceptionNotification message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.AppStateFatalExceptionNotification
             * @static
             * @param {E2E.Message.AppStateFatalExceptionNotification} message AppStateFatalExceptionNotification
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AppStateFatalExceptionNotification.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.collectionNames = [];
                if (message.collectionNames && message.collectionNames.length) {
                    object.collectionNames = [];
                    for (var j = 0; j < message.collectionNames.length; ++j)
                        object.collectionNames[j] = message.collectionNames[j];
                }
                if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
                    if (typeof message.timestamp === "number")
                        object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
                    else
                        object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp;
                    if (options.oneofs)
                        object._timestamp = "timestamp";
                }
                return object;
            };

            /**
             * Converts this AppStateFatalExceptionNotification to JSON.
             * @function toJSON
             * @memberof E2E.Message.AppStateFatalExceptionNotification
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AppStateFatalExceptionNotification.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AppStateFatalExceptionNotification
             * @function getTypeUrl
             * @memberof E2E.Message.AppStateFatalExceptionNotification
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AppStateFatalExceptionNotification.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.AppStateFatalExceptionNotification";
            };

            return AppStateFatalExceptionNotification;
        })();

        Message.AppStateSyncKey = (function() {

            /**
             * Properties of an AppStateSyncKey.
             * @memberof E2E.Message
             * @interface IAppStateSyncKey
             * @property {E2E.Message.IAppStateSyncKeyId|null} [keyId] AppStateSyncKey keyId
             * @property {E2E.Message.IAppStateSyncKeyData|null} [keyData] AppStateSyncKey keyData
             */

            /**
             * Constructs a new AppStateSyncKey.
             * @memberof E2E.Message
             * @classdesc Represents an AppStateSyncKey.
             * @implements IAppStateSyncKey
             * @constructor
             * @param {E2E.Message.IAppStateSyncKey=} [properties] Properties to set
             */
            function AppStateSyncKey(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]];
            }

            /**
             * AppStateSyncKey keyId.
             * @member {E2E.Message.IAppStateSyncKeyId|null|undefined} keyId
             * @memberof E2E.Message.AppStateSyncKey
             * @instance
             */
            AppStateSyncKey.prototype.keyId = null;

            /**
             * AppStateSyncKey keyData.
             * @member {E2E.Message.IAppStateSyncKeyData|null|undefined} keyData
             * @memberof E2E.Message.AppStateSyncKey
             * @instance
             */
            AppStateSyncKey.prototype.keyData = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * AppStateSyncKey _keyId.
             * @member {"keyId"|undefined} _keyId
             * @memberof E2E.Message.AppStateSyncKey
             * @instance
             */
            Object.defineProperty(AppStateSyncKey.prototype, "_keyId", {
                get: $util.oneOfGetter($oneOfFields = ["keyId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AppStateSyncKey _keyData.
             * @member {"keyData"|undefined} _keyData
             * @memberof E2E.Message.AppStateSyncKey
             * @instance
             */
            Object.defineProperty(AppStateSyncKey.prototype, "_keyData", {
                get: $util.oneOfGetter($oneOfFields = ["keyData"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new AppStateSyncKey instance using the specified properties.
             * @function create
             * @memberof E2E.Message.AppStateSyncKey
             * @static
             * @param {E2E.Message.IAppStateSyncKey=} [properties] Properties to set
             * @returns {E2E.Message.AppStateSyncKey} AppStateSyncKey instance
             */
            AppStateSyncKey.create = function create(properties) {
                return new AppStateSyncKey(properties);
            };

            /**
             * Encodes the specified AppStateSyncKey message. Does not implicitly {@link E2E.Message.AppStateSyncKey.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.AppStateSyncKey
             * @static
             * @param {E2E.Message.IAppStateSyncKey} message AppStateSyncKey message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AppStateSyncKey.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId"))
                    $root.E2E.Message.AppStateSyncKeyId.encode(message.keyId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.keyData != null && Object.hasOwnProperty.call(message, "keyData"))
                    $root.E2E.Message.AppStateSyncKeyData.encode(message.keyData, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified AppStateSyncKey message, length delimited. Does not implicitly {@link E2E.Message.AppStateSyncKey.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.AppStateSyncKey
             * @static
             * @param {E2E.Message.IAppStateSyncKey} message AppStateSyncKey message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AppStateSyncKey.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AppStateSyncKey message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.AppStateSyncKey
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.AppStateSyncKey} AppStateSyncKey
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AppStateSyncKey.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.E2E.Message.AppStateSyncKey();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.keyId = $root.E2E.Message.AppStateSyncKeyId.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.keyData = $root.E2E.Message.AppStateSyncKeyData.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an AppStateSyncKey message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.AppStateSyncKey
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.AppStateSyncKey} AppStateSyncKey
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AppStateSyncKey.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AppStateSyncKey message.
             * @function verify
             * @memberof E2E.Message.AppStateSyncKey
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AppStateSyncKey.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.keyId != null && message.hasOwnProperty("keyId")) {
                    properties._keyId = 1;
                    {
                        var error = $root.E2E.Message.AppStateSyncKeyId.verify(message.keyId);
                        if (error)
                            return "keyId." + error;
                    }
                }
                if (message.keyData != null && message.hasOwnProperty("keyData")) {
                    properties._keyData = 1;
                    {
                        var error = $root.E2E.Message.AppStateSyncKeyData.verify(message.keyData);
                        if (error)
                            return "keyData." + error;
                    }
                }
                return null;
            };

            /**
             * Creates an AppStateSyncKey message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.AppStateSyncKey
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.AppStateSyncKey} AppStateSyncKey
             */
            AppStateSyncKey.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.AppStateSyncKey)
                    return object;
                var message = new $root.E2E.Message.AppStateSyncKey();
                if (object.keyId != null) {
                    if (typeof object.keyId !== "object")
                        throw TypeError(".E2E.Message.AppStateSyncKey.keyId: object expected");
                    message.keyId = $root.E2E.Message.AppStateSyncKeyId.fromObject(object.keyId);
                }
                if (object.keyData != null) {
                    if (typeof object.keyData !== "object")
                        throw TypeError(".E2E.Message.AppStateSyncKey.keyData: object expected");
                    message.keyData = $root.E2E.Message.AppStateSyncKeyData.fromObject(object.keyData);
                }
                return message;
            };

            /**
             * Creates a plain object from an AppStateSyncKey message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.AppStateSyncKey
             * @static
             * @param {E2E.Message.AppStateSyncKey} message AppStateSyncKey
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AppStateSyncKey.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.keyId != null && message.hasOwnProperty("keyId")) {
                    object.keyId = $root.E2E.Message.AppStateSyncKeyId.toObject(message.keyId, options);
                    if (options.oneofs)
                        object._keyId = "keyId";
                }
                if (message.keyData != null && message.hasOwnProperty("keyData")) {
                    object.keyData = $root.E2E.Message.AppStateSyncKeyData.toObject(message.keyData, options);
                    if (options.oneofs)
                        object._keyData = "keyData";
                }
                return object;
            };

            /**
             * Converts this AppStateSyncKey to JSON.
             * @function toJSON
             * @memberof E2E.Message.AppStateSyncKey
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AppStateSyncKey.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AppStateSyncKey
             * @function getTypeUrl
             * @memberof E2E.Message.AppStateSyncKey
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AppStateSyncKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.AppStateSyncKey";
            };

            return AppStateSyncKey;
        })();

        Message.AppStateSyncKeyData = (function() {

            /**
             * Properties of an AppStateSyncKeyData.
             * @memberof E2E.Message
             * @interface IAppStateSyncKeyData
             * @property {Uint8Array|null} [keyData] AppStateSyncKeyData keyData
             * @property {E2E.Message.IAppStateSyncKeyFingerprint|null} [fingerprint] AppStateSyncKeyData fingerprint
             * @property {number|Long|null} [timestamp] AppStateSyncKeyData timestamp
             */

            /**
             * Constructs a new AppStateSyncKeyData.
             * @memberof E2E.Message
             * @classdesc Represents an AppStateSyncKeyData.
             * @implements IAppStateSyncKeyData
             * @constructor
             * @param {E2E.Message.IAppStateSyncKeyData=} [properties] Properties to set
             */
            function AppStateSyncKeyData(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]];
            }

            /**
             * AppStateSyncKeyData keyData.
             * @member {Uint8Array|null|undefined} keyData
             * @memberof E2E.Message.AppStateSyncKeyData
             * @instance
             */
            AppStateSyncKeyData.prototype.keyData = null;

            /**
             * AppStateSyncKeyData fingerprint.
             * @member {E2E.Message.IAppStateSyncKeyFingerprint|null|undefined} fingerprint
             * @memberof E2E.Message.AppStateSyncKeyData
             * @instance
             */
            AppStateSyncKeyData.prototype.fingerprint = null;

            /**
             * AppStateSyncKeyData timestamp.
             * @member {number|Long|null|undefined} timestamp
             * @memberof E2E.Message.AppStateSyncKeyData
             * @instance
             */
            AppStateSyncKeyData.prototype.timestamp = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * AppStateSyncKeyData _keyData.
             * @member {"keyData"|undefined} _keyData
             * @memberof E2E.Message.AppStateSyncKeyData
             * @instance
             */
            Object.defineProperty(AppStateSyncKeyData.prototype, "_keyData", {
                get: $util.oneOfGetter($oneOfFields = ["keyData"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AppStateSyncKeyData _fingerprint.
             * @member {"fingerprint"|undefined} _fingerprint
             * @memberof E2E.Message.AppStateSyncKeyData
             * @instance
             */
            Object.defineProperty(AppStateSyncKeyData.prototype, "_fingerprint", {
                get: $util.oneOfGetter($oneOfFields = ["fingerprint"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AppStateSyncKeyData _timestamp.
             * @member {"timestamp"|undefined} _timestamp
             * @memberof E2E.Message.AppStateSyncKeyData
             * @instance
             */
            Object.defineProperty(AppStateSyncKeyData.prototype, "_timestamp", {
                get: $util.oneOfGetter($oneOfFields = ["timestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new AppStateSyncKeyData instance using the specified properties.
             * @function create
             * @memberof E2E.Message.AppStateSyncKeyData
             * @static
             * @param {E2E.Message.IAppStateSyncKeyData=} [properties] Properties to set
             * @returns {E2E.Message.AppStateSyncKeyData} AppStateSyncKeyData instance
             */
            AppStateSyncKeyData.create = function create(properties) {
                return new AppStateSyncKeyData(properties);
            };

            /**
             * Encodes the specified AppStateSyncKeyData message. Does not implicitly {@link E2E.Message.AppStateSyncKeyData.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.AppStateSyncKeyData
             * @static
             * @param {E2E.Message.IAppStateSyncKeyData} message AppStateSyncKeyData message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AppStateSyncKeyData.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.keyData != null && Object.hasOwnProperty.call(message, "keyData"))
                    writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.keyData);
                if (message.fingerprint != null && Object.hasOwnProperty.call(message, "fingerprint"))
                    $root.E2E.Message.AppStateSyncKeyFingerprint.encode(message.fingerprint, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
                    writer.uint32(/* id 3, wireType 0 =*/24).int64(message.timestamp);
                return writer;
            };

            /**
             * Encodes the specified AppStateSyncKeyData message, length delimited. Does not implicitly {@link E2E.Message.AppStateSyncKeyData.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.AppStateSyncKeyData
             * @static
             * @param {E2E.Message.IAppStateSyncKeyData} message AppStateSyncKeyData message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AppStateSyncKeyData.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AppStateSyncKeyData message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.AppStateSyncKeyData
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.AppStateSyncKeyData} AppStateSyncKeyData
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AppStateSyncKeyData.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.E2E.Message.AppStateSyncKeyData();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.keyData = reader.bytes();
                            break;
                        }
                    case 2: {
                            message.fingerprint = $root.E2E.Message.AppStateSyncKeyFingerprint.decode(reader, reader.uint32());
                            break;
                        }
                    case 3: {
                            message.timestamp = reader.int64();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an AppStateSyncKeyData message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.AppStateSyncKeyData
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.AppStateSyncKeyData} AppStateSyncKeyData
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AppStateSyncKeyData.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AppStateSyncKeyData message.
             * @function verify
             * @memberof E2E.Message.AppStateSyncKeyData
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AppStateSyncKeyData.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.keyData != null && message.hasOwnProperty("keyData")) {
                    properties._keyData = 1;
                    if (!(message.keyData && typeof message.keyData.length === "number" || $util.isString(message.keyData)))
                        return "keyData: buffer expected";
                }
                if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) {
                    properties._fingerprint = 1;
                    {
                        var error = $root.E2E.Message.AppStateSyncKeyFingerprint.verify(message.fingerprint);
                        if (error)
                            return "fingerprint." + error;
                    }
                }
                if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
                    properties._timestamp = 1;
                    if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
                        return "timestamp: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an AppStateSyncKeyData message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.AppStateSyncKeyData
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.AppStateSyncKeyData} AppStateSyncKeyData
             */
            AppStateSyncKeyData.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.AppStateSyncKeyData)
                    return object;
                var message = new $root.E2E.Message.AppStateSyncKeyData();
                if (object.keyData != null)
                    if (typeof object.keyData === "string")
                        $util.base64.decode(object.keyData, message.keyData = $util.newBuffer($util.base64.length(object.keyData)), 0);
                    else if (object.keyData.length >= 0)
                        message.keyData = object.keyData;
                if (object.fingerprint != null) {
                    if (typeof object.fingerprint !== "object")
                        throw TypeError(".E2E.Message.AppStateSyncKeyData.fingerprint: object expected");
                    message.fingerprint = $root.E2E.Message.AppStateSyncKeyFingerprint.fromObject(object.fingerprint);
                }
                if (object.timestamp != null)
                    if ($util.Long)
                        (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false;
                    else if (typeof object.timestamp === "string")
                        message.timestamp = parseInt(object.timestamp, 10);
                    else if (typeof object.timestamp === "number")
                        message.timestamp = object.timestamp;
                    else if (typeof object.timestamp === "object")
                        message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber();
                return message;
            };

            /**
             * Creates a plain object from an AppStateSyncKeyData message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.AppStateSyncKeyData
             * @static
             * @param {E2E.Message.AppStateSyncKeyData} message AppStateSyncKeyData
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AppStateSyncKeyData.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.keyData != null && message.hasOwnProperty("keyData")) {
                    object.keyData = options.bytes === String ? $util.base64.encode(message.keyData, 0, message.keyData.length) : options.bytes === Array ? Array.prototype.slice.call(message.keyData) : message.keyData;
                    if (options.oneofs)
                        object._keyData = "keyData";
                }
                if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) {
                    object.fingerprint = $root.E2E.Message.AppStateSyncKeyFingerprint.toObject(message.fingerprint, options);
                    if (options.oneofs)
                        object._fingerprint = "fingerprint";
                }
                if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
                    if (typeof message.timestamp === "number")
                        object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
                    else
                        object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp;
                    if (options.oneofs)
                        object._timestamp = "timestamp";
                }
                return object;
            };

            /**
             * Converts this AppStateSyncKeyData to JSON.
             * @function toJSON
             * @memberof E2E.Message.AppStateSyncKeyData
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AppStateSyncKeyData.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AppStateSyncKeyData
             * @function getTypeUrl
             * @memberof E2E.Message.AppStateSyncKeyData
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AppStateSyncKeyData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.AppStateSyncKeyData";
            };

            return AppStateSyncKeyData;
        })();

        Message.AppStateSyncKeyFingerprint = (function() {

            /**
             * Properties of an AppStateSyncKeyFingerprint.
             * @memberof E2E.Message
             * @interface IAppStateSyncKeyFingerprint
             * @property {number|null} [rawId] AppStateSyncKeyFingerprint rawId
             * @property {number|null} [currentIndex] AppStateSyncKeyFingerprint currentIndex
             * @property {Array.<number>|null} [deviceIndexes] AppStateSyncKeyFingerprint deviceIndexes
             */

            /**
             * Constructs a new AppStateSyncKeyFingerprint.
             * @memberof E2E.Message
             * @classdesc Represents an AppStateSyncKeyFingerprint.
             * @implements IAppStateSyncKeyFingerprint
             * @constructor
             * @param {E2E.Message.IAppStateSyncKeyFingerprint=} [properties] Properties to set
             */
            function AppStateSyncKeyFingerprint(properties) {
                this.deviceIndexes = [];
                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]];
            }

            /**
             * AppStateSyncKeyFingerprint rawId.
             * @member {number|null|undefined} rawId
             * @memberof E2E.Message.AppStateSyncKeyFingerprint
             * @instance
             */
            AppStateSyncKeyFingerprint.prototype.rawId = null;

            /**
             * AppStateSyncKeyFingerprint currentIndex.
             * @member {number|null|undefined} currentIndex
             * @memberof E2E.Message.AppStateSyncKeyFingerprint
             * @instance
             */
            AppStateSyncKeyFingerprint.prototype.currentIndex = null;

            /**
             * AppStateSyncKeyFingerprint deviceIndexes.
             * @member {Array.<number>} deviceIndexes
             * @memberof E2E.Message.AppStateSyncKeyFingerprint
             * @instance
             */
            AppStateSyncKeyFingerprint.prototype.deviceIndexes = $util.emptyArray;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * AppStateSyncKeyFingerprint _rawId.
             * @member {"rawId"|undefined} _rawId
             * @memberof E2E.Message.AppStateSyncKeyFingerprint
             * @instance
             */
            Object.defineProperty(AppStateSyncKeyFingerprint.prototype, "_rawId", {
                get: $util.oneOfGetter($oneOfFields = ["rawId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AppStateSyncKeyFingerprint _currentIndex.
             * @member {"currentIndex"|undefined} _currentIndex
             * @memberof E2E.Message.AppStateSyncKeyFingerprint
             * @instance
             */
            Object.defineProperty(AppStateSyncKeyFingerprint.prototype, "_currentIndex", {
                get: $util.oneOfGetter($oneOfFields = ["currentIndex"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new AppStateSyncKeyFingerprint instance using the specified properties.
             * @function create
             * @memberof E2E.Message.AppStateSyncKeyFingerprint
             * @static
             * @param {E2E.Message.IAppStateSyncKeyFingerprint=} [properties] Properties to set
             * @returns {E2E.Message.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint instance
             */
            AppStateSyncKeyFingerprint.create = function create(properties) {
                return new AppStateSyncKeyFingerprint(properties);
            };

            /**
             * Encodes the specified AppStateSyncKeyFingerprint message. Does not implicitly {@link E2E.Message.AppStateSyncKeyFingerprint.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.AppStateSyncKeyFingerprint
             * @static
             * @param {E2E.Message.IAppStateSyncKeyFingerprint} message AppStateSyncKeyFingerprint message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AppStateSyncKeyFingerprint.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.rawId != null && Object.hasOwnProperty.call(message, "rawId"))
                    writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.rawId);
                if (message.currentIndex != null && Object.hasOwnProperty.call(message, "currentIndex"))
                    writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.currentIndex);
                if (message.deviceIndexes != null && message.deviceIndexes.length) {
                    writer.uint32(/* id 3, wireType 2 =*/26).fork();
                    for (var i = 0; i < message.deviceIndexes.length; ++i)
                        writer.uint32(message.deviceIndexes[i]);
                    writer.ldelim();
                }
                return writer;
            };

            /**
             * Encodes the specified AppStateSyncKeyFingerprint message, length delimited. Does not implicitly {@link E2E.Message.AppStateSyncKeyFingerprint.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.AppStateSyncKeyFingerprint
             * @static
             * @param {E2E.Message.IAppStateSyncKeyFingerprint} message AppStateSyncKeyFingerprint message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AppStateSyncKeyFingerprint.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AppStateSyncKeyFingerprint message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.AppStateSyncKeyFingerprint
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AppStateSyncKeyFingerprint.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.E2E.Message.AppStateSyncKeyFingerprint();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.rawId = reader.uint32();
                            break;
                        }
                    case 2: {
                            message.currentIndex = reader.uint32();
                            break;
                        }
                    case 3: {
                            if (!(message.deviceIndexes && message.deviceIndexes.length))
                                message.deviceIndexes = [];
                            if ((tag & 7) === 2) {
                                var end2 = reader.uint32() + reader.pos;
                                while (reader.pos < end2)
                                    message.deviceIndexes.push(reader.uint32());
                            } else
                                message.deviceIndexes.push(reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an AppStateSyncKeyFingerprint message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.AppStateSyncKeyFingerprint
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AppStateSyncKeyFingerprint.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AppStateSyncKeyFingerprint message.
             * @function verify
             * @memberof E2E.Message.AppStateSyncKeyFingerprint
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AppStateSyncKeyFingerprint.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.rawId != null && message.hasOwnProperty("rawId")) {
                    properties._rawId = 1;
                    if (!$util.isInteger(message.rawId))
                        return "rawId: integer expected";
                }
                if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) {
                    properties._currentIndex = 1;
                    if (!$util.isInteger(message.currentIndex))
                        return "currentIndex: integer expected";
                }
                if (message.deviceIndexes != null && message.hasOwnProperty("deviceIndexes")) {
                    if (!Array.isArray(message.deviceIndexes))
                        return "deviceIndexes: array expected";
                    for (var i = 0; i < message.deviceIndexes.length; ++i)
                        if (!$util.isInteger(message.deviceIndexes[i]))
                            return "deviceIndexes: integer[] expected";
                }
                return null;
            };

            /**
             * Creates an AppStateSyncKeyFingerprint message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.AppStateSyncKeyFingerprint
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint
             */
            AppStateSyncKeyFingerprint.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.AppStateSyncKeyFingerprint)
                    return object;
                var message = new $root.E2E.Message.AppStateSyncKeyFingerprint();
                if (object.rawId != null)
                    message.rawId = object.rawId >>> 0;
                if (object.currentIndex != null)
                    message.currentIndex = object.currentIndex >>> 0;
                if (object.deviceIndexes) {
                    if (!Array.isArray(object.deviceIndexes))
                        throw TypeError(".E2E.Message.AppStateSyncKeyFingerprint.deviceIndexes: array expected");
                    message.deviceIndexes = [];
                    for (var i = 0; i < object.deviceIndexes.length; ++i)
                        message.deviceIndexes[i] = object.deviceIndexes[i] >>> 0;
                }
                return message;
            };

            /**
             * Creates a plain object from an AppStateSyncKeyFingerprint message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.AppStateSyncKeyFingerprint
             * @static
             * @param {E2E.Message.AppStateSyncKeyFingerprint} message AppStateSyncKeyFingerprint
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AppStateSyncKeyFingerprint.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.deviceIndexes = [];
                if (message.rawId != null && message.hasOwnProperty("rawId")) {
                    object.rawId = message.rawId;
                    if (options.oneofs)
                        object._rawId = "rawId";
                }
                if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) {
                    object.currentIndex = message.currentIndex;
                    if (options.oneofs)
                        object._currentIndex = "currentIndex";
                }
                if (message.deviceIndexes && message.deviceIndexes.length) {
                    object.deviceIndexes = [];
                    for (var j = 0; j < message.deviceIndexes.length; ++j)
                        object.deviceIndexes[j] = message.deviceIndexes[j];
                }
                return object;
            };

            /**
             * Converts this AppStateSyncKeyFingerprint to JSON.
             * @function toJSON
             * @memberof E2E.Message.AppStateSyncKeyFingerprint
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AppStateSyncKeyFingerprint.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AppStateSyncKeyFingerprint
             * @function getTypeUrl
             * @memberof E2E.Message.AppStateSyncKeyFingerprint
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AppStateSyncKeyFingerprint.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.AppStateSyncKeyFingerprint";
            };

            return AppStateSyncKeyFingerprint;
        })();

        Message.AppStateSyncKeyId = (function() {

            /**
             * Properties of an AppStateSyncKeyId.
             * @memberof E2E.Message
             * @interface IAppStateSyncKeyId
             * @property {Uint8Array|null} [keyId] AppStateSyncKeyId keyId
             */

            /**
             * Constructs a new AppStateSyncKeyId.
             * @memberof E2E.Message
             * @classdesc Represents an AppStateSyncKeyId.
             * @implements IAppStateSyncKeyId
             * @constructor
             * @param {E2E.Message.IAppStateSyncKeyId=} [properties] Properties to set
             */
            function AppStateSyncKeyId(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]];
            }

            /**
             * AppStateSyncKeyId keyId.
             * @member {Uint8Array|null|undefined} keyId
             * @memberof E2E.Message.AppStateSyncKeyId
             * @instance
             */
            AppStateSyncKeyId.prototype.keyId = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * AppStateSyncKeyId _keyId.
             * @member {"keyId"|undefined} _keyId
             * @memberof E2E.Message.AppStateSyncKeyId
             * @instance
             */
            Object.defineProperty(AppStateSyncKeyId.prototype, "_keyId", {
                get: $util.oneOfGetter($oneOfFields = ["keyId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new AppStateSyncKeyId instance using the specified properties.
             * @function create
             * @memberof E2E.Message.AppStateSyncKeyId
             * @static
             * @param {E2E.Message.IAppStateSyncKeyId=} [properties] Properties to set
             * @returns {E2E.Message.AppStateSyncKeyId} AppStateSyncKeyId instance
             */
            AppStateSyncKeyId.create = function create(properties) {
                return new AppStateSyncKeyId(properties);
            };

            /**
             * Encodes the specified AppStateSyncKeyId message. Does not implicitly {@link E2E.Message.AppStateSyncKeyId.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.AppStateSyncKeyId
             * @static
             * @param {E2E.Message.IAppStateSyncKeyId} message AppStateSyncKeyId message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AppStateSyncKeyId.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId"))
                    writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.keyId);
                return writer;
            };

            /**
             * Encodes the specified AppStateSyncKeyId message, length delimited. Does not implicitly {@link E2E.Message.AppStateSyncKeyId.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.AppStateSyncKeyId
             * @static
             * @param {E2E.Message.IAppStateSyncKeyId} message AppStateSyncKeyId message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AppStateSyncKeyId.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AppStateSyncKeyId message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.AppStateSyncKeyId
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.AppStateSyncKeyId} AppStateSyncKeyId
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AppStateSyncKeyId.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.E2E.Message.AppStateSyncKeyId();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.keyId = reader.bytes();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an AppStateSyncKeyId message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.AppStateSyncKeyId
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.AppStateSyncKeyId} AppStateSyncKeyId
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AppStateSyncKeyId.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AppStateSyncKeyId message.
             * @function verify
             * @memberof E2E.Message.AppStateSyncKeyId
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AppStateSyncKeyId.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.keyId != null && message.hasOwnProperty("keyId")) {
                    properties._keyId = 1;
                    if (!(message.keyId && typeof message.keyId.length === "number" || $util.isString(message.keyId)))
                        return "keyId: buffer expected";
                }
                return null;
            };

            /**
             * Creates an AppStateSyncKeyId message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.AppStateSyncKeyId
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.AppStateSyncKeyId} AppStateSyncKeyId
             */
            AppStateSyncKeyId.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.AppStateSyncKeyId)
                    return object;
                var message = new $root.E2E.Message.AppStateSyncKeyId();
                if (object.keyId != null)
                    if (typeof object.keyId === "string")
                        $util.base64.decode(object.keyId, message.keyId = $util.newBuffer($util.base64.length(object.keyId)), 0);
                    else if (object.keyId.length >= 0)
                        message.keyId = object.keyId;
                return message;
            };

            /**
             * Creates a plain object from an AppStateSyncKeyId message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.AppStateSyncKeyId
             * @static
             * @param {E2E.Message.AppStateSyncKeyId} message AppStateSyncKeyId
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AppStateSyncKeyId.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.keyId != null && message.hasOwnProperty("keyId")) {
                    object.keyId = options.bytes === String ? $util.base64.encode(message.keyId, 0, message.keyId.length) : options.bytes === Array ? Array.prototype.slice.call(message.keyId) : message.keyId;
                    if (options.oneofs)
                        object._keyId = "keyId";
                }
                return object;
            };

            /**
             * Converts this AppStateSyncKeyId to JSON.
             * @function toJSON
             * @memberof E2E.Message.AppStateSyncKeyId
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AppStateSyncKeyId.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AppStateSyncKeyId
             * @function getTypeUrl
             * @memberof E2E.Message.AppStateSyncKeyId
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AppStateSyncKeyId.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.AppStateSyncKeyId";
            };

            return AppStateSyncKeyId;
        })();

        Message.AppStateSyncKeyRequest = (function() {

            /**
             * Properties of an AppStateSyncKeyRequest.
             * @memberof E2E.Message
             * @interface IAppStateSyncKeyRequest
             * @property {Array.<E2E.Message.IAppStateSyncKeyId>|null} [keyIds] AppStateSyncKeyRequest keyIds
             */

            /**
             * Constructs a new AppStateSyncKeyRequest.
             * @memberof E2E.Message
             * @classdesc Represents an AppStateSyncKeyRequest.
             * @implements IAppStateSyncKeyRequest
             * @constructor
             * @param {E2E.Message.IAppStateSyncKeyRequest=} [properties] Properties to set
             */
            function AppStateSyncKeyRequest(properties) {
                this.keyIds = [];
                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]];
            }

            /**
             * AppStateSyncKeyRequest keyIds.
             * @member {Array.<E2E.Message.IAppStateSyncKeyId>} keyIds
             * @memberof E2E.Message.AppStateSyncKeyRequest
             * @instance
             */
            AppStateSyncKeyRequest.prototype.keyIds = $util.emptyArray;

            /**
             * Creates a new AppStateSyncKeyRequest instance using the specified properties.
             * @function create
             * @memberof E2E.Message.AppStateSyncKeyRequest
             * @static
             * @param {E2E.Message.IAppStateSyncKeyRequest=} [properties] Properties to set
             * @returns {E2E.Message.AppStateSyncKeyRequest} AppStateSyncKeyRequest instance
             */
            AppStateSyncKeyRequest.create = function create(properties) {
                return new AppStateSyncKeyRequest(properties);
            };

            /**
             * Encodes the specified AppStateSyncKeyRequest message. Does not implicitly {@link E2E.Message.AppStateSyncKeyRequest.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.AppStateSyncKeyRequest
             * @static
             * @param {E2E.Message.IAppStateSyncKeyRequest} message AppStateSyncKeyRequest message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AppStateSyncKeyRequest.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.keyIds != null && message.keyIds.length)
                    for (var i = 0; i < message.keyIds.length; ++i)
                        $root.E2E.Message.AppStateSyncKeyId.encode(message.keyIds[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified AppStateSyncKeyRequest message, length delimited. Does not implicitly {@link E2E.Message.AppStateSyncKeyRequest.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.AppStateSyncKeyRequest
             * @static
             * @param {E2E.Message.IAppStateSyncKeyRequest} message AppStateSyncKeyRequest message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AppStateSyncKeyRequest.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AppStateSyncKeyRequest message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.AppStateSyncKeyRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.AppStateSyncKeyRequest} AppStateSyncKeyRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AppStateSyncKeyRequest.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.E2E.Message.AppStateSyncKeyRequest();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            if (!(message.keyIds && message.keyIds.length))
                                message.keyIds = [];
                            message.keyIds.push($root.E2E.Message.AppStateSyncKeyId.decode(reader, reader.uint32()));
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an AppStateSyncKeyRequest message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.AppStateSyncKeyRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.AppStateSyncKeyRequest} AppStateSyncKeyRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AppStateSyncKeyRequest.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AppStateSyncKeyRequest message.
             * @function verify
             * @memberof E2E.Message.AppStateSyncKeyRequest
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AppStateSyncKeyRequest.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.keyIds != null && message.hasOwnProperty("keyIds")) {
                    if (!Array.isArray(message.keyIds))
                        return "keyIds: array expected";
                    for (var i = 0; i < message.keyIds.length; ++i) {
                        var error = $root.E2E.Message.AppStateSyncKeyId.verify(message.keyIds[i]);
                        if (error)
                            return "keyIds." + error;
                    }
                }
                return null;
            };

            /**
             * Creates an AppStateSyncKeyRequest message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.AppStateSyncKeyRequest
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.AppStateSyncKeyRequest} AppStateSyncKeyRequest
             */
            AppStateSyncKeyRequest.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.AppStateSyncKeyRequest)
                    return object;
                var message = new $root.E2E.Message.AppStateSyncKeyRequest();
                if (object.keyIds) {
                    if (!Array.isArray(object.keyIds))
                        throw TypeError(".E2E.Message.AppStateSyncKeyRequest.keyIds: array expected");
                    message.keyIds = [];
                    for (var i = 0; i < object.keyIds.length; ++i) {
                        if (typeof object.keyIds[i] !== "object")
                            throw TypeError(".E2E.Message.AppStateSyncKeyRequest.keyIds: object expected");
                        message.keyIds[i] = $root.E2E.Message.AppStateSyncKeyId.fromObject(object.keyIds[i]);
                    }
                }
                return message;
            };

            /**
             * Creates a plain object from an AppStateSyncKeyRequest message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.AppStateSyncKeyRequest
             * @static
             * @param {E2E.Message.AppStateSyncKeyRequest} message AppStateSyncKeyRequest
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AppStateSyncKeyRequest.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.keyIds = [];
                if (message.keyIds && message.keyIds.length) {
                    object.keyIds = [];
                    for (var j = 0; j < message.keyIds.length; ++j)
                        object.keyIds[j] = $root.E2E.Message.AppStateSyncKeyId.toObject(message.keyIds[j], options);
                }
                return object;
            };

            /**
             * Converts this AppStateSyncKeyRequest to JSON.
             * @function toJSON
             * @memberof E2E.Message.AppStateSyncKeyRequest
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AppStateSyncKeyRequest.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AppStateSyncKeyRequest
             * @function getTypeUrl
             * @memberof E2E.Message.AppStateSyncKeyRequest
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AppStateSyncKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.AppStateSyncKeyRequest";
            };

            return AppStateSyncKeyRequest;
        })();

        Message.AppStateSyncKeyShare = (function() {

            /**
             * Properties of an AppStateSyncKeyShare.
             * @memberof E2E.Message
             * @interface IAppStateSyncKeyShare
             * @property {Array.<E2E.Message.IAppStateSyncKey>|null} [keys] AppStateSyncKeyShare keys
             */

            /**
             * Constructs a new AppStateSyncKeyShare.
             * @memberof E2E.Message
             * @classdesc Represents an AppStateSyncKeyShare.
             * @implements IAppStateSyncKeyShare
             * @constructor
             * @param {E2E.Message.IAppStateSyncKeyShare=} [properties] Properties to set
             */
            function AppStateSyncKeyShare(properties) {
                this.keys = [];
                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]];
            }

            /**
             * AppStateSyncKeyShare keys.
             * @member {Array.<E2E.Message.IAppStateSyncKey>} keys
             * @memberof E2E.Message.AppStateSyncKeyShare
             * @instance
             */
            AppStateSyncKeyShare.prototype.keys = $util.emptyArray;

            /**
             * Creates a new AppStateSyncKeyShare instance using the specified properties.
             * @function create
             * @memberof E2E.Message.AppStateSyncKeyShare
             * @static
             * @param {E2E.Message.IAppStateSyncKeyShare=} [properties] Properties to set
             * @returns {E2E.Message.AppStateSyncKeyShare} AppStateSyncKeyShare instance
             */
            AppStateSyncKeyShare.create = function create(properties) {
                return new AppStateSyncKeyShare(properties);
            };

            /**
             * Encodes the specified AppStateSyncKeyShare message. Does not implicitly {@link E2E.Message.AppStateSyncKeyShare.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.AppStateSyncKeyShare
             * @static
             * @param {E2E.Message.IAppStateSyncKeyShare} message AppStateSyncKeyShare message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AppStateSyncKeyShare.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.keys != null && message.keys.length)
                    for (var i = 0; i < message.keys.length; ++i)
                        $root.E2E.Message.AppStateSyncKey.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified AppStateSyncKeyShare message, length delimited. Does not implicitly {@link E2E.Message.AppStateSyncKeyShare.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.AppStateSyncKeyShare
             * @static
             * @param {E2E.Message.IAppStateSyncKeyShare} message AppStateSyncKeyShare message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AppStateSyncKeyShare.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AppStateSyncKeyShare message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.AppStateSyncKeyShare
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.AppStateSyncKeyShare} AppStateSyncKeyShare
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AppStateSyncKeyShare.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.E2E.Message.AppStateSyncKeyShare();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            if (!(message.keys && message.keys.length))
                                message.keys = [];
                            message.keys.push($root.E2E.Message.AppStateSyncKey.decode(reader, reader.uint32()));
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an AppStateSyncKeyShare message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.AppStateSyncKeyShare
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.AppStateSyncKeyShare} AppStateSyncKeyShare
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AppStateSyncKeyShare.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AppStateSyncKeyShare message.
             * @function verify
             * @memberof E2E.Message.AppStateSyncKeyShare
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AppStateSyncKeyShare.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.keys != null && message.hasOwnProperty("keys")) {
                    if (!Array.isArray(message.keys))
                        return "keys: array expected";
                    for (var i = 0; i < message.keys.length; ++i) {
                        var error = $root.E2E.Message.AppStateSyncKey.verify(message.keys[i]);
                        if (error)
                            return "keys." + error;
                    }
                }
                return null;
            };

            /**
             * Creates an AppStateSyncKeyShare message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.AppStateSyncKeyShare
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.AppStateSyncKeyShare} AppStateSyncKeyShare
             */
            AppStateSyncKeyShare.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.AppStateSyncKeyShare)
                    return object;
                var message = new $root.E2E.Message.AppStateSyncKeyShare();
                if (object.keys) {
                    if (!Array.isArray(object.keys))
                        throw TypeError(".E2E.Message.AppStateSyncKeyShare.keys: array expected");
                    message.keys = [];
                    for (var i = 0; i < object.keys.length; ++i) {
                        if (typeof object.keys[i] !== "object")
                            throw TypeError(".E2E.Message.AppStateSyncKeyShare.keys: object expected");
                        message.keys[i] = $root.E2E.Message.AppStateSyncKey.fromObject(object.keys[i]);
                    }
                }
                return message;
            };

            /**
             * Creates a plain object from an AppStateSyncKeyShare message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.AppStateSyncKeyShare
             * @static
             * @param {E2E.Message.AppStateSyncKeyShare} message AppStateSyncKeyShare
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AppStateSyncKeyShare.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.keys = [];
                if (message.keys && message.keys.length) {
                    object.keys = [];
                    for (var j = 0; j < message.keys.length; ++j)
                        object.keys[j] = $root.E2E.Message.AppStateSyncKey.toObject(message.keys[j], options);
                }
                return object;
            };

            /**
             * Converts this AppStateSyncKeyShare to JSON.
             * @function toJSON
             * @memberof E2E.Message.AppStateSyncKeyShare
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AppStateSyncKeyShare.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AppStateSyncKeyShare
             * @function getTypeUrl
             * @memberof E2E.Message.AppStateSyncKeyShare
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AppStateSyncKeyShare.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.AppStateSyncKeyShare";
            };

            return AppStateSyncKeyShare;
        })();

        Message.AudioMessage = (function() {

            /**
             * Properties of an AudioMessage.
             * @memberof E2E.Message
             * @interface IAudioMessage
             * @property {string|null} [url] AudioMessage url
             * @property {string|null} [mimetype] AudioMessage mimetype
             * @property {Uint8Array|null} [fileSha256] AudioMessage fileSha256
             * @property {number|Long|null} [fileLength] AudioMessage fileLength
             * @property {number|null} [seconds] AudioMessage seconds
             * @property {boolean|null} [ptt] AudioMessage ptt
             * @property {Uint8Array|null} [mediaKey] AudioMessage mediaKey
             * @property {Uint8Array|null} [fileEncSha256] AudioMessage fileEncSha256
             * @property {string|null} [directPath] AudioMessage directPath
             * @property {number|Long|null} [mediaKeyTimestamp] AudioMessage mediaKeyTimestamp
             * @property {E2E.IContextInfo|null} [contextInfo] AudioMessage contextInfo
             * @property {Uint8Array|null} [streamingSidecar] AudioMessage streamingSidecar
             * @property {Uint8Array|null} [waveform] AudioMessage waveform
             * @property {number|null} [backgroundArgb] AudioMessage backgroundArgb
             * @property {boolean|null} [viewOnce] AudioMessage viewOnce
             * @property {string|null} [accessibilityLabel] AudioMessage accessibilityLabel
             * @property {E2E.Message.MediaKeyDomain|null} [mediaKeyDomain] AudioMessage mediaKeyDomain
             */

            /**
             * Constructs a new AudioMessage.
             * @memberof E2E.Message
             * @classdesc Represents an AudioMessage.
             * @implements IAudioMessage
             * @constructor
             * @param {E2E.Message.IAudioMessage=} [properties] Properties to set
             */
            function AudioMessage(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]];
            }

            /**
             * AudioMessage url.
             * @member {string|null|undefined} url
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.url = null;

            /**
             * AudioMessage mimetype.
             * @member {string|null|undefined} mimetype
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.mimetype = null;

            /**
             * AudioMessage fileSha256.
             * @member {Uint8Array|null|undefined} fileSha256
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.fileSha256 = null;

            /**
             * AudioMessage fileLength.
             * @member {number|Long|null|undefined} fileLength
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.fileLength = null;

            /**
             * AudioMessage seconds.
             * @member {number|null|undefined} seconds
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.seconds = null;

            /**
             * AudioMessage ptt.
             * @member {boolean|null|undefined} ptt
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.ptt = null;

            /**
             * AudioMessage mediaKey.
             * @member {Uint8Array|null|undefined} mediaKey
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.mediaKey = null;

            /**
             * AudioMessage fileEncSha256.
             * @member {Uint8Array|null|undefined} fileEncSha256
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.fileEncSha256 = null;

            /**
             * AudioMessage directPath.
             * @member {string|null|undefined} directPath
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.directPath = null;

            /**
             * AudioMessage mediaKeyTimestamp.
             * @member {number|Long|null|undefined} mediaKeyTimestamp
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.mediaKeyTimestamp = null;

            /**
             * AudioMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.contextInfo = null;

            /**
             * AudioMessage streamingSidecar.
             * @member {Uint8Array|null|undefined} streamingSidecar
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.streamingSidecar = null;

            /**
             * AudioMessage waveform.
             * @member {Uint8Array|null|undefined} waveform
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.waveform = null;

            /**
             * AudioMessage backgroundArgb.
             * @member {number|null|undefined} backgroundArgb
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.backgroundArgb = null;

            /**
             * AudioMessage viewOnce.
             * @member {boolean|null|undefined} viewOnce
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.viewOnce = null;

            /**
             * AudioMessage accessibilityLabel.
             * @member {string|null|undefined} accessibilityLabel
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.accessibilityLabel = null;

            /**
             * AudioMessage mediaKeyDomain.
             * @member {E2E.Message.MediaKeyDomain|null|undefined} mediaKeyDomain
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            AudioMessage.prototype.mediaKeyDomain = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * AudioMessage _url.
             * @member {"url"|undefined} _url
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            Object.defineProperty(AudioMessage.prototype, "_url", {
                get: $util.oneOfGetter($oneOfFields = ["url"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AudioMessage _mimetype.
             * @member {"mimetype"|undefined} _mimetype
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            Object.defineProperty(AudioMessage.prototype, "_mimetype", {
                get: $util.oneOfGetter($oneOfFields = ["mimetype"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AudioMessage _fileSha256.
             * @member {"fileSha256"|undefined} _fileSha256
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            Object.defineProperty(AudioMessage.prototype, "_fileSha256", {
                get: $util.oneOfGetter($oneOfFields = ["fileSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AudioMessage _fileLength.
             * @member {"fileLength"|undefined} _fileLength
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            Object.defineProperty(AudioMessage.prototype, "_fileLength", {
                get: $util.oneOfGetter($oneOfFields = ["fileLength"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AudioMessage _seconds.
             * @member {"seconds"|undefined} _seconds
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            Object.defineProperty(AudioMessage.prototype, "_seconds", {
                get: $util.oneOfGetter($oneOfFields = ["seconds"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AudioMessage _ptt.
             * @member {"ptt"|undefined} _ptt
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            Object.defineProperty(AudioMessage.prototype, "_ptt", {
                get: $util.oneOfGetter($oneOfFields = ["ptt"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AudioMessage _mediaKey.
             * @member {"mediaKey"|undefined} _mediaKey
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            Object.defineProperty(AudioMessage.prototype, "_mediaKey", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AudioMessage _fileEncSha256.
             * @member {"fileEncSha256"|undefined} _fileEncSha256
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            Object.defineProperty(AudioMessage.prototype, "_fileEncSha256", {
                get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AudioMessage _directPath.
             * @member {"directPath"|undefined} _directPath
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            Object.defineProperty(AudioMessage.prototype, "_directPath", {
                get: $util.oneOfGetter($oneOfFields = ["directPath"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AudioMessage _mediaKeyTimestamp.
             * @member {"mediaKeyTimestamp"|undefined} _mediaKeyTimestamp
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            Object.defineProperty(AudioMessage.prototype, "_mediaKeyTimestamp", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AudioMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            Object.defineProperty(AudioMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AudioMessage _streamingSidecar.
             * @member {"streamingSidecar"|undefined} _streamingSidecar
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            Object.defineProperty(AudioMessage.prototype, "_streamingSidecar", {
                get: $util.oneOfGetter($oneOfFields = ["streamingSidecar"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AudioMessage _waveform.
             * @member {"waveform"|undefined} _waveform
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            Object.defineProperty(AudioMessage.prototype, "_waveform", {
                get: $util.oneOfGetter($oneOfFields = ["waveform"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AudioMessage _backgroundArgb.
             * @member {"backgroundArgb"|undefined} _backgroundArgb
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            Object.defineProperty(AudioMessage.prototype, "_backgroundArgb", {
                get: $util.oneOfGetter($oneOfFields = ["backgroundArgb"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AudioMessage _viewOnce.
             * @member {"viewOnce"|undefined} _viewOnce
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            Object.defineProperty(AudioMessage.prototype, "_viewOnce", {
                get: $util.oneOfGetter($oneOfFields = ["viewOnce"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AudioMessage _accessibilityLabel.
             * @member {"accessibilityLabel"|undefined} _accessibilityLabel
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            Object.defineProperty(AudioMessage.prototype, "_accessibilityLabel", {
                get: $util.oneOfGetter($oneOfFields = ["accessibilityLabel"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AudioMessage _mediaKeyDomain.
             * @member {"mediaKeyDomain"|undefined} _mediaKeyDomain
             * @memberof E2E.Message.AudioMessage
             * @instance
             */
            Object.defineProperty(AudioMessage.prototype, "_mediaKeyDomain", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKeyDomain"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new AudioMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.AudioMessage
             * @static
             * @param {E2E.Message.IAudioMessage=} [properties] Properties to set
             * @returns {E2E.Message.AudioMessage} AudioMessage instance
             */
            AudioMessage.create = function create(properties) {
                return new AudioMessage(properties);
            };

            /**
             * Encodes the specified AudioMessage message. Does not implicitly {@link E2E.Message.AudioMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.AudioMessage
             * @static
             * @param {E2E.Message.IAudioMessage} message AudioMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AudioMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.url);
                if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimetype);
                if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256"))
                    writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.fileSha256);
                if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength"))
                    writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.fileLength);
                if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds"))
                    writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.seconds);
                if (message.ptt != null && Object.hasOwnProperty.call(message, "ptt"))
                    writer.uint32(/* id 6, wireType 0 =*/48).bool(message.ptt);
                if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey"))
                    writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.mediaKey);
                if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256"))
                    writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.fileEncSha256);
                if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath"))
                    writer.uint32(/* id 9, wireType 2 =*/74).string(message.directPath);
                if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp"))
                    writer.uint32(/* id 10, wireType 0 =*/80).int64(message.mediaKeyTimestamp);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
                if (message.streamingSidecar != null && Object.hasOwnProperty.call(message, "streamingSidecar"))
                    writer.uint32(/* id 18, wireType 2 =*/146).bytes(message.streamingSidecar);
                if (message.waveform != null && Object.hasOwnProperty.call(message, "waveform"))
                    writer.uint32(/* id 19, wireType 2 =*/154).bytes(message.waveform);
                if (message.backgroundArgb != null && Object.hasOwnProperty.call(message, "backgroundArgb"))
                    writer.uint32(/* id 20, wireType 5 =*/165).fixed32(message.backgroundArgb);
                if (message.viewOnce != null && Object.hasOwnProperty.call(message, "viewOnce"))
                    writer.uint32(/* id 21, wireType 0 =*/168).bool(message.viewOnce);
                if (message.accessibilityLabel != null && Object.hasOwnProperty.call(message, "accessibilityLabel"))
                    writer.uint32(/* id 22, wireType 2 =*/178).string(message.accessibilityLabel);
                if (message.mediaKeyDomain != null && Object.hasOwnProperty.call(message, "mediaKeyDomain"))
                    writer.uint32(/* id 23, wireType 0 =*/184).int32(message.mediaKeyDomain);
                return writer;
            };

            /**
             * Encodes the specified AudioMessage message, length delimited. Does not implicitly {@link E2E.Message.AudioMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.AudioMessage
             * @static
             * @param {E2E.Message.IAudioMessage} message AudioMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AudioMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AudioMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.AudioMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.AudioMessage} AudioMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AudioMessage.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.E2E.Message.AudioMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.url = reader.string();
                            break;
                        }
                    case 2: {
                            message.mimetype = reader.string();
                            break;
                        }
                    case 3: {
                            message.fileSha256 = reader.bytes();
                            break;
                        }
                    case 4: {
                            message.fileLength = reader.uint64();
                            break;
                        }
                    case 5: {
                            message.seconds = reader.uint32();
                            break;
                        }
                    case 6: {
                            message.ptt = reader.bool();
                            break;
                        }
                    case 7: {
                            message.mediaKey = reader.bytes();
                            break;
                        }
                    case 8: {
                            message.fileEncSha256 = reader.bytes();
                            break;
                        }
                    case 9: {
                            message.directPath = reader.string();
                            break;
                        }
                    case 10: {
                            message.mediaKeyTimestamp = reader.int64();
                            break;
                        }
                    case 17: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 18: {
                            message.streamingSidecar = reader.bytes();
                            break;
                        }
                    case 19: {
                            message.waveform = reader.bytes();
                            break;
                        }
                    case 20: {
                            message.backgroundArgb = reader.fixed32();
                            break;
                        }
                    case 21: {
                            message.viewOnce = reader.bool();
                            break;
                        }
                    case 22: {
                            message.accessibilityLabel = reader.string();
                            break;
                        }
                    case 23: {
                            message.mediaKeyDomain = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an AudioMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.AudioMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.AudioMessage} AudioMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AudioMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AudioMessage message.
             * @function verify
             * @memberof E2E.Message.AudioMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AudioMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.url != null && message.hasOwnProperty("url")) {
                    properties._url = 1;
                    if (!$util.isString(message.url))
                        return "url: string expected";
                }
                if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                    properties._mimetype = 1;
                    if (!$util.isString(message.mimetype))
                        return "mimetype: string expected";
                }
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                    properties._fileSha256 = 1;
                    if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                        return "fileSha256: buffer expected";
                }
                if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                    properties._fileLength = 1;
                    if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high)))
                        return "fileLength: integer|Long expected";
                }
                if (message.seconds != null && message.hasOwnProperty("seconds")) {
                    properties._seconds = 1;
                    if (!$util.isInteger(message.seconds))
                        return "seconds: integer expected";
                }
                if (message.ptt != null && message.hasOwnProperty("ptt")) {
                    properties._ptt = 1;
                    if (typeof message.ptt !== "boolean")
                        return "ptt: boolean expected";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    properties._mediaKey = 1;
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                }
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                    properties._fileEncSha256 = 1;
                    if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                        return "fileEncSha256: buffer expected";
                }
                if (message.directPath != null && message.hasOwnProperty("directPath")) {
                    properties._directPath = 1;
                    if (!$util.isString(message.directPath))
                        return "directPath: string expected";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    properties._mediaKeyTimestamp = 1;
                    if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high)))
                        return "mediaKeyTimestamp: integer|Long expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.streamingSidecar != null && message.hasOwnProperty("streamingSidecar")) {
                    properties._streamingSidecar = 1;
                    if (!(message.streamingSidecar && typeof message.streamingSidecar.length === "number" || $util.isString(message.streamingSidecar)))
                        return "streamingSidecar: buffer expected";
                }
                if (message.waveform != null && message.hasOwnProperty("waveform")) {
                    properties._waveform = 1;
                    if (!(message.waveform && typeof message.waveform.length === "number" || $util.isString(message.waveform)))
                        return "waveform: buffer expected";
                }
                if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb")) {
                    properties._backgroundArgb = 1;
                    if (!$util.isInteger(message.backgroundArgb))
                        return "backgroundArgb: integer expected";
                }
                if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) {
                    properties._viewOnce = 1;
                    if (typeof message.viewOnce !== "boolean")
                        return "viewOnce: boolean expected";
                }
                if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) {
                    properties._accessibilityLabel = 1;
                    if (!$util.isString(message.accessibilityLabel))
                        return "accessibilityLabel: string expected";
                }
                if (message.mediaKeyDomain != null && message.hasOwnProperty("mediaKeyDomain")) {
                    properties._mediaKeyDomain = 1;
                    switch (message.mediaKeyDomain) {
                    default:
                        return "mediaKeyDomain: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates an AudioMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.AudioMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.AudioMessage} AudioMessage
             */
            AudioMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.AudioMessage)
                    return object;
                var message = new $root.E2E.Message.AudioMessage();
                if (object.url != null)
                    message.url = String(object.url);
                if (object.mimetype != null)
                    message.mimetype = String(object.mimetype);
                if (object.fileSha256 != null)
                    if (typeof object.fileSha256 === "string")
                        $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0);
                    else if (object.fileSha256.length >= 0)
                        message.fileSha256 = object.fileSha256;
                if (object.fileLength != null)
                    if ($util.Long)
                        (message.fileLength = $util.Long.fromValue(object.fileLength)).unsigned = true;
                    else if (typeof object.fileLength === "string")
                        message.fileLength = parseInt(object.fileLength, 10);
                    else if (typeof object.fileLength === "number")
                        message.fileLength = object.fileLength;
                    else if (typeof object.fileLength === "object")
                        message.fileLength = new $util.LongBits(object.fileLength.low >>> 0, object.fileLength.high >>> 0).toNumber(true);
                if (object.seconds != null)
                    message.seconds = object.seconds >>> 0;
                if (object.ptt != null)
                    message.ptt = Boolean(object.ptt);
                if (object.mediaKey != null)
                    if (typeof object.mediaKey === "string")
                        $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0);
                    else if (object.mediaKey.length >= 0)
                        message.mediaKey = object.mediaKey;
                if (object.fileEncSha256 != null)
                    if (typeof object.fileEncSha256 === "string")
                        $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0);
                    else if (object.fileEncSha256.length >= 0)
                        message.fileEncSha256 = object.fileEncSha256;
                if (object.directPath != null)
                    message.directPath = String(object.directPath);
                if (object.mediaKeyTimestamp != null)
                    if ($util.Long)
                        (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false;
                    else if (typeof object.mediaKeyTimestamp === "string")
                        message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10);
                    else if (typeof object.mediaKeyTimestamp === "number")
                        message.mediaKeyTimestamp = object.mediaKeyTimestamp;
                    else if (typeof object.mediaKeyTimestamp === "object")
                        message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber();
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.AudioMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                if (object.streamingSidecar != null)
                    if (typeof object.streamingSidecar === "string")
                        $util.base64.decode(object.streamingSidecar, message.streamingSidecar = $util.newBuffer($util.base64.length(object.streamingSidecar)), 0);
                    else if (object.streamingSidecar.length >= 0)
                        message.streamingSidecar = object.streamingSidecar;
                if (object.waveform != null)
                    if (typeof object.waveform === "string")
                        $util.base64.decode(object.waveform, message.waveform = $util.newBuffer($util.base64.length(object.waveform)), 0);
                    else if (object.waveform.length >= 0)
                        message.waveform = object.waveform;
                if (object.backgroundArgb != null)
                    message.backgroundArgb = object.backgroundArgb >>> 0;
                if (object.viewOnce != null)
                    message.viewOnce = Boolean(object.viewOnce);
                if (object.accessibilityLabel != null)
                    message.accessibilityLabel = String(object.accessibilityLabel);
                switch (object.mediaKeyDomain) {
                default:
                    if (typeof object.mediaKeyDomain === "number") {
                        message.mediaKeyDomain = object.mediaKeyDomain;
                        break;
                    }
                    break;
                case "UNSET":
                case 0:
                    message.mediaKeyDomain = 0;
                    break;
                case "E2EE_CHAT":
                case 1:
                    message.mediaKeyDomain = 1;
                    break;
                case "STATUS":
                case 2:
                    message.mediaKeyDomain = 2;
                    break;
                case "CAPI":
                case 3:
                    message.mediaKeyDomain = 3;
                    break;
                case "BOT":
                case 4:
                    message.mediaKeyDomain = 4;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from an AudioMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.AudioMessage
             * @static
             * @param {E2E.Message.AudioMessage} message AudioMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AudioMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.url != null && message.hasOwnProperty("url")) {
                    object.url = message.url;
                    if (options.oneofs)
                        object._url = "url";
                }
                if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                    object.mimetype = message.mimetype;
                    if (options.oneofs)
                        object._mimetype = "mimetype";
                }
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                    object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256;
                    if (options.oneofs)
                        object._fileSha256 = "fileSha256";
                }
                if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                    if (typeof message.fileLength === "number")
                        object.fileLength = options.longs === String ? String(message.fileLength) : message.fileLength;
                    else
                        object.fileLength = options.longs === String ? $util.Long.prototype.toString.call(message.fileLength) : options.longs === Number ? new $util.LongBits(message.fileLength.low >>> 0, message.fileLength.high >>> 0).toNumber(true) : message.fileLength;
                    if (options.oneofs)
                        object._fileLength = "fileLength";
                }
                if (message.seconds != null && message.hasOwnProperty("seconds")) {
                    object.seconds = message.seconds;
                    if (options.oneofs)
                        object._seconds = "seconds";
                }
                if (message.ptt != null && message.hasOwnProperty("ptt")) {
                    object.ptt = message.ptt;
                    if (options.oneofs)
                        object._ptt = "ptt";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey;
                    if (options.oneofs)
                        object._mediaKey = "mediaKey";
                }
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                    object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256;
                    if (options.oneofs)
                        object._fileEncSha256 = "fileEncSha256";
                }
                if (message.directPath != null && message.hasOwnProperty("directPath")) {
                    object.directPath = message.directPath;
                    if (options.oneofs)
                        object._directPath = "directPath";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    if (typeof message.mediaKeyTimestamp === "number")
                        object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp;
                    else
                        object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp;
                    if (options.oneofs)
                        object._mediaKeyTimestamp = "mediaKeyTimestamp";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.streamingSidecar != null && message.hasOwnProperty("streamingSidecar")) {
                    object.streamingSidecar = options.bytes === String ? $util.base64.encode(message.streamingSidecar, 0, message.streamingSidecar.length) : options.bytes === Array ? Array.prototype.slice.call(message.streamingSidecar) : message.streamingSidecar;
                    if (options.oneofs)
                        object._streamingSidecar = "streamingSidecar";
                }
                if (message.waveform != null && message.hasOwnProperty("waveform")) {
                    object.waveform = options.bytes === String ? $util.base64.encode(message.waveform, 0, message.waveform.length) : options.bytes === Array ? Array.prototype.slice.call(message.waveform) : message.waveform;
                    if (options.oneofs)
                        object._waveform = "waveform";
                }
                if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb")) {
                    object.backgroundArgb = message.backgroundArgb;
                    if (options.oneofs)
                        object._backgroundArgb = "backgroundArgb";
                }
                if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) {
                    object.viewOnce = message.viewOnce;
                    if (options.oneofs)
                        object._viewOnce = "viewOnce";
                }
                if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) {
                    object.accessibilityLabel = message.accessibilityLabel;
                    if (options.oneofs)
                        object._accessibilityLabel = "accessibilityLabel";
                }
                if (message.mediaKeyDomain != null && message.hasOwnProperty("mediaKeyDomain")) {
                    object.mediaKeyDomain = options.enums === String ? $root.E2E.Message.MediaKeyDomain[message.mediaKeyDomain] === undefined ? message.mediaKeyDomain : $root.E2E.Message.MediaKeyDomain[message.mediaKeyDomain] : message.mediaKeyDomain;
                    if (options.oneofs)
                        object._mediaKeyDomain = "mediaKeyDomain";
                }
                return object;
            };

            /**
             * Converts this AudioMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.AudioMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AudioMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AudioMessage
             * @function getTypeUrl
             * @memberof E2E.Message.AudioMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AudioMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.AudioMessage";
            };

            return AudioMessage;
        })();

        Message.BCallMessage = (function() {

            /**
             * Properties of a BCallMessage.
             * @memberof E2E.Message
             * @interface IBCallMessage
             * @property {string|null} [sessionId] BCallMessage sessionId
             * @property {E2E.Message.BCallMessage.MediaType|null} [mediaType] BCallMessage mediaType
             * @property {Uint8Array|null} [masterKey] BCallMessage masterKey
             * @property {string|null} [caption] BCallMessage caption
             */

            /**
             * Constructs a new BCallMessage.
             * @memberof E2E.Message
             * @classdesc Represents a BCallMessage.
             * @implements IBCallMessage
             * @constructor
             * @param {E2E.Message.IBCallMessage=} [properties] Properties to set
             */
            function BCallMessage(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]];
            }

            /**
             * BCallMessage sessionId.
             * @member {string|null|undefined} sessionId
             * @memberof E2E.Message.BCallMessage
             * @instance
             */
            BCallMessage.prototype.sessionId = null;

            /**
             * BCallMessage mediaType.
             * @member {E2E.Message.BCallMessage.MediaType|null|undefined} mediaType
             * @memberof E2E.Message.BCallMessage
             * @instance
             */
            BCallMessage.prototype.mediaType = null;

            /**
             * BCallMessage masterKey.
             * @member {Uint8Array|null|undefined} masterKey
             * @memberof E2E.Message.BCallMessage
             * @instance
             */
            BCallMessage.prototype.masterKey = null;

            /**
             * BCallMessage caption.
             * @member {string|null|undefined} caption
             * @memberof E2E.Message.BCallMessage
             * @instance
             */
            BCallMessage.prototype.caption = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * BCallMessage _sessionId.
             * @member {"sessionId"|undefined} _sessionId
             * @memberof E2E.Message.BCallMessage
             * @instance
             */
            Object.defineProperty(BCallMessage.prototype, "_sessionId", {
                get: $util.oneOfGetter($oneOfFields = ["sessionId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BCallMessage _mediaType.
             * @member {"mediaType"|undefined} _mediaType
             * @memberof E2E.Message.BCallMessage
             * @instance
             */
            Object.defineProperty(BCallMessage.prototype, "_mediaType", {
                get: $util.oneOfGetter($oneOfFields = ["mediaType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BCallMessage _masterKey.
             * @member {"masterKey"|undefined} _masterKey
             * @memberof E2E.Message.BCallMessage
             * @instance
             */
            Object.defineProperty(BCallMessage.prototype, "_masterKey", {
                get: $util.oneOfGetter($oneOfFields = ["masterKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BCallMessage _caption.
             * @member {"caption"|undefined} _caption
             * @memberof E2E.Message.BCallMessage
             * @instance
             */
            Object.defineProperty(BCallMessage.prototype, "_caption", {
                get: $util.oneOfGetter($oneOfFields = ["caption"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new BCallMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.BCallMessage
             * @static
             * @param {E2E.Message.IBCallMessage=} [properties] Properties to set
             * @returns {E2E.Message.BCallMessage} BCallMessage instance
             */
            BCallMessage.create = function create(properties) {
                return new BCallMessage(properties);
            };

            /**
             * Encodes the specified BCallMessage message. Does not implicitly {@link E2E.Message.BCallMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.BCallMessage
             * @static
             * @param {E2E.Message.IBCallMessage} message BCallMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BCallMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.sessionId);
                if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mediaType);
                if (message.masterKey != null && Object.hasOwnProperty.call(message, "masterKey"))
                    writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.masterKey);
                if (message.caption != null && Object.hasOwnProperty.call(message, "caption"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.caption);
                return writer;
            };

            /**
             * Encodes the specified BCallMessage message, length delimited. Does not implicitly {@link E2E.Message.BCallMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.BCallMessage
             * @static
             * @param {E2E.Message.IBCallMessage} message BCallMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BCallMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BCallMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.BCallMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.BCallMessage} BCallMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BCallMessage.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.E2E.Message.BCallMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.sessionId = reader.string();
                            break;
                        }
                    case 2: {
                            message.mediaType = reader.int32();
                            break;
                        }
                    case 3: {
                            message.masterKey = reader.bytes();
                            break;
                        }
                    case 4: {
                            message.caption = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a BCallMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.BCallMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.BCallMessage} BCallMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BCallMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BCallMessage message.
             * @function verify
             * @memberof E2E.Message.BCallMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BCallMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.sessionId != null && message.hasOwnProperty("sessionId")) {
                    properties._sessionId = 1;
                    if (!$util.isString(message.sessionId))
                        return "sessionId: string expected";
                }
                if (message.mediaType != null && message.hasOwnProperty("mediaType")) {
                    properties._mediaType = 1;
                    switch (message.mediaType) {
                    default:
                        return "mediaType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                if (message.masterKey != null && message.hasOwnProperty("masterKey")) {
                    properties._masterKey = 1;
                    if (!(message.masterKey && typeof message.masterKey.length === "number" || $util.isString(message.masterKey)))
                        return "masterKey: buffer expected";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    properties._caption = 1;
                    if (!$util.isString(message.caption))
                        return "caption: string expected";
                }
                return null;
            };

            /**
             * Creates a BCallMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.BCallMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.BCallMessage} BCallMessage
             */
            BCallMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.BCallMessage)
                    return object;
                var message = new $root.E2E.Message.BCallMessage();
                if (object.sessionId != null)
                    message.sessionId = String(object.sessionId);
                switch (object.mediaType) {
                default:
                    if (typeof object.mediaType === "number") {
                        message.mediaType = object.mediaType;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.mediaType = 0;
                    break;
                case "AUDIO":
                case 1:
                    message.mediaType = 1;
                    break;
                case "VIDEO":
                case 2:
                    message.mediaType = 2;
                    break;
                }
                if (object.masterKey != null)
                    if (typeof object.masterKey === "string")
                        $util.base64.decode(object.masterKey, message.masterKey = $util.newBuffer($util.base64.length(object.masterKey)), 0);
                    else if (object.masterKey.length >= 0)
                        message.masterKey = object.masterKey;
                if (object.caption != null)
                    message.caption = String(object.caption);
                return message;
            };

            /**
             * Creates a plain object from a BCallMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.BCallMessage
             * @static
             * @param {E2E.Message.BCallMessage} message BCallMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BCallMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.sessionId != null && message.hasOwnProperty("sessionId")) {
                    object.sessionId = message.sessionId;
                    if (options.oneofs)
                        object._sessionId = "sessionId";
                }
                if (message.mediaType != null && message.hasOwnProperty("mediaType")) {
                    object.mediaType = options.enums === String ? $root.E2E.Message.BCallMessage.MediaType[message.mediaType] === undefined ? message.mediaType : $root.E2E.Message.BCallMessage.MediaType[message.mediaType] : message.mediaType;
                    if (options.oneofs)
                        object._mediaType = "mediaType";
                }
                if (message.masterKey != null && message.hasOwnProperty("masterKey")) {
                    object.masterKey = options.bytes === String ? $util.base64.encode(message.masterKey, 0, message.masterKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.masterKey) : message.masterKey;
                    if (options.oneofs)
                        object._masterKey = "masterKey";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    object.caption = message.caption;
                    if (options.oneofs)
                        object._caption = "caption";
                }
                return object;
            };

            /**
             * Converts this BCallMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.BCallMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BCallMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for BCallMessage
             * @function getTypeUrl
             * @memberof E2E.Message.BCallMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            BCallMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.BCallMessage";
            };

            /**
             * MediaType enum.
             * @name E2E.Message.BCallMessage.MediaType
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} AUDIO=1 AUDIO value
             * @property {number} VIDEO=2 VIDEO value
             */
            BCallMessage.MediaType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "AUDIO"] = 1;
                values[valuesById[2] = "VIDEO"] = 2;
                return values;
            })();

            return BCallMessage;
        })();

        Message.ButtonsMessage = (function() {

            /**
             * Properties of a ButtonsMessage.
             * @memberof E2E.Message
             * @interface IButtonsMessage
             * @property {string|null} [contentText] ButtonsMessage contentText
             * @property {string|null} [footerText] ButtonsMessage footerText
             * @property {E2E.IContextInfo|null} [contextInfo] ButtonsMessage contextInfo
             * @property {Array.<E2E.Message.ButtonsMessage.IButton>|null} [buttons] ButtonsMessage buttons
             * @property {E2E.Message.ButtonsMessage.HeaderType|null} [headerType] ButtonsMessage headerType
             * @property {string|null} [text] ButtonsMessage text
             * @property {E2E.Message.IDocumentMessage|null} [documentMessage] ButtonsMessage documentMessage
             * @property {E2E.Message.IImageMessage|null} [imageMessage] ButtonsMessage imageMessage
             * @property {E2E.Message.IVideoMessage|null} [videoMessage] ButtonsMessage videoMessage
             * @property {E2E.Message.ILocationMessage|null} [locationMessage] ButtonsMessage locationMessage
             */

            /**
             * Constructs a new ButtonsMessage.
             * @memberof E2E.Message
             * @classdesc Represents a ButtonsMessage.
             * @implements IButtonsMessage
             * @constructor
             * @param {E2E.Message.IButtonsMessage=} [properties] Properties to set
             */
            function ButtonsMessage(properties) {
                this.buttons = [];
                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]];
            }

            /**
             * ButtonsMessage contentText.
             * @member {string|null|undefined} contentText
             * @memberof E2E.Message.ButtonsMessage
             * @instance
             */
            ButtonsMessage.prototype.contentText = null;

            /**
             * ButtonsMessage footerText.
             * @member {string|null|undefined} footerText
             * @memberof E2E.Message.ButtonsMessage
             * @instance
             */
            ButtonsMessage.prototype.footerText = null;

            /**
             * ButtonsMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.ButtonsMessage
             * @instance
             */
            ButtonsMessage.prototype.contextInfo = null;

            /**
             * ButtonsMessage buttons.
             * @member {Array.<E2E.Message.ButtonsMessage.IButton>} buttons
             * @memberof E2E.Message.ButtonsMessage
             * @instance
             */
            ButtonsMessage.prototype.buttons = $util.emptyArray;

            /**
             * ButtonsMessage headerType.
             * @member {E2E.Message.ButtonsMessage.HeaderType|null|undefined} headerType
             * @memberof E2E.Message.ButtonsMessage
             * @instance
             */
            ButtonsMessage.prototype.headerType = null;

            /**
             * ButtonsMessage text.
             * @member {string|null|undefined} text
             * @memberof E2E.Message.ButtonsMessage
             * @instance
             */
            ButtonsMessage.prototype.text = null;

            /**
             * ButtonsMessage documentMessage.
             * @member {E2E.Message.IDocumentMessage|null|undefined} documentMessage
             * @memberof E2E.Message.ButtonsMessage
             * @instance
             */
            ButtonsMessage.prototype.documentMessage = null;

            /**
             * ButtonsMessage imageMessage.
             * @member {E2E.Message.IImageMessage|null|undefined} imageMessage
             * @memberof E2E.Message.ButtonsMessage
             * @instance
             */
            ButtonsMessage.prototype.imageMessage = null;

            /**
             * ButtonsMessage videoMessage.
             * @member {E2E.Message.IVideoMessage|null|undefined} videoMessage
             * @memberof E2E.Message.ButtonsMessage
             * @instance
             */
            ButtonsMessage.prototype.videoMessage = null;

            /**
             * ButtonsMessage locationMessage.
             * @member {E2E.Message.ILocationMessage|null|undefined} locationMessage
             * @memberof E2E.Message.ButtonsMessage
             * @instance
             */
            ButtonsMessage.prototype.locationMessage = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * ButtonsMessage _contentText.
             * @member {"contentText"|undefined} _contentText
             * @memberof E2E.Message.ButtonsMessage
             * @instance
             */
            Object.defineProperty(ButtonsMessage.prototype, "_contentText", {
                get: $util.oneOfGetter($oneOfFields = ["contentText"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ButtonsMessage _footerText.
             * @member {"footerText"|undefined} _footerText
             * @memberof E2E.Message.ButtonsMessage
             * @instance
             */
            Object.defineProperty(ButtonsMessage.prototype, "_footerText", {
                get: $util.oneOfGetter($oneOfFields = ["footerText"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ButtonsMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.ButtonsMessage
             * @instance
             */
            Object.defineProperty(ButtonsMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ButtonsMessage _headerType.
             * @member {"headerType"|undefined} _headerType
             * @memberof E2E.Message.ButtonsMessage
             * @instance
             */
            Object.defineProperty(ButtonsMessage.prototype, "_headerType", {
                get: $util.oneOfGetter($oneOfFields = ["headerType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ButtonsMessage header.
             * @member {"text"|"documentMessage"|"imageMessage"|"videoMessage"|"locationMessage"|undefined} header
             * @memberof E2E.Message.ButtonsMessage
             * @instance
             */
            Object.defineProperty(ButtonsMessage.prototype, "header", {
                get: $util.oneOfGetter($oneOfFields = ["text", "documentMessage", "imageMessage", "videoMessage", "locationMessage"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new ButtonsMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.ButtonsMessage
             * @static
             * @param {E2E.Message.IButtonsMessage=} [properties] Properties to set
             * @returns {E2E.Message.ButtonsMessage} ButtonsMessage instance
             */
            ButtonsMessage.create = function create(properties) {
                return new ButtonsMessage(properties);
            };

            /**
             * Encodes the specified ButtonsMessage message. Does not implicitly {@link E2E.Message.ButtonsMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.ButtonsMessage
             * @static
             * @param {E2E.Message.IButtonsMessage} message ButtonsMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ButtonsMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.text);
                if (message.documentMessage != null && Object.hasOwnProperty.call(message, "documentMessage"))
                    $root.E2E.Message.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage"))
                    $root.E2E.Message.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                if (message.videoMessage != null && Object.hasOwnProperty.call(message, "videoMessage"))
                    $root.E2E.Message.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                if (message.locationMessage != null && Object.hasOwnProperty.call(message, "locationMessage"))
                    $root.E2E.Message.LocationMessage.encode(message.locationMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                if (message.contentText != null && Object.hasOwnProperty.call(message, "contentText"))
                    writer.uint32(/* id 6, wireType 2 =*/50).string(message.contentText);
                if (message.footerText != null && Object.hasOwnProperty.call(message, "footerText"))
                    writer.uint32(/* id 7, wireType 2 =*/58).string(message.footerText);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                if (message.buttons != null && message.buttons.length)
                    for (var i = 0; i < message.buttons.length; ++i)
                        $root.E2E.Message.ButtonsMessage.Button.encode(message.buttons[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                if (message.headerType != null && Object.hasOwnProperty.call(message, "headerType"))
                    writer.uint32(/* id 10, wireType 0 =*/80).int32(message.headerType);
                return writer;
            };

            /**
             * Encodes the specified ButtonsMessage message, length delimited. Does not implicitly {@link E2E.Message.ButtonsMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.ButtonsMessage
             * @static
             * @param {E2E.Message.IButtonsMessage} message ButtonsMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ButtonsMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ButtonsMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.ButtonsMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.ButtonsMessage} ButtonsMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ButtonsMessage.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.E2E.Message.ButtonsMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 6: {
                            message.contentText = reader.string();
                            break;
                        }
                    case 7: {
                            message.footerText = reader.string();
                            break;
                        }
                    case 8: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 9: {
                            if (!(message.buttons && message.buttons.length))
                                message.buttons = [];
                            message.buttons.push($root.E2E.Message.ButtonsMessage.Button.decode(reader, reader.uint32()));
                            break;
                        }
                    case 10: {
                            message.headerType = reader.int32();
                            break;
                        }
                    case 1: {
                            message.text = reader.string();
                            break;
                        }
                    case 2: {
                            message.documentMessage = $root.E2E.Message.DocumentMessage.decode(reader, reader.uint32());
                            break;
                        }
                    case 3: {
                            message.imageMessage = $root.E2E.Message.ImageMessage.decode(reader, reader.uint32());
                            break;
                        }
                    case 4: {
                            message.videoMessage = $root.E2E.Message.VideoMessage.decode(reader, reader.uint32());
                            break;
                        }
                    case 5: {
                            message.locationMessage = $root.E2E.Message.LocationMessage.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a ButtonsMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.ButtonsMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.ButtonsMessage} ButtonsMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ButtonsMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ButtonsMessage message.
             * @function verify
             * @memberof E2E.Message.ButtonsMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ButtonsMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.contentText != null && message.hasOwnProperty("contentText")) {
                    properties._contentText = 1;
                    if (!$util.isString(message.contentText))
                        return "contentText: string expected";
                }
                if (message.footerText != null && message.hasOwnProperty("footerText")) {
                    properties._footerText = 1;
                    if (!$util.isString(message.footerText))
                        return "footerText: string expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.buttons != null && message.hasOwnProperty("buttons")) {
                    if (!Array.isArray(message.buttons))
                        return "buttons: array expected";
                    for (var i = 0; i < message.buttons.length; ++i) {
                        var error = $root.E2E.Message.ButtonsMessage.Button.verify(message.buttons[i]);
                        if (error)
                            return "buttons." + error;
                    }
                }
                if (message.headerType != null && message.hasOwnProperty("headerType")) {
                    properties._headerType = 1;
                    switch (message.headerType) {
                    default:
                        return "headerType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                        break;
                    }
                }
                if (message.text != null && message.hasOwnProperty("text")) {
                    properties.header = 1;
                    if (!$util.isString(message.text))
                        return "text: string expected";
                }
                if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) {
                    if (properties.header === 1)
                        return "header: multiple values";
                    properties.header = 1;
                    {
                        var error = $root.E2E.Message.DocumentMessage.verify(message.documentMessage);
                        if (error)
                            return "documentMessage." + error;
                    }
                }
                if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) {
                    if (properties.header === 1)
                        return "header: multiple values";
                    properties.header = 1;
                    {
                        var error = $root.E2E.Message.ImageMessage.verify(message.imageMessage);
                        if (error)
                            return "imageMessage." + error;
                    }
                }
                if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) {
                    if (properties.header === 1)
                        return "header: multiple values";
                    properties.header = 1;
                    {
                        var error = $root.E2E.Message.VideoMessage.verify(message.videoMessage);
                        if (error)
                            return "videoMessage." + error;
                    }
                }
                if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) {
                    if (properties.header === 1)
                        return "header: multiple values";
                    properties.header = 1;
                    {
                        var error = $root.E2E.Message.LocationMessage.verify(message.locationMessage);
                        if (error)
                            return "locationMessage." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a ButtonsMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.ButtonsMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.ButtonsMessage} ButtonsMessage
             */
            ButtonsMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.ButtonsMessage)
                    return object;
                var message = new $root.E2E.Message.ButtonsMessage();
                if (object.contentText != null)
                    message.contentText = String(object.contentText);
                if (object.footerText != null)
                    message.footerText = String(object.footerText);
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.ButtonsMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                if (object.buttons) {
                    if (!Array.isArray(object.buttons))
                        throw TypeError(".E2E.Message.ButtonsMessage.buttons: array expected");
                    message.buttons = [];
                    for (var i = 0; i < object.buttons.length; ++i) {
                        if (typeof object.buttons[i] !== "object")
                            throw TypeError(".E2E.Message.ButtonsMessage.buttons: object expected");
                        message.buttons[i] = $root.E2E.Message.ButtonsMessage.Button.fromObject(object.buttons[i]);
                    }
                }
                switch (object.headerType) {
                default:
                    if (typeof object.headerType === "number") {
                        message.headerType = object.headerType;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.headerType = 0;
                    break;
                case "EMPTY":
                case 1:
                    message.headerType = 1;
                    break;
                case "TEXT":
                case 2:
                    message.headerType = 2;
                    break;
                case "DOCUMENT":
                case 3:
                    message.headerType = 3;
                    break;
                case "IMAGE":
                case 4:
                    message.headerType = 4;
                    break;
                case "VIDEO":
                case 5:
                    message.headerType = 5;
                    break;
                case "LOCATION":
                case 6:
                    message.headerType = 6;
                    break;
                }
                if (object.text != null)
                    message.text = String(object.text);
                if (object.documentMessage != null) {
                    if (typeof object.documentMessage !== "object")
                        throw TypeError(".E2E.Message.ButtonsMessage.documentMessage: object expected");
                    message.documentMessage = $root.E2E.Message.DocumentMessage.fromObject(object.documentMessage);
                }
                if (object.imageMessage != null) {
                    if (typeof object.imageMessage !== "object")
                        throw TypeError(".E2E.Message.ButtonsMessage.imageMessage: object expected");
                    message.imageMessage = $root.E2E.Message.ImageMessage.fromObject(object.imageMessage);
                }
                if (object.videoMessage != null) {
                    if (typeof object.videoMessage !== "object")
                        throw TypeError(".E2E.Message.ButtonsMessage.videoMessage: object expected");
                    message.videoMessage = $root.E2E.Message.VideoMessage.fromObject(object.videoMessage);
                }
                if (object.locationMessage != null) {
                    if (typeof object.locationMessage !== "object")
                        throw TypeError(".E2E.Message.ButtonsMessage.locationMessage: object expected");
                    message.locationMessage = $root.E2E.Message.LocationMessage.fromObject(object.locationMessage);
                }
                return message;
            };

            /**
             * Creates a plain object from a ButtonsMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.ButtonsMessage
             * @static
             * @param {E2E.Message.ButtonsMessage} message ButtonsMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ButtonsMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.buttons = [];
                if (message.text != null && message.hasOwnProperty("text")) {
                    object.text = message.text;
                    if (options.oneofs)
                        object.header = "text";
                }
                if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) {
                    object.documentMessage = $root.E2E.Message.DocumentMessage.toObject(message.documentMessage, options);
                    if (options.oneofs)
                        object.header = "documentMessage";
                }
                if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) {
                    object.imageMessage = $root.E2E.Message.ImageMessage.toObject(message.imageMessage, options);
                    if (options.oneofs)
                        object.header = "imageMessage";
                }
                if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) {
                    object.videoMessage = $root.E2E.Message.VideoMessage.toObject(message.videoMessage, options);
                    if (options.oneofs)
                        object.header = "videoMessage";
                }
                if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) {
                    object.locationMessage = $root.E2E.Message.LocationMessage.toObject(message.locationMessage, options);
                    if (options.oneofs)
                        object.header = "locationMessage";
                }
                if (message.contentText != null && message.hasOwnProperty("contentText")) {
                    object.contentText = message.contentText;
                    if (options.oneofs)
                        object._contentText = "contentText";
                }
                if (message.footerText != null && message.hasOwnProperty("footerText")) {
                    object.footerText = message.footerText;
                    if (options.oneofs)
                        object._footerText = "footerText";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.buttons && message.buttons.length) {
                    object.buttons = [];
                    for (var j = 0; j < message.buttons.length; ++j)
                        object.buttons[j] = $root.E2E.Message.ButtonsMessage.Button.toObject(message.buttons[j], options);
                }
                if (message.headerType != null && message.hasOwnProperty("headerType")) {
                    object.headerType = options.enums === String ? $root.E2E.Message.ButtonsMessage.HeaderType[message.headerType] === undefined ? message.headerType : $root.E2E.Message.ButtonsMessage.HeaderType[message.headerType] : message.headerType;
                    if (options.oneofs)
                        object._headerType = "headerType";
                }
                return object;
            };

            /**
             * Converts this ButtonsMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.ButtonsMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ButtonsMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for ButtonsMessage
             * @function getTypeUrl
             * @memberof E2E.Message.ButtonsMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            ButtonsMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.ButtonsMessage";
            };

            ButtonsMessage.Button = (function() {

                /**
                 * Properties of a Button.
                 * @memberof E2E.Message.ButtonsMessage
                 * @interface IButton
                 * @property {string|null} [buttonId] Button buttonId
                 * @property {E2E.Message.ButtonsMessage.Button.IButtonText|null} [buttonText] Button buttonText
                 * @property {E2E.Message.ButtonsMessage.Button.Type|null} [type] Button type
                 * @property {E2E.Message.ButtonsMessage.Button.INativeFlowInfo|null} [nativeFlowInfo] Button nativeFlowInfo
                 */

                /**
                 * Constructs a new Button.
                 * @memberof E2E.Message.ButtonsMessage
                 * @classdesc Represents a Button.
                 * @implements IButton
                 * @constructor
                 * @param {E2E.Message.ButtonsMessage.IButton=} [properties] Properties to set
                 */
                function Button(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]];
                }

                /**
                 * Button buttonId.
                 * @member {string|null|undefined} buttonId
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @instance
                 */
                Button.prototype.buttonId = null;

                /**
                 * Button buttonText.
                 * @member {E2E.Message.ButtonsMessage.Button.IButtonText|null|undefined} buttonText
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @instance
                 */
                Button.prototype.buttonText = null;

                /**
                 * Button type.
                 * @member {E2E.Message.ButtonsMessage.Button.Type|null|undefined} type
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @instance
                 */
                Button.prototype.type = null;

                /**
                 * Button nativeFlowInfo.
                 * @member {E2E.Message.ButtonsMessage.Button.INativeFlowInfo|null|undefined} nativeFlowInfo
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @instance
                 */
                Button.prototype.nativeFlowInfo = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * Button _buttonId.
                 * @member {"buttonId"|undefined} _buttonId
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @instance
                 */
                Object.defineProperty(Button.prototype, "_buttonId", {
                    get: $util.oneOfGetter($oneOfFields = ["buttonId"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Button _buttonText.
                 * @member {"buttonText"|undefined} _buttonText
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @instance
                 */
                Object.defineProperty(Button.prototype, "_buttonText", {
                    get: $util.oneOfGetter($oneOfFields = ["buttonText"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Button _type.
                 * @member {"type"|undefined} _type
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @instance
                 */
                Object.defineProperty(Button.prototype, "_type", {
                    get: $util.oneOfGetter($oneOfFields = ["type"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Button _nativeFlowInfo.
                 * @member {"nativeFlowInfo"|undefined} _nativeFlowInfo
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @instance
                 */
                Object.defineProperty(Button.prototype, "_nativeFlowInfo", {
                    get: $util.oneOfGetter($oneOfFields = ["nativeFlowInfo"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new Button instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @static
                 * @param {E2E.Message.ButtonsMessage.IButton=} [properties] Properties to set
                 * @returns {E2E.Message.ButtonsMessage.Button} Button instance
                 */
                Button.create = function create(properties) {
                    return new Button(properties);
                };

                /**
                 * Encodes the specified Button message. Does not implicitly {@link E2E.Message.ButtonsMessage.Button.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @static
                 * @param {E2E.Message.ButtonsMessage.IButton} message Button message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Button.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.buttonId != null && Object.hasOwnProperty.call(message, "buttonId"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.buttonId);
                    if (message.buttonText != null && Object.hasOwnProperty.call(message, "buttonText"))
                        $root.E2E.Message.ButtonsMessage.Button.ButtonText.encode(message.buttonText, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                        writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type);
                    if (message.nativeFlowInfo != null && Object.hasOwnProperty.call(message, "nativeFlowInfo"))
                        $root.E2E.Message.ButtonsMessage.Button.NativeFlowInfo.encode(message.nativeFlowInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                    return writer;
                };

                /**
                 * Encodes the specified Button message, length delimited. Does not implicitly {@link E2E.Message.ButtonsMessage.Button.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @static
                 * @param {E2E.Message.ButtonsMessage.IButton} message Button message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Button.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Button message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.ButtonsMessage.Button} Button
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Button.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.E2E.Message.ButtonsMessage.Button();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.buttonId = reader.string();
                                break;
                            }
                        case 2: {
                                message.buttonText = $root.E2E.Message.ButtonsMessage.Button.ButtonText.decode(reader, reader.uint32());
                                break;
                            }
                        case 3: {
                                message.type = reader.int32();
                                break;
                            }
                        case 4: {
                                message.nativeFlowInfo = $root.E2E.Message.ButtonsMessage.Button.NativeFlowInfo.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a Button message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.ButtonsMessage.Button} Button
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Button.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Button message.
                 * @function verify
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Button.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.buttonId != null && message.hasOwnProperty("buttonId")) {
                        properties._buttonId = 1;
                        if (!$util.isString(message.buttonId))
                            return "buttonId: string expected";
                    }
                    if (message.buttonText != null && message.hasOwnProperty("buttonText")) {
                        properties._buttonText = 1;
                        {
                            var error = $root.E2E.Message.ButtonsMessage.Button.ButtonText.verify(message.buttonText);
                            if (error)
                                return "buttonText." + error;
                        }
                    }
                    if (message.type != null && message.hasOwnProperty("type")) {
                        properties._type = 1;
                        switch (message.type) {
                        default:
                            return "type: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    }
                    if (message.nativeFlowInfo != null && message.hasOwnProperty("nativeFlowInfo")) {
                        properties._nativeFlowInfo = 1;
                        {
                            var error = $root.E2E.Message.ButtonsMessage.Button.NativeFlowInfo.verify(message.nativeFlowInfo);
                            if (error)
                                return "nativeFlowInfo." + error;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Button message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.ButtonsMessage.Button} Button
                 */
                Button.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.ButtonsMessage.Button)
                        return object;
                    var message = new $root.E2E.Message.ButtonsMessage.Button();
                    if (object.buttonId != null)
                        message.buttonId = String(object.buttonId);
                    if (object.buttonText != null) {
                        if (typeof object.buttonText !== "object")
                            throw TypeError(".E2E.Message.ButtonsMessage.Button.buttonText: object expected");
                        message.buttonText = $root.E2E.Message.ButtonsMessage.Button.ButtonText.fromObject(object.buttonText);
                    }
                    switch (object.type) {
                    default:
                        if (typeof object.type === "number") {
                            message.type = object.type;
                            break;
                        }
                        break;
                    case "UNKNOWN":
                    case 0:
                        message.type = 0;
                        break;
                    case "RESPONSE":
                    case 1:
                        message.type = 1;
                        break;
                    case "NATIVE_FLOW":
                    case 2:
                        message.type = 2;
                        break;
                    }
                    if (object.nativeFlowInfo != null) {
                        if (typeof object.nativeFlowInfo !== "object")
                            throw TypeError(".E2E.Message.ButtonsMessage.Button.nativeFlowInfo: object expected");
                        message.nativeFlowInfo = $root.E2E.Message.ButtonsMessage.Button.NativeFlowInfo.fromObject(object.nativeFlowInfo);
                    }
                    return message;
                };

                /**
                 * Creates a plain object from a Button message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @static
                 * @param {E2E.Message.ButtonsMessage.Button} message Button
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Button.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.buttonId != null && message.hasOwnProperty("buttonId")) {
                        object.buttonId = message.buttonId;
                        if (options.oneofs)
                            object._buttonId = "buttonId";
                    }
                    if (message.buttonText != null && message.hasOwnProperty("buttonText")) {
                        object.buttonText = $root.E2E.Message.ButtonsMessage.Button.ButtonText.toObject(message.buttonText, options);
                        if (options.oneofs)
                            object._buttonText = "buttonText";
                    }
                    if (message.type != null && message.hasOwnProperty("type")) {
                        object.type = options.enums === String ? $root.E2E.Message.ButtonsMessage.Button.Type[message.type] === undefined ? message.type : $root.E2E.Message.ButtonsMessage.Button.Type[message.type] : message.type;
                        if (options.oneofs)
                            object._type = "type";
                    }
                    if (message.nativeFlowInfo != null && message.hasOwnProperty("nativeFlowInfo")) {
                        object.nativeFlowInfo = $root.E2E.Message.ButtonsMessage.Button.NativeFlowInfo.toObject(message.nativeFlowInfo, options);
                        if (options.oneofs)
                            object._nativeFlowInfo = "nativeFlowInfo";
                    }
                    return object;
                };

                /**
                 * Converts this Button to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Button.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for Button
                 * @function getTypeUrl
                 * @memberof E2E.Message.ButtonsMessage.Button
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Button.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.ButtonsMessage.Button";
                };

                Button.ButtonText = (function() {

                    /**
                     * Properties of a ButtonText.
                     * @memberof E2E.Message.ButtonsMessage.Button
                     * @interface IButtonText
                     * @property {string|null} [displayText] ButtonText displayText
                     */

                    /**
                     * Constructs a new ButtonText.
                     * @memberof E2E.Message.ButtonsMessage.Button
                     * @classdesc Represents a ButtonText.
                     * @implements IButtonText
                     * @constructor
                     * @param {E2E.Message.ButtonsMessage.Button.IButtonText=} [properties] Properties to set
                     */
                    function ButtonText(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]];
                    }

                    /**
                     * ButtonText displayText.
                     * @member {string|null|undefined} displayText
                     * @memberof E2E.Message.ButtonsMessage.Button.ButtonText
                     * @instance
                     */
                    ButtonText.prototype.displayText = null;

                    // OneOf field names bound to virtual getters and setters
                    var $oneOfFields;

                    /**
                     * ButtonText _displayText.
                     * @member {"displayText"|undefined} _displayText
                     * @memberof E2E.Message.ButtonsMessage.Button.ButtonText
                     * @instance
                     */
                    Object.defineProperty(ButtonText.prototype, "_displayText", {
                        get: $util.oneOfGetter($oneOfFields = ["displayText"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * Creates a new ButtonText instance using the specified properties.
                     * @function create
                     * @memberof E2E.Message.ButtonsMessage.Button.ButtonText
                     * @static
                     * @param {E2E.Message.ButtonsMessage.Button.IButtonText=} [properties] Properties to set
                     * @returns {E2E.Message.ButtonsMessage.Button.ButtonText} ButtonText instance
                     */
                    ButtonText.create = function create(properties) {
                        return new ButtonText(properties);
                    };

                    /**
                     * Encodes the specified ButtonText message. Does not implicitly {@link E2E.Message.ButtonsMessage.Button.ButtonText.verify|verify} messages.
                     * @function encode
                     * @memberof E2E.Message.ButtonsMessage.Button.ButtonText
                     * @static
                     * @param {E2E.Message.ButtonsMessage.Button.IButtonText} message ButtonText message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    ButtonText.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText"))
                            writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayText);
                        return writer;
                    };

                    /**
                     * Encodes the specified ButtonText message, length delimited. Does not implicitly {@link E2E.Message.ButtonsMessage.Button.ButtonText.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof E2E.Message.ButtonsMessage.Button.ButtonText
                     * @static
                     * @param {E2E.Message.ButtonsMessage.Button.IButtonText} message ButtonText message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    ButtonText.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a ButtonText message from the specified reader or buffer.
                     * @function decode
                     * @memberof E2E.Message.ButtonsMessage.Button.ButtonText
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {E2E.Message.ButtonsMessage.Button.ButtonText} ButtonText
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    ButtonText.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.E2E.Message.ButtonsMessage.Button.ButtonText();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            if (tag === error)
                                break;
                            switch (tag >>> 3) {
                            case 1: {
                                    message.displayText = reader.string();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a ButtonText message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof E2E.Message.ButtonsMessage.Button.ButtonText
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {E2E.Message.ButtonsMessage.Button.ButtonText} ButtonText
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    ButtonText.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a ButtonText message.
                     * @function verify
                     * @memberof E2E.Message.ButtonsMessage.Button.ButtonText
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    ButtonText.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        var properties = {};
                        if (message.displayText != null && message.hasOwnProperty("displayText")) {
                            properties._displayText = 1;
                            if (!$util.isString(message.displayText))
                                return "displayText: string expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a ButtonText message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof E2E.Message.ButtonsMessage.Button.ButtonText
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {E2E.Message.ButtonsMessage.Button.ButtonText} ButtonText
                     */
                    ButtonText.fromObject = function fromObject(object) {
                        if (object instanceof $root.E2E.Message.ButtonsMessage.Button.ButtonText)
                            return object;
                        var message = new $root.E2E.Message.ButtonsMessage.Button.ButtonText();
                        if (object.displayText != null)
                            message.displayText = String(object.displayText);
                        return message;
                    };

                    /**
                     * Creates a plain object from a ButtonText message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof E2E.Message.ButtonsMessage.Button.ButtonText
                     * @static
                     * @param {E2E.Message.ButtonsMessage.Button.ButtonText} message ButtonText
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    ButtonText.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (message.displayText != null && message.hasOwnProperty("displayText")) {
                            object.displayText = message.displayText;
                            if (options.oneofs)
                                object._displayText = "displayText";
                        }
                        return object;
                    };

                    /**
                     * Converts this ButtonText to JSON.
                     * @function toJSON
                     * @memberof E2E.Message.ButtonsMessage.Button.ButtonText
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    ButtonText.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for ButtonText
                     * @function getTypeUrl
                     * @memberof E2E.Message.ButtonsMessage.Button.ButtonText
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    ButtonText.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/E2E.Message.ButtonsMessage.Button.ButtonText";
                    };

                    return ButtonText;
                })();

                Button.NativeFlowInfo = (function() {

                    /**
                     * Properties of a NativeFlowInfo.
                     * @memberof E2E.Message.ButtonsMessage.Button
                     * @interface INativeFlowInfo
                     * @property {string|null} [name] NativeFlowInfo name
                     * @property {string|null} [paramsJson] NativeFlowInfo paramsJson
                     */

                    /**
                     * Constructs a new NativeFlowInfo.
                     * @memberof E2E.Message.ButtonsMessage.Button
                     * @classdesc Represents a NativeFlowInfo.
                     * @implements INativeFlowInfo
                     * @constructor
                     * @param {E2E.Message.ButtonsMessage.Button.INativeFlowInfo=} [properties] Properties to set
                     */
                    function NativeFlowInfo(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]];
                    }

                    /**
                     * NativeFlowInfo name.
                     * @member {string|null|undefined} name
                     * @memberof E2E.Message.ButtonsMessage.Button.NativeFlowInfo
                     * @instance
                     */
                    NativeFlowInfo.prototype.name = null;

                    /**
                     * NativeFlowInfo paramsJson.
                     * @member {string|null|undefined} paramsJson
                     * @memberof E2E.Message.ButtonsMessage.Button.NativeFlowInfo
                     * @instance
                     */
                    NativeFlowInfo.prototype.paramsJson = null;

                    // OneOf field names bound to virtual getters and setters
                    var $oneOfFields;

                    /**
                     * NativeFlowInfo _name.
                     * @member {"name"|undefined} _name
                     * @memberof E2E.Message.ButtonsMessage.Button.NativeFlowInfo
                     * @instance
                     */
                    Object.defineProperty(NativeFlowInfo.prototype, "_name", {
                        get: $util.oneOfGetter($oneOfFields = ["name"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * NativeFlowInfo _paramsJson.
                     * @member {"paramsJson"|undefined} _paramsJson
                     * @memberof E2E.Message.ButtonsMessage.Button.NativeFlowInfo
                     * @instance
                     */
                    Object.defineProperty(NativeFlowInfo.prototype, "_paramsJson", {
                        get: $util.oneOfGetter($oneOfFields = ["paramsJson"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * Creates a new NativeFlowInfo instance using the specified properties.
                     * @function create
                     * @memberof E2E.Message.ButtonsMessage.Button.NativeFlowInfo
                     * @static
                     * @param {E2E.Message.ButtonsMessage.Button.INativeFlowInfo=} [properties] Properties to set
                     * @returns {E2E.Message.ButtonsMessage.Button.NativeFlowInfo} NativeFlowInfo instance
                     */
                    NativeFlowInfo.create = function create(properties) {
                        return new NativeFlowInfo(properties);
                    };

                    /**
                     * Encodes the specified NativeFlowInfo message. Does not implicitly {@link E2E.Message.ButtonsMessage.Button.NativeFlowInfo.verify|verify} messages.
                     * @function encode
                     * @memberof E2E.Message.ButtonsMessage.Button.NativeFlowInfo
                     * @static
                     * @param {E2E.Message.ButtonsMessage.Button.INativeFlowInfo} message NativeFlowInfo message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    NativeFlowInfo.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                            writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                        if (message.paramsJson != null && Object.hasOwnProperty.call(message, "paramsJson"))
                            writer.uint32(/* id 2, wireType 2 =*/18).string(message.paramsJson);
                        return writer;
                    };

                    /**
                     * Encodes the specified NativeFlowInfo message, length delimited. Does not implicitly {@link E2E.Message.ButtonsMessage.Button.NativeFlowInfo.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof E2E.Message.ButtonsMessage.Button.NativeFlowInfo
                     * @static
                     * @param {E2E.Message.ButtonsMessage.Button.INativeFlowInfo} message NativeFlowInfo message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    NativeFlowInfo.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a NativeFlowInfo message from the specified reader or buffer.
                     * @function decode
                     * @memberof E2E.Message.ButtonsMessage.Button.NativeFlowInfo
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {E2E.Message.ButtonsMessage.Button.NativeFlowInfo} NativeFlowInfo
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    NativeFlowInfo.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.E2E.Message.ButtonsMessage.Button.NativeFlowInfo();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            if (tag === error)
                                break;
                            switch (tag >>> 3) {
                            case 1: {
                                    message.name = reader.string();
                                    break;
                                }
                            case 2: {
                                    message.paramsJson = reader.string();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a NativeFlowInfo message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof E2E.Message.ButtonsMessage.Button.NativeFlowInfo
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {E2E.Message.ButtonsMessage.Button.NativeFlowInfo} NativeFlowInfo
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    NativeFlowInfo.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a NativeFlowInfo message.
                     * @function verify
                     * @memberof E2E.Message.ButtonsMessage.Button.NativeFlowInfo
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    NativeFlowInfo.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        var properties = {};
                        if (message.name != null && message.hasOwnProperty("name")) {
                            properties._name = 1;
                            if (!$util.isString(message.name))
                                return "name: string expected";
                        }
                        if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) {
                            properties._paramsJson = 1;
                            if (!$util.isString(message.paramsJson))
                                return "paramsJson: string expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a NativeFlowInfo message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof E2E.Message.ButtonsMessage.Button.NativeFlowInfo
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {E2E.Message.ButtonsMessage.Button.NativeFlowInfo} NativeFlowInfo
                     */
                    NativeFlowInfo.fromObject = function fromObject(object) {
                        if (object instanceof $root.E2E.Message.ButtonsMessage.Button.NativeFlowInfo)
                            return object;
                        var message = new $root.E2E.Message.ButtonsMessage.Button.NativeFlowInfo();
                        if (object.name != null)
                            message.name = String(object.name);
                        if (object.paramsJson != null)
                            message.paramsJson = String(object.paramsJson);
                        return message;
                    };

                    /**
                     * Creates a plain object from a NativeFlowInfo message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof E2E.Message.ButtonsMessage.Button.NativeFlowInfo
                     * @static
                     * @param {E2E.Message.ButtonsMessage.Button.NativeFlowInfo} message NativeFlowInfo
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    NativeFlowInfo.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (message.name != null && message.hasOwnProperty("name")) {
                            object.name = message.name;
                            if (options.oneofs)
                                object._name = "name";
                        }
                        if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) {
                            object.paramsJson = message.paramsJson;
                            if (options.oneofs)
                                object._paramsJson = "paramsJson";
                        }
                        return object;
                    };

                    /**
                     * Converts this NativeFlowInfo to JSON.
                     * @function toJSON
                     * @memberof E2E.Message.ButtonsMessage.Button.NativeFlowInfo
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    NativeFlowInfo.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for NativeFlowInfo
                     * @function getTypeUrl
                     * @memberof E2E.Message.ButtonsMessage.Button.NativeFlowInfo
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    NativeFlowInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/E2E.Message.ButtonsMessage.Button.NativeFlowInfo";
                    };

                    return NativeFlowInfo;
                })();

                /**
                 * Type enum.
                 * @name E2E.Message.ButtonsMessage.Button.Type
                 * @enum {number}
                 * @property {number} UNKNOWN=0 UNKNOWN value
                 * @property {number} RESPONSE=1 RESPONSE value
                 * @property {number} NATIVE_FLOW=2 NATIVE_FLOW value
                 */
                Button.Type = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "UNKNOWN"] = 0;
                    values[valuesById[1] = "RESPONSE"] = 1;
                    values[valuesById[2] = "NATIVE_FLOW"] = 2;
                    return values;
                })();

                return Button;
            })();

            /**
             * HeaderType enum.
             * @name E2E.Message.ButtonsMessage.HeaderType
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} EMPTY=1 EMPTY value
             * @property {number} TEXT=2 TEXT value
             * @property {number} DOCUMENT=3 DOCUMENT value
             * @property {number} IMAGE=4 IMAGE value
             * @property {number} VIDEO=5 VIDEO value
             * @property {number} LOCATION=6 LOCATION value
             */
            ButtonsMessage.HeaderType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "EMPTY"] = 1;
                values[valuesById[2] = "TEXT"] = 2;
                values[valuesById[3] = "DOCUMENT"] = 3;
                values[valuesById[4] = "IMAGE"] = 4;
                values[valuesById[5] = "VIDEO"] = 5;
                values[valuesById[6] = "LOCATION"] = 6;
                return values;
            })();

            return ButtonsMessage;
        })();

        Message.ButtonsResponseMessage = (function() {

            /**
             * Properties of a ButtonsResponseMessage.
             * @memberof E2E.Message
             * @interface IButtonsResponseMessage
             * @property {string|null} [selectedButtonId] ButtonsResponseMessage selectedButtonId
             * @property {E2E.IContextInfo|null} [contextInfo] ButtonsResponseMessage contextInfo
             * @property {E2E.Message.ButtonsResponseMessage.Type|null} [type] ButtonsResponseMessage type
             * @property {string|null} [selectedDisplayText] ButtonsResponseMessage selectedDisplayText
             */

            /**
             * Constructs a new ButtonsResponseMessage.
             * @memberof E2E.Message
             * @classdesc Represents a ButtonsResponseMessage.
             * @implements IButtonsResponseMessage
             * @constructor
             * @param {E2E.Message.IButtonsResponseMessage=} [properties] Properties to set
             */
            function ButtonsResponseMessage(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]];
            }

            /**
             * ButtonsResponseMessage selectedButtonId.
             * @member {string|null|undefined} selectedButtonId
             * @memberof E2E.Message.ButtonsResponseMessage
             * @instance
             */
            ButtonsResponseMessage.prototype.selectedButtonId = null;

            /**
             * ButtonsResponseMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.ButtonsResponseMessage
             * @instance
             */
            ButtonsResponseMessage.prototype.contextInfo = null;

            /**
             * ButtonsResponseMessage type.
             * @member {E2E.Message.ButtonsResponseMessage.Type|null|undefined} type
             * @memberof E2E.Message.ButtonsResponseMessage
             * @instance
             */
            ButtonsResponseMessage.prototype.type = null;

            /**
             * ButtonsResponseMessage selectedDisplayText.
             * @member {string|null|undefined} selectedDisplayText
             * @memberof E2E.Message.ButtonsResponseMessage
             * @instance
             */
            ButtonsResponseMessage.prototype.selectedDisplayText = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * ButtonsResponseMessage _selectedButtonId.
             * @member {"selectedButtonId"|undefined} _selectedButtonId
             * @memberof E2E.Message.ButtonsResponseMessage
             * @instance
             */
            Object.defineProperty(ButtonsResponseMessage.prototype, "_selectedButtonId", {
                get: $util.oneOfGetter($oneOfFields = ["selectedButtonId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ButtonsResponseMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.ButtonsResponseMessage
             * @instance
             */
            Object.defineProperty(ButtonsResponseMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ButtonsResponseMessage _type.
             * @member {"type"|undefined} _type
             * @memberof E2E.Message.ButtonsResponseMessage
             * @instance
             */
            Object.defineProperty(ButtonsResponseMessage.prototype, "_type", {
                get: $util.oneOfGetter($oneOfFields = ["type"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ButtonsResponseMessage response.
             * @member {"selectedDisplayText"|undefined} response
             * @memberof E2E.Message.ButtonsResponseMessage
             * @instance
             */
            Object.defineProperty(ButtonsResponseMessage.prototype, "response", {
                get: $util.oneOfGetter($oneOfFields = ["selectedDisplayText"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new ButtonsResponseMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.ButtonsResponseMessage
             * @static
             * @param {E2E.Message.IButtonsResponseMessage=} [properties] Properties to set
             * @returns {E2E.Message.ButtonsResponseMessage} ButtonsResponseMessage instance
             */
            ButtonsResponseMessage.create = function create(properties) {
                return new ButtonsResponseMessage(properties);
            };

            /**
             * Encodes the specified ButtonsResponseMessage message. Does not implicitly {@link E2E.Message.ButtonsResponseMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.ButtonsResponseMessage
             * @static
             * @param {E2E.Message.IButtonsResponseMessage} message ButtonsResponseMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ButtonsResponseMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.selectedButtonId != null && Object.hasOwnProperty.call(message, "selectedButtonId"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedButtonId);
                if (message.selectedDisplayText != null && Object.hasOwnProperty.call(message, "selectedDisplayText"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.selectedDisplayText);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                    writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type);
                return writer;
            };

            /**
             * Encodes the specified ButtonsResponseMessage message, length delimited. Does not implicitly {@link E2E.Message.ButtonsResponseMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.ButtonsResponseMessage
             * @static
             * @param {E2E.Message.IButtonsResponseMessage} message ButtonsResponseMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ButtonsResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ButtonsResponseMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.ButtonsResponseMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.ButtonsResponseMessage} ButtonsResponseMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ButtonsResponseMessage.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.E2E.Message.ButtonsResponseMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.selectedButtonId = reader.string();
                            break;
                        }
                    case 3: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 4: {
                            message.type = reader.int32();
                            break;
                        }
                    case 2: {
                            message.selectedDisplayText = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a ButtonsResponseMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.ButtonsResponseMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.ButtonsResponseMessage} ButtonsResponseMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ButtonsResponseMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ButtonsResponseMessage message.
             * @function verify
             * @memberof E2E.Message.ButtonsResponseMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ButtonsResponseMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.selectedButtonId != null && message.hasOwnProperty("selectedButtonId")) {
                    properties._selectedButtonId = 1;
                    if (!$util.isString(message.selectedButtonId))
                        return "selectedButtonId: string expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.type != null && message.hasOwnProperty("type")) {
                    properties._type = 1;
                    switch (message.type) {
                    default:
                        return "type: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) {
                    properties.response = 1;
                    if (!$util.isString(message.selectedDisplayText))
                        return "selectedDisplayText: string expected";
                }
                return null;
            };

            /**
             * Creates a ButtonsResponseMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.ButtonsResponseMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.ButtonsResponseMessage} ButtonsResponseMessage
             */
            ButtonsResponseMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.ButtonsResponseMessage)
                    return object;
                var message = new $root.E2E.Message.ButtonsResponseMessage();
                if (object.selectedButtonId != null)
                    message.selectedButtonId = String(object.selectedButtonId);
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.ButtonsResponseMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                switch (object.type) {
                default:
                    if (typeof object.type === "number") {
                        message.type = object.type;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.type = 0;
                    break;
                case "DISPLAY_TEXT":
                case 1:
                    message.type = 1;
                    break;
                }
                if (object.selectedDisplayText != null)
                    message.selectedDisplayText = String(object.selectedDisplayText);
                return message;
            };

            /**
             * Creates a plain object from a ButtonsResponseMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.ButtonsResponseMessage
             * @static
             * @param {E2E.Message.ButtonsResponseMessage} message ButtonsResponseMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ButtonsResponseMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.selectedButtonId != null && message.hasOwnProperty("selectedButtonId")) {
                    object.selectedButtonId = message.selectedButtonId;
                    if (options.oneofs)
                        object._selectedButtonId = "selectedButtonId";
                }
                if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) {
                    object.selectedDisplayText = message.selectedDisplayText;
                    if (options.oneofs)
                        object.response = "selectedDisplayText";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.type != null && message.hasOwnProperty("type")) {
                    object.type = options.enums === String ? $root.E2E.Message.ButtonsResponseMessage.Type[message.type] === undefined ? message.type : $root.E2E.Message.ButtonsResponseMessage.Type[message.type] : message.type;
                    if (options.oneofs)
                        object._type = "type";
                }
                return object;
            };

            /**
             * Converts this ButtonsResponseMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.ButtonsResponseMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ButtonsResponseMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for ButtonsResponseMessage
             * @function getTypeUrl
             * @memberof E2E.Message.ButtonsResponseMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            ButtonsResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.ButtonsResponseMessage";
            };

            /**
             * Type enum.
             * @name E2E.Message.ButtonsResponseMessage.Type
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} DISPLAY_TEXT=1 DISPLAY_TEXT value
             */
            ButtonsResponseMessage.Type = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "DISPLAY_TEXT"] = 1;
                return values;
            })();

            return ButtonsResponseMessage;
        })();

        Message.Call = (function() {

            /**
             * Properties of a Call.
             * @memberof E2E.Message
             * @interface ICall
             * @property {Uint8Array|null} [callKey] Call callKey
             * @property {string|null} [conversionSource] Call conversionSource
             * @property {Uint8Array|null} [conversionData] Call conversionData
             * @property {number|null} [conversionDelaySeconds] Call conversionDelaySeconds
             * @property {string|null} [ctwaSignals] Call ctwaSignals
             * @property {Uint8Array|null} [ctwaPayload] Call ctwaPayload
             * @property {E2E.IContextInfo|null} [contextInfo] Call contextInfo
             * @property {string|null} [nativeFlowCallButtonPayload] Call nativeFlowCallButtonPayload
             * @property {string|null} [deeplinkPayload] Call deeplinkPayload
             * @property {E2E.IMessageContextInfo|null} [messageContextInfo] Call messageContextInfo
             */

            /**
             * Constructs a new Call.
             * @memberof E2E.Message
             * @classdesc Represents a Call.
             * @implements ICall
             * @constructor
             * @param {E2E.Message.ICall=} [properties] Properties to set
             */
            function Call(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]];
            }

            /**
             * Call callKey.
             * @member {Uint8Array|null|undefined} callKey
             * @memberof E2E.Message.Call
             * @instance
             */
            Call.prototype.callKey = null;

            /**
             * Call conversionSource.
             * @member {string|null|undefined} conversionSource
             * @memberof E2E.Message.Call
             * @instance
             */
            Call.prototype.conversionSource = null;

            /**
             * Call conversionData.
             * @member {Uint8Array|null|undefined} conversionData
             * @memberof E2E.Message.Call
             * @instance
             */
            Call.prototype.conversionData = null;

            /**
             * Call conversionDelaySeconds.
             * @member {number|null|undefined} conversionDelaySeconds
             * @memberof E2E.Message.Call
             * @instance
             */
            Call.prototype.conversionDelaySeconds = null;

            /**
             * Call ctwaSignals.
             * @member {string|null|undefined} ctwaSignals
             * @memberof E2E.Message.Call
             * @instance
             */
            Call.prototype.ctwaSignals = null;

            /**
             * Call ctwaPayload.
             * @member {Uint8Array|null|undefined} ctwaPayload
             * @memberof E2E.Message.Call
             * @instance
             */
            Call.prototype.ctwaPayload = null;

            /**
             * Call contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.Call
             * @instance
             */
            Call.prototype.contextInfo = null;

            /**
             * Call nativeFlowCallButtonPayload.
             * @member {string|null|undefined} nativeFlowCallButtonPayload
             * @memberof E2E.Message.Call
             * @instance
             */
            Call.prototype.nativeFlowCallButtonPayload = null;

            /**
             * Call deeplinkPayload.
             * @member {string|null|undefined} deeplinkPayload
             * @memberof E2E.Message.Call
             * @instance
             */
            Call.prototype.deeplinkPayload = null;

            /**
             * Call messageContextInfo.
             * @member {E2E.IMessageContextInfo|null|undefined} messageContextInfo
             * @memberof E2E.Message.Call
             * @instance
             */
            Call.prototype.messageContextInfo = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * Call _callKey.
             * @member {"callKey"|undefined} _callKey
             * @memberof E2E.Message.Call
             * @instance
             */
            Object.defineProperty(Call.prototype, "_callKey", {
                get: $util.oneOfGetter($oneOfFields = ["callKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Call _conversionSource.
             * @member {"conversionSource"|undefined} _conversionSource
             * @memberof E2E.Message.Call
             * @instance
             */
            Object.defineProperty(Call.prototype, "_conversionSource", {
                get: $util.oneOfGetter($oneOfFields = ["conversionSource"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Call _conversionData.
             * @member {"conversionData"|undefined} _conversionData
             * @memberof E2E.Message.Call
             * @instance
             */
            Object.defineProperty(Call.prototype, "_conversionData", {
                get: $util.oneOfGetter($oneOfFields = ["conversionData"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Call _conversionDelaySeconds.
             * @member {"conversionDelaySeconds"|undefined} _conversionDelaySeconds
             * @memberof E2E.Message.Call
             * @instance
             */
            Object.defineProperty(Call.prototype, "_conversionDelaySeconds", {
                get: $util.oneOfGetter($oneOfFields = ["conversionDelaySeconds"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Call _ctwaSignals.
             * @member {"ctwaSignals"|undefined} _ctwaSignals
             * @memberof E2E.Message.Call
             * @instance
             */
            Object.defineProperty(Call.prototype, "_ctwaSignals", {
                get: $util.oneOfGetter($oneOfFields = ["ctwaSignals"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Call _ctwaPayload.
             * @member {"ctwaPayload"|undefined} _ctwaPayload
             * @memberof E2E.Message.Call
             * @instance
             */
            Object.defineProperty(Call.prototype, "_ctwaPayload", {
                get: $util.oneOfGetter($oneOfFields = ["ctwaPayload"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Call _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.Call
             * @instance
             */
            Object.defineProperty(Call.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Call _nativeFlowCallButtonPayload.
             * @member {"nativeFlowCallButtonPayload"|undefined} _nativeFlowCallButtonPayload
             * @memberof E2E.Message.Call
             * @instance
             */
            Object.defineProperty(Call.prototype, "_nativeFlowCallButtonPayload", {
                get: $util.oneOfGetter($oneOfFields = ["nativeFlowCallButtonPayload"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Call _deeplinkPayload.
             * @member {"deeplinkPayload"|undefined} _deeplinkPayload
             * @memberof E2E.Message.Call
             * @instance
             */
            Object.defineProperty(Call.prototype, "_deeplinkPayload", {
                get: $util.oneOfGetter($oneOfFields = ["deeplinkPayload"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Call _messageContextInfo.
             * @member {"messageContextInfo"|undefined} _messageContextInfo
             * @memberof E2E.Message.Call
             * @instance
             */
            Object.defineProperty(Call.prototype, "_messageContextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["messageContextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new Call instance using the specified properties.
             * @function create
             * @memberof E2E.Message.Call
             * @static
             * @param {E2E.Message.ICall=} [properties] Properties to set
             * @returns {E2E.Message.Call} Call instance
             */
            Call.create = function create(properties) {
                return new Call(properties);
            };

            /**
             * Encodes the specified Call message. Does not implicitly {@link E2E.Message.Call.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.Call
             * @static
             * @param {E2E.Message.ICall} message Call message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Call.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.callKey != null && Object.hasOwnProperty.call(message, "callKey"))
                    writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.callKey);
                if (message.conversionSource != null && Object.hasOwnProperty.call(message, "conversionSource"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.conversionSource);
                if (message.conversionData != null && Object.hasOwnProperty.call(message, "conversionData"))
                    writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.conversionData);
                if (message.conversionDelaySeconds != null && Object.hasOwnProperty.call(message, "conversionDelaySeconds"))
                    writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.conversionDelaySeconds);
                if (message.ctwaSignals != null && Object.hasOwnProperty.call(message, "ctwaSignals"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.ctwaSignals);
                if (message.ctwaPayload != null && Object.hasOwnProperty.call(message, "ctwaPayload"))
                    writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.ctwaPayload);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                if (message.nativeFlowCallButtonPayload != null && Object.hasOwnProperty.call(message, "nativeFlowCallButtonPayload"))
                    writer.uint32(/* id 8, wireType 2 =*/66).string(message.nativeFlowCallButtonPayload);
                if (message.deeplinkPayload != null && Object.hasOwnProperty.call(message, "deeplinkPayload"))
                    writer.uint32(/* id 9, wireType 2 =*/74).string(message.deeplinkPayload);
                if (message.messageContextInfo != null && Object.hasOwnProperty.call(message, "messageContextInfo"))
                    $root.E2E.MessageContextInfo.encode(message.messageContextInfo, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified Call message, length delimited. Does not implicitly {@link E2E.Message.Call.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.Call
             * @static
             * @param {E2E.Message.ICall} message Call message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Call.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a Call message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.Call
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.Call} Call
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Call.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.E2E.Message.Call();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.callKey = reader.bytes();
                            break;
                        }
                    case 2: {
                            message.conversionSource = reader.string();
                            break;
                        }
                    case 3: {
                            message.conversionData = reader.bytes();
                            break;
                        }
                    case 4: {
                            message.conversionDelaySeconds = reader.uint32();
                            break;
                        }
                    case 5: {
                            message.ctwaSignals = reader.string();
                            break;
                        }
                    case 6: {
                            message.ctwaPayload = reader.bytes();
                            break;
                        }
                    case 7: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 8: {
                            message.nativeFlowCallButtonPayload = reader.string();
                            break;
                        }
                    case 9: {
                            message.deeplinkPayload = reader.string();
                            break;
                        }
                    case 10: {
                            message.messageContextInfo = $root.E2E.MessageContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a Call message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.Call
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.Call} Call
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Call.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a Call message.
             * @function verify
             * @memberof E2E.Message.Call
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Call.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.callKey != null && message.hasOwnProperty("callKey")) {
                    properties._callKey = 1;
                    if (!(message.callKey && typeof message.callKey.length === "number" || $util.isString(message.callKey)))
                        return "callKey: buffer expected";
                }
                if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) {
                    properties._conversionSource = 1;
                    if (!$util.isString(message.conversionSource))
                        return "conversionSource: string expected";
                }
                if (message.conversionData != null && message.hasOwnProperty("conversionData")) {
                    properties._conversionData = 1;
                    if (!(message.conversionData && typeof message.conversionData.length === "number" || $util.isString(message.conversionData)))
                        return "conversionData: buffer expected";
                }
                if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) {
                    properties._conversionDelaySeconds = 1;
                    if (!$util.isInteger(message.conversionDelaySeconds))
                        return "conversionDelaySeconds: integer expected";
                }
                if (message.ctwaSignals != null && message.hasOwnProperty("ctwaSignals")) {
                    properties._ctwaSignals = 1;
                    if (!$util.isString(message.ctwaSignals))
                        return "ctwaSignals: string expected";
                }
                if (message.ctwaPayload != null && message.hasOwnProperty("ctwaPayload")) {
                    properties._ctwaPayload = 1;
                    if (!(message.ctwaPayload && typeof message.ctwaPayload.length === "number" || $util.isString(message.ctwaPayload)))
                        return "ctwaPayload: buffer expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.nativeFlowCallButtonPayload != null && message.hasOwnProperty("nativeFlowCallButtonPayload")) {
                    properties._nativeFlowCallButtonPayload = 1;
                    if (!$util.isString(message.nativeFlowCallButtonPayload))
                        return "nativeFlowCallButtonPayload: string expected";
                }
                if (message.deeplinkPayload != null && message.hasOwnProperty("deeplinkPayload")) {
                    properties._deeplinkPayload = 1;
                    if (!$util.isString(message.deeplinkPayload))
                        return "deeplinkPayload: string expected";
                }
                if (message.messageContextInfo != null && message.hasOwnProperty("messageContextInfo")) {
                    properties._messageContextInfo = 1;
                    {
                        var error = $root.E2E.MessageContextInfo.verify(message.messageContextInfo);
                        if (error)
                            return "messageContextInfo." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a Call message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.Call
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.Call} Call
             */
            Call.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.Call)
                    return object;
                var message = new $root.E2E.Message.Call();
                if (object.callKey != null)
                    if (typeof object.callKey === "string")
                        $util.base64.decode(object.callKey, message.callKey = $util.newBuffer($util.base64.length(object.callKey)), 0);
                    else if (object.callKey.length >= 0)
                        message.callKey = object.callKey;
                if (object.conversionSource != null)
                    message.conversionSource = String(object.conversionSource);
                if (object.conversionData != null)
                    if (typeof object.conversionData === "string")
                        $util.base64.decode(object.conversionData, message.conversionData = $util.newBuffer($util.base64.length(object.conversionData)), 0);
                    else if (object.conversionData.length >= 0)
                        message.conversionData = object.conversionData;
                if (object.conversionDelaySeconds != null)
                    message.conversionDelaySeconds = object.conversionDelaySeconds >>> 0;
                if (object.ctwaSignals != null)
                    message.ctwaSignals = String(object.ctwaSignals);
                if (object.ctwaPayload != null)
                    if (typeof object.ctwaPayload === "string")
                        $util.base64.decode(object.ctwaPayload, message.ctwaPayload = $util.newBuffer($util.base64.length(object.ctwaPayload)), 0);
                    else if (object.ctwaPayload.length >= 0)
                        message.ctwaPayload = object.ctwaPayload;
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.Call.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                if (object.nativeFlowCallButtonPayload != null)
                    message.nativeFlowCallButtonPayload = String(object.nativeFlowCallButtonPayload);
                if (object.deeplinkPayload != null)
                    message.deeplinkPayload = String(object.deeplinkPayload);
                if (object.messageContextInfo != null) {
                    if (typeof object.messageContextInfo !== "object")
                        throw TypeError(".E2E.Message.Call.messageContextInfo: object expected");
                    message.messageContextInfo = $root.E2E.MessageContextInfo.fromObject(object.messageContextInfo);
                }
                return message;
            };

            /**
             * Creates a plain object from a Call message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.Call
             * @static
             * @param {E2E.Message.Call} message Call
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Call.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.callKey != null && message.hasOwnProperty("callKey")) {
                    object.callKey = options.bytes === String ? $util.base64.encode(message.callKey, 0, message.callKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.callKey) : message.callKey;
                    if (options.oneofs)
                        object._callKey = "callKey";
                }
                if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) {
                    object.conversionSource = message.conversionSource;
                    if (options.oneofs)
                        object._conversionSource = "conversionSource";
                }
                if (message.conversionData != null && message.hasOwnProperty("conversionData")) {
                    object.conversionData = options.bytes === String ? $util.base64.encode(message.conversionData, 0, message.conversionData.length) : options.bytes === Array ? Array.prototype.slice.call(message.conversionData) : message.conversionData;
                    if (options.oneofs)
                        object._conversionData = "conversionData";
                }
                if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) {
                    object.conversionDelaySeconds = message.conversionDelaySeconds;
                    if (options.oneofs)
                        object._conversionDelaySeconds = "conversionDelaySeconds";
                }
                if (message.ctwaSignals != null && message.hasOwnProperty("ctwaSignals")) {
                    object.ctwaSignals = message.ctwaSignals;
                    if (options.oneofs)
                        object._ctwaSignals = "ctwaSignals";
                }
                if (message.ctwaPayload != null && message.hasOwnProperty("ctwaPayload")) {
                    object.ctwaPayload = options.bytes === String ? $util.base64.encode(message.ctwaPayload, 0, message.ctwaPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.ctwaPayload) : message.ctwaPayload;
                    if (options.oneofs)
                        object._ctwaPayload = "ctwaPayload";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.nativeFlowCallButtonPayload != null && message.hasOwnProperty("nativeFlowCallButtonPayload")) {
                    object.nativeFlowCallButtonPayload = message.nativeFlowCallButtonPayload;
                    if (options.oneofs)
                        object._nativeFlowCallButtonPayload = "nativeFlowCallButtonPayload";
                }
                if (message.deeplinkPayload != null && message.hasOwnProperty("deeplinkPayload")) {
                    object.deeplinkPayload = message.deeplinkPayload;
                    if (options.oneofs)
                        object._deeplinkPayload = "deeplinkPayload";
                }
                if (message.messageContextInfo != null && message.hasOwnProperty("messageContextInfo")) {
                    object.messageContextInfo = $root.E2E.MessageContextInfo.toObject(message.messageContextInfo, options);
                    if (options.oneofs)
                        object._messageContextInfo = "messageContextInfo";
                }
                return object;
            };

            /**
             * Converts this Call to JSON.
             * @function toJSON
             * @memberof E2E.Message.Call
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Call.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for Call
             * @function getTypeUrl
             * @memberof E2E.Message.Call
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            Call.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.Call";
            };

            return Call;
        })();

        Message.CallLogMessage = (function() {

            /**
             * Properties of a CallLogMessage.
             * @memberof E2E.Message
             * @interface ICallLogMessage
             * @property {boolean|null} [isVideo] CallLogMessage isVideo
             * @property {E2E.Message.CallLogMessage.CallOutcome|null} [callOutcome] CallLogMessage callOutcome
             * @property {number|Long|null} [durationSecs] CallLogMessage durationSecs
             * @property {E2E.Message.CallLogMessage.CallType|null} [callType] CallLogMessage callType
             * @property {Array.<E2E.Message.CallLogMessage.ICallParticipant>|null} [participants] CallLogMessage participants
             */

            /**
             * Constructs a new CallLogMessage.
             * @memberof E2E.Message
             * @classdesc Represents a CallLogMessage.
             * @implements ICallLogMessage
             * @constructor
             * @param {E2E.Message.ICallLogMessage=} [properties] Properties to set
             */
            function CallLogMessage(properties) {
                this.participants = [];
                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]];
            }

            /**
             * CallLogMessage isVideo.
             * @member {boolean|null|undefined} isVideo
             * @memberof E2E.Message.CallLogMessage
             * @instance
             */
            CallLogMessage.prototype.isVideo = null;

            /**
             * CallLogMessage callOutcome.
             * @member {E2E.Message.CallLogMessage.CallOutcome|null|undefined} callOutcome
             * @memberof E2E.Message.CallLogMessage
             * @instance
             */
            CallLogMessage.prototype.callOutcome = null;

            /**
             * CallLogMessage durationSecs.
             * @member {number|Long|null|undefined} durationSecs
             * @memberof E2E.Message.CallLogMessage
             * @instance
             */
            CallLogMessage.prototype.durationSecs = null;

            /**
             * CallLogMessage callType.
             * @member {E2E.Message.CallLogMessage.CallType|null|undefined} callType
             * @memberof E2E.Message.CallLogMessage
             * @instance
             */
            CallLogMessage.prototype.callType = null;

            /**
             * CallLogMessage participants.
             * @member {Array.<E2E.Message.CallLogMessage.ICallParticipant>} participants
             * @memberof E2E.Message.CallLogMessage
             * @instance
             */
            CallLogMessage.prototype.participants = $util.emptyArray;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * CallLogMessage _isVideo.
             * @member {"isVideo"|undefined} _isVideo
             * @memberof E2E.Message.CallLogMessage
             * @instance
             */
            Object.defineProperty(CallLogMessage.prototype, "_isVideo", {
                get: $util.oneOfGetter($oneOfFields = ["isVideo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * CallLogMessage _callOutcome.
             * @member {"callOutcome"|undefined} _callOutcome
             * @memberof E2E.Message.CallLogMessage
             * @instance
             */
            Object.defineProperty(CallLogMessage.prototype, "_callOutcome", {
                get: $util.oneOfGetter($oneOfFields = ["callOutcome"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * CallLogMessage _durationSecs.
             * @member {"durationSecs"|undefined} _durationSecs
             * @memberof E2E.Message.CallLogMessage
             * @instance
             */
            Object.defineProperty(CallLogMessage.prototype, "_durationSecs", {
                get: $util.oneOfGetter($oneOfFields = ["durationSecs"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * CallLogMessage _callType.
             * @member {"callType"|undefined} _callType
             * @memberof E2E.Message.CallLogMessage
             * @instance
             */
            Object.defineProperty(CallLogMessage.prototype, "_callType", {
                get: $util.oneOfGetter($oneOfFields = ["callType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new CallLogMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.CallLogMessage
             * @static
             * @param {E2E.Message.ICallLogMessage=} [properties] Properties to set
             * @returns {E2E.Message.CallLogMessage} CallLogMessage instance
             */
            CallLogMessage.create = function create(properties) {
                return new CallLogMessage(properties);
            };

            /**
             * Encodes the specified CallLogMessage message. Does not implicitly {@link E2E.Message.CallLogMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.CallLogMessage
             * @static
             * @param {E2E.Message.ICallLogMessage} message CallLogMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CallLogMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.isVideo != null && Object.hasOwnProperty.call(message, "isVideo"))
                    writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isVideo);
                if (message.callOutcome != null && Object.hasOwnProperty.call(message, "callOutcome"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int32(message.callOutcome);
                if (message.durationSecs != null && Object.hasOwnProperty.call(message, "durationSecs"))
                    writer.uint32(/* id 3, wireType 0 =*/24).int64(message.durationSecs);
                if (message.callType != null && Object.hasOwnProperty.call(message, "callType"))
                    writer.uint32(/* id 4, wireType 0 =*/32).int32(message.callType);
                if (message.participants != null && message.participants.length)
                    for (var i = 0; i < message.participants.length; ++i)
                        $root.E2E.Message.CallLogMessage.CallParticipant.encode(message.participants[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified CallLogMessage message, length delimited. Does not implicitly {@link E2E.Message.CallLogMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.CallLogMessage
             * @static
             * @param {E2E.Message.ICallLogMessage} message CallLogMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CallLogMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CallLogMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.CallLogMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.CallLogMessage} CallLogMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CallLogMessage.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.E2E.Message.CallLogMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.isVideo = reader.bool();
                            break;
                        }
                    case 2: {
                            message.callOutcome = reader.int32();
                            break;
                        }
                    case 3: {
                            message.durationSecs = reader.int64();
                            break;
                        }
                    case 4: {
                            message.callType = reader.int32();
                            break;
                        }
                    case 5: {
                            if (!(message.participants && message.participants.length))
                                message.participants = [];
                            message.participants.push($root.E2E.Message.CallLogMessage.CallParticipant.decode(reader, reader.uint32()));
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a CallLogMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.CallLogMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.CallLogMessage} CallLogMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CallLogMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CallLogMessage message.
             * @function verify
             * @memberof E2E.Message.CallLogMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CallLogMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.isVideo != null && message.hasOwnProperty("isVideo")) {
                    properties._isVideo = 1;
                    if (typeof message.isVideo !== "boolean")
                        return "isVideo: boolean expected";
                }
                if (message.callOutcome != null && message.hasOwnProperty("callOutcome")) {
                    properties._callOutcome = 1;
                    switch (message.callOutcome) {
                    default:
                        return "callOutcome: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                        break;
                    }
                }
                if (message.durationSecs != null && message.hasOwnProperty("durationSecs")) {
                    properties._durationSecs = 1;
                    if (!$util.isInteger(message.durationSecs) && !(message.durationSecs && $util.isInteger(message.durationSecs.low) && $util.isInteger(message.durationSecs.high)))
                        return "durationSecs: integer|Long expected";
                }
                if (message.callType != null && message.hasOwnProperty("callType")) {
                    properties._callType = 1;
                    switch (message.callType) {
                    default:
                        return "callType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                if (message.participants != null && message.hasOwnProperty("participants")) {
                    if (!Array.isArray(message.participants))
                        return "participants: array expected";
                    for (var i = 0; i < message.participants.length; ++i) {
                        var error = $root.E2E.Message.CallLogMessage.CallParticipant.verify(message.participants[i]);
                        if (error)
                            return "participants." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a CallLogMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.CallLogMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.CallLogMessage} CallLogMessage
             */
            CallLogMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.CallLogMessage)
                    return object;
                var message = new $root.E2E.Message.CallLogMessage();
                if (object.isVideo != null)
                    message.isVideo = Boolean(object.isVideo);
                switch (object.callOutcome) {
                default:
                    if (typeof object.callOutcome === "number") {
                        message.callOutcome = object.callOutcome;
                        break;
                    }
                    break;
                case "CONNECTED":
                case 0:
                    message.callOutcome = 0;
                    break;
                case "MISSED":
                case 1:
                    message.callOutcome = 1;
                    break;
                case "FAILED":
                case 2:
                    message.callOutcome = 2;
                    break;
                case "REJECTED":
                case 3:
                    message.callOutcome = 3;
                    break;
                case "ACCEPTED_ELSEWHERE":
                case 4:
                    message.callOutcome = 4;
                    break;
                case "ONGOING":
                case 5:
                    message.callOutcome = 5;
                    break;
                case "SILENCED_BY_DND":
                case 6:
                    message.callOutcome = 6;
                    break;
                case "SILENCED_UNKNOWN_CALLER":
                case 7:
                    message.callOutcome = 7;
                    break;
                }
                if (object.durationSecs != null)
                    if ($util.Long)
                        (message.durationSecs = $util.Long.fromValue(object.durationSecs)).unsigned = false;
                    else if (typeof object.durationSecs === "string")
                        message.durationSecs = parseInt(object.durationSecs, 10);
                    else if (typeof object.durationSecs === "number")
                        message.durationSecs = object.durationSecs;
                    else if (typeof object.durationSecs === "object")
                        message.durationSecs = new $util.LongBits(object.durationSecs.low >>> 0, object.durationSecs.high >>> 0).toNumber();
                switch (object.callType) {
                default:
                    if (typeof object.callType === "number") {
                        message.callType = object.callType;
                        break;
                    }
                    break;
                case "REGULAR":
                case 0:
                    message.callType = 0;
                    break;
                case "SCHEDULED_CALL":
                case 1:
                    message.callType = 1;
                    break;
                case "VOICE_CHAT":
                case 2:
                    message.callType = 2;
                    break;
                }
                if (object.participants) {
                    if (!Array.isArray(object.participants))
                        throw TypeError(".E2E.Message.CallLogMessage.participants: array expected");
                    message.participants = [];
                    for (var i = 0; i < object.participants.length; ++i) {
                        if (typeof object.participants[i] !== "object")
                            throw TypeError(".E2E.Message.CallLogMessage.participants: object expected");
                        message.participants[i] = $root.E2E.Message.CallLogMessage.CallParticipant.fromObject(object.participants[i]);
                    }
                }
                return message;
            };

            /**
             * Creates a plain object from a CallLogMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.CallLogMessage
             * @static
             * @param {E2E.Message.CallLogMessage} message CallLogMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CallLogMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.participants = [];
                if (message.isVideo != null && message.hasOwnProperty("isVideo")) {
                    object.isVideo = message.isVideo;
                    if (options.oneofs)
                        object._isVideo = "isVideo";
                }
                if (message.callOutcome != null && message.hasOwnProperty("callOutcome")) {
                    object.callOutcome = options.enums === String ? $root.E2E.Message.CallLogMessage.CallOutcome[message.callOutcome] === undefined ? message.callOutcome : $root.E2E.Message.CallLogMessage.CallOutcome[message.callOutcome] : message.callOutcome;
                    if (options.oneofs)
                        object._callOutcome = "callOutcome";
                }
                if (message.durationSecs != null && message.hasOwnProperty("durationSecs")) {
                    if (typeof message.durationSecs === "number")
                        object.durationSecs = options.longs === String ? String(message.durationSecs) : message.durationSecs;
                    else
                        object.durationSecs = options.longs === String ? $util.Long.prototype.toString.call(message.durationSecs) : options.longs === Number ? new $util.LongBits(message.durationSecs.low >>> 0, message.durationSecs.high >>> 0).toNumber() : message.durationSecs;
                    if (options.oneofs)
                        object._durationSecs = "durationSecs";
                }
                if (message.callType != null && message.hasOwnProperty("callType")) {
                    object.callType = options.enums === String ? $root.E2E.Message.CallLogMessage.CallType[message.callType] === undefined ? message.callType : $root.E2E.Message.CallLogMessage.CallType[message.callType] : message.callType;
                    if (options.oneofs)
                        object._callType = "callType";
                }
                if (message.participants && message.participants.length) {
                    object.participants = [];
                    for (var j = 0; j < message.participants.length; ++j)
                        object.participants[j] = $root.E2E.Message.CallLogMessage.CallParticipant.toObject(message.participants[j], options);
                }
                return object;
            };

            /**
             * Converts this CallLogMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.CallLogMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CallLogMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for CallLogMessage
             * @function getTypeUrl
             * @memberof E2E.Message.CallLogMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            CallLogMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.CallLogMessage";
            };

            /**
             * CallOutcome enum.
             * @name E2E.Message.CallLogMessage.CallOutcome
             * @enum {number}
             * @property {number} CONNECTED=0 CONNECTED value
             * @property {number} MISSED=1 MISSED value
             * @property {number} FAILED=2 FAILED value
             * @property {number} REJECTED=3 REJECTED value
             * @property {number} ACCEPTED_ELSEWHERE=4 ACCEPTED_ELSEWHERE value
             * @property {number} ONGOING=5 ONGOING value
             * @property {number} SILENCED_BY_DND=6 SILENCED_BY_DND value
             * @property {number} SILENCED_UNKNOWN_CALLER=7 SILENCED_UNKNOWN_CALLER value
             */
            CallLogMessage.CallOutcome = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "CONNECTED"] = 0;
                values[valuesById[1] = "MISSED"] = 1;
                values[valuesById[2] = "FAILED"] = 2;
                values[valuesById[3] = "REJECTED"] = 3;
                values[valuesById[4] = "ACCEPTED_ELSEWHERE"] = 4;
                values[valuesById[5] = "ONGOING"] = 5;
                values[valuesById[6] = "SILENCED_BY_DND"] = 6;
                values[valuesById[7] = "SILENCED_UNKNOWN_CALLER"] = 7;
                return values;
            })();

            CallLogMessage.CallParticipant = (function() {

                /**
                 * Properties of a CallParticipant.
                 * @memberof E2E.Message.CallLogMessage
                 * @interface ICallParticipant
                 * @property {string|null} [jid] CallParticipant jid
                 * @property {E2E.Message.CallLogMessage.CallOutcome|null} [callOutcome] CallParticipant callOutcome
                 */

                /**
                 * Constructs a new CallParticipant.
                 * @memberof E2E.Message.CallLogMessage
                 * @classdesc Represents a CallParticipant.
                 * @implements ICallParticipant
                 * @constructor
                 * @param {E2E.Message.CallLogMessage.ICallParticipant=} [properties] Properties to set
                 */
                function CallParticipant(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]];
                }

                /**
                 * CallParticipant jid.
                 * @member {string|null|undefined} jid
                 * @memberof E2E.Message.CallLogMessage.CallParticipant
                 * @instance
                 */
                CallParticipant.prototype.jid = null;

                /**
                 * CallParticipant callOutcome.
                 * @member {E2E.Message.CallLogMessage.CallOutcome|null|undefined} callOutcome
                 * @memberof E2E.Message.CallLogMessage.CallParticipant
                 * @instance
                 */
                CallParticipant.prototype.callOutcome = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * CallParticipant _jid.
                 * @member {"jid"|undefined} _jid
                 * @memberof E2E.Message.CallLogMessage.CallParticipant
                 * @instance
                 */
                Object.defineProperty(CallParticipant.prototype, "_jid", {
                    get: $util.oneOfGetter($oneOfFields = ["jid"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * CallParticipant _callOutcome.
                 * @member {"callOutcome"|undefined} _callOutcome
                 * @memberof E2E.Message.CallLogMessage.CallParticipant
                 * @instance
                 */
                Object.defineProperty(CallParticipant.prototype, "_callOutcome", {
                    get: $util.oneOfGetter($oneOfFields = ["callOutcome"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new CallParticipant instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.CallLogMessage.CallParticipant
                 * @static
                 * @param {E2E.Message.CallLogMessage.ICallParticipant=} [properties] Properties to set
                 * @returns {E2E.Message.CallLogMessage.CallParticipant} CallParticipant instance
                 */
                CallParticipant.create = function create(properties) {
                    return new CallParticipant(properties);
                };

                /**
                 * Encodes the specified CallParticipant message. Does not implicitly {@link E2E.Message.CallLogMessage.CallParticipant.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.CallLogMessage.CallParticipant
                 * @static
                 * @param {E2E.Message.CallLogMessage.ICallParticipant} message CallParticipant message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CallParticipant.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.jid != null && Object.hasOwnProperty.call(message, "jid"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.jid);
                    if (message.callOutcome != null && Object.hasOwnProperty.call(message, "callOutcome"))
                        writer.uint32(/* id 2, wireType 0 =*/16).int32(message.callOutcome);
                    return writer;
                };

                /**
                 * Encodes the specified CallParticipant message, length delimited. Does not implicitly {@link E2E.Message.CallLogMessage.CallParticipant.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.CallLogMessage.CallParticipant
                 * @static
                 * @param {E2E.Message.CallLogMessage.ICallParticipant} message CallParticipant message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CallParticipant.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a CallParticipant message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.CallLogMessage.CallParticipant
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.CallLogMessage.CallParticipant} CallParticipant
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CallParticipant.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.E2E.Message.CallLogMessage.CallParticipant();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.jid = reader.string();
                                break;
                            }
                        case 2: {
                                message.callOutcome = reader.int32();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a CallParticipant message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.CallLogMessage.CallParticipant
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.CallLogMessage.CallParticipant} CallParticipant
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CallParticipant.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a CallParticipant message.
                 * @function verify
                 * @memberof E2E.Message.CallLogMessage.CallParticipant
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CallParticipant.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.jid != null && message.hasOwnProperty("jid")) {
                        properties._jid = 1;
                        if (!$util.isString(message.jid))
                            return "jid: string expected";
                    }
                    if (message.callOutcome != null && message.hasOwnProperty("callOutcome")) {
                        properties._callOutcome = 1;
                        switch (message.callOutcome) {
                        default:
                            return "callOutcome: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                            break;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a CallParticipant message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.CallLogMessage.CallParticipant
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.CallLogMessage.CallParticipant} CallParticipant
                 */
                CallParticipant.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.CallLogMessage.CallParticipant)
                        return object;
                    var message = new $root.E2E.Message.CallLogMessage.CallParticipant();
                    if (object.jid != null)
                        message.jid = String(object.jid);
                    switch (object.callOutcome) {
                    default:
                        if (typeof object.callOutcome === "number") {
                            message.callOutcome = object.callOutcome;
                            break;
                        }
                        break;
                    case "CONNECTED":
                    case 0:
                        message.callOutcome = 0;
                        break;
                    case "MISSED":
                    case 1:
                        message.callOutcome = 1;
                        break;
                    case "FAILED":
                    case 2:
                        message.callOutcome = 2;
                        break;
                    case "REJECTED":
                    case 3:
                        message.callOutcome = 3;
                        break;
                    case "ACCEPTED_ELSEWHERE":
                    case 4:
                        message.callOutcome = 4;
                        break;
                    case "ONGOING":
                    case 5:
                        message.callOutcome = 5;
                        break;
                    case "SILENCED_BY_DND":
                    case 6:
                        message.callOutcome = 6;
                        break;
                    case "SILENCED_UNKNOWN_CALLER":
                    case 7:
                        message.callOutcome = 7;
                        break;
                    }
                    return message;
                };

                /**
                 * Creates a plain object from a CallParticipant message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.CallLogMessage.CallParticipant
                 * @static
                 * @param {E2E.Message.CallLogMessage.CallParticipant} message CallParticipant
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CallParticipant.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.jid != null && message.hasOwnProperty("jid")) {
                        object.jid = message.jid;
                        if (options.oneofs)
                            object._jid = "jid";
                    }
                    if (message.callOutcome != null && message.hasOwnProperty("callOutcome")) {
                        object.callOutcome = options.enums === String ? $root.E2E.Message.CallLogMessage.CallOutcome[message.callOutcome] === undefined ? message.callOutcome : $root.E2E.Message.CallLogMessage.CallOutcome[message.callOutcome] : message.callOutcome;
                        if (options.oneofs)
                            object._callOutcome = "callOutcome";
                    }
                    return object;
                };

                /**
                 * Converts this CallParticipant to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.CallLogMessage.CallParticipant
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CallParticipant.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for CallParticipant
                 * @function getTypeUrl
                 * @memberof E2E.Message.CallLogMessage.CallParticipant
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                CallParticipant.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.CallLogMessage.CallParticipant";
                };

                return CallParticipant;
            })();

            /**
             * CallType enum.
             * @name E2E.Message.CallLogMessage.CallType
             * @enum {number}
             * @property {number} REGULAR=0 REGULAR value
             * @property {number} SCHEDULED_CALL=1 SCHEDULED_CALL value
             * @property {number} VOICE_CHAT=2 VOICE_CHAT value
             */
            CallLogMessage.CallType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "REGULAR"] = 0;
                values[valuesById[1] = "SCHEDULED_CALL"] = 1;
                values[valuesById[2] = "VOICE_CHAT"] = 2;
                return values;
            })();

            return CallLogMessage;
        })();

        Message.CancelPaymentRequestMessage = (function() {

            /**
             * Properties of a CancelPaymentRequestMessage.
             * @memberof E2E.Message
             * @interface ICancelPaymentRequestMessage
             * @property {Protocol.IMessageKey|null} [key] CancelPaymentRequestMessage key
             */

            /**
             * Constructs a new CancelPaymentRequestMessage.
             * @memberof E2E.Message
             * @classdesc Represents a CancelPaymentRequestMessage.
             * @implements ICancelPaymentRequestMessage
             * @constructor
             * @param {E2E.Message.ICancelPaymentRequestMessage=} [properties] Properties to set
             */
            function CancelPaymentRequestMessage(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]];
            }

            /**
             * CancelPaymentRequestMessage key.
             * @member {Protocol.IMessageKey|null|undefined} key
             * @memberof E2E.Message.CancelPaymentRequestMessage
             * @instance
             */
            CancelPaymentRequestMessage.prototype.key = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * CancelPaymentRequestMessage _key.
             * @member {"key"|undefined} _key
             * @memberof E2E.Message.CancelPaymentRequestMessage
             * @instance
             */
            Object.defineProperty(CancelPaymentRequestMessage.prototype, "_key", {
                get: $util.oneOfGetter($oneOfFields = ["key"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new CancelPaymentRequestMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.CancelPaymentRequestMessage
             * @static
             * @param {E2E.Message.ICancelPaymentRequestMessage=} [properties] Properties to set
             * @returns {E2E.Message.CancelPaymentRequestMessage} CancelPaymentRequestMessage instance
             */
            CancelPaymentRequestMessage.create = function create(properties) {
                return new CancelPaymentRequestMessage(properties);
            };

            /**
             * Encodes the specified CancelPaymentRequestMessage message. Does not implicitly {@link E2E.Message.CancelPaymentRequestMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.CancelPaymentRequestMessage
             * @static
             * @param {E2E.Message.ICancelPaymentRequestMessage} message CancelPaymentRequestMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CancelPaymentRequestMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.key != null && Object.hasOwnProperty.call(message, "key"))
                    $root.Protocol.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified CancelPaymentRequestMessage message, length delimited. Does not implicitly {@link E2E.Message.CancelPaymentRequestMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.CancelPaymentRequestMessage
             * @static
             * @param {E2E.Message.ICancelPaymentRequestMessage} message CancelPaymentRequestMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CancelPaymentRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CancelPaymentRequestMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.CancelPaymentRequestMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.CancelPaymentRequestMessage} CancelPaymentRequestMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CancelPaymentRequestMessage.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.E2E.Message.CancelPaymentRequestMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.key = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a CancelPaymentRequestMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.CancelPaymentRequestMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.CancelPaymentRequestMessage} CancelPaymentRequestMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CancelPaymentRequestMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CancelPaymentRequestMessage message.
             * @function verify
             * @memberof E2E.Message.CancelPaymentRequestMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CancelPaymentRequestMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    properties._key = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.key);
                        if (error)
                            return "key." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a CancelPaymentRequestMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.CancelPaymentRequestMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.CancelPaymentRequestMessage} CancelPaymentRequestMessage
             */
            CancelPaymentRequestMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.CancelPaymentRequestMessage)
                    return object;
                var message = new $root.E2E.Message.CancelPaymentRequestMessage();
                if (object.key != null) {
                    if (typeof object.key !== "object")
                        throw TypeError(".E2E.Message.CancelPaymentRequestMessage.key: object expected");
                    message.key = $root.Protocol.MessageKey.fromObject(object.key);
                }
                return message;
            };

            /**
             * Creates a plain object from a CancelPaymentRequestMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.CancelPaymentRequestMessage
             * @static
             * @param {E2E.Message.CancelPaymentRequestMessage} message CancelPaymentRequestMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CancelPaymentRequestMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                    if (options.oneofs)
                        object._key = "key";
                }
                return object;
            };

            /**
             * Converts this CancelPaymentRequestMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.CancelPaymentRequestMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CancelPaymentRequestMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for CancelPaymentRequestMessage
             * @function getTypeUrl
             * @memberof E2E.Message.CancelPaymentRequestMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            CancelPaymentRequestMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.CancelPaymentRequestMessage";
            };

            return CancelPaymentRequestMessage;
        })();

        Message.Chat = (function() {

            /**
             * Properties of a Chat.
             * @memberof E2E.Message
             * @interface IChat
             * @property {string|null} [displayName] Chat displayName
             * @property {string|null} [id] Chat id
             */

            /**
             * Constructs a new Chat.
             * @memberof E2E.Message
             * @classdesc Represents a Chat.
             * @implements IChat
             * @constructor
             * @param {E2E.Message.IChat=} [properties] Properties to set
             */
            function Chat(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]];
            }

            /**
             * Chat displayName.
             * @member {string|null|undefined} displayName
             * @memberof E2E.Message.Chat
             * @instance
             */
            Chat.prototype.displayName = null;

            /**
             * Chat id.
             * @member {string|null|undefined} id
             * @memberof E2E.Message.Chat
             * @instance
             */
            Chat.prototype.id = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * Chat _displayName.
             * @member {"displayName"|undefined} _displayName
             * @memberof E2E.Message.Chat
             * @instance
             */
            Object.defineProperty(Chat.prototype, "_displayName", {
                get: $util.oneOfGetter($oneOfFields = ["displayName"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Chat _id.
             * @member {"id"|undefined} _id
             * @memberof E2E.Message.Chat
             * @instance
             */
            Object.defineProperty(Chat.prototype, "_id", {
                get: $util.oneOfGetter($oneOfFields = ["id"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new Chat instance using the specified properties.
             * @function create
             * @memberof E2E.Message.Chat
             * @static
             * @param {E2E.Message.IChat=} [properties] Properties to set
             * @returns {E2E.Message.Chat} Chat instance
             */
            Chat.create = function create(properties) {
                return new Chat(properties);
            };

            /**
             * Encodes the specified Chat message. Does not implicitly {@link E2E.Message.Chat.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.Chat
             * @static
             * @param {E2E.Message.IChat} message Chat message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Chat.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName);
                if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.id);
                return writer;
            };

            /**
             * Encodes the specified Chat message, length delimited. Does not implicitly {@link E2E.Message.Chat.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.Chat
             * @static
             * @param {E2E.Message.IChat} message Chat message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Chat.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a Chat message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.Chat
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.Chat} Chat
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Chat.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.E2E.Message.Chat();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.displayName = reader.string();
                            break;
                        }
                    case 2: {
                            message.id = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a Chat message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.Chat
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.Chat} Chat
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Chat.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a Chat message.
             * @function verify
             * @memberof E2E.Message.Chat
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Chat.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.displayName != null && message.hasOwnProperty("displayName")) {
                    properties._displayName = 1;
                    if (!$util.isString(message.displayName))
                        return "displayName: string expected";
                }
                if (message.id != null && message.hasOwnProperty("id")) {
                    properties._id = 1;
                    if (!$util.isString(message.id))
                        return "id: string expected";
                }
                return null;
            };

            /**
             * Creates a Chat message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.Chat
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.Chat} Chat
             */
            Chat.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.Chat)
                    return object;
                var message = new $root.E2E.Message.Chat();
                if (object.displayName != null)
                    message.displayName = String(object.displayName);
                if (object.id != null)
                    message.id = String(object.id);
                return message;
            };

            /**
             * Creates a plain object from a Chat message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.Chat
             * @static
             * @param {E2E.Message.Chat} message Chat
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Chat.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.displayName != null && message.hasOwnProperty("displayName")) {
                    object.displayName = message.displayName;
                    if (options.oneofs)
                        object._displayName = "displayName";
                }
                if (message.id != null && message.hasOwnProperty("id")) {
                    object.id = message.id;
                    if (options.oneofs)
                        object._id = "id";
                }
                return object;
            };

            /**
             * Converts this Chat to JSON.
             * @function toJSON
             * @memberof E2E.Message.Chat
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Chat.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for Chat
             * @function getTypeUrl
             * @memberof E2E.Message.Chat
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            Chat.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.Chat";
            };

            return Chat;
        })();

        Message.CloudAPIThreadControlNotification = (function() {

            /**
             * Properties of a CloudAPIThreadControlNotification.
             * @memberof E2E.Message
             * @interface ICloudAPIThreadControlNotification
             * @property {E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControl|null} [status] CloudAPIThreadControlNotification status
             * @property {number|Long|null} [senderNotificationTimestampMs] CloudAPIThreadControlNotification senderNotificationTimestampMs
             * @property {string|null} [consumerLid] CloudAPIThreadControlNotification consumerLid
             * @property {string|null} [consumerPhoneNumber] CloudAPIThreadControlNotification consumerPhoneNumber
             * @property {E2E.Message.CloudAPIThreadControlNotification.ICloudAPIThreadControlNotificationContent|null} [notificationContent] CloudAPIThreadControlNotification notificationContent
             * @property {boolean|null} [shouldSuppressNotification] CloudAPIThreadControlNotification shouldSuppressNotification
             */

            /**
             * Constructs a new CloudAPIThreadControlNotification.
             * @memberof E2E.Message
             * @classdesc Represents a CloudAPIThreadControlNotification.
             * @implements ICloudAPIThreadControlNotification
             * @constructor
             * @param {E2E.Message.ICloudAPIThreadControlNotification=} [properties] Properties to set
             */
            function CloudAPIThreadControlNotification(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]];
            }

            /**
             * CloudAPIThreadControlNotification status.
             * @member {E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControl|null|undefined} status
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @instance
             */
            CloudAPIThreadControlNotification.prototype.status = null;

            /**
             * CloudAPIThreadControlNotification senderNotificationTimestampMs.
             * @member {number|Long|null|undefined} senderNotificationTimestampMs
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @instance
             */
            CloudAPIThreadControlNotification.prototype.senderNotificationTimestampMs = null;

            /**
             * CloudAPIThreadControlNotification consumerLid.
             * @member {string|null|undefined} consumerLid
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @instance
             */
            CloudAPIThreadControlNotification.prototype.consumerLid = null;

            /**
             * CloudAPIThreadControlNotification consumerPhoneNumber.
             * @member {string|null|undefined} consumerPhoneNumber
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @instance
             */
            CloudAPIThreadControlNotification.prototype.consumerPhoneNumber = null;

            /**
             * CloudAPIThreadControlNotification notificationContent.
             * @member {E2E.Message.CloudAPIThreadControlNotification.ICloudAPIThreadControlNotificationContent|null|undefined} notificationContent
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @instance
             */
            CloudAPIThreadControlNotification.prototype.notificationContent = null;

            /**
             * CloudAPIThreadControlNotification shouldSuppressNotification.
             * @member {boolean|null|undefined} shouldSuppressNotification
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @instance
             */
            CloudAPIThreadControlNotification.prototype.shouldSuppressNotification = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * CloudAPIThreadControlNotification _status.
             * @member {"status"|undefined} _status
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @instance
             */
            Object.defineProperty(CloudAPIThreadControlNotification.prototype, "_status", {
                get: $util.oneOfGetter($oneOfFields = ["status"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * CloudAPIThreadControlNotification _senderNotificationTimestampMs.
             * @member {"senderNotificationTimestampMs"|undefined} _senderNotificationTimestampMs
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @instance
             */
            Object.defineProperty(CloudAPIThreadControlNotification.prototype, "_senderNotificationTimestampMs", {
                get: $util.oneOfGetter($oneOfFields = ["senderNotificationTimestampMs"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * CloudAPIThreadControlNotification _consumerLid.
             * @member {"consumerLid"|undefined} _consumerLid
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @instance
             */
            Object.defineProperty(CloudAPIThreadControlNotification.prototype, "_consumerLid", {
                get: $util.oneOfGetter($oneOfFields = ["consumerLid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * CloudAPIThreadControlNotification _consumerPhoneNumber.
             * @member {"consumerPhoneNumber"|undefined} _consumerPhoneNumber
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @instance
             */
            Object.defineProperty(CloudAPIThreadControlNotification.prototype, "_consumerPhoneNumber", {
                get: $util.oneOfGetter($oneOfFields = ["consumerPhoneNumber"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * CloudAPIThreadControlNotification _notificationContent.
             * @member {"notificationContent"|undefined} _notificationContent
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @instance
             */
            Object.defineProperty(CloudAPIThreadControlNotification.prototype, "_notificationContent", {
                get: $util.oneOfGetter($oneOfFields = ["notificationContent"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * CloudAPIThreadControlNotification _shouldSuppressNotification.
             * @member {"shouldSuppressNotification"|undefined} _shouldSuppressNotification
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @instance
             */
            Object.defineProperty(CloudAPIThreadControlNotification.prototype, "_shouldSuppressNotification", {
                get: $util.oneOfGetter($oneOfFields = ["shouldSuppressNotification"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new CloudAPIThreadControlNotification instance using the specified properties.
             * @function create
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @static
             * @param {E2E.Message.ICloudAPIThreadControlNotification=} [properties] Properties to set
             * @returns {E2E.Message.CloudAPIThreadControlNotification} CloudAPIThreadControlNotification instance
             */
            CloudAPIThreadControlNotification.create = function create(properties) {
                return new CloudAPIThreadControlNotification(properties);
            };

            /**
             * Encodes the specified CloudAPIThreadControlNotification message. Does not implicitly {@link E2E.Message.CloudAPIThreadControlNotification.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @static
             * @param {E2E.Message.ICloudAPIThreadControlNotification} message CloudAPIThreadControlNotification message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CloudAPIThreadControlNotification.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.status != null && Object.hasOwnProperty.call(message, "status"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status);
                if (message.senderNotificationTimestampMs != null && Object.hasOwnProperty.call(message, "senderNotificationTimestampMs"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int64(message.senderNotificationTimestampMs);
                if (message.consumerLid != null && Object.hasOwnProperty.call(message, "consumerLid"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.consumerLid);
                if (message.consumerPhoneNumber != null && Object.hasOwnProperty.call(message, "consumerPhoneNumber"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.consumerPhoneNumber);
                if (message.notificationContent != null && Object.hasOwnProperty.call(message, "notificationContent"))
                    $root.E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent.encode(message.notificationContent, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                if (message.shouldSuppressNotification != null && Object.hasOwnProperty.call(message, "shouldSuppressNotification"))
                    writer.uint32(/* id 6, wireType 0 =*/48).bool(message.shouldSuppressNotification);
                return writer;
            };

            /**
             * Encodes the specified CloudAPIThreadControlNotification message, length delimited. Does not implicitly {@link E2E.Message.CloudAPIThreadControlNotification.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @static
             * @param {E2E.Message.ICloudAPIThreadControlNotification} message CloudAPIThreadControlNotification message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CloudAPIThreadControlNotification.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CloudAPIThreadControlNotification message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.CloudAPIThreadControlNotification} CloudAPIThreadControlNotification
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CloudAPIThreadControlNotification.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.E2E.Message.CloudAPIThreadControlNotification();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.status = reader.int32();
                            break;
                        }
                    case 2: {
                            message.senderNotificationTimestampMs = reader.int64();
                            break;
                        }
                    case 3: {
                            message.consumerLid = reader.string();
                            break;
                        }
                    case 4: {
                            message.consumerPhoneNumber = reader.string();
                            break;
                        }
                    case 5: {
                            message.notificationContent = $root.E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent.decode(reader, reader.uint32());
                            break;
                        }
                    case 6: {
                            message.shouldSuppressNotification = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a CloudAPIThreadControlNotification message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.CloudAPIThreadControlNotification} CloudAPIThreadControlNotification
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CloudAPIThreadControlNotification.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CloudAPIThreadControlNotification message.
             * @function verify
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CloudAPIThreadControlNotification.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.status != null && message.hasOwnProperty("status")) {
                    properties._status = 1;
                    switch (message.status) {
                    default:
                        return "status: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                if (message.senderNotificationTimestampMs != null && message.hasOwnProperty("senderNotificationTimestampMs")) {
                    properties._senderNotificationTimestampMs = 1;
                    if (!$util.isInteger(message.senderNotificationTimestampMs) && !(message.senderNotificationTimestampMs && $util.isInteger(message.senderNotificationTimestampMs.low) && $util.isInteger(message.senderNotificationTimestampMs.high)))
                        return "senderNotificationTimestampMs: integer|Long expected";
                }
                if (message.consumerLid != null && message.hasOwnProperty("consumerLid")) {
                    properties._consumerLid = 1;
                    if (!$util.isString(message.consumerLid))
                        return "consumerLid: string expected";
                }
                if (message.consumerPhoneNumber != null && message.hasOwnProperty("consumerPhoneNumber")) {
                    properties._consumerPhoneNumber = 1;
                    if (!$util.isString(message.consumerPhoneNumber))
                        return "consumerPhoneNumber: string expected";
                }
                if (message.notificationContent != null && message.hasOwnProperty("notificationContent")) {
                    properties._notificationContent = 1;
                    {
                        var error = $root.E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent.verify(message.notificationContent);
                        if (error)
                            return "notificationContent." + error;
                    }
                }
                if (message.shouldSuppressNotification != null && message.hasOwnProperty("shouldSuppressNotification")) {
                    properties._shouldSuppressNotification = 1;
                    if (typeof message.shouldSuppressNotification !== "boolean")
                        return "shouldSuppressNotification: boolean expected";
                }
                return null;
            };

            /**
             * Creates a CloudAPIThreadControlNotification message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.CloudAPIThreadControlNotification} CloudAPIThreadControlNotification
             */
            CloudAPIThreadControlNotification.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.CloudAPIThreadControlNotification)
                    return object;
                var message = new $root.E2E.Message.CloudAPIThreadControlNotification();
                switch (object.status) {
                default:
                    if (typeof object.status === "number") {
                        message.status = object.status;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.status = 0;
                    break;
                case "CONTROL_PASSED":
                case 1:
                    message.status = 1;
                    break;
                case "CONTROL_TAKEN":
                case 2:
                    message.status = 2;
                    break;
                }
                if (object.senderNotificationTimestampMs != null)
                    if ($util.Long)
                        (message.senderNotificationTimestampMs = $util.Long.fromValue(object.senderNotificationTimestampMs)).unsigned = false;
                    else if (typeof object.senderNotificationTimestampMs === "string")
                        message.senderNotificationTimestampMs = parseInt(object.senderNotificationTimestampMs, 10);
                    else if (typeof object.senderNotificationTimestampMs === "number")
                        message.senderNotificationTimestampMs = object.senderNotificationTimestampMs;
                    else if (typeof object.senderNotificationTimestampMs === "object")
                        message.senderNotificationTimestampMs = new $util.LongBits(object.senderNotificationTimestampMs.low >>> 0, object.senderNotificationTimestampMs.high >>> 0).toNumber();
                if (object.consumerLid != null)
                    message.consumerLid = String(object.consumerLid);
                if (object.consumerPhoneNumber != null)
                    message.consumerPhoneNumber = String(object.consumerPhoneNumber);
                if (object.notificationContent != null) {
                    if (typeof object.notificationContent !== "object")
                        throw TypeError(".E2E.Message.CloudAPIThreadControlNotification.notificationContent: object expected");
                    message.notificationContent = $root.E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent.fromObject(object.notificationContent);
                }
                if (object.shouldSuppressNotification != null)
                    message.shouldSuppressNotification = Boolean(object.shouldSuppressNotification);
                return message;
            };

            /**
             * Creates a plain object from a CloudAPIThreadControlNotification message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @static
             * @param {E2E.Message.CloudAPIThreadControlNotification} message CloudAPIThreadControlNotification
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CloudAPIThreadControlNotification.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.status != null && message.hasOwnProperty("status")) {
                    object.status = options.enums === String ? $root.E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControl[message.status] === undefined ? message.status : $root.E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControl[message.status] : message.status;
                    if (options.oneofs)
                        object._status = "status";
                }
                if (message.senderNotificationTimestampMs != null && message.hasOwnProperty("senderNotificationTimestampMs")) {
                    if (typeof message.senderNotificationTimestampMs === "number")
                        object.senderNotificationTimestampMs = options.longs === String ? String(message.senderNotificationTimestampMs) : message.senderNotificationTimestampMs;
                    else
                        object.senderNotificationTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.senderNotificationTimestampMs) : options.longs === Number ? new $util.LongBits(message.senderNotificationTimestampMs.low >>> 0, message.senderNotificationTimestampMs.high >>> 0).toNumber() : message.senderNotificationTimestampMs;
                    if (options.oneofs)
                        object._senderNotificationTimestampMs = "senderNotificationTimestampMs";
                }
                if (message.consumerLid != null && message.hasOwnProperty("consumerLid")) {
                    object.consumerLid = message.consumerLid;
                    if (options.oneofs)
                        object._consumerLid = "consumerLid";
                }
                if (message.consumerPhoneNumber != null && message.hasOwnProperty("consumerPhoneNumber")) {
                    object.consumerPhoneNumber = message.consumerPhoneNumber;
                    if (options.oneofs)
                        object._consumerPhoneNumber = "consumerPhoneNumber";
                }
                if (message.notificationContent != null && message.hasOwnProperty("notificationContent")) {
                    object.notificationContent = $root.E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent.toObject(message.notificationContent, options);
                    if (options.oneofs)
                        object._notificationContent = "notificationContent";
                }
                if (message.shouldSuppressNotification != null && message.hasOwnProperty("shouldSuppressNotification")) {
                    object.shouldSuppressNotification = message.shouldSuppressNotification;
                    if (options.oneofs)
                        object._shouldSuppressNotification = "shouldSuppressNotification";
                }
                return object;
            };

            /**
             * Converts this CloudAPIThreadControlNotification to JSON.
             * @function toJSON
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CloudAPIThreadControlNotification.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for CloudAPIThreadControlNotification
             * @function getTypeUrl
             * @memberof E2E.Message.CloudAPIThreadControlNotification
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            CloudAPIThreadControlNotification.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.CloudAPIThreadControlNotification";
            };

            /**
             * CloudAPIThreadControl enum.
             * @name E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControl
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} CONTROL_PASSED=1 CONTROL_PASSED value
             * @property {number} CONTROL_TAKEN=2 CONTROL_TAKEN value
             */
            CloudAPIThreadControlNotification.CloudAPIThreadControl = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "CONTROL_PASSED"] = 1;
                values[valuesById[2] = "CONTROL_TAKEN"] = 2;
                return values;
            })();

            CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent = (function() {

                /**
                 * Properties of a CloudAPIThreadControlNotificationContent.
                 * @memberof E2E.Message.CloudAPIThreadControlNotification
                 * @interface ICloudAPIThreadControlNotificationContent
                 * @property {string|null} [handoffNotificationText] CloudAPIThreadControlNotificationContent handoffNotificationText
                 * @property {string|null} [extraJson] CloudAPIThreadControlNotificationContent extraJson
                 */

                /**
                 * Constructs a new CloudAPIThreadControlNotificationContent.
                 * @memberof E2E.Message.CloudAPIThreadControlNotification
                 * @classdesc Represents a CloudAPIThreadControlNotificationContent.
                 * @implements ICloudAPIThreadControlNotificationContent
                 * @constructor
                 * @param {E2E.Message.CloudAPIThreadControlNotification.ICloudAPIThreadControlNotificationContent=} [properties] Properties to set
                 */
                function CloudAPIThreadControlNotificationContent(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]];
                }

                /**
                 * CloudAPIThreadControlNotificationContent handoffNotificationText.
                 * @member {string|null|undefined} handoffNotificationText
                 * @memberof E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent
                 * @instance
                 */
                CloudAPIThreadControlNotificationContent.prototype.handoffNotificationText = null;

                /**
                 * CloudAPIThreadControlNotificationContent extraJson.
                 * @member {string|null|undefined} extraJson
                 * @memberof E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent
                 * @instance
                 */
                CloudAPIThreadControlNotificationContent.prototype.extraJson = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * CloudAPIThreadControlNotificationContent _handoffNotificationText.
                 * @member {"handoffNotificationText"|undefined} _handoffNotificationText
                 * @memberof E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent
                 * @instance
                 */
                Object.defineProperty(CloudAPIThreadControlNotificationContent.prototype, "_handoffNotificationText", {
                    get: $util.oneOfGetter($oneOfFields = ["handoffNotificationText"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * CloudAPIThreadControlNotificationContent _extraJson.
                 * @member {"extraJson"|undefined} _extraJson
                 * @memberof E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent
                 * @instance
                 */
                Object.defineProperty(CloudAPIThreadControlNotificationContent.prototype, "_extraJson", {
                    get: $util.oneOfGetter($oneOfFields = ["extraJson"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new CloudAPIThreadControlNotificationContent instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent
                 * @static
                 * @param {E2E.Message.CloudAPIThreadControlNotification.ICloudAPIThreadControlNotificationContent=} [properties] Properties to set
                 * @returns {E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent} CloudAPIThreadControlNotificationContent instance
                 */
                CloudAPIThreadControlNotificationContent.create = function create(properties) {
                    return new CloudAPIThreadControlNotificationContent(properties);
                };

                /**
                 * Encodes the specified CloudAPIThreadControlNotificationContent message. Does not implicitly {@link E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent
                 * @static
                 * @param {E2E.Message.CloudAPIThreadControlNotification.ICloudAPIThreadControlNotificationContent} message CloudAPIThreadControlNotificationContent message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CloudAPIThreadControlNotificationContent.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.handoffNotificationText != null && Object.hasOwnProperty.call(message, "handoffNotificationText"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.handoffNotificationText);
                    if (message.extraJson != null && Object.hasOwnProperty.call(message, "extraJson"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.extraJson);
                    return writer;
                };

                /**
                 * Encodes the specified CloudAPIThreadControlNotificationContent message, length delimited. Does not implicitly {@link E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent
                 * @static
                 * @param {E2E.Message.CloudAPIThreadControlNotification.ICloudAPIThreadControlNotificationContent} message CloudAPIThreadControlNotificationContent message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CloudAPIThreadControlNotificationContent.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a CloudAPIThreadControlNotificationContent message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent} CloudAPIThreadControlNotificationContent
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CloudAPIThreadControlNotificationContent.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.E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.handoffNotificationText = reader.string();
                                break;
                            }
                        case 2: {
                                message.extraJson = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a CloudAPIThreadControlNotificationContent message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent} CloudAPIThreadControlNotificationContent
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CloudAPIThreadControlNotificationContent.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a CloudAPIThreadControlNotificationContent message.
                 * @function verify
                 * @memberof E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CloudAPIThreadControlNotificationContent.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.handoffNotificationText != null && message.hasOwnProperty("handoffNotificationText")) {
                        properties._handoffNotificationText = 1;
                        if (!$util.isString(message.handoffNotificationText))
                            return "handoffNotificationText: string expected";
                    }
                    if (message.extraJson != null && message.hasOwnProperty("extraJson")) {
                        properties._extraJson = 1;
                        if (!$util.isString(message.extraJson))
                            return "extraJson: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a CloudAPIThreadControlNotificationContent message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent} CloudAPIThreadControlNotificationContent
                 */
                CloudAPIThreadControlNotificationContent.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent)
                        return object;
                    var message = new $root.E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent();
                    if (object.handoffNotificationText != null)
                        message.handoffNotificationText = String(object.handoffNotificationText);
                    if (object.extraJson != null)
                        message.extraJson = String(object.extraJson);
                    return message;
                };

                /**
                 * Creates a plain object from a CloudAPIThreadControlNotificationContent message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent
                 * @static
                 * @param {E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent} message CloudAPIThreadControlNotificationContent
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CloudAPIThreadControlNotificationContent.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.handoffNotificationText != null && message.hasOwnProperty("handoffNotificationText")) {
                        object.handoffNotificationText = message.handoffNotificationText;
                        if (options.oneofs)
                            object._handoffNotificationText = "handoffNotificationText";
                    }
                    if (message.extraJson != null && message.hasOwnProperty("extraJson")) {
                        object.extraJson = message.extraJson;
                        if (options.oneofs)
                            object._extraJson = "extraJson";
                    }
                    return object;
                };

                /**
                 * Converts this CloudAPIThreadControlNotificationContent to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CloudAPIThreadControlNotificationContent.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for CloudAPIThreadControlNotificationContent
                 * @function getTypeUrl
                 * @memberof E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                CloudAPIThreadControlNotificationContent.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent";
                };

                return CloudAPIThreadControlNotificationContent;
            })();

            return CloudAPIThreadControlNotification;
        })();

        Message.CommentMessage = (function() {

            /**
             * Properties of a CommentMessage.
             * @memberof E2E.Message
             * @interface ICommentMessage
             * @property {E2E.IMessage|null} [message] CommentMessage message
             * @property {Protocol.IMessageKey|null} [targetMessageKey] CommentMessage targetMessageKey
             */

            /**
             * Constructs a new CommentMessage.
             * @memberof E2E.Message
             * @classdesc Represents a CommentMessage.
             * @implements ICommentMessage
             * @constructor
             * @param {E2E.Message.ICommentMessage=} [properties] Properties to set
             */
            function CommentMessage(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]];
            }

            /**
             * CommentMessage message.
             * @member {E2E.IMessage|null|undefined} message
             * @memberof E2E.Message.CommentMessage
             * @instance
             */
            CommentMessage.prototype.message = null;

            /**
             * CommentMessage targetMessageKey.
             * @member {Protocol.IMessageKey|null|undefined} targetMessageKey
             * @memberof E2E.Message.CommentMessage
             * @instance
             */
            CommentMessage.prototype.targetMessageKey = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * CommentMessage _message.
             * @member {"message"|undefined} _message
             * @memberof E2E.Message.CommentMessage
             * @instance
             */
            Object.defineProperty(CommentMessage.prototype, "_message", {
                get: $util.oneOfGetter($oneOfFields = ["message"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * CommentMessage _targetMessageKey.
             * @member {"targetMessageKey"|undefined} _targetMessageKey
             * @memberof E2E.Message.CommentMessage
             * @instance
             */
            Object.defineProperty(CommentMessage.prototype, "_targetMessageKey", {
                get: $util.oneOfGetter($oneOfFields = ["targetMessageKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new CommentMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.CommentMessage
             * @static
             * @param {E2E.Message.ICommentMessage=} [properties] Properties to set
             * @returns {E2E.Message.CommentMessage} CommentMessage instance
             */
            CommentMessage.create = function create(properties) {
                return new CommentMessage(properties);
            };

            /**
             * Encodes the specified CommentMessage message. Does not implicitly {@link E2E.Message.CommentMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.CommentMessage
             * @static
             * @param {E2E.Message.ICommentMessage} message CommentMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CommentMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.message != null && Object.hasOwnProperty.call(message, "message"))
                    $root.E2E.Message.encode(message.message, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.targetMessageKey != null && Object.hasOwnProperty.call(message, "targetMessageKey"))
                    $root.Protocol.MessageKey.encode(message.targetMessageKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified CommentMessage message, length delimited. Does not implicitly {@link E2E.Message.CommentMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.CommentMessage
             * @static
             * @param {E2E.Message.ICommentMessage} message CommentMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CommentMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CommentMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.CommentMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.CommentMessage} CommentMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CommentMessage.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.E2E.Message.CommentMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.message = $root.E2E.Message.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.targetMessageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a CommentMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.CommentMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.CommentMessage} CommentMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CommentMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CommentMessage message.
             * @function verify
             * @memberof E2E.Message.CommentMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CommentMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.message != null && message.hasOwnProperty("message")) {
                    properties._message = 1;
                    {
                        var error = $root.E2E.Message.verify(message.message);
                        if (error)
                            return "message." + error;
                    }
                }
                if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) {
                    properties._targetMessageKey = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.targetMessageKey);
                        if (error)
                            return "targetMessageKey." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a CommentMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.CommentMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.CommentMessage} CommentMessage
             */
            CommentMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.CommentMessage)
                    return object;
                var message = new $root.E2E.Message.CommentMessage();
                if (object.message != null) {
                    if (typeof object.message !== "object")
                        throw TypeError(".E2E.Message.CommentMessage.message: object expected");
                    message.message = $root.E2E.Message.fromObject(object.message);
                }
                if (object.targetMessageKey != null) {
                    if (typeof object.targetMessageKey !== "object")
                        throw TypeError(".E2E.Message.CommentMessage.targetMessageKey: object expected");
                    message.targetMessageKey = $root.Protocol.MessageKey.fromObject(object.targetMessageKey);
                }
                return message;
            };

            /**
             * Creates a plain object from a CommentMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.CommentMessage
             * @static
             * @param {E2E.Message.CommentMessage} message CommentMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CommentMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.message != null && message.hasOwnProperty("message")) {
                    object.message = $root.E2E.Message.toObject(message.message, options);
                    if (options.oneofs)
                        object._message = "message";
                }
                if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) {
                    object.targetMessageKey = $root.Protocol.MessageKey.toObject(message.targetMessageKey, options);
                    if (options.oneofs)
                        object._targetMessageKey = "targetMessageKey";
                }
                return object;
            };

            /**
             * Converts this CommentMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.CommentMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CommentMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for CommentMessage
             * @function getTypeUrl
             * @memberof E2E.Message.CommentMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            CommentMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.CommentMessage";
            };

            return CommentMessage;
        })();

        Message.ContactMessage = (function() {

            /**
             * Properties of a ContactMessage.
             * @memberof E2E.Message
             * @interface IContactMessage
             * @property {string|null} [displayName] ContactMessage displayName
             * @property {string|null} [vcard] ContactMessage vcard
             * @property {E2E.IContextInfo|null} [contextInfo] ContactMessage contextInfo
             */

            /**
             * Constructs a new ContactMessage.
             * @memberof E2E.Message
             * @classdesc Represents a ContactMessage.
             * @implements IContactMessage
             * @constructor
             * @param {E2E.Message.IContactMessage=} [properties] Properties to set
             */
            function ContactMessage(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]];
            }

            /**
             * ContactMessage displayName.
             * @member {string|null|undefined} displayName
             * @memberof E2E.Message.ContactMessage
             * @instance
             */
            ContactMessage.prototype.displayName = null;

            /**
             * ContactMessage vcard.
             * @member {string|null|undefined} vcard
             * @memberof E2E.Message.ContactMessage
             * @instance
             */
            ContactMessage.prototype.vcard = null;

            /**
             * ContactMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.ContactMessage
             * @instance
             */
            ContactMessage.prototype.contextInfo = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * ContactMessage _displayName.
             * @member {"displayName"|undefined} _displayName
             * @memberof E2E.Message.ContactMessage
             * @instance
             */
            Object.defineProperty(ContactMessage.prototype, "_displayName", {
                get: $util.oneOfGetter($oneOfFields = ["displayName"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ContactMessage _vcard.
             * @member {"vcard"|undefined} _vcard
             * @memberof E2E.Message.ContactMessage
             * @instance
             */
            Object.defineProperty(ContactMessage.prototype, "_vcard", {
                get: $util.oneOfGetter($oneOfFields = ["vcard"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ContactMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.ContactMessage
             * @instance
             */
            Object.defineProperty(ContactMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new ContactMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.ContactMessage
             * @static
             * @param {E2E.Message.IContactMessage=} [properties] Properties to set
             * @returns {E2E.Message.ContactMessage} ContactMessage instance
             */
            ContactMessage.create = function create(properties) {
                return new ContactMessage(properties);
            };

            /**
             * Encodes the specified ContactMessage message. Does not implicitly {@link E2E.Message.ContactMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.ContactMessage
             * @static
             * @param {E2E.Message.IContactMessage} message ContactMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ContactMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName);
                if (message.vcard != null && Object.hasOwnProperty.call(message, "vcard"))
                    writer.uint32(/* id 16, wireType 2 =*/130).string(message.vcard);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified ContactMessage message, length delimited. Does not implicitly {@link E2E.Message.ContactMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.ContactMessage
             * @static
             * @param {E2E.Message.IContactMessage} message ContactMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ContactMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ContactMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.ContactMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.ContactMessage} ContactMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ContactMessage.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.E2E.Message.ContactMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.displayName = reader.string();
                            break;
                        }
                    case 16: {
                            message.vcard = reader.string();
                            break;
                        }
                    case 17: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a ContactMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.ContactMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.ContactMessage} ContactMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ContactMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ContactMessage message.
             * @function verify
             * @memberof E2E.Message.ContactMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ContactMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.displayName != null && message.hasOwnProperty("displayName")) {
                    properties._displayName = 1;
                    if (!$util.isString(message.displayName))
                        return "displayName: string expected";
                }
                if (message.vcard != null && message.hasOwnProperty("vcard")) {
                    properties._vcard = 1;
                    if (!$util.isString(message.vcard))
                        return "vcard: string expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a ContactMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.ContactMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.ContactMessage} ContactMessage
             */
            ContactMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.ContactMessage)
                    return object;
                var message = new $root.E2E.Message.ContactMessage();
                if (object.displayName != null)
                    message.displayName = String(object.displayName);
                if (object.vcard != null)
                    message.vcard = String(object.vcard);
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.ContactMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                return message;
            };

            /**
             * Creates a plain object from a ContactMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.ContactMessage
             * @static
             * @param {E2E.Message.ContactMessage} message ContactMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ContactMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.displayName != null && message.hasOwnProperty("displayName")) {
                    object.displayName = message.displayName;
                    if (options.oneofs)
                        object._displayName = "displayName";
                }
                if (message.vcard != null && message.hasOwnProperty("vcard")) {
                    object.vcard = message.vcard;
                    if (options.oneofs)
                        object._vcard = "vcard";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                return object;
            };

            /**
             * Converts this ContactMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.ContactMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ContactMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for ContactMessage
             * @function getTypeUrl
             * @memberof E2E.Message.ContactMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            ContactMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.ContactMessage";
            };

            return ContactMessage;
        })();

        Message.ContactsArrayMessage = (function() {

            /**
             * Properties of a ContactsArrayMessage.
             * @memberof E2E.Message
             * @interface IContactsArrayMessage
             * @property {string|null} [displayName] ContactsArrayMessage displayName
             * @property {Array.<E2E.Message.IContactMessage>|null} [contacts] ContactsArrayMessage contacts
             * @property {E2E.IContextInfo|null} [contextInfo] ContactsArrayMessage contextInfo
             */

            /**
             * Constructs a new ContactsArrayMessage.
             * @memberof E2E.Message
             * @classdesc Represents a ContactsArrayMessage.
             * @implements IContactsArrayMessage
             * @constructor
             * @param {E2E.Message.IContactsArrayMessage=} [properties] Properties to set
             */
            function ContactsArrayMessage(properties) {
                this.contacts = [];
                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]];
            }

            /**
             * ContactsArrayMessage displayName.
             * @member {string|null|undefined} displayName
             * @memberof E2E.Message.ContactsArrayMessage
             * @instance
             */
            ContactsArrayMessage.prototype.displayName = null;

            /**
             * ContactsArrayMessage contacts.
             * @member {Array.<E2E.Message.IContactMessage>} contacts
             * @memberof E2E.Message.ContactsArrayMessage
             * @instance
             */
            ContactsArrayMessage.prototype.contacts = $util.emptyArray;

            /**
             * ContactsArrayMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.ContactsArrayMessage
             * @instance
             */
            ContactsArrayMessage.prototype.contextInfo = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * ContactsArrayMessage _displayName.
             * @member {"displayName"|undefined} _displayName
             * @memberof E2E.Message.ContactsArrayMessage
             * @instance
             */
            Object.defineProperty(ContactsArrayMessage.prototype, "_displayName", {
                get: $util.oneOfGetter($oneOfFields = ["displayName"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ContactsArrayMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.ContactsArrayMessage
             * @instance
             */
            Object.defineProperty(ContactsArrayMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new ContactsArrayMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.ContactsArrayMessage
             * @static
             * @param {E2E.Message.IContactsArrayMessage=} [properties] Properties to set
             * @returns {E2E.Message.ContactsArrayMessage} ContactsArrayMessage instance
             */
            ContactsArrayMessage.create = function create(properties) {
                return new ContactsArrayMessage(properties);
            };

            /**
             * Encodes the specified ContactsArrayMessage message. Does not implicitly {@link E2E.Message.ContactsArrayMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.ContactsArrayMessage
             * @static
             * @param {E2E.Message.IContactsArrayMessage} message ContactsArrayMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ContactsArrayMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName);
                if (message.contacts != null && message.contacts.length)
                    for (var i = 0; i < message.contacts.length; ++i)
                        $root.E2E.Message.ContactMessage.encode(message.contacts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified ContactsArrayMessage message, length delimited. Does not implicitly {@link E2E.Message.ContactsArrayMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.ContactsArrayMessage
             * @static
             * @param {E2E.Message.IContactsArrayMessage} message ContactsArrayMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ContactsArrayMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ContactsArrayMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.ContactsArrayMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.ContactsArrayMessage} ContactsArrayMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ContactsArrayMessage.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.E2E.Message.ContactsArrayMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.displayName = reader.string();
                            break;
                        }
                    case 2: {
                            if (!(message.contacts && message.contacts.length))
                                message.contacts = [];
                            message.contacts.push($root.E2E.Message.ContactMessage.decode(reader, reader.uint32()));
                            break;
                        }
                    case 17: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a ContactsArrayMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.ContactsArrayMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.ContactsArrayMessage} ContactsArrayMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ContactsArrayMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ContactsArrayMessage message.
             * @function verify
             * @memberof E2E.Message.ContactsArrayMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ContactsArrayMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.displayName != null && message.hasOwnProperty("displayName")) {
                    properties._displayName = 1;
                    if (!$util.isString(message.displayName))
                        return "displayName: string expected";
                }
                if (message.contacts != null && message.hasOwnProperty("contacts")) {
                    if (!Array.isArray(message.contacts))
                        return "contacts: array expected";
                    for (var i = 0; i < message.contacts.length; ++i) {
                        var error = $root.E2E.Message.ContactMessage.verify(message.contacts[i]);
                        if (error)
                            return "contacts." + error;
                    }
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a ContactsArrayMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.ContactsArrayMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.ContactsArrayMessage} ContactsArrayMessage
             */
            ContactsArrayMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.ContactsArrayMessage)
                    return object;
                var message = new $root.E2E.Message.ContactsArrayMessage();
                if (object.displayName != null)
                    message.displayName = String(object.displayName);
                if (object.contacts) {
                    if (!Array.isArray(object.contacts))
                        throw TypeError(".E2E.Message.ContactsArrayMessage.contacts: array expected");
                    message.contacts = [];
                    for (var i = 0; i < object.contacts.length; ++i) {
                        if (typeof object.contacts[i] !== "object")
                            throw TypeError(".E2E.Message.ContactsArrayMessage.contacts: object expected");
                        message.contacts[i] = $root.E2E.Message.ContactMessage.fromObject(object.contacts[i]);
                    }
                }
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.ContactsArrayMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                return message;
            };

            /**
             * Creates a plain object from a ContactsArrayMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.ContactsArrayMessage
             * @static
             * @param {E2E.Message.ContactsArrayMessage} message ContactsArrayMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ContactsArrayMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.contacts = [];
                if (message.displayName != null && message.hasOwnProperty("displayName")) {
                    object.displayName = message.displayName;
                    if (options.oneofs)
                        object._displayName = "displayName";
                }
                if (message.contacts && message.contacts.length) {
                    object.contacts = [];
                    for (var j = 0; j < message.contacts.length; ++j)
                        object.contacts[j] = $root.E2E.Message.ContactMessage.toObject(message.contacts[j], options);
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                return object;
            };

            /**
             * Converts this ContactsArrayMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.ContactsArrayMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ContactsArrayMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for ContactsArrayMessage
             * @function getTypeUrl
             * @memberof E2E.Message.ContactsArrayMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            ContactsArrayMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.ContactsArrayMessage";
            };

            return ContactsArrayMessage;
        })();

        Message.DeclinePaymentRequestMessage = (function() {

            /**
             * Properties of a DeclinePaymentRequestMessage.
             * @memberof E2E.Message
             * @interface IDeclinePaymentRequestMessage
             * @property {Protocol.IMessageKey|null} [key] DeclinePaymentRequestMessage key
             */

            /**
             * Constructs a new DeclinePaymentRequestMessage.
             * @memberof E2E.Message
             * @classdesc Represents a DeclinePaymentRequestMessage.
             * @implements IDeclinePaymentRequestMessage
             * @constructor
             * @param {E2E.Message.IDeclinePaymentRequestMessage=} [properties] Properties to set
             */
            function DeclinePaymentRequestMessage(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]];
            }

            /**
             * DeclinePaymentRequestMessage key.
             * @member {Protocol.IMessageKey|null|undefined} key
             * @memberof E2E.Message.DeclinePaymentRequestMessage
             * @instance
             */
            DeclinePaymentRequestMessage.prototype.key = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * DeclinePaymentRequestMessage _key.
             * @member {"key"|undefined} _key
             * @memberof E2E.Message.DeclinePaymentRequestMessage
             * @instance
             */
            Object.defineProperty(DeclinePaymentRequestMessage.prototype, "_key", {
                get: $util.oneOfGetter($oneOfFields = ["key"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new DeclinePaymentRequestMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.DeclinePaymentRequestMessage
             * @static
             * @param {E2E.Message.IDeclinePaymentRequestMessage=} [properties] Properties to set
             * @returns {E2E.Message.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage instance
             */
            DeclinePaymentRequestMessage.create = function create(properties) {
                return new DeclinePaymentRequestMessage(properties);
            };

            /**
             * Encodes the specified DeclinePaymentRequestMessage message. Does not implicitly {@link E2E.Message.DeclinePaymentRequestMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.DeclinePaymentRequestMessage
             * @static
             * @param {E2E.Message.IDeclinePaymentRequestMessage} message DeclinePaymentRequestMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DeclinePaymentRequestMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.key != null && Object.hasOwnProperty.call(message, "key"))
                    $root.Protocol.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified DeclinePaymentRequestMessage message, length delimited. Does not implicitly {@link E2E.Message.DeclinePaymentRequestMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.DeclinePaymentRequestMessage
             * @static
             * @param {E2E.Message.IDeclinePaymentRequestMessage} message DeclinePaymentRequestMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DeclinePaymentRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DeclinePaymentRequestMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.DeclinePaymentRequestMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DeclinePaymentRequestMessage.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.E2E.Message.DeclinePaymentRequestMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.key = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a DeclinePaymentRequestMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.DeclinePaymentRequestMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DeclinePaymentRequestMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DeclinePaymentRequestMessage message.
             * @function verify
             * @memberof E2E.Message.DeclinePaymentRequestMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DeclinePaymentRequestMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    properties._key = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.key);
                        if (error)
                            return "key." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a DeclinePaymentRequestMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.DeclinePaymentRequestMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage
             */
            DeclinePaymentRequestMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.DeclinePaymentRequestMessage)
                    return object;
                var message = new $root.E2E.Message.DeclinePaymentRequestMessage();
                if (object.key != null) {
                    if (typeof object.key !== "object")
                        throw TypeError(".E2E.Message.DeclinePaymentRequestMessage.key: object expected");
                    message.key = $root.Protocol.MessageKey.fromObject(object.key);
                }
                return message;
            };

            /**
             * Creates a plain object from a DeclinePaymentRequestMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.DeclinePaymentRequestMessage
             * @static
             * @param {E2E.Message.DeclinePaymentRequestMessage} message DeclinePaymentRequestMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DeclinePaymentRequestMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                    if (options.oneofs)
                        object._key = "key";
                }
                return object;
            };

            /**
             * Converts this DeclinePaymentRequestMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.DeclinePaymentRequestMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DeclinePaymentRequestMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for DeclinePaymentRequestMessage
             * @function getTypeUrl
             * @memberof E2E.Message.DeclinePaymentRequestMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            DeclinePaymentRequestMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.DeclinePaymentRequestMessage";
            };

            return DeclinePaymentRequestMessage;
        })();

        Message.DeviceSentMessage = (function() {

            /**
             * Properties of a DeviceSentMessage.
             * @memberof E2E.Message
             * @interface IDeviceSentMessage
             * @property {string|null} [destinationJid] DeviceSentMessage destinationJid
             * @property {E2E.IMessage|null} [message] DeviceSentMessage message
             * @property {string|null} [phash] DeviceSentMessage phash
             */

            /**
             * Constructs a new DeviceSentMessage.
             * @memberof E2E.Message
             * @classdesc Represents a DeviceSentMessage.
             * @implements IDeviceSentMessage
             * @constructor
             * @param {E2E.Message.IDeviceSentMessage=} [properties] Properties to set
             */
            function DeviceSentMessage(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]];
            }

            /**
             * DeviceSentMessage destinationJid.
             * @member {string|null|undefined} destinationJid
             * @memberof E2E.Message.DeviceSentMessage
             * @instance
             */
            DeviceSentMessage.prototype.destinationJid = null;

            /**
             * DeviceSentMessage message.
             * @member {E2E.IMessage|null|undefined} message
             * @memberof E2E.Message.DeviceSentMessage
             * @instance
             */
            DeviceSentMessage.prototype.message = null;

            /**
             * DeviceSentMessage phash.
             * @member {string|null|undefined} phash
             * @memberof E2E.Message.DeviceSentMessage
             * @instance
             */
            DeviceSentMessage.prototype.phash = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * DeviceSentMessage _destinationJid.
             * @member {"destinationJid"|undefined} _destinationJid
             * @memberof E2E.Message.DeviceSentMessage
             * @instance
             */
            Object.defineProperty(DeviceSentMessage.prototype, "_destinationJid", {
                get: $util.oneOfGetter($oneOfFields = ["destinationJid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DeviceSentMessage _message.
             * @member {"message"|undefined} _message
             * @memberof E2E.Message.DeviceSentMessage
             * @instance
             */
            Object.defineProperty(DeviceSentMessage.prototype, "_message", {
                get: $util.oneOfGetter($oneOfFields = ["message"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DeviceSentMessage _phash.
             * @member {"phash"|undefined} _phash
             * @memberof E2E.Message.DeviceSentMessage
             * @instance
             */
            Object.defineProperty(DeviceSentMessage.prototype, "_phash", {
                get: $util.oneOfGetter($oneOfFields = ["phash"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new DeviceSentMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.DeviceSentMessage
             * @static
             * @param {E2E.Message.IDeviceSentMessage=} [properties] Properties to set
             * @returns {E2E.Message.DeviceSentMessage} DeviceSentMessage instance
             */
            DeviceSentMessage.create = function create(properties) {
                return new DeviceSentMessage(properties);
            };

            /**
             * Encodes the specified DeviceSentMessage message. Does not implicitly {@link E2E.Message.DeviceSentMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.DeviceSentMessage
             * @static
             * @param {E2E.Message.IDeviceSentMessage} message DeviceSentMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DeviceSentMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.destinationJid != null && Object.hasOwnProperty.call(message, "destinationJid"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationJid);
                if (message.message != null && Object.hasOwnProperty.call(message, "message"))
                    $root.E2E.Message.encode(message.message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                if (message.phash != null && Object.hasOwnProperty.call(message, "phash"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.phash);
                return writer;
            };

            /**
             * Encodes the specified DeviceSentMessage message, length delimited. Does not implicitly {@link E2E.Message.DeviceSentMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.DeviceSentMessage
             * @static
             * @param {E2E.Message.IDeviceSentMessage} message DeviceSentMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DeviceSentMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DeviceSentMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.DeviceSentMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.DeviceSentMessage} DeviceSentMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DeviceSentMessage.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.E2E.Message.DeviceSentMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.destinationJid = reader.string();
                            break;
                        }
                    case 2: {
                            message.message = $root.E2E.Message.decode(reader, reader.uint32());
                            break;
                        }
                    case 3: {
                            message.phash = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a DeviceSentMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.DeviceSentMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.DeviceSentMessage} DeviceSentMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DeviceSentMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DeviceSentMessage message.
             * @function verify
             * @memberof E2E.Message.DeviceSentMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DeviceSentMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.destinationJid != null && message.hasOwnProperty("destinationJid")) {
                    properties._destinationJid = 1;
                    if (!$util.isString(message.destinationJid))
                        return "destinationJid: string expected";
                }
                if (message.message != null && message.hasOwnProperty("message")) {
                    properties._message = 1;
                    {
                        var error = $root.E2E.Message.verify(message.message);
                        if (error)
                            return "message." + error;
                    }
                }
                if (message.phash != null && message.hasOwnProperty("phash")) {
                    properties._phash = 1;
                    if (!$util.isString(message.phash))
                        return "phash: string expected";
                }
                return null;
            };

            /**
             * Creates a DeviceSentMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.DeviceSentMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.DeviceSentMessage} DeviceSentMessage
             */
            DeviceSentMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.DeviceSentMessage)
                    return object;
                var message = new $root.E2E.Message.DeviceSentMessage();
                if (object.destinationJid != null)
                    message.destinationJid = String(object.destinationJid);
                if (object.message != null) {
                    if (typeof object.message !== "object")
                        throw TypeError(".E2E.Message.DeviceSentMessage.message: object expected");
                    message.message = $root.E2E.Message.fromObject(object.message);
                }
                if (object.phash != null)
                    message.phash = String(object.phash);
                return message;
            };

            /**
             * Creates a plain object from a DeviceSentMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.DeviceSentMessage
             * @static
             * @param {E2E.Message.DeviceSentMessage} message DeviceSentMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DeviceSentMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.destinationJid != null && message.hasOwnProperty("destinationJid")) {
                    object.destinationJid = message.destinationJid;
                    if (options.oneofs)
                        object._destinationJid = "destinationJid";
                }
                if (message.message != null && message.hasOwnProperty("message")) {
                    object.message = $root.E2E.Message.toObject(message.message, options);
                    if (options.oneofs)
                        object._message = "message";
                }
                if (message.phash != null && message.hasOwnProperty("phash")) {
                    object.phash = message.phash;
                    if (options.oneofs)
                        object._phash = "phash";
                }
                return object;
            };

            /**
             * Converts this DeviceSentMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.DeviceSentMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DeviceSentMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for DeviceSentMessage
             * @function getTypeUrl
             * @memberof E2E.Message.DeviceSentMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            DeviceSentMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.DeviceSentMessage";
            };

            return DeviceSentMessage;
        })();

        Message.DocumentMessage = (function() {

            /**
             * Properties of a DocumentMessage.
             * @memberof E2E.Message
             * @interface IDocumentMessage
             * @property {string|null} [url] DocumentMessage url
             * @property {string|null} [mimetype] DocumentMessage mimetype
             * @property {string|null} [title] DocumentMessage title
             * @property {Uint8Array|null} [fileSha256] DocumentMessage fileSha256
             * @property {number|Long|null} [fileLength] DocumentMessage fileLength
             * @property {number|null} [pageCount] DocumentMessage pageCount
             * @property {Uint8Array|null} [mediaKey] DocumentMessage mediaKey
             * @property {string|null} [fileName] DocumentMessage fileName
             * @property {Uint8Array|null} [fileEncSha256] DocumentMessage fileEncSha256
             * @property {string|null} [directPath] DocumentMessage directPath
             * @property {number|Long|null} [mediaKeyTimestamp] DocumentMessage mediaKeyTimestamp
             * @property {boolean|null} [contactVcard] DocumentMessage contactVcard
             * @property {string|null} [thumbnailDirectPath] DocumentMessage thumbnailDirectPath
             * @property {Uint8Array|null} [thumbnailSha256] DocumentMessage thumbnailSha256
             * @property {Uint8Array|null} [thumbnailEncSha256] DocumentMessage thumbnailEncSha256
             * @property {Uint8Array|null} [jpegThumbnail] DocumentMessage jpegThumbnail
             * @property {E2E.IContextInfo|null} [contextInfo] DocumentMessage contextInfo
             * @property {number|null} [thumbnailHeight] DocumentMessage thumbnailHeight
             * @property {number|null} [thumbnailWidth] DocumentMessage thumbnailWidth
             * @property {string|null} [caption] DocumentMessage caption
             * @property {string|null} [accessibilityLabel] DocumentMessage accessibilityLabel
             * @property {E2E.Message.MediaKeyDomain|null} [mediaKeyDomain] DocumentMessage mediaKeyDomain
             */

            /**
             * Constructs a new DocumentMessage.
             * @memberof E2E.Message
             * @classdesc Represents a DocumentMessage.
             * @implements IDocumentMessage
             * @constructor
             * @param {E2E.Message.IDocumentMessage=} [properties] Properties to set
             */
            function DocumentMessage(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]];
            }

            /**
             * DocumentMessage url.
             * @member {string|null|undefined} url
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.url = null;

            /**
             * DocumentMessage mimetype.
             * @member {string|null|undefined} mimetype
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.mimetype = null;

            /**
             * DocumentMessage title.
             * @member {string|null|undefined} title
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.title = null;

            /**
             * DocumentMessage fileSha256.
             * @member {Uint8Array|null|undefined} fileSha256
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.fileSha256 = null;

            /**
             * DocumentMessage fileLength.
             * @member {number|Long|null|undefined} fileLength
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.fileLength = null;

            /**
             * DocumentMessage pageCount.
             * @member {number|null|undefined} pageCount
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.pageCount = null;

            /**
             * DocumentMessage mediaKey.
             * @member {Uint8Array|null|undefined} mediaKey
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.mediaKey = null;

            /**
             * DocumentMessage fileName.
             * @member {string|null|undefined} fileName
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.fileName = null;

            /**
             * DocumentMessage fileEncSha256.
             * @member {Uint8Array|null|undefined} fileEncSha256
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.fileEncSha256 = null;

            /**
             * DocumentMessage directPath.
             * @member {string|null|undefined} directPath
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.directPath = null;

            /**
             * DocumentMessage mediaKeyTimestamp.
             * @member {number|Long|null|undefined} mediaKeyTimestamp
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.mediaKeyTimestamp = null;

            /**
             * DocumentMessage contactVcard.
             * @member {boolean|null|undefined} contactVcard
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.contactVcard = null;

            /**
             * DocumentMessage thumbnailDirectPath.
             * @member {string|null|undefined} thumbnailDirectPath
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.thumbnailDirectPath = null;

            /**
             * DocumentMessage thumbnailSha256.
             * @member {Uint8Array|null|undefined} thumbnailSha256
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.thumbnailSha256 = null;

            /**
             * DocumentMessage thumbnailEncSha256.
             * @member {Uint8Array|null|undefined} thumbnailEncSha256
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.thumbnailEncSha256 = null;

            /**
             * DocumentMessage jpegThumbnail.
             * @member {Uint8Array|null|undefined} jpegThumbnail
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.jpegThumbnail = null;

            /**
             * DocumentMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.contextInfo = null;

            /**
             * DocumentMessage thumbnailHeight.
             * @member {number|null|undefined} thumbnailHeight
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.thumbnailHeight = null;

            /**
             * DocumentMessage thumbnailWidth.
             * @member {number|null|undefined} thumbnailWidth
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.thumbnailWidth = null;

            /**
             * DocumentMessage caption.
             * @member {string|null|undefined} caption
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.caption = null;

            /**
             * DocumentMessage accessibilityLabel.
             * @member {string|null|undefined} accessibilityLabel
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.accessibilityLabel = null;

            /**
             * DocumentMessage mediaKeyDomain.
             * @member {E2E.Message.MediaKeyDomain|null|undefined} mediaKeyDomain
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            DocumentMessage.prototype.mediaKeyDomain = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * DocumentMessage _url.
             * @member {"url"|undefined} _url
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_url", {
                get: $util.oneOfGetter($oneOfFields = ["url"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _mimetype.
             * @member {"mimetype"|undefined} _mimetype
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_mimetype", {
                get: $util.oneOfGetter($oneOfFields = ["mimetype"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _title.
             * @member {"title"|undefined} _title
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_title", {
                get: $util.oneOfGetter($oneOfFields = ["title"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _fileSha256.
             * @member {"fileSha256"|undefined} _fileSha256
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_fileSha256", {
                get: $util.oneOfGetter($oneOfFields = ["fileSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _fileLength.
             * @member {"fileLength"|undefined} _fileLength
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_fileLength", {
                get: $util.oneOfGetter($oneOfFields = ["fileLength"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _pageCount.
             * @member {"pageCount"|undefined} _pageCount
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_pageCount", {
                get: $util.oneOfGetter($oneOfFields = ["pageCount"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _mediaKey.
             * @member {"mediaKey"|undefined} _mediaKey
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_mediaKey", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _fileName.
             * @member {"fileName"|undefined} _fileName
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_fileName", {
                get: $util.oneOfGetter($oneOfFields = ["fileName"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _fileEncSha256.
             * @member {"fileEncSha256"|undefined} _fileEncSha256
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_fileEncSha256", {
                get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _directPath.
             * @member {"directPath"|undefined} _directPath
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_directPath", {
                get: $util.oneOfGetter($oneOfFields = ["directPath"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _mediaKeyTimestamp.
             * @member {"mediaKeyTimestamp"|undefined} _mediaKeyTimestamp
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_mediaKeyTimestamp", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _contactVcard.
             * @member {"contactVcard"|undefined} _contactVcard
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_contactVcard", {
                get: $util.oneOfGetter($oneOfFields = ["contactVcard"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _thumbnailDirectPath.
             * @member {"thumbnailDirectPath"|undefined} _thumbnailDirectPath
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_thumbnailDirectPath", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailDirectPath"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _thumbnailSha256.
             * @member {"thumbnailSha256"|undefined} _thumbnailSha256
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_thumbnailSha256", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _thumbnailEncSha256.
             * @member {"thumbnailEncSha256"|undefined} _thumbnailEncSha256
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_thumbnailEncSha256", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailEncSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _jpegThumbnail.
             * @member {"jpegThumbnail"|undefined} _jpegThumbnail
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_jpegThumbnail", {
                get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _thumbnailHeight.
             * @member {"thumbnailHeight"|undefined} _thumbnailHeight
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_thumbnailHeight", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailHeight"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _thumbnailWidth.
             * @member {"thumbnailWidth"|undefined} _thumbnailWidth
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_thumbnailWidth", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailWidth"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _caption.
             * @member {"caption"|undefined} _caption
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_caption", {
                get: $util.oneOfGetter($oneOfFields = ["caption"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _accessibilityLabel.
             * @member {"accessibilityLabel"|undefined} _accessibilityLabel
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_accessibilityLabel", {
                get: $util.oneOfGetter($oneOfFields = ["accessibilityLabel"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DocumentMessage _mediaKeyDomain.
             * @member {"mediaKeyDomain"|undefined} _mediaKeyDomain
             * @memberof E2E.Message.DocumentMessage
             * @instance
             */
            Object.defineProperty(DocumentMessage.prototype, "_mediaKeyDomain", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKeyDomain"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new DocumentMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.DocumentMessage
             * @static
             * @param {E2E.Message.IDocumentMessage=} [properties] Properties to set
             * @returns {E2E.Message.DocumentMessage} DocumentMessage instance
             */
            DocumentMessage.create = function create(properties) {
                return new DocumentMessage(properties);
            };

            /**
             * Encodes the specified DocumentMessage message. Does not implicitly {@link E2E.Message.DocumentMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.DocumentMessage
             * @static
             * @param {E2E.Message.IDocumentMessage} message DocumentMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DocumentMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.url);
                if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimetype);
                if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.title);
                if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256"))
                    writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.fileSha256);
                if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength"))
                    writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.fileLength);
                if (message.pageCount != null && Object.hasOwnProperty.call(message, "pageCount"))
                    writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.pageCount);
                if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey"))
                    writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.mediaKey);
                if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName"))
                    writer.uint32(/* id 8, wireType 2 =*/66).string(message.fileName);
                if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256"))
                    writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.fileEncSha256);
                if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath"))
                    writer.uint32(/* id 10, wireType 2 =*/82).string(message.directPath);
                if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp"))
                    writer.uint32(/* id 11, wireType 0 =*/88).int64(message.mediaKeyTimestamp);
                if (message.contactVcard != null && Object.hasOwnProperty.call(message, "contactVcard"))
                    writer.uint32(/* id 12, wireType 0 =*/96).bool(message.contactVcard);
                if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath"))
                    writer.uint32(/* id 13, wireType 2 =*/106).string(message.thumbnailDirectPath);
                if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256"))
                    writer.uint32(/* id 14, wireType 2 =*/114).bytes(message.thumbnailSha256);
                if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256"))
                    writer.uint32(/* id 15, wireType 2 =*/122).bytes(message.thumbnailEncSha256);
                if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail"))
                    writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.jpegThumbnail);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
                if (message.thumbnailHeight != null && Object.hasOwnProperty.call(message, "thumbnailHeight"))
                    writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.thumbnailHeight);
                if (message.thumbnailWidth != null && Object.hasOwnProperty.call(message, "thumbnailWidth"))
                    writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.thumbnailWidth);
                if (message.caption != null && Object.hasOwnProperty.call(message, "caption"))
                    writer.uint32(/* id 20, wireType 2 =*/162).string(message.caption);
                if (message.accessibilityLabel != null && Object.hasOwnProperty.call(message, "accessibilityLabel"))
                    writer.uint32(/* id 21, wireType 2 =*/170).string(message.accessibilityLabel);
                if (message.mediaKeyDomain != null && Object.hasOwnProperty.call(message, "mediaKeyDomain"))
                    writer.uint32(/* id 22, wireType 0 =*/176).int32(message.mediaKeyDomain);
                return writer;
            };

            /**
             * Encodes the specified DocumentMessage message, length delimited. Does not implicitly {@link E2E.Message.DocumentMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.DocumentMessage
             * @static
             * @param {E2E.Message.IDocumentMessage} message DocumentMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DocumentMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DocumentMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.DocumentMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.DocumentMessage} DocumentMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DocumentMessage.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.E2E.Message.DocumentMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.url = reader.string();
                            break;
                        }
                    case 2: {
                            message.mimetype = reader.string();
                            break;
                        }
                    case 3: {
                            message.title = reader.string();
                            break;
                        }
                    case 4: {
                            message.fileSha256 = reader.bytes();
                            break;
                        }
                    case 5: {
                            message.fileLength = reader.uint64();
                            break;
                        }
                    case 6: {
                            message.pageCount = reader.uint32();
                            break;
                        }
                    case 7: {
                            message.mediaKey = reader.bytes();
                            break;
                        }
                    case 8: {
                            message.fileName = reader.string();
                            break;
                        }
                    case 9: {
                            message.fileEncSha256 = reader.bytes();
                            break;
                        }
                    case 10: {
                            message.directPath = reader.string();
                            break;
                        }
                    case 11: {
                            message.mediaKeyTimestamp = reader.int64();
                            break;
                        }
                    case 12: {
                            message.contactVcard = reader.bool();
                            break;
                        }
                    case 13: {
                            message.thumbnailDirectPath = reader.string();
                            break;
                        }
                    case 14: {
                            message.thumbnailSha256 = reader.bytes();
                            break;
                        }
                    case 15: {
                            message.thumbnailEncSha256 = reader.bytes();
                            break;
                        }
                    case 16: {
                            message.jpegThumbnail = reader.bytes();
                            break;
                        }
                    case 17: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 18: {
                            message.thumbnailHeight = reader.uint32();
                            break;
                        }
                    case 19: {
                            message.thumbnailWidth = reader.uint32();
                            break;
                        }
                    case 20: {
                            message.caption = reader.string();
                            break;
                        }
                    case 21: {
                            message.accessibilityLabel = reader.string();
                            break;
                        }
                    case 22: {
                            message.mediaKeyDomain = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a DocumentMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.DocumentMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.DocumentMessage} DocumentMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DocumentMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DocumentMessage message.
             * @function verify
             * @memberof E2E.Message.DocumentMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DocumentMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.url != null && message.hasOwnProperty("url")) {
                    properties._url = 1;
                    if (!$util.isString(message.url))
                        return "url: string expected";
                }
                if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                    properties._mimetype = 1;
                    if (!$util.isString(message.mimetype))
                        return "mimetype: string expected";
                }
                if (message.title != null && message.hasOwnProperty("title")) {
                    properties._title = 1;
                    if (!$util.isString(message.title))
                        return "title: string expected";
                }
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                    properties._fileSha256 = 1;
                    if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                        return "fileSha256: buffer expected";
                }
                if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                    properties._fileLength = 1;
                    if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high)))
                        return "fileLength: integer|Long expected";
                }
                if (message.pageCount != null && message.hasOwnProperty("pageCount")) {
                    properties._pageCount = 1;
                    if (!$util.isInteger(message.pageCount))
                        return "pageCount: integer expected";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    properties._mediaKey = 1;
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                }
                if (message.fileName != null && message.hasOwnProperty("fileName")) {
                    properties._fileName = 1;
                    if (!$util.isString(message.fileName))
                        return "fileName: string expected";
                }
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                    properties._fileEncSha256 = 1;
                    if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                        return "fileEncSha256: buffer expected";
                }
                if (message.directPath != null && message.hasOwnProperty("directPath")) {
                    properties._directPath = 1;
                    if (!$util.isString(message.directPath))
                        return "directPath: string expected";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    properties._mediaKeyTimestamp = 1;
                    if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high)))
                        return "mediaKeyTimestamp: integer|Long expected";
                }
                if (message.contactVcard != null && message.hasOwnProperty("contactVcard")) {
                    properties._contactVcard = 1;
                    if (typeof message.contactVcard !== "boolean")
                        return "contactVcard: boolean expected";
                }
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) {
                    properties._thumbnailDirectPath = 1;
                    if (!$util.isString(message.thumbnailDirectPath))
                        return "thumbnailDirectPath: string expected";
                }
                if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) {
                    properties._thumbnailSha256 = 1;
                    if (!(message.thumbnailSha256 && typeof message.thumbnailSha256.length === "number" || $util.isString(message.thumbnailSha256)))
                        return "thumbnailSha256: buffer expected";
                }
                if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) {
                    properties._thumbnailEncSha256 = 1;
                    if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256)))
                        return "thumbnailEncSha256: buffer expected";
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    properties._jpegThumbnail = 1;
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) {
                    properties._thumbnailHeight = 1;
                    if (!$util.isInteger(message.thumbnailHeight))
                        return "thumbnailHeight: integer expected";
                }
                if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) {
                    properties._thumbnailWidth = 1;
                    if (!$util.isInteger(message.thumbnailWidth))
                        return "thumbnailWidth: integer expected";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    properties._caption = 1;
                    if (!$util.isString(message.caption))
                        return "caption: string expected";
                }
                if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) {
                    properties._accessibilityLabel = 1;
                    if (!$util.isString(message.accessibilityLabel))
                        return "accessibilityLabel: string expected";
                }
                if (message.mediaKeyDomain != null && message.hasOwnProperty("mediaKeyDomain")) {
                    properties._mediaKeyDomain = 1;
                    switch (message.mediaKeyDomain) {
                    default:
                        return "mediaKeyDomain: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a DocumentMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.DocumentMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.DocumentMessage} DocumentMessage
             */
            DocumentMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.DocumentMessage)
                    return object;
                var message = new $root.E2E.Message.DocumentMessage();
                if (object.url != null)
                    message.url = String(object.url);
                if (object.mimetype != null)
                    message.mimetype = String(object.mimetype);
                if (object.title != null)
                    message.title = String(object.title);
                if (object.fileSha256 != null)
                    if (typeof object.fileSha256 === "string")
                        $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0);
                    else if (object.fileSha256.length >= 0)
                        message.fileSha256 = object.fileSha256;
                if (object.fileLength != null)
                    if ($util.Long)
                        (message.fileLength = $util.Long.fromValue(object.fileLength)).unsigned = true;
                    else if (typeof object.fileLength === "string")
                        message.fileLength = parseInt(object.fileLength, 10);
                    else if (typeof object.fileLength === "number")
                        message.fileLength = object.fileLength;
                    else if (typeof object.fileLength === "object")
                        message.fileLength = new $util.LongBits(object.fileLength.low >>> 0, object.fileLength.high >>> 0).toNumber(true);
                if (object.pageCount != null)
                    message.pageCount = object.pageCount >>> 0;
                if (object.mediaKey != null)
                    if (typeof object.mediaKey === "string")
                        $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0);
                    else if (object.mediaKey.length >= 0)
                        message.mediaKey = object.mediaKey;
                if (object.fileName != null)
                    message.fileName = String(object.fileName);
                if (object.fileEncSha256 != null)
                    if (typeof object.fileEncSha256 === "string")
                        $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0);
                    else if (object.fileEncSha256.length >= 0)
                        message.fileEncSha256 = object.fileEncSha256;
                if (object.directPath != null)
                    message.directPath = String(object.directPath);
                if (object.mediaKeyTimestamp != null)
                    if ($util.Long)
                        (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false;
                    else if (typeof object.mediaKeyTimestamp === "string")
                        message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10);
                    else if (typeof object.mediaKeyTimestamp === "number")
                        message.mediaKeyTimestamp = object.mediaKeyTimestamp;
                    else if (typeof object.mediaKeyTimestamp === "object")
                        message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber();
                if (object.contactVcard != null)
                    message.contactVcard = Boolean(object.contactVcard);
                if (object.thumbnailDirectPath != null)
                    message.thumbnailDirectPath = String(object.thumbnailDirectPath);
                if (object.thumbnailSha256 != null)
                    if (typeof object.thumbnailSha256 === "string")
                        $util.base64.decode(object.thumbnailSha256, message.thumbnailSha256 = $util.newBuffer($util.base64.length(object.thumbnailSha256)), 0);
                    else if (object.thumbnailSha256.length >= 0)
                        message.thumbnailSha256 = object.thumbnailSha256;
                if (object.thumbnailEncSha256 != null)
                    if (typeof object.thumbnailEncSha256 === "string")
                        $util.base64.decode(object.thumbnailEncSha256, message.thumbnailEncSha256 = $util.newBuffer($util.base64.length(object.thumbnailEncSha256)), 0);
                    else if (object.thumbnailEncSha256.length >= 0)
                        message.thumbnailEncSha256 = object.thumbnailEncSha256;
                if (object.jpegThumbnail != null)
                    if (typeof object.jpegThumbnail === "string")
                        $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0);
                    else if (object.jpegThumbnail.length >= 0)
                        message.jpegThumbnail = object.jpegThumbnail;
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.DocumentMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                if (object.thumbnailHeight != null)
                    message.thumbnailHeight = object.thumbnailHeight >>> 0;
                if (object.thumbnailWidth != null)
                    message.thumbnailWidth = object.thumbnailWidth >>> 0;
                if (object.caption != null)
                    message.caption = String(object.caption);
                if (object.accessibilityLabel != null)
                    message.accessibilityLabel = String(object.accessibilityLabel);
                switch (object.mediaKeyDomain) {
                default:
                    if (typeof object.mediaKeyDomain === "number") {
                        message.mediaKeyDomain = object.mediaKeyDomain;
                        break;
                    }
                    break;
                case "UNSET":
                case 0:
                    message.mediaKeyDomain = 0;
                    break;
                case "E2EE_CHAT":
                case 1:
                    message.mediaKeyDomain = 1;
                    break;
                case "STATUS":
                case 2:
                    message.mediaKeyDomain = 2;
                    break;
                case "CAPI":
                case 3:
                    message.mediaKeyDomain = 3;
                    break;
                case "BOT":
                case 4:
                    message.mediaKeyDomain = 4;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a DocumentMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.DocumentMessage
             * @static
             * @param {E2E.Message.DocumentMessage} message DocumentMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DocumentMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.url != null && message.hasOwnProperty("url")) {
                    object.url = message.url;
                    if (options.oneofs)
                        object._url = "url";
                }
                if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                    object.mimetype = message.mimetype;
                    if (options.oneofs)
                        object._mimetype = "mimetype";
                }
                if (message.title != null && message.hasOwnProperty("title")) {
                    object.title = message.title;
                    if (options.oneofs)
                        object._title = "title";
                }
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                    object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256;
                    if (options.oneofs)
                        object._fileSha256 = "fileSha256";
                }
                if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                    if (typeof message.fileLength === "number")
                        object.fileLength = options.longs === String ? String(message.fileLength) : message.fileLength;
                    else
                        object.fileLength = options.longs === String ? $util.Long.prototype.toString.call(message.fileLength) : options.longs === Number ? new $util.LongBits(message.fileLength.low >>> 0, message.fileLength.high >>> 0).toNumber(true) : message.fileLength;
                    if (options.oneofs)
                        object._fileLength = "fileLength";
                }
                if (message.pageCount != null && message.hasOwnProperty("pageCount")) {
                    object.pageCount = message.pageCount;
                    if (options.oneofs)
                        object._pageCount = "pageCount";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey;
                    if (options.oneofs)
                        object._mediaKey = "mediaKey";
                }
                if (message.fileName != null && message.hasOwnProperty("fileName")) {
                    object.fileName = message.fileName;
                    if (options.oneofs)
                        object._fileName = "fileName";
                }
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                    object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256;
                    if (options.oneofs)
                        object._fileEncSha256 = "fileEncSha256";
                }
                if (message.directPath != null && message.hasOwnProperty("directPath")) {
                    object.directPath = message.directPath;
                    if (options.oneofs)
                        object._directPath = "directPath";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    if (typeof message.mediaKeyTimestamp === "number")
                        object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp;
                    else
                        object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp;
                    if (options.oneofs)
                        object._mediaKeyTimestamp = "mediaKeyTimestamp";
                }
                if (message.contactVcard != null && message.hasOwnProperty("contactVcard")) {
                    object.contactVcard = message.contactVcard;
                    if (options.oneofs)
                        object._contactVcard = "contactVcard";
                }
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) {
                    object.thumbnailDirectPath = message.thumbnailDirectPath;
                    if (options.oneofs)
                        object._thumbnailDirectPath = "thumbnailDirectPath";
                }
                if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) {
                    object.thumbnailSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailSha256, 0, message.thumbnailSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailSha256) : message.thumbnailSha256;
                    if (options.oneofs)
                        object._thumbnailSha256 = "thumbnailSha256";
                }
                if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) {
                    object.thumbnailEncSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailEncSha256, 0, message.thumbnailEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailEncSha256) : message.thumbnailEncSha256;
                    if (options.oneofs)
                        object._thumbnailEncSha256 = "thumbnailEncSha256";
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail;
                    if (options.oneofs)
                        object._jpegThumbnail = "jpegThumbnail";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) {
                    object.thumbnailHeight = message.thumbnailHeight;
                    if (options.oneofs)
                        object._thumbnailHeight = "thumbnailHeight";
                }
                if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) {
                    object.thumbnailWidth = message.thumbnailWidth;
                    if (options.oneofs)
                        object._thumbnailWidth = "thumbnailWidth";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    object.caption = message.caption;
                    if (options.oneofs)
                        object._caption = "caption";
                }
                if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) {
                    object.accessibilityLabel = message.accessibilityLabel;
                    if (options.oneofs)
                        object._accessibilityLabel = "accessibilityLabel";
                }
                if (message.mediaKeyDomain != null && message.hasOwnProperty("mediaKeyDomain")) {
                    object.mediaKeyDomain = options.enums === String ? $root.E2E.Message.MediaKeyDomain[message.mediaKeyDomain] === undefined ? message.mediaKeyDomain : $root.E2E.Message.MediaKeyDomain[message.mediaKeyDomain] : message.mediaKeyDomain;
                    if (options.oneofs)
                        object._mediaKeyDomain = "mediaKeyDomain";
                }
                return object;
            };

            /**
             * Converts this DocumentMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.DocumentMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DocumentMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for DocumentMessage
             * @function getTypeUrl
             * @memberof E2E.Message.DocumentMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            DocumentMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.DocumentMessage";
            };

            return DocumentMessage;
        })();

        Message.EncCommentMessage = (function() {

            /**
             * Properties of an EncCommentMessage.
             * @memberof E2E.Message
             * @interface IEncCommentMessage
             * @property {Protocol.IMessageKey|null} [targetMessageKey] EncCommentMessage targetMessageKey
             * @property {Uint8Array|null} [encPayload] EncCommentMessage encPayload
             * @property {Uint8Array|null} [encIv] EncCommentMessage encIv
             */

            /**
             * Constructs a new EncCommentMessage.
             * @memberof E2E.Message
             * @classdesc Represents an EncCommentMessage.
             * @implements IEncCommentMessage
             * @constructor
             * @param {E2E.Message.IEncCommentMessage=} [properties] Properties to set
             */
            function EncCommentMessage(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]];
            }

            /**
             * EncCommentMessage targetMessageKey.
             * @member {Protocol.IMessageKey|null|undefined} targetMessageKey
             * @memberof E2E.Message.EncCommentMessage
             * @instance
             */
            EncCommentMessage.prototype.targetMessageKey = null;

            /**
             * EncCommentMessage encPayload.
             * @member {Uint8Array|null|undefined} encPayload
             * @memberof E2E.Message.EncCommentMessage
             * @instance
             */
            EncCommentMessage.prototype.encPayload = null;

            /**
             * EncCommentMessage encIv.
             * @member {Uint8Array|null|undefined} encIv
             * @memberof E2E.Message.EncCommentMessage
             * @instance
             */
            EncCommentMessage.prototype.encIv = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * EncCommentMessage _targetMessageKey.
             * @member {"targetMessageKey"|undefined} _targetMessageKey
             * @memberof E2E.Message.EncCommentMessage
             * @instance
             */
            Object.defineProperty(EncCommentMessage.prototype, "_targetMessageKey", {
                get: $util.oneOfGetter($oneOfFields = ["targetMessageKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * EncCommentMessage _encPayload.
             * @member {"encPayload"|undefined} _encPayload
             * @memberof E2E.Message.EncCommentMessage
             * @instance
             */
            Object.defineProperty(EncCommentMessage.prototype, "_encPayload", {
                get: $util.oneOfGetter($oneOfFields = ["encPayload"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * EncCommentMessage _encIv.
             * @member {"encIv"|undefined} _encIv
             * @memberof E2E.Message.EncCommentMessage
             * @instance
             */
            Object.defineProperty(EncCommentMessage.prototype, "_encIv", {
                get: $util.oneOfGetter($oneOfFields = ["encIv"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new EncCommentMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.EncCommentMessage
             * @static
             * @param {E2E.Message.IEncCommentMessage=} [properties] Properties to set
             * @returns {E2E.Message.EncCommentMessage} EncCommentMessage instance
             */
            EncCommentMessage.create = function create(properties) {
                return new EncCommentMessage(properties);
            };

            /**
             * Encodes the specified EncCommentMessage message. Does not implicitly {@link E2E.Message.EncCommentMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.EncCommentMessage
             * @static
             * @param {E2E.Message.IEncCommentMessage} message EncCommentMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EncCommentMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.targetMessageKey != null && Object.hasOwnProperty.call(message, "targetMessageKey"))
                    $root.Protocol.MessageKey.encode(message.targetMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.encPayload != null && Object.hasOwnProperty.call(message, "encPayload"))
                    writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encPayload);
                if (message.encIv != null && Object.hasOwnProperty.call(message, "encIv"))
                    writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.encIv);
                return writer;
            };

            /**
             * Encodes the specified EncCommentMessage message, length delimited. Does not implicitly {@link E2E.Message.EncCommentMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.EncCommentMessage
             * @static
             * @param {E2E.Message.IEncCommentMessage} message EncCommentMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EncCommentMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an EncCommentMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.EncCommentMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.EncCommentMessage} EncCommentMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EncCommentMessage.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.E2E.Message.EncCommentMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.targetMessageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.encPayload = reader.bytes();
                            break;
                        }
                    case 3: {
                            message.encIv = reader.bytes();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an EncCommentMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.EncCommentMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.EncCommentMessage} EncCommentMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EncCommentMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an EncCommentMessage message.
             * @function verify
             * @memberof E2E.Message.EncCommentMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            EncCommentMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) {
                    properties._targetMessageKey = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.targetMessageKey);
                        if (error)
                            return "targetMessageKey." + error;
                    }
                }
                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";
                }
                return null;
            };

            /**
             * Creates an EncCommentMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.EncCommentMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.EncCommentMessage} EncCommentMessage
             */
            EncCommentMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.EncCommentMessage)
                    return object;
                var message = new $root.E2E.Message.EncCommentMessage();
                if (object.targetMessageKey != null) {
                    if (typeof object.targetMessageKey !== "object")
                        throw TypeError(".E2E.Message.EncCommentMessage.targetMessageKey: object expected");
                    message.targetMessageKey = $root.Protocol.MessageKey.fromObject(object.targetMessageKey);
                }
                if (object.encPayload != null)
                    if (typeof object.encPayload === "string")
                        $util.base64.decode(object.encPayload, message.encPayload = $util.newBuffer($util.base64.length(object.encPayload)), 0);
                    else if (object.encPayload.length >= 0)
                        message.encPayload = object.encPayload;
                if (object.encIv != null)
                    if (typeof object.encIv === "string")
                        $util.base64.decode(object.encIv, message.encIv = $util.newBuffer($util.base64.length(object.encIv)), 0);
                    else if (object.encIv.length >= 0)
                        message.encIv = object.encIv;
                return message;
            };

            /**
             * Creates a plain object from an EncCommentMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.EncCommentMessage
             * @static
             * @param {E2E.Message.EncCommentMessage} message EncCommentMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            EncCommentMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) {
                    object.targetMessageKey = $root.Protocol.MessageKey.toObject(message.targetMessageKey, options);
                    if (options.oneofs)
                        object._targetMessageKey = "targetMessageKey";
                }
                if (message.encPayload != null && message.hasOwnProperty("encPayload")) {
                    object.encPayload = options.bytes === String ? $util.base64.encode(message.encPayload, 0, message.encPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encPayload) : message.encPayload;
                    if (options.oneofs)
                        object._encPayload = "encPayload";
                }
                if (message.encIv != null && message.hasOwnProperty("encIv")) {
                    object.encIv = options.bytes === String ? $util.base64.encode(message.encIv, 0, message.encIv.length) : options.bytes === Array ? Array.prototype.slice.call(message.encIv) : message.encIv;
                    if (options.oneofs)
                        object._encIv = "encIv";
                }
                return object;
            };

            /**
             * Converts this EncCommentMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.EncCommentMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            EncCommentMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for EncCommentMessage
             * @function getTypeUrl
             * @memberof E2E.Message.EncCommentMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            EncCommentMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.EncCommentMessage";
            };

            return EncCommentMessage;
        })();

        Message.EncEventResponseMessage = (function() {

            /**
             * Properties of an EncEventResponseMessage.
             * @memberof E2E.Message
             * @interface IEncEventResponseMessage
             * @property {Protocol.IMessageKey|null} [eventCreationMessageKey] EncEventResponseMessage eventCreationMessageKey
             * @property {Uint8Array|null} [encPayload] EncEventResponseMessage encPayload
             * @property {Uint8Array|null} [encIv] EncEventResponseMessage encIv
             */

            /**
             * Constructs a new EncEventResponseMessage.
             * @memberof E2E.Message
             * @classdesc Represents an EncEventResponseMessage.
             * @implements IEncEventResponseMessage
             * @constructor
             * @param {E2E.Message.IEncEventResponseMessage=} [properties] Properties to set
             */
            function EncEventResponseMessage(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]];
            }

            /**
             * EncEventResponseMessage eventCreationMessageKey.
             * @member {Protocol.IMessageKey|null|undefined} eventCreationMessageKey
             * @memberof E2E.Message.EncEventResponseMessage
             * @instance
             */
            EncEventResponseMessage.prototype.eventCreationMessageKey = null;

            /**
             * EncEventResponseMessage encPayload.
             * @member {Uint8Array|null|undefined} encPayload
             * @memberof E2E.Message.EncEventResponseMessage
             * @instance
             */
            EncEventResponseMessage.prototype.encPayload = null;

            /**
             * EncEventResponseMessage encIv.
             * @member {Uint8Array|null|undefined} encIv
             * @memberof E2E.Message.EncEventResponseMessage
             * @instance
             */
            EncEventResponseMessage.prototype.encIv = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * EncEventResponseMessage _eventCreationMessageKey.
             * @member {"eventCreationMessageKey"|undefined} _eventCreationMessageKey
             * @memberof E2E.Message.EncEventResponseMessage
             * @instance
             */
            Object.defineProperty(EncEventResponseMessage.prototype, "_eventCreationMessageKey", {
                get: $util.oneOfGetter($oneOfFields = ["eventCreationMessageKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * EncEventResponseMessage _encPayload.
             * @member {"encPayload"|undefined} _encPayload
             * @memberof E2E.Message.EncEventResponseMessage
             * @instance
             */
            Object.defineProperty(EncEventResponseMessage.prototype, "_encPayload", {
                get: $util.oneOfGetter($oneOfFields = ["encPayload"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * EncEventResponseMessage _encIv.
             * @member {"encIv"|undefined} _encIv
             * @memberof E2E.Message.EncEventResponseMessage
             * @instance
             */
            Object.defineProperty(EncEventResponseMessage.prototype, "_encIv", {
                get: $util.oneOfGetter($oneOfFields = ["encIv"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new EncEventResponseMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.EncEventResponseMessage
             * @static
             * @param {E2E.Message.IEncEventResponseMessage=} [properties] Properties to set
             * @returns {E2E.Message.EncEventResponseMessage} EncEventResponseMessage instance
             */
            EncEventResponseMessage.create = function create(properties) {
                return new EncEventResponseMessage(properties);
            };

            /**
             * Encodes the specified EncEventResponseMessage message. Does not implicitly {@link E2E.Message.EncEventResponseMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.EncEventResponseMessage
             * @static
             * @param {E2E.Message.IEncEventResponseMessage} message EncEventResponseMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EncEventResponseMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.eventCreationMessageKey != null && Object.hasOwnProperty.call(message, "eventCreationMessageKey"))
                    $root.Protocol.MessageKey.encode(message.eventCreationMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.encPayload != null && Object.hasOwnProperty.call(message, "encPayload"))
                    writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encPayload);
                if (message.encIv != null && Object.hasOwnProperty.call(message, "encIv"))
                    writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.encIv);
                return writer;
            };

            /**
             * Encodes the specified EncEventResponseMessage message, length delimited. Does not implicitly {@link E2E.Message.EncEventResponseMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.EncEventResponseMessage
             * @static
             * @param {E2E.Message.IEncEventResponseMessage} message EncEventResponseMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EncEventResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an EncEventResponseMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.EncEventResponseMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.EncEventResponseMessage} EncEventResponseMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EncEventResponseMessage.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.E2E.Message.EncEventResponseMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.eventCreationMessageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.encPayload = reader.bytes();
                            break;
                        }
                    case 3: {
                            message.encIv = reader.bytes();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an EncEventResponseMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.EncEventResponseMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.EncEventResponseMessage} EncEventResponseMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EncEventResponseMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an EncEventResponseMessage message.
             * @function verify
             * @memberof E2E.Message.EncEventResponseMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            EncEventResponseMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.eventCreationMessageKey != null && message.hasOwnProperty("eventCreationMessageKey")) {
                    properties._eventCreationMessageKey = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.eventCreationMessageKey);
                        if (error)
                            return "eventCreationMessageKey." + error;
                    }
                }
                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";
                }
                return null;
            };

            /**
             * Creates an EncEventResponseMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.EncEventResponseMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.EncEventResponseMessage} EncEventResponseMessage
             */
            EncEventResponseMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.EncEventResponseMessage)
                    return object;
                var message = new $root.E2E.Message.EncEventResponseMessage();
                if (object.eventCreationMessageKey != null) {
                    if (typeof object.eventCreationMessageKey !== "object")
                        throw TypeError(".E2E.Message.EncEventResponseMessage.eventCreationMessageKey: object expected");
                    message.eventCreationMessageKey = $root.Protocol.MessageKey.fromObject(object.eventCreationMessageKey);
                }
                if (object.encPayload != null)
                    if (typeof object.encPayload === "string")
                        $util.base64.decode(object.encPayload, message.encPayload = $util.newBuffer($util.base64.length(object.encPayload)), 0);
                    else if (object.encPayload.length >= 0)
                        message.encPayload = object.encPayload;
                if (object.encIv != null)
                    if (typeof object.encIv === "string")
                        $util.base64.decode(object.encIv, message.encIv = $util.newBuffer($util.base64.length(object.encIv)), 0);
                    else if (object.encIv.length >= 0)
                        message.encIv = object.encIv;
                return message;
            };

            /**
             * Creates a plain object from an EncEventResponseMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.EncEventResponseMessage
             * @static
             * @param {E2E.Message.EncEventResponseMessage} message EncEventResponseMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            EncEventResponseMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.eventCreationMessageKey != null && message.hasOwnProperty("eventCreationMessageKey")) {
                    object.eventCreationMessageKey = $root.Protocol.MessageKey.toObject(message.eventCreationMessageKey, options);
                    if (options.oneofs)
                        object._eventCreationMessageKey = "eventCreationMessageKey";
                }
                if (message.encPayload != null && message.hasOwnProperty("encPayload")) {
                    object.encPayload = options.bytes === String ? $util.base64.encode(message.encPayload, 0, message.encPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encPayload) : message.encPayload;
                    if (options.oneofs)
                        object._encPayload = "encPayload";
                }
                if (message.encIv != null && message.hasOwnProperty("encIv")) {
                    object.encIv = options.bytes === String ? $util.base64.encode(message.encIv, 0, message.encIv.length) : options.bytes === Array ? Array.prototype.slice.call(message.encIv) : message.encIv;
                    if (options.oneofs)
                        object._encIv = "encIv";
                }
                return object;
            };

            /**
             * Converts this EncEventResponseMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.EncEventResponseMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            EncEventResponseMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for EncEventResponseMessage
             * @function getTypeUrl
             * @memberof E2E.Message.EncEventResponseMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            EncEventResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.EncEventResponseMessage";
            };

            return EncEventResponseMessage;
        })();

        Message.EncReactionMessage = (function() {

            /**
             * Properties of an EncReactionMessage.
             * @memberof E2E.Message
             * @interface IEncReactionMessage
             * @property {Protocol.IMessageKey|null} [targetMessageKey] EncReactionMessage targetMessageKey
             * @property {Uint8Array|null} [encPayload] EncReactionMessage encPayload
             * @property {Uint8Array|null} [encIv] EncReactionMessage encIv
             */

            /**
             * Constructs a new EncReactionMessage.
             * @memberof E2E.Message
             * @classdesc Represents an EncReactionMessage.
             * @implements IEncReactionMessage
             * @constructor
             * @param {E2E.Message.IEncReactionMessage=} [properties] Properties to set
             */
            function EncReactionMessage(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]];
            }

            /**
             * EncReactionMessage targetMessageKey.
             * @member {Protocol.IMessageKey|null|undefined} targetMessageKey
             * @memberof E2E.Message.EncReactionMessage
             * @instance
             */
            EncReactionMessage.prototype.targetMessageKey = null;

            /**
             * EncReactionMessage encPayload.
             * @member {Uint8Array|null|undefined} encPayload
             * @memberof E2E.Message.EncReactionMessage
             * @instance
             */
            EncReactionMessage.prototype.encPayload = null;

            /**
             * EncReactionMessage encIv.
             * @member {Uint8Array|null|undefined} encIv
             * @memberof E2E.Message.EncReactionMessage
             * @instance
             */
            EncReactionMessage.prototype.encIv = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * EncReactionMessage _targetMessageKey.
             * @member {"targetMessageKey"|undefined} _targetMessageKey
             * @memberof E2E.Message.EncReactionMessage
             * @instance
             */
            Object.defineProperty(EncReactionMessage.prototype, "_targetMessageKey", {
                get: $util.oneOfGetter($oneOfFields = ["targetMessageKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * EncReactionMessage _encPayload.
             * @member {"encPayload"|undefined} _encPayload
             * @memberof E2E.Message.EncReactionMessage
             * @instance
             */
            Object.defineProperty(EncReactionMessage.prototype, "_encPayload", {
                get: $util.oneOfGetter($oneOfFields = ["encPayload"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * EncReactionMessage _encIv.
             * @member {"encIv"|undefined} _encIv
             * @memberof E2E.Message.EncReactionMessage
             * @instance
             */
            Object.defineProperty(EncReactionMessage.prototype, "_encIv", {
                get: $util.oneOfGetter($oneOfFields = ["encIv"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new EncReactionMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.EncReactionMessage
             * @static
             * @param {E2E.Message.IEncReactionMessage=} [properties] Properties to set
             * @returns {E2E.Message.EncReactionMessage} EncReactionMessage instance
             */
            EncReactionMessage.create = function create(properties) {
                return new EncReactionMessage(properties);
            };

            /**
             * Encodes the specified EncReactionMessage message. Does not implicitly {@link E2E.Message.EncReactionMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.EncReactionMessage
             * @static
             * @param {E2E.Message.IEncReactionMessage} message EncReactionMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EncReactionMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.targetMessageKey != null && Object.hasOwnProperty.call(message, "targetMessageKey"))
                    $root.Protocol.MessageKey.encode(message.targetMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.encPayload != null && Object.hasOwnProperty.call(message, "encPayload"))
                    writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encPayload);
                if (message.encIv != null && Object.hasOwnProperty.call(message, "encIv"))
                    writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.encIv);
                return writer;
            };

            /**
             * Encodes the specified EncReactionMessage message, length delimited. Does not implicitly {@link E2E.Message.EncReactionMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.EncReactionMessage
             * @static
             * @param {E2E.Message.IEncReactionMessage} message EncReactionMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EncReactionMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an EncReactionMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.EncReactionMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.EncReactionMessage} EncReactionMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EncReactionMessage.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.E2E.Message.EncReactionMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.targetMessageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.encPayload = reader.bytes();
                            break;
                        }
                    case 3: {
                            message.encIv = reader.bytes();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an EncReactionMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.EncReactionMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.EncReactionMessage} EncReactionMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EncReactionMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an EncReactionMessage message.
             * @function verify
             * @memberof E2E.Message.EncReactionMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            EncReactionMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) {
                    properties._targetMessageKey = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.targetMessageKey);
                        if (error)
                            return "targetMessageKey." + error;
                    }
                }
                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";
                }
                return null;
            };

            /**
             * Creates an EncReactionMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.EncReactionMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.EncReactionMessage} EncReactionMessage
             */
            EncReactionMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.EncReactionMessage)
                    return object;
                var message = new $root.E2E.Message.EncReactionMessage();
                if (object.targetMessageKey != null) {
                    if (typeof object.targetMessageKey !== "object")
                        throw TypeError(".E2E.Message.EncReactionMessage.targetMessageKey: object expected");
                    message.targetMessageKey = $root.Protocol.MessageKey.fromObject(object.targetMessageKey);
                }
                if (object.encPayload != null)
                    if (typeof object.encPayload === "string")
                        $util.base64.decode(object.encPayload, message.encPayload = $util.newBuffer($util.base64.length(object.encPayload)), 0);
                    else if (object.encPayload.length >= 0)
                        message.encPayload = object.encPayload;
                if (object.encIv != null)
                    if (typeof object.encIv === "string")
                        $util.base64.decode(object.encIv, message.encIv = $util.newBuffer($util.base64.length(object.encIv)), 0);
                    else if (object.encIv.length >= 0)
                        message.encIv = object.encIv;
                return message;
            };

            /**
             * Creates a plain object from an EncReactionMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.EncReactionMessage
             * @static
             * @param {E2E.Message.EncReactionMessage} message EncReactionMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            EncReactionMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) {
                    object.targetMessageKey = $root.Protocol.MessageKey.toObject(message.targetMessageKey, options);
                    if (options.oneofs)
                        object._targetMessageKey = "targetMessageKey";
                }
                if (message.encPayload != null && message.hasOwnProperty("encPayload")) {
                    object.encPayload = options.bytes === String ? $util.base64.encode(message.encPayload, 0, message.encPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encPayload) : message.encPayload;
                    if (options.oneofs)
                        object._encPayload = "encPayload";
                }
                if (message.encIv != null && message.hasOwnProperty("encIv")) {
                    object.encIv = options.bytes === String ? $util.base64.encode(message.encIv, 0, message.encIv.length) : options.bytes === Array ? Array.prototype.slice.call(message.encIv) : message.encIv;
                    if (options.oneofs)
                        object._encIv = "encIv";
                }
                return object;
            };

            /**
             * Converts this EncReactionMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.EncReactionMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            EncReactionMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for EncReactionMessage
             * @function getTypeUrl
             * @memberof E2E.Message.EncReactionMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            EncReactionMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.EncReactionMessage";
            };

            return EncReactionMessage;
        })();

        Message.EventMessage = (function() {

            /**
             * Properties of an EventMessage.
             * @memberof E2E.Message
             * @interface IEventMessage
             * @property {E2E.IContextInfo|null} [contextInfo] EventMessage contextInfo
             * @property {boolean|null} [isCanceled] EventMessage isCanceled
             * @property {string|null} [name] EventMessage name
             * @property {string|null} [description] EventMessage description
             * @property {E2E.Message.ILocationMessage|null} [location] EventMessage location
             * @property {string|null} [joinLink] EventMessage joinLink
             * @property {number|Long|null} [startTime] EventMessage startTime
             * @property {number|Long|null} [endTime] EventMessage endTime
             * @property {boolean|null} [extraGuestsAllowed] EventMessage extraGuestsAllowed
             * @property {boolean|null} [isScheduleCall] EventMessage isScheduleCall
             * @property {boolean|null} [hasReminder] EventMessage hasReminder
             * @property {number|Long|null} [reminderOffsetSec] EventMessage reminderOffsetSec
             */

            /**
             * Constructs a new EventMessage.
             * @memberof E2E.Message
             * @classdesc Represents an EventMessage.
             * @implements IEventMessage
             * @constructor
             * @param {E2E.Message.IEventMessage=} [properties] Properties to set
             */
            function EventMessage(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]];
            }

            /**
             * EventMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.contextInfo = null;

            /**
             * EventMessage isCanceled.
             * @member {boolean|null|undefined} isCanceled
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.isCanceled = null;

            /**
             * EventMessage name.
             * @member {string|null|undefined} name
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.name = null;

            /**
             * EventMessage description.
             * @member {string|null|undefined} description
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.description = null;

            /**
             * EventMessage location.
             * @member {E2E.Message.ILocationMessage|null|undefined} location
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.location = null;

            /**
             * EventMessage joinLink.
             * @member {string|null|undefined} joinLink
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.joinLink = null;

            /**
             * EventMessage startTime.
             * @member {number|Long|null|undefined} startTime
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.startTime = null;

            /**
             * EventMessage endTime.
             * @member {number|Long|null|undefined} endTime
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.endTime = null;

            /**
             * EventMessage extraGuestsAllowed.
             * @member {boolean|null|undefined} extraGuestsAllowed
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.extraGuestsAllowed = null;

            /**
             * EventMessage isScheduleCall.
             * @member {boolean|null|undefined} isScheduleCall
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.isScheduleCall = null;

            /**
             * EventMessage hasReminder.
             * @member {boolean|null|undefined} hasReminder
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.hasReminder = null;

            /**
             * EventMessage reminderOffsetSec.
             * @member {number|Long|null|undefined} reminderOffsetSec
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            EventMessage.prototype.reminderOffsetSec = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * EventMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            Object.defineProperty(EventMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * EventMessage _isCanceled.
             * @member {"isCanceled"|undefined} _isCanceled
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            Object.defineProperty(EventMessage.prototype, "_isCanceled", {
                get: $util.oneOfGetter($oneOfFields = ["isCanceled"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * EventMessage _name.
             * @member {"name"|undefined} _name
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            Object.defineProperty(EventMessage.prototype, "_name", {
                get: $util.oneOfGetter($oneOfFields = ["name"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * EventMessage _description.
             * @member {"description"|undefined} _description
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            Object.defineProperty(EventMessage.prototype, "_description", {
                get: $util.oneOfGetter($oneOfFields = ["description"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * EventMessage _location.
             * @member {"location"|undefined} _location
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            Object.defineProperty(EventMessage.prototype, "_location", {
                get: $util.oneOfGetter($oneOfFields = ["location"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * EventMessage _joinLink.
             * @member {"joinLink"|undefined} _joinLink
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            Object.defineProperty(EventMessage.prototype, "_joinLink", {
                get: $util.oneOfGetter($oneOfFields = ["joinLink"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * EventMessage _startTime.
             * @member {"startTime"|undefined} _startTime
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            Object.defineProperty(EventMessage.prototype, "_startTime", {
                get: $util.oneOfGetter($oneOfFields = ["startTime"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * EventMessage _endTime.
             * @member {"endTime"|undefined} _endTime
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            Object.defineProperty(EventMessage.prototype, "_endTime", {
                get: $util.oneOfGetter($oneOfFields = ["endTime"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * EventMessage _extraGuestsAllowed.
             * @member {"extraGuestsAllowed"|undefined} _extraGuestsAllowed
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            Object.defineProperty(EventMessage.prototype, "_extraGuestsAllowed", {
                get: $util.oneOfGetter($oneOfFields = ["extraGuestsAllowed"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * EventMessage _isScheduleCall.
             * @member {"isScheduleCall"|undefined} _isScheduleCall
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            Object.defineProperty(EventMessage.prototype, "_isScheduleCall", {
                get: $util.oneOfGetter($oneOfFields = ["isScheduleCall"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * EventMessage _hasReminder.
             * @member {"hasReminder"|undefined} _hasReminder
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            Object.defineProperty(EventMessage.prototype, "_hasReminder", {
                get: $util.oneOfGetter($oneOfFields = ["hasReminder"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * EventMessage _reminderOffsetSec.
             * @member {"reminderOffsetSec"|undefined} _reminderOffsetSec
             * @memberof E2E.Message.EventMessage
             * @instance
             */
            Object.defineProperty(EventMessage.prototype, "_reminderOffsetSec", {
                get: $util.oneOfGetter($oneOfFields = ["reminderOffsetSec"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new EventMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.EventMessage
             * @static
             * @param {E2E.Message.IEventMessage=} [properties] Properties to set
             * @returns {E2E.Message.EventMessage} EventMessage instance
             */
            EventMessage.create = function create(properties) {
                return new EventMessage(properties);
            };

            /**
             * Encodes the specified EventMessage message. Does not implicitly {@link E2E.Message.EventMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.EventMessage
             * @static
             * @param {E2E.Message.IEventMessage} message EventMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EventMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.isCanceled != null && Object.hasOwnProperty.call(message, "isCanceled"))
                    writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isCanceled);
                if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.name);
                if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.description);
                if (message.location != null && Object.hasOwnProperty.call(message, "location"))
                    $root.E2E.Message.LocationMessage.encode(message.location, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                if (message.joinLink != null && Object.hasOwnProperty.call(message, "joinLink"))
                    writer.uint32(/* id 6, wireType 2 =*/50).string(message.joinLink);
                if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime"))
                    writer.uint32(/* id 7, wireType 0 =*/56).int64(message.startTime);
                if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime"))
                    writer.uint32(/* id 8, wireType 0 =*/64).int64(message.endTime);
                if (message.extraGuestsAllowed != null && Object.hasOwnProperty.call(message, "extraGuestsAllowed"))
                    writer.uint32(/* id 9, wireType 0 =*/72).bool(message.extraGuestsAllowed);
                if (message.isScheduleCall != null && Object.hasOwnProperty.call(message, "isScheduleCall"))
                    writer.uint32(/* id 10, wireType 0 =*/80).bool(message.isScheduleCall);
                if (message.hasReminder != null && Object.hasOwnProperty.call(message, "hasReminder"))
                    writer.uint32(/* id 11, wireType 0 =*/88).bool(message.hasReminder);
                if (message.reminderOffsetSec != null && Object.hasOwnProperty.call(message, "reminderOffsetSec"))
                    writer.uint32(/* id 12, wireType 0 =*/96).int64(message.reminderOffsetSec);
                return writer;
            };

            /**
             * Encodes the specified EventMessage message, length delimited. Does not implicitly {@link E2E.Message.EventMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.EventMessage
             * @static
             * @param {E2E.Message.IEventMessage} message EventMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EventMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an EventMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.EventMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.EventMessage} EventMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EventMessage.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.E2E.Message.EventMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.isCanceled = reader.bool();
                            break;
                        }
                    case 3: {
                            message.name = reader.string();
                            break;
                        }
                    case 4: {
                            message.description = reader.string();
                            break;
                        }
                    case 5: {
                            message.location = $root.E2E.Message.LocationMessage.decode(reader, reader.uint32());
                            break;
                        }
                    case 6: {
                            message.joinLink = reader.string();
                            break;
                        }
                    case 7: {
                            message.startTime = reader.int64();
                            break;
                        }
                    case 8: {
                            message.endTime = reader.int64();
                            break;
                        }
                    case 9: {
                            message.extraGuestsAllowed = reader.bool();
                            break;
                        }
                    case 10: {
                            message.isScheduleCall = reader.bool();
                            break;
                        }
                    case 11: {
                            message.hasReminder = reader.bool();
                            break;
                        }
                    case 12: {
                            message.reminderOffsetSec = reader.int64();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an EventMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.EventMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.EventMessage} EventMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EventMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an EventMessage message.
             * @function verify
             * @memberof E2E.Message.EventMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            EventMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.isCanceled != null && message.hasOwnProperty("isCanceled")) {
                    properties._isCanceled = 1;
                    if (typeof message.isCanceled !== "boolean")
                        return "isCanceled: boolean expected";
                }
                if (message.name != null && message.hasOwnProperty("name")) {
                    properties._name = 1;
                    if (!$util.isString(message.name))
                        return "name: string expected";
                }
                if (message.description != null && message.hasOwnProperty("description")) {
                    properties._description = 1;
                    if (!$util.isString(message.description))
                        return "description: string expected";
                }
                if (message.location != null && message.hasOwnProperty("location")) {
                    properties._location = 1;
                    {
                        var error = $root.E2E.Message.LocationMessage.verify(message.location);
                        if (error)
                            return "location." + error;
                    }
                }
                if (message.joinLink != null && message.hasOwnProperty("joinLink")) {
                    properties._joinLink = 1;
                    if (!$util.isString(message.joinLink))
                        return "joinLink: string expected";
                }
                if (message.startTime != null && message.hasOwnProperty("startTime")) {
                    properties._startTime = 1;
                    if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high)))
                        return "startTime: integer|Long expected";
                }
                if (message.endTime != null && message.hasOwnProperty("endTime")) {
                    properties._endTime = 1;
                    if (!$util.isInteger(message.endTime) && !(message.endTime && $util.isInteger(message.endTime.low) && $util.isInteger(message.endTime.high)))
                        return "endTime: integer|Long expected";
                }
                if (message.extraGuestsAllowed != null && message.hasOwnProperty("extraGuestsAllowed")) {
                    properties._extraGuestsAllowed = 1;
                    if (typeof message.extraGuestsAllowed !== "boolean")
                        return "extraGuestsAllowed: boolean expected";
                }
                if (message.isScheduleCall != null && message.hasOwnProperty("isScheduleCall")) {
                    properties._isScheduleCall = 1;
                    if (typeof message.isScheduleCall !== "boolean")
                        return "isScheduleCall: boolean expected";
                }
                if (message.hasReminder != null && message.hasOwnProperty("hasReminder")) {
                    properties._hasReminder = 1;
                    if (typeof message.hasReminder !== "boolean")
                        return "hasReminder: boolean expected";
                }
                if (message.reminderOffsetSec != null && message.hasOwnProperty("reminderOffsetSec")) {
                    properties._reminderOffsetSec = 1;
                    if (!$util.isInteger(message.reminderOffsetSec) && !(message.reminderOffsetSec && $util.isInteger(message.reminderOffsetSec.low) && $util.isInteger(message.reminderOffsetSec.high)))
                        return "reminderOffsetSec: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an EventMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.EventMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.EventMessage} EventMessage
             */
            EventMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.EventMessage)
                    return object;
                var message = new $root.E2E.Message.EventMessage();
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.EventMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                if (object.isCanceled != null)
                    message.isCanceled = Boolean(object.isCanceled);
                if (object.name != null)
                    message.name = String(object.name);
                if (object.description != null)
                    message.description = String(object.description);
                if (object.location != null) {
                    if (typeof object.location !== "object")
                        throw TypeError(".E2E.Message.EventMessage.location: object expected");
                    message.location = $root.E2E.Message.LocationMessage.fromObject(object.location);
                }
                if (object.joinLink != null)
                    message.joinLink = String(object.joinLink);
                if (object.startTime != null)
                    if ($util.Long)
                        (message.startTime = $util.Long.fromValue(object.startTime)).unsigned = false;
                    else if (typeof object.startTime === "string")
                        message.startTime = parseInt(object.startTime, 10);
                    else if (typeof object.startTime === "number")
                        message.startTime = object.startTime;
                    else if (typeof object.startTime === "object")
                        message.startTime = new $util.LongBits(object.startTime.low >>> 0, object.startTime.high >>> 0).toNumber();
                if (object.endTime != null)
                    if ($util.Long)
                        (message.endTime = $util.Long.fromValue(object.endTime)).unsigned = false;
                    else if (typeof object.endTime === "string")
                        message.endTime = parseInt(object.endTime, 10);
                    else if (typeof object.endTime === "number")
                        message.endTime = object.endTime;
                    else if (typeof object.endTime === "object")
                        message.endTime = new $util.LongBits(object.endTime.low >>> 0, object.endTime.high >>> 0).toNumber();
                if (object.extraGuestsAllowed != null)
                    message.extraGuestsAllowed = Boolean(object.extraGuestsAllowed);
                if (object.isScheduleCall != null)
                    message.isScheduleCall = Boolean(object.isScheduleCall);
                if (object.hasReminder != null)
                    message.hasReminder = Boolean(object.hasReminder);
                if (object.reminderOffsetSec != null)
                    if ($util.Long)
                        (message.reminderOffsetSec = $util.Long.fromValue(object.reminderOffsetSec)).unsigned = false;
                    else if (typeof object.reminderOffsetSec === "string")
                        message.reminderOffsetSec = parseInt(object.reminderOffsetSec, 10);
                    else if (typeof object.reminderOffsetSec === "number")
                        message.reminderOffsetSec = object.reminderOffsetSec;
                    else if (typeof object.reminderOffsetSec === "object")
                        message.reminderOffsetSec = new $util.LongBits(object.reminderOffsetSec.low >>> 0, object.reminderOffsetSec.high >>> 0).toNumber();
                return message;
            };

            /**
             * Creates a plain object from an EventMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.EventMessage
             * @static
             * @param {E2E.Message.EventMessage} message EventMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            EventMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.isCanceled != null && message.hasOwnProperty("isCanceled")) {
                    object.isCanceled = message.isCanceled;
                    if (options.oneofs)
                        object._isCanceled = "isCanceled";
                }
                if (message.name != null && message.hasOwnProperty("name")) {
                    object.name = message.name;
                    if (options.oneofs)
                        object._name = "name";
                }
                if (message.description != null && message.hasOwnProperty("description")) {
                    object.description = message.description;
                    if (options.oneofs)
                        object._description = "description";
                }
                if (message.location != null && message.hasOwnProperty("location")) {
                    object.location = $root.E2E.Message.LocationMessage.toObject(message.location, options);
                    if (options.oneofs)
                        object._location = "location";
                }
                if (message.joinLink != null && message.hasOwnProperty("joinLink")) {
                    object.joinLink = message.joinLink;
                    if (options.oneofs)
                        object._joinLink = "joinLink";
                }
                if (message.startTime != null && message.hasOwnProperty("startTime")) {
                    if (typeof message.startTime === "number")
                        object.startTime = options.longs === String ? String(message.startTime) : message.startTime;
                    else
                        object.startTime = options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber() : message.startTime;
                    if (options.oneofs)
                        object._startTime = "startTime";
                }
                if (message.endTime != null && message.hasOwnProperty("endTime")) {
                    if (typeof message.endTime === "number")
                        object.endTime = options.longs === String ? String(message.endTime) : message.endTime;
                    else
                        object.endTime = options.longs === String ? $util.Long.prototype.toString.call(message.endTime) : options.longs === Number ? new $util.LongBits(message.endTime.low >>> 0, message.endTime.high >>> 0).toNumber() : message.endTime;
                    if (options.oneofs)
                        object._endTime = "endTime";
                }
                if (message.extraGuestsAllowed != null && message.hasOwnProperty("extraGuestsAllowed")) {
                    object.extraGuestsAllowed = message.extraGuestsAllowed;
                    if (options.oneofs)
                        object._extraGuestsAllowed = "extraGuestsAllowed";
                }
                if (message.isScheduleCall != null && message.hasOwnProperty("isScheduleCall")) {
                    object.isScheduleCall = message.isScheduleCall;
                    if (options.oneofs)
                        object._isScheduleCall = "isScheduleCall";
                }
                if (message.hasReminder != null && message.hasOwnProperty("hasReminder")) {
                    object.hasReminder = message.hasReminder;
                    if (options.oneofs)
                        object._hasReminder = "hasReminder";
                }
                if (message.reminderOffsetSec != null && message.hasOwnProperty("reminderOffsetSec")) {
                    if (typeof message.reminderOffsetSec === "number")
                        object.reminderOffsetSec = options.longs === String ? String(message.reminderOffsetSec) : message.reminderOffsetSec;
                    else
                        object.reminderOffsetSec = options.longs === String ? $util.Long.prototype.toString.call(message.reminderOffsetSec) : options.longs === Number ? new $util.LongBits(message.reminderOffsetSec.low >>> 0, message.reminderOffsetSec.high >>> 0).toNumber() : message.reminderOffsetSec;
                    if (options.oneofs)
                        object._reminderOffsetSec = "reminderOffsetSec";
                }
                return object;
            };

            /**
             * Converts this EventMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.EventMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            EventMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for EventMessage
             * @function getTypeUrl
             * @memberof E2E.Message.EventMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            EventMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.EventMessage";
            };

            return EventMessage;
        })();

        Message.EventResponseMessage = (function() {

            /**
             * Properties of an EventResponseMessage.
             * @memberof E2E.Message
             * @interface IEventResponseMessage
             * @property {E2E.Message.EventResponseMessage.EventResponseType|null} [response] EventResponseMessage response
             * @property {number|Long|null} [timestampMs] EventResponseMessage timestampMs
             * @property {number|null} [extraGuestCount] EventResponseMessage extraGuestCount
             */

            /**
             * Constructs a new EventResponseMessage.
             * @memberof E2E.Message
             * @classdesc Represents an EventResponseMessage.
             * @implements IEventResponseMessage
             * @constructor
             * @param {E2E.Message.IEventResponseMessage=} [properties] Properties to set
             */
            function EventResponseMessage(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]];
            }

            /**
             * EventResponseMessage response.
             * @member {E2E.Message.EventResponseMessage.EventResponseType|null|undefined} response
             * @memberof E2E.Message.EventResponseMessage
             * @instance
             */
            EventResponseMessage.prototype.response = null;

            /**
             * EventResponseMessage timestampMs.
             * @member {number|Long|null|undefined} timestampMs
             * @memberof E2E.Message.EventResponseMessage
             * @instance
             */
            EventResponseMessage.prototype.timestampMs = null;

            /**
             * EventResponseMessage extraGuestCount.
             * @member {number|null|undefined} extraGuestCount
             * @memberof E2E.Message.EventResponseMessage
             * @instance
             */
            EventResponseMessage.prototype.extraGuestCount = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * EventResponseMessage _response.
             * @member {"response"|undefined} _response
             * @memberof E2E.Message.EventResponseMessage
             * @instance
             */
            Object.defineProperty(EventResponseMessage.prototype, "_response", {
                get: $util.oneOfGetter($oneOfFields = ["response"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * EventResponseMessage _timestampMs.
             * @member {"timestampMs"|undefined} _timestampMs
             * @memberof E2E.Message.EventResponseMessage
             * @instance
             */
            Object.defineProperty(EventResponseMessage.prototype, "_timestampMs", {
                get: $util.oneOfGetter($oneOfFields = ["timestampMs"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * EventResponseMessage _extraGuestCount.
             * @member {"extraGuestCount"|undefined} _extraGuestCount
             * @memberof E2E.Message.EventResponseMessage
             * @instance
             */
            Object.defineProperty(EventResponseMessage.prototype, "_extraGuestCount", {
                get: $util.oneOfGetter($oneOfFields = ["extraGuestCount"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new EventResponseMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.EventResponseMessage
             * @static
             * @param {E2E.Message.IEventResponseMessage=} [properties] Properties to set
             * @returns {E2E.Message.EventResponseMessage} EventResponseMessage instance
             */
            EventResponseMessage.create = function create(properties) {
                return new EventResponseMessage(properties);
            };

            /**
             * Encodes the specified EventResponseMessage message. Does not implicitly {@link E2E.Message.EventResponseMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.EventResponseMessage
             * @static
             * @param {E2E.Message.IEventResponseMessage} message EventResponseMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EventResponseMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.response != null && Object.hasOwnProperty.call(message, "response"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.response);
                if (message.timestampMs != null && Object.hasOwnProperty.call(message, "timestampMs"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestampMs);
                if (message.extraGuestCount != null && Object.hasOwnProperty.call(message, "extraGuestCount"))
                    writer.uint32(/* id 3, wireType 0 =*/24).int32(message.extraGuestCount);
                return writer;
            };

            /**
             * Encodes the specified EventResponseMessage message, length delimited. Does not implicitly {@link E2E.Message.EventResponseMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.EventResponseMessage
             * @static
             * @param {E2E.Message.IEventResponseMessage} message EventResponseMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EventResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an EventResponseMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.EventResponseMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.EventResponseMessage} EventResponseMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EventResponseMessage.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.E2E.Message.EventResponseMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.response = reader.int32();
                            break;
                        }
                    case 2: {
                            message.timestampMs = reader.int64();
                            break;
                        }
                    case 3: {
                            message.extraGuestCount = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an EventResponseMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.EventResponseMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.EventResponseMessage} EventResponseMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EventResponseMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an EventResponseMessage message.
             * @function verify
             * @memberof E2E.Message.EventResponseMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            EventResponseMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.response != null && message.hasOwnProperty("response")) {
                    properties._response = 1;
                    switch (message.response) {
                    default:
                        return "response: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) {
                    properties._timestampMs = 1;
                    if (!$util.isInteger(message.timestampMs) && !(message.timestampMs && $util.isInteger(message.timestampMs.low) && $util.isInteger(message.timestampMs.high)))
                        return "timestampMs: integer|Long expected";
                }
                if (message.extraGuestCount != null && message.hasOwnProperty("extraGuestCount")) {
                    properties._extraGuestCount = 1;
                    if (!$util.isInteger(message.extraGuestCount))
                        return "extraGuestCount: integer expected";
                }
                return null;
            };

            /**
             * Creates an EventResponseMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.EventResponseMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.EventResponseMessage} EventResponseMessage
             */
            EventResponseMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.EventResponseMessage)
                    return object;
                var message = new $root.E2E.Message.EventResponseMessage();
                switch (object.response) {
                default:
                    if (typeof object.response === "number") {
                        message.response = object.response;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.response = 0;
                    break;
                case "GOING":
                case 1:
                    message.response = 1;
                    break;
                case "NOT_GOING":
                case 2:
                    message.response = 2;
                    break;
                case "MAYBE":
                case 3:
                    message.response = 3;
                    break;
                }
                if (object.timestampMs != null)
                    if ($util.Long)
                        (message.timestampMs = $util.Long.fromValue(object.timestampMs)).unsigned = false;
                    else if (typeof object.timestampMs === "string")
                        message.timestampMs = parseInt(object.timestampMs, 10);
                    else if (typeof object.timestampMs === "number")
                        message.timestampMs = object.timestampMs;
                    else if (typeof object.timestampMs === "object")
                        message.timestampMs = new $util.LongBits(object.timestampMs.low >>> 0, object.timestampMs.high >>> 0).toNumber();
                if (object.extraGuestCount != null)
                    message.extraGuestCount = object.extraGuestCount | 0;
                return message;
            };

            /**
             * Creates a plain object from an EventResponseMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.EventResponseMessage
             * @static
             * @param {E2E.Message.EventResponseMessage} message EventResponseMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            EventResponseMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.response != null && message.hasOwnProperty("response")) {
                    object.response = options.enums === String ? $root.E2E.Message.EventResponseMessage.EventResponseType[message.response] === undefined ? message.response : $root.E2E.Message.EventResponseMessage.EventResponseType[message.response] : message.response;
                    if (options.oneofs)
                        object._response = "response";
                }
                if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) {
                    if (typeof message.timestampMs === "number")
                        object.timestampMs = options.longs === String ? String(message.timestampMs) : message.timestampMs;
                    else
                        object.timestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.timestampMs) : options.longs === Number ? new $util.LongBits(message.timestampMs.low >>> 0, message.timestampMs.high >>> 0).toNumber() : message.timestampMs;
                    if (options.oneofs)
                        object._timestampMs = "timestampMs";
                }
                if (message.extraGuestCount != null && message.hasOwnProperty("extraGuestCount")) {
                    object.extraGuestCount = message.extraGuestCount;
                    if (options.oneofs)
                        object._extraGuestCount = "extraGuestCount";
                }
                return object;
            };

            /**
             * Converts this EventResponseMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.EventResponseMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            EventResponseMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for EventResponseMessage
             * @function getTypeUrl
             * @memberof E2E.Message.EventResponseMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            EventResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.EventResponseMessage";
            };

            /**
             * EventResponseType enum.
             * @name E2E.Message.EventResponseMessage.EventResponseType
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} GOING=1 GOING value
             * @property {number} NOT_GOING=2 NOT_GOING value
             * @property {number} MAYBE=3 MAYBE value
             */
            EventResponseMessage.EventResponseType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "GOING"] = 1;
                values[valuesById[2] = "NOT_GOING"] = 2;
                values[valuesById[3] = "MAYBE"] = 3;
                return values;
            })();

            return EventResponseMessage;
        })();

        Message.ExtendedTextMessage = (function() {

            /**
             * Properties of an ExtendedTextMessage.
             * @memberof E2E.Message
             * @interface IExtendedTextMessage
             * @property {string|null} [text] ExtendedTextMessage text
             * @property {string|null} [matchedText] ExtendedTextMessage matchedText
             * @property {string|null} [description] ExtendedTextMessage description
             * @property {string|null} [title] ExtendedTextMessage title
             * @property {number|null} [textArgb] ExtendedTextMessage textArgb
             * @property {number|null} [backgroundArgb] ExtendedTextMessage backgroundArgb
             * @property {E2E.Message.ExtendedTextMessage.FontType|null} [font] ExtendedTextMessage font
             * @property {E2E.Message.ExtendedTextMessage.PreviewType|null} [previewType] ExtendedTextMessage previewType
             * @property {Uint8Array|null} [jpegThumbnail] ExtendedTextMessage jpegThumbnail
             * @property {E2E.IContextInfo|null} [contextInfo] ExtendedTextMessage contextInfo
             * @property {boolean|null} [doNotPlayInline] ExtendedTextMessage doNotPlayInline
             * @property {string|null} [thumbnailDirectPath] ExtendedTextMessage thumbnailDirectPath
             * @property {Uint8Array|null} [thumbnailSha256] ExtendedTextMessage thumbnailSha256
             * @property {Uint8Array|null} [thumbnailEncSha256] ExtendedTextMessage thumbnailEncSha256
             * @property {Uint8Array|null} [mediaKey] ExtendedTextMessage mediaKey
             * @property {number|Long|null} [mediaKeyTimestamp] ExtendedTextMessage mediaKeyTimestamp
             * @property {number|null} [thumbnailHeight] ExtendedTextMessage thumbnailHeight
             * @property {number|null} [thumbnailWidth] ExtendedTextMessage thumbnailWidth
             * @property {E2E.Message.ExtendedTextMessage.InviteLinkGroupType|null} [inviteLinkGroupType] ExtendedTextMessage inviteLinkGroupType
             * @property {string|null} [inviteLinkParentGroupSubjectV2] ExtendedTextMessage inviteLinkParentGroupSubjectV2
             * @property {Uint8Array|null} [inviteLinkParentGroupThumbnailV2] ExtendedTextMessage inviteLinkParentGroupThumbnailV2
             * @property {E2E.Message.ExtendedTextMessage.InviteLinkGroupType|null} [inviteLinkGroupTypeV2] ExtendedTextMessage inviteLinkGroupTypeV2
             * @property {boolean|null} [viewOnce] ExtendedTextMessage viewOnce
             * @property {number|null} [videoHeight] ExtendedTextMessage videoHeight
             * @property {number|null} [videoWidth] ExtendedTextMessage videoWidth
             * @property {E2E.Message.IMMSThumbnailMetadata|null} [faviconMMSMetadata] ExtendedTextMessage faviconMMSMetadata
             * @property {E2E.Message.ILinkPreviewMetadata|null} [linkPreviewMetadata] ExtendedTextMessage linkPreviewMetadata
             * @property {E2E.Message.IPaymentLinkMetadata|null} [paymentLinkMetadata] ExtendedTextMessage paymentLinkMetadata
             * @property {Array.<E2E.Message.IVideoEndCard>|null} [endCardTiles] ExtendedTextMessage endCardTiles
             * @property {string|null} [videoContentUrl] ExtendedTextMessage videoContentUrl
             * @property {E2E.IEmbeddedMusic|null} [musicMetadata] ExtendedTextMessage musicMetadata
             * @property {E2E.Message.IPaymentExtendedMetadata|null} [paymentExtendedMetadata] ExtendedTextMessage paymentExtendedMetadata
             */

            /**
             * Constructs a new ExtendedTextMessage.
             * @memberof E2E.Message
             * @classdesc Represents an ExtendedTextMessage.
             * @implements IExtendedTextMessage
             * @constructor
             * @param {E2E.Message.IExtendedTextMessage=} [properties] Properties to set
             */
            function ExtendedTextMessage(properties) {
                this.endCardTiles = [];
                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]];
            }

            /**
             * ExtendedTextMessage text.
             * @member {string|null|undefined} text
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.text = null;

            /**
             * ExtendedTextMessage matchedText.
             * @member {string|null|undefined} matchedText
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.matchedText = null;

            /**
             * ExtendedTextMessage description.
             * @member {string|null|undefined} description
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.description = null;

            /**
             * ExtendedTextMessage title.
             * @member {string|null|undefined} title
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.title = null;

            /**
             * ExtendedTextMessage textArgb.
             * @member {number|null|undefined} textArgb
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.textArgb = null;

            /**
             * ExtendedTextMessage backgroundArgb.
             * @member {number|null|undefined} backgroundArgb
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.backgroundArgb = null;

            /**
             * ExtendedTextMessage font.
             * @member {E2E.Message.ExtendedTextMessage.FontType|null|undefined} font
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.font = null;

            /**
             * ExtendedTextMessage previewType.
             * @member {E2E.Message.ExtendedTextMessage.PreviewType|null|undefined} previewType
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.previewType = null;

            /**
             * ExtendedTextMessage jpegThumbnail.
             * @member {Uint8Array|null|undefined} jpegThumbnail
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.jpegThumbnail = null;

            /**
             * ExtendedTextMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.contextInfo = null;

            /**
             * ExtendedTextMessage doNotPlayInline.
             * @member {boolean|null|undefined} doNotPlayInline
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.doNotPlayInline = null;

            /**
             * ExtendedTextMessage thumbnailDirectPath.
             * @member {string|null|undefined} thumbnailDirectPath
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.thumbnailDirectPath = null;

            /**
             * ExtendedTextMessage thumbnailSha256.
             * @member {Uint8Array|null|undefined} thumbnailSha256
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.thumbnailSha256 = null;

            /**
             * ExtendedTextMessage thumbnailEncSha256.
             * @member {Uint8Array|null|undefined} thumbnailEncSha256
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.thumbnailEncSha256 = null;

            /**
             * ExtendedTextMessage mediaKey.
             * @member {Uint8Array|null|undefined} mediaKey
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.mediaKey = null;

            /**
             * ExtendedTextMessage mediaKeyTimestamp.
             * @member {number|Long|null|undefined} mediaKeyTimestamp
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.mediaKeyTimestamp = null;

            /**
             * ExtendedTextMessage thumbnailHeight.
             * @member {number|null|undefined} thumbnailHeight
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.thumbnailHeight = null;

            /**
             * ExtendedTextMessage thumbnailWidth.
             * @member {number|null|undefined} thumbnailWidth
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.thumbnailWidth = null;

            /**
             * ExtendedTextMessage inviteLinkGroupType.
             * @member {E2E.Message.ExtendedTextMessage.InviteLinkGroupType|null|undefined} inviteLinkGroupType
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.inviteLinkGroupType = null;

            /**
             * ExtendedTextMessage inviteLinkParentGroupSubjectV2.
             * @member {string|null|undefined} inviteLinkParentGroupSubjectV2
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.inviteLinkParentGroupSubjectV2 = null;

            /**
             * ExtendedTextMessage inviteLinkParentGroupThumbnailV2.
             * @member {Uint8Array|null|undefined} inviteLinkParentGroupThumbnailV2
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.inviteLinkParentGroupThumbnailV2 = null;

            /**
             * ExtendedTextMessage inviteLinkGroupTypeV2.
             * @member {E2E.Message.ExtendedTextMessage.InviteLinkGroupType|null|undefined} inviteLinkGroupTypeV2
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.inviteLinkGroupTypeV2 = null;

            /**
             * ExtendedTextMessage viewOnce.
             * @member {boolean|null|undefined} viewOnce
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.viewOnce = null;

            /**
             * ExtendedTextMessage videoHeight.
             * @member {number|null|undefined} videoHeight
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.videoHeight = null;

            /**
             * ExtendedTextMessage videoWidth.
             * @member {number|null|undefined} videoWidth
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.videoWidth = null;

            /**
             * ExtendedTextMessage faviconMMSMetadata.
             * @member {E2E.Message.IMMSThumbnailMetadata|null|undefined} faviconMMSMetadata
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.faviconMMSMetadata = null;

            /**
             * ExtendedTextMessage linkPreviewMetadata.
             * @member {E2E.Message.ILinkPreviewMetadata|null|undefined} linkPreviewMetadata
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.linkPreviewMetadata = null;

            /**
             * ExtendedTextMessage paymentLinkMetadata.
             * @member {E2E.Message.IPaymentLinkMetadata|null|undefined} paymentLinkMetadata
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.paymentLinkMetadata = null;

            /**
             * ExtendedTextMessage endCardTiles.
             * @member {Array.<E2E.Message.IVideoEndCard>} endCardTiles
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.endCardTiles = $util.emptyArray;

            /**
             * ExtendedTextMessage videoContentUrl.
             * @member {string|null|undefined} videoContentUrl
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.videoContentUrl = null;

            /**
             * ExtendedTextMessage musicMetadata.
             * @member {E2E.IEmbeddedMusic|null|undefined} musicMetadata
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.musicMetadata = null;

            /**
             * ExtendedTextMessage paymentExtendedMetadata.
             * @member {E2E.Message.IPaymentExtendedMetadata|null|undefined} paymentExtendedMetadata
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            ExtendedTextMessage.prototype.paymentExtendedMetadata = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * ExtendedTextMessage _text.
             * @member {"text"|undefined} _text
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_text", {
                get: $util.oneOfGetter($oneOfFields = ["text"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _matchedText.
             * @member {"matchedText"|undefined} _matchedText
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_matchedText", {
                get: $util.oneOfGetter($oneOfFields = ["matchedText"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _description.
             * @member {"description"|undefined} _description
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_description", {
                get: $util.oneOfGetter($oneOfFields = ["description"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _title.
             * @member {"title"|undefined} _title
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_title", {
                get: $util.oneOfGetter($oneOfFields = ["title"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _textArgb.
             * @member {"textArgb"|undefined} _textArgb
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_textArgb", {
                get: $util.oneOfGetter($oneOfFields = ["textArgb"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _backgroundArgb.
             * @member {"backgroundArgb"|undefined} _backgroundArgb
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_backgroundArgb", {
                get: $util.oneOfGetter($oneOfFields = ["backgroundArgb"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _font.
             * @member {"font"|undefined} _font
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_font", {
                get: $util.oneOfGetter($oneOfFields = ["font"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _previewType.
             * @member {"previewType"|undefined} _previewType
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_previewType", {
                get: $util.oneOfGetter($oneOfFields = ["previewType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _jpegThumbnail.
             * @member {"jpegThumbnail"|undefined} _jpegThumbnail
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_jpegThumbnail", {
                get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _doNotPlayInline.
             * @member {"doNotPlayInline"|undefined} _doNotPlayInline
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_doNotPlayInline", {
                get: $util.oneOfGetter($oneOfFields = ["doNotPlayInline"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _thumbnailDirectPath.
             * @member {"thumbnailDirectPath"|undefined} _thumbnailDirectPath
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_thumbnailDirectPath", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailDirectPath"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _thumbnailSha256.
             * @member {"thumbnailSha256"|undefined} _thumbnailSha256
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_thumbnailSha256", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _thumbnailEncSha256.
             * @member {"thumbnailEncSha256"|undefined} _thumbnailEncSha256
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_thumbnailEncSha256", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailEncSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _mediaKey.
             * @member {"mediaKey"|undefined} _mediaKey
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_mediaKey", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _mediaKeyTimestamp.
             * @member {"mediaKeyTimestamp"|undefined} _mediaKeyTimestamp
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_mediaKeyTimestamp", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _thumbnailHeight.
             * @member {"thumbnailHeight"|undefined} _thumbnailHeight
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_thumbnailHeight", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailHeight"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _thumbnailWidth.
             * @member {"thumbnailWidth"|undefined} _thumbnailWidth
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_thumbnailWidth", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailWidth"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _inviteLinkGroupType.
             * @member {"inviteLinkGroupType"|undefined} _inviteLinkGroupType
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_inviteLinkGroupType", {
                get: $util.oneOfGetter($oneOfFields = ["inviteLinkGroupType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _inviteLinkParentGroupSubjectV2.
             * @member {"inviteLinkParentGroupSubjectV2"|undefined} _inviteLinkParentGroupSubjectV2
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_inviteLinkParentGroupSubjectV2", {
                get: $util.oneOfGetter($oneOfFields = ["inviteLinkParentGroupSubjectV2"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _inviteLinkParentGroupThumbnailV2.
             * @member {"inviteLinkParentGroupThumbnailV2"|undefined} _inviteLinkParentGroupThumbnailV2
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_inviteLinkParentGroupThumbnailV2", {
                get: $util.oneOfGetter($oneOfFields = ["inviteLinkParentGroupThumbnailV2"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _inviteLinkGroupTypeV2.
             * @member {"inviteLinkGroupTypeV2"|undefined} _inviteLinkGroupTypeV2
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_inviteLinkGroupTypeV2", {
                get: $util.oneOfGetter($oneOfFields = ["inviteLinkGroupTypeV2"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _viewOnce.
             * @member {"viewOnce"|undefined} _viewOnce
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_viewOnce", {
                get: $util.oneOfGetter($oneOfFields = ["viewOnce"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _videoHeight.
             * @member {"videoHeight"|undefined} _videoHeight
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_videoHeight", {
                get: $util.oneOfGetter($oneOfFields = ["videoHeight"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _videoWidth.
             * @member {"videoWidth"|undefined} _videoWidth
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_videoWidth", {
                get: $util.oneOfGetter($oneOfFields = ["videoWidth"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _faviconMMSMetadata.
             * @member {"faviconMMSMetadata"|undefined} _faviconMMSMetadata
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_faviconMMSMetadata", {
                get: $util.oneOfGetter($oneOfFields = ["faviconMMSMetadata"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _linkPreviewMetadata.
             * @member {"linkPreviewMetadata"|undefined} _linkPreviewMetadata
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_linkPreviewMetadata", {
                get: $util.oneOfGetter($oneOfFields = ["linkPreviewMetadata"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _paymentLinkMetadata.
             * @member {"paymentLinkMetadata"|undefined} _paymentLinkMetadata
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_paymentLinkMetadata", {
                get: $util.oneOfGetter($oneOfFields = ["paymentLinkMetadata"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _videoContentUrl.
             * @member {"videoContentUrl"|undefined} _videoContentUrl
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_videoContentUrl", {
                get: $util.oneOfGetter($oneOfFields = ["videoContentUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _musicMetadata.
             * @member {"musicMetadata"|undefined} _musicMetadata
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_musicMetadata", {
                get: $util.oneOfGetter($oneOfFields = ["musicMetadata"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExtendedTextMessage _paymentExtendedMetadata.
             * @member {"paymentExtendedMetadata"|undefined} _paymentExtendedMetadata
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             */
            Object.defineProperty(ExtendedTextMessage.prototype, "_paymentExtendedMetadata", {
                get: $util.oneOfGetter($oneOfFields = ["paymentExtendedMetadata"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new ExtendedTextMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.ExtendedTextMessage
             * @static
             * @param {E2E.Message.IExtendedTextMessage=} [properties] Properties to set
             * @returns {E2E.Message.ExtendedTextMessage} ExtendedTextMessage instance
             */
            ExtendedTextMessage.create = function create(properties) {
                return new ExtendedTextMessage(properties);
            };

            /**
             * Encodes the specified ExtendedTextMessage message. Does not implicitly {@link E2E.Message.ExtendedTextMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.ExtendedTextMessage
             * @static
             * @param {E2E.Message.IExtendedTextMessage} message ExtendedTextMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ExtendedTextMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.text);
                if (message.matchedText != null && Object.hasOwnProperty.call(message, "matchedText"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.matchedText);
                if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.description);
                if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                    writer.uint32(/* id 6, wireType 2 =*/50).string(message.title);
                if (message.textArgb != null && Object.hasOwnProperty.call(message, "textArgb"))
                    writer.uint32(/* id 7, wireType 5 =*/61).fixed32(message.textArgb);
                if (message.backgroundArgb != null && Object.hasOwnProperty.call(message, "backgroundArgb"))
                    writer.uint32(/* id 8, wireType 5 =*/69).fixed32(message.backgroundArgb);
                if (message.font != null && Object.hasOwnProperty.call(message, "font"))
                    writer.uint32(/* id 9, wireType 0 =*/72).int32(message.font);
                if (message.previewType != null && Object.hasOwnProperty.call(message, "previewType"))
                    writer.uint32(/* id 10, wireType 0 =*/80).int32(message.previewType);
                if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail"))
                    writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.jpegThumbnail);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
                if (message.doNotPlayInline != null && Object.hasOwnProperty.call(message, "doNotPlayInline"))
                    writer.uint32(/* id 18, wireType 0 =*/144).bool(message.doNotPlayInline);
                if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath"))
                    writer.uint32(/* id 19, wireType 2 =*/154).string(message.thumbnailDirectPath);
                if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256"))
                    writer.uint32(/* id 20, wireType 2 =*/162).bytes(message.thumbnailSha256);
                if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256"))
                    writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.thumbnailEncSha256);
                if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey"))
                    writer.uint32(/* id 22, wireType 2 =*/178).bytes(message.mediaKey);
                if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp"))
                    writer.uint32(/* id 23, wireType 0 =*/184).int64(message.mediaKeyTimestamp);
                if (message.thumbnailHeight != null && Object.hasOwnProperty.call(message, "thumbnailHeight"))
                    writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.thumbnailHeight);
                if (message.thumbnailWidth != null && Object.hasOwnProperty.call(message, "thumbnailWidth"))
                    writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.thumbnailWidth);
                if (message.inviteLinkGroupType != null && Object.hasOwnProperty.call(message, "inviteLinkGroupType"))
                    writer.uint32(/* id 26, wireType 0 =*/208).int32(message.inviteLinkGroupType);
                if (message.inviteLinkParentGroupSubjectV2 != null && Object.hasOwnProperty.call(message, "inviteLinkParentGroupSubjectV2"))
                    writer.uint32(/* id 27, wireType 2 =*/218).string(message.inviteLinkParentGroupSubjectV2);
                if (message.inviteLinkParentGroupThumbnailV2 != null && Object.hasOwnProperty.call(message, "inviteLinkParentGroupThumbnailV2"))
                    writer.uint32(/* id 28, wireType 2 =*/226).bytes(message.inviteLinkParentGroupThumbnailV2);
                if (message.inviteLinkGroupTypeV2 != null && Object.hasOwnProperty.call(message, "inviteLinkGroupTypeV2"))
                    writer.uint32(/* id 29, wireType 0 =*/232).int32(message.inviteLinkGroupTypeV2);
                if (message.viewOnce != null && Object.hasOwnProperty.call(message, "viewOnce"))
                    writer.uint32(/* id 30, wireType 0 =*/240).bool(message.viewOnce);
                if (message.videoHeight != null && Object.hasOwnProperty.call(message, "videoHeight"))
                    writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.videoHeight);
                if (message.videoWidth != null && Object.hasOwnProperty.call(message, "videoWidth"))
                    writer.uint32(/* id 32, wireType 0 =*/256).uint32(message.videoWidth);
                if (message.faviconMMSMetadata != null && Object.hasOwnProperty.call(message, "faviconMMSMetadata"))
                    $root.E2E.Message.MMSThumbnailMetadata.encode(message.faviconMMSMetadata, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim();
                if (message.linkPreviewMetadata != null && Object.hasOwnProperty.call(message, "linkPreviewMetadata"))
                    $root.E2E.Message.LinkPreviewMetadata.encode(message.linkPreviewMetadata, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim();
                if (message.paymentLinkMetadata != null && Object.hasOwnProperty.call(message, "paymentLinkMetadata"))
                    $root.E2E.Message.PaymentLinkMetadata.encode(message.paymentLinkMetadata, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim();
                if (message.endCardTiles != null && message.endCardTiles.length)
                    for (var i = 0; i < message.endCardTiles.length; ++i)
                        $root.E2E.Message.VideoEndCard.encode(message.endCardTiles[i], writer.uint32(/* id 36, wireType 2 =*/290).fork()).ldelim();
                if (message.videoContentUrl != null && Object.hasOwnProperty.call(message, "videoContentUrl"))
                    writer.uint32(/* id 37, wireType 2 =*/298).string(message.videoContentUrl);
                if (message.musicMetadata != null && Object.hasOwnProperty.call(message, "musicMetadata"))
                    $root.E2E.EmbeddedMusic.encode(message.musicMetadata, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim();
                if (message.paymentExtendedMetadata != null && Object.hasOwnProperty.call(message, "paymentExtendedMetadata"))
                    $root.E2E.Message.PaymentExtendedMetadata.encode(message.paymentExtendedMetadata, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified ExtendedTextMessage message, length delimited. Does not implicitly {@link E2E.Message.ExtendedTextMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.ExtendedTextMessage
             * @static
             * @param {E2E.Message.IExtendedTextMessage} message ExtendedTextMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ExtendedTextMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an ExtendedTextMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.ExtendedTextMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.ExtendedTextMessage} ExtendedTextMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ExtendedTextMessage.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.E2E.Message.ExtendedTextMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.text = reader.string();
                            break;
                        }
                    case 2: {
                            message.matchedText = reader.string();
                            break;
                        }
                    case 5: {
                            message.description = reader.string();
                            break;
                        }
                    case 6: {
                            message.title = reader.string();
                            break;
                        }
                    case 7: {
                            message.textArgb = reader.fixed32();
                            break;
                        }
                    case 8: {
                            message.backgroundArgb = reader.fixed32();
                            break;
                        }
                    case 9: {
                            message.font = reader.int32();
                            break;
                        }
                    case 10: {
                            message.previewType = reader.int32();
                            break;
                        }
                    case 16: {
                            message.jpegThumbnail = reader.bytes();
                            break;
                        }
                    case 17: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 18: {
                            message.doNotPlayInline = reader.bool();
                            break;
                        }
                    case 19: {
                            message.thumbnailDirectPath = reader.string();
                            break;
                        }
                    case 20: {
                            message.thumbnailSha256 = reader.bytes();
                            break;
                        }
                    case 21: {
                            message.thumbnailEncSha256 = reader.bytes();
                            break;
                        }
                    case 22: {
                            message.mediaKey = reader.bytes();
                            break;
                        }
                    case 23: {
                            message.mediaKeyTimestamp = reader.int64();
                            break;
                        }
                    case 24: {
                            message.thumbnailHeight = reader.uint32();
                            break;
                        }
                    case 25: {
                            message.thumbnailWidth = reader.uint32();
                            break;
                        }
                    case 26: {
                            message.inviteLinkGroupType = reader.int32();
                            break;
                        }
                    case 27: {
                            message.inviteLinkParentGroupSubjectV2 = reader.string();
                            break;
                        }
                    case 28: {
                            message.inviteLinkParentGroupThumbnailV2 = reader.bytes();
                            break;
                        }
                    case 29: {
                            message.inviteLinkGroupTypeV2 = reader.int32();
                            break;
                        }
                    case 30: {
                            message.viewOnce = reader.bool();
                            break;
                        }
                    case 31: {
                            message.videoHeight = reader.uint32();
                            break;
                        }
                    case 32: {
                            message.videoWidth = reader.uint32();
                            break;
                        }
                    case 33: {
                            message.faviconMMSMetadata = $root.E2E.Message.MMSThumbnailMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    case 34: {
                            message.linkPreviewMetadata = $root.E2E.Message.LinkPreviewMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    case 35: {
                            message.paymentLinkMetadata = $root.E2E.Message.PaymentLinkMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    case 36: {
                            if (!(message.endCardTiles && message.endCardTiles.length))
                                message.endCardTiles = [];
                            message.endCardTiles.push($root.E2E.Message.VideoEndCard.decode(reader, reader.uint32()));
                            break;
                        }
                    case 37: {
                            message.videoContentUrl = reader.string();
                            break;
                        }
                    case 38: {
                            message.musicMetadata = $root.E2E.EmbeddedMusic.decode(reader, reader.uint32());
                            break;
                        }
                    case 39: {
                            message.paymentExtendedMetadata = $root.E2E.Message.PaymentExtendedMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an ExtendedTextMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.ExtendedTextMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.ExtendedTextMessage} ExtendedTextMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ExtendedTextMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an ExtendedTextMessage message.
             * @function verify
             * @memberof E2E.Message.ExtendedTextMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ExtendedTextMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.text != null && message.hasOwnProperty("text")) {
                    properties._text = 1;
                    if (!$util.isString(message.text))
                        return "text: string expected";
                }
                if (message.matchedText != null && message.hasOwnProperty("matchedText")) {
                    properties._matchedText = 1;
                    if (!$util.isString(message.matchedText))
                        return "matchedText: string expected";
                }
                if (message.description != null && message.hasOwnProperty("description")) {
                    properties._description = 1;
                    if (!$util.isString(message.description))
                        return "description: string expected";
                }
                if (message.title != null && message.hasOwnProperty("title")) {
                    properties._title = 1;
                    if (!$util.isString(message.title))
                        return "title: string expected";
                }
                if (message.textArgb != null && message.hasOwnProperty("textArgb")) {
                    properties._textArgb = 1;
                    if (!$util.isInteger(message.textArgb))
                        return "textArgb: integer expected";
                }
                if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb")) {
                    properties._backgroundArgb = 1;
                    if (!$util.isInteger(message.backgroundArgb))
                        return "backgroundArgb: integer expected";
                }
                if (message.font != null && message.hasOwnProperty("font")) {
                    properties._font = 1;
                    switch (message.font) {
                    default:
                        return "font: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 6:
                    case 7:
                    case 8:
                    case 9:
                    case 10:
                        break;
                    }
                }
                if (message.previewType != null && message.hasOwnProperty("previewType")) {
                    properties._previewType = 1;
                    switch (message.previewType) {
                    default:
                        return "previewType: enum value expected";
                    case 0:
                    case 1:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                        break;
                    }
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    properties._jpegThumbnail = 1;
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.doNotPlayInline != null && message.hasOwnProperty("doNotPlayInline")) {
                    properties._doNotPlayInline = 1;
                    if (typeof message.doNotPlayInline !== "boolean")
                        return "doNotPlayInline: boolean expected";
                }
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) {
                    properties._thumbnailDirectPath = 1;
                    if (!$util.isString(message.thumbnailDirectPath))
                        return "thumbnailDirectPath: string expected";
                }
                if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) {
                    properties._thumbnailSha256 = 1;
                    if (!(message.thumbnailSha256 && typeof message.thumbnailSha256.length === "number" || $util.isString(message.thumbnailSha256)))
                        return "thumbnailSha256: buffer expected";
                }
                if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) {
                    properties._thumbnailEncSha256 = 1;
                    if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256)))
                        return "thumbnailEncSha256: buffer expected";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    properties._mediaKey = 1;
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    properties._mediaKeyTimestamp = 1;
                    if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high)))
                        return "mediaKeyTimestamp: integer|Long expected";
                }
                if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) {
                    properties._thumbnailHeight = 1;
                    if (!$util.isInteger(message.thumbnailHeight))
                        return "thumbnailHeight: integer expected";
                }
                if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) {
                    properties._thumbnailWidth = 1;
                    if (!$util.isInteger(message.thumbnailWidth))
                        return "thumbnailWidth: integer expected";
                }
                if (message.inviteLinkGroupType != null && message.hasOwnProperty("inviteLinkGroupType")) {
                    properties._inviteLinkGroupType = 1;
                    switch (message.inviteLinkGroupType) {
                    default:
                        return "inviteLinkGroupType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                if (message.inviteLinkParentGroupSubjectV2 != null && message.hasOwnProperty("inviteLinkParentGroupSubjectV2")) {
                    properties._inviteLinkParentGroupSubjectV2 = 1;
                    if (!$util.isString(message.inviteLinkParentGroupSubjectV2))
                        return "inviteLinkParentGroupSubjectV2: string expected";
                }
                if (message.inviteLinkParentGroupThumbnailV2 != null && message.hasOwnProperty("inviteLinkParentGroupThumbnailV2")) {
                    properties._inviteLinkParentGroupThumbnailV2 = 1;
                    if (!(message.inviteLinkParentGroupThumbnailV2 && typeof message.inviteLinkParentGroupThumbnailV2.length === "number" || $util.isString(message.inviteLinkParentGroupThumbnailV2)))
                        return "inviteLinkParentGroupThumbnailV2: buffer expected";
                }
                if (message.inviteLinkGroupTypeV2 != null && message.hasOwnProperty("inviteLinkGroupTypeV2")) {
                    properties._inviteLinkGroupTypeV2 = 1;
                    switch (message.inviteLinkGroupTypeV2) {
                    default:
                        return "inviteLinkGroupTypeV2: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) {
                    properties._viewOnce = 1;
                    if (typeof message.viewOnce !== "boolean")
                        return "viewOnce: boolean expected";
                }
                if (message.videoHeight != null && message.hasOwnProperty("videoHeight")) {
                    properties._videoHeight = 1;
                    if (!$util.isInteger(message.videoHeight))
                        return "videoHeight: integer expected";
                }
                if (message.videoWidth != null && message.hasOwnProperty("videoWidth")) {
                    properties._videoWidth = 1;
                    if (!$util.isInteger(message.videoWidth))
                        return "videoWidth: integer expected";
                }
                if (message.faviconMMSMetadata != null && message.hasOwnProperty("faviconMMSMetadata")) {
                    properties._faviconMMSMetadata = 1;
                    {
                        var error = $root.E2E.Message.MMSThumbnailMetadata.verify(message.faviconMMSMetadata);
                        if (error)
                            return "faviconMMSMetadata." + error;
                    }
                }
                if (message.linkPreviewMetadata != null && message.hasOwnProperty("linkPreviewMetadata")) {
                    properties._linkPreviewMetadata = 1;
                    {
                        var error = $root.E2E.Message.LinkPreviewMetadata.verify(message.linkPreviewMetadata);
                        if (error)
                            return "linkPreviewMetadata." + error;
                    }
                }
                if (message.paymentLinkMetadata != null && message.hasOwnProperty("paymentLinkMetadata")) {
                    properties._paymentLinkMetadata = 1;
                    {
                        var error = $root.E2E.Message.PaymentLinkMetadata.verify(message.paymentLinkMetadata);
                        if (error)
                            return "paymentLinkMetadata." + error;
                    }
                }
                if (message.endCardTiles != null && message.hasOwnProperty("endCardTiles")) {
                    if (!Array.isArray(message.endCardTiles))
                        return "endCardTiles: array expected";
                    for (var i = 0; i < message.endCardTiles.length; ++i) {
                        var error = $root.E2E.Message.VideoEndCard.verify(message.endCardTiles[i]);
                        if (error)
                            return "endCardTiles." + error;
                    }
                }
                if (message.videoContentUrl != null && message.hasOwnProperty("videoContentUrl")) {
                    properties._videoContentUrl = 1;
                    if (!$util.isString(message.videoContentUrl))
                        return "videoContentUrl: string expected";
                }
                if (message.musicMetadata != null && message.hasOwnProperty("musicMetadata")) {
                    properties._musicMetadata = 1;
                    {
                        var error = $root.E2E.EmbeddedMusic.verify(message.musicMetadata);
                        if (error)
                            return "musicMetadata." + error;
                    }
                }
                if (message.paymentExtendedMetadata != null && message.hasOwnProperty("paymentExtendedMetadata")) {
                    properties._paymentExtendedMetadata = 1;
                    {
                        var error = $root.E2E.Message.PaymentExtendedMetadata.verify(message.paymentExtendedMetadata);
                        if (error)
                            return "paymentExtendedMetadata." + error;
                    }
                }
                return null;
            };

            /**
             * Creates an ExtendedTextMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.ExtendedTextMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.ExtendedTextMessage} ExtendedTextMessage
             */
            ExtendedTextMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.ExtendedTextMessage)
                    return object;
                var message = new $root.E2E.Message.ExtendedTextMessage();
                if (object.text != null)
                    message.text = String(object.text);
                if (object.matchedText != null)
                    message.matchedText = String(object.matchedText);
                if (object.description != null)
                    message.description = String(object.description);
                if (object.title != null)
                    message.title = String(object.title);
                if (object.textArgb != null)
                    message.textArgb = object.textArgb >>> 0;
                if (object.backgroundArgb != null)
                    message.backgroundArgb = object.backgroundArgb >>> 0;
                switch (object.font) {
                default:
                    if (typeof object.font === "number") {
                        message.font = object.font;
                        break;
                    }
                    break;
                case "SYSTEM":
                case 0:
                    message.font = 0;
                    break;
                case "SYSTEM_TEXT":
                case 1:
                    message.font = 1;
                    break;
                case "FB_SCRIPT":
                case 2:
                    message.font = 2;
                    break;
                case "SYSTEM_BOLD":
                case 6:
                    message.font = 6;
                    break;
                case "MORNINGBREEZE_REGULAR":
                case 7:
                    message.font = 7;
                    break;
                case "CALISTOGA_REGULAR":
                case 8:
                    message.font = 8;
                    break;
                case "EXO2_EXTRABOLD":
                case 9:
                    message.font = 9;
                    break;
                case "COURIERPRIME_BOLD":
                case 10:
                    message.font = 10;
                    break;
                }
                switch (object.previewType) {
                default:
                    if (typeof object.previewType === "number") {
                        message.previewType = object.previewType;
                        break;
                    }
                    break;
                case "NONE":
                case 0:
                    message.previewType = 0;
                    break;
                case "VIDEO":
                case 1:
                    message.previewType = 1;
                    break;
                case "PLACEHOLDER":
                case 4:
                    message.previewType = 4;
                    break;
                case "IMAGE":
                case 5:
                    message.previewType = 5;
                    break;
                case "PAYMENT_LINKS":
                case 6:
                    message.previewType = 6;
                    break;
                case "PROFILE":
                case 7:
                    message.previewType = 7;
                    break;
                }
                if (object.jpegThumbnail != null)
                    if (typeof object.jpegThumbnail === "string")
                        $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0);
                    else if (object.jpegThumbnail.length >= 0)
                        message.jpegThumbnail = object.jpegThumbnail;
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.ExtendedTextMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                if (object.doNotPlayInline != null)
                    message.doNotPlayInline = Boolean(object.doNotPlayInline);
                if (object.thumbnailDirectPath != null)
                    message.thumbnailDirectPath = String(object.thumbnailDirectPath);
                if (object.thumbnailSha256 != null)
                    if (typeof object.thumbnailSha256 === "string")
                        $util.base64.decode(object.thumbnailSha256, message.thumbnailSha256 = $util.newBuffer($util.base64.length(object.thumbnailSha256)), 0);
                    else if (object.thumbnailSha256.length >= 0)
                        message.thumbnailSha256 = object.thumbnailSha256;
                if (object.thumbnailEncSha256 != null)
                    if (typeof object.thumbnailEncSha256 === "string")
                        $util.base64.decode(object.thumbnailEncSha256, message.thumbnailEncSha256 = $util.newBuffer($util.base64.length(object.thumbnailEncSha256)), 0);
                    else if (object.thumbnailEncSha256.length >= 0)
                        message.thumbnailEncSha256 = object.thumbnailEncSha256;
                if (object.mediaKey != null)
                    if (typeof object.mediaKey === "string")
                        $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0);
                    else if (object.mediaKey.length >= 0)
                        message.mediaKey = object.mediaKey;
                if (object.mediaKeyTimestamp != null)
                    if ($util.Long)
                        (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false;
                    else if (typeof object.mediaKeyTimestamp === "string")
                        message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10);
                    else if (typeof object.mediaKeyTimestamp === "number")
                        message.mediaKeyTimestamp = object.mediaKeyTimestamp;
                    else if (typeof object.mediaKeyTimestamp === "object")
                        message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber();
                if (object.thumbnailHeight != null)
                    message.thumbnailHeight = object.thumbnailHeight >>> 0;
                if (object.thumbnailWidth != null)
                    message.thumbnailWidth = object.thumbnailWidth >>> 0;
                switch (object.inviteLinkGroupType) {
                default:
                    if (typeof object.inviteLinkGroupType === "number") {
                        message.inviteLinkGroupType = object.inviteLinkGroupType;
                        break;
                    }
                    break;
                case "DEFAULT":
                case 0:
                    message.inviteLinkGroupType = 0;
                    break;
                case "PARENT":
                case 1:
                    message.inviteLinkGroupType = 1;
                    break;
                case "SUB":
                case 2:
                    message.inviteLinkGroupType = 2;
                    break;
                case "DEFAULT_SUB":
                case 3:
                    message.inviteLinkGroupType = 3;
                    break;
                }
                if (object.inviteLinkParentGroupSubjectV2 != null)
                    message.inviteLinkParentGroupSubjectV2 = String(object.inviteLinkParentGroupSubjectV2);
                if (object.inviteLinkParentGroupThumbnailV2 != null)
                    if (typeof object.inviteLinkParentGroupThumbnailV2 === "string")
                        $util.base64.decode(object.inviteLinkParentGroupThumbnailV2, message.inviteLinkParentGroupThumbnailV2 = $util.newBuffer($util.base64.length(object.inviteLinkParentGroupThumbnailV2)), 0);
                    else if (object.inviteLinkParentGroupThumbnailV2.length >= 0)
                        message.inviteLinkParentGroupThumbnailV2 = object.inviteLinkParentGroupThumbnailV2;
                switch (object.inviteLinkGroupTypeV2) {
                default:
                    if (typeof object.inviteLinkGroupTypeV2 === "number") {
                        message.inviteLinkGroupTypeV2 = object.inviteLinkGroupTypeV2;
                        break;
                    }
                    break;
                case "DEFAULT":
                case 0:
                    message.inviteLinkGroupTypeV2 = 0;
                    break;
                case "PARENT":
                case 1:
                    message.inviteLinkGroupTypeV2 = 1;
                    break;
                case "SUB":
                case 2:
                    message.inviteLinkGroupTypeV2 = 2;
                    break;
                case "DEFAULT_SUB":
                case 3:
                    message.inviteLinkGroupTypeV2 = 3;
                    break;
                }
                if (object.viewOnce != null)
                    message.viewOnce = Boolean(object.viewOnce);
                if (object.videoHeight != null)
                    message.videoHeight = object.videoHeight >>> 0;
                if (object.videoWidth != null)
                    message.videoWidth = object.videoWidth >>> 0;
                if (object.faviconMMSMetadata != null) {
                    if (typeof object.faviconMMSMetadata !== "object")
                        throw TypeError(".E2E.Message.ExtendedTextMessage.faviconMMSMetadata: object expected");
                    message.faviconMMSMetadata = $root.E2E.Message.MMSThumbnailMetadata.fromObject(object.faviconMMSMetadata);
                }
                if (object.linkPreviewMetadata != null) {
                    if (typeof object.linkPreviewMetadata !== "object")
                        throw TypeError(".E2E.Message.ExtendedTextMessage.linkPreviewMetadata: object expected");
                    message.linkPreviewMetadata = $root.E2E.Message.LinkPreviewMetadata.fromObject(object.linkPreviewMetadata);
                }
                if (object.paymentLinkMetadata != null) {
                    if (typeof object.paymentLinkMetadata !== "object")
                        throw TypeError(".E2E.Message.ExtendedTextMessage.paymentLinkMetadata: object expected");
                    message.paymentLinkMetadata = $root.E2E.Message.PaymentLinkMetadata.fromObject(object.paymentLinkMetadata);
                }
                if (object.endCardTiles) {
                    if (!Array.isArray(object.endCardTiles))
                        throw TypeError(".E2E.Message.ExtendedTextMessage.endCardTiles: array expected");
                    message.endCardTiles = [];
                    for (var i = 0; i < object.endCardTiles.length; ++i) {
                        if (typeof object.endCardTiles[i] !== "object")
                            throw TypeError(".E2E.Message.ExtendedTextMessage.endCardTiles: object expected");
                        message.endCardTiles[i] = $root.E2E.Message.VideoEndCard.fromObject(object.endCardTiles[i]);
                    }
                }
                if (object.videoContentUrl != null)
                    message.videoContentUrl = String(object.videoContentUrl);
                if (object.musicMetadata != null) {
                    if (typeof object.musicMetadata !== "object")
                        throw TypeError(".E2E.Message.ExtendedTextMessage.musicMetadata: object expected");
                    message.musicMetadata = $root.E2E.EmbeddedMusic.fromObject(object.musicMetadata);
                }
                if (object.paymentExtendedMetadata != null) {
                    if (typeof object.paymentExtendedMetadata !== "object")
                        throw TypeError(".E2E.Message.ExtendedTextMessage.paymentExtendedMetadata: object expected");
                    message.paymentExtendedMetadata = $root.E2E.Message.PaymentExtendedMetadata.fromObject(object.paymentExtendedMetadata);
                }
                return message;
            };

            /**
             * Creates a plain object from an ExtendedTextMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.ExtendedTextMessage
             * @static
             * @param {E2E.Message.ExtendedTextMessage} message ExtendedTextMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ExtendedTextMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.endCardTiles = [];
                if (message.text != null && message.hasOwnProperty("text")) {
                    object.text = message.text;
                    if (options.oneofs)
                        object._text = "text";
                }
                if (message.matchedText != null && message.hasOwnProperty("matchedText")) {
                    object.matchedText = message.matchedText;
                    if (options.oneofs)
                        object._matchedText = "matchedText";
                }
                if (message.description != null && message.hasOwnProperty("description")) {
                    object.description = message.description;
                    if (options.oneofs)
                        object._description = "description";
                }
                if (message.title != null && message.hasOwnProperty("title")) {
                    object.title = message.title;
                    if (options.oneofs)
                        object._title = "title";
                }
                if (message.textArgb != null && message.hasOwnProperty("textArgb")) {
                    object.textArgb = message.textArgb;
                    if (options.oneofs)
                        object._textArgb = "textArgb";
                }
                if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb")) {
                    object.backgroundArgb = message.backgroundArgb;
                    if (options.oneofs)
                        object._backgroundArgb = "backgroundArgb";
                }
                if (message.font != null && message.hasOwnProperty("font")) {
                    object.font = options.enums === String ? $root.E2E.Message.ExtendedTextMessage.FontType[message.font] === undefined ? message.font : $root.E2E.Message.ExtendedTextMessage.FontType[message.font] : message.font;
                    if (options.oneofs)
                        object._font = "font";
                }
                if (message.previewType != null && message.hasOwnProperty("previewType")) {
                    object.previewType = options.enums === String ? $root.E2E.Message.ExtendedTextMessage.PreviewType[message.previewType] === undefined ? message.previewType : $root.E2E.Message.ExtendedTextMessage.PreviewType[message.previewType] : message.previewType;
                    if (options.oneofs)
                        object._previewType = "previewType";
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail;
                    if (options.oneofs)
                        object._jpegThumbnail = "jpegThumbnail";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.doNotPlayInline != null && message.hasOwnProperty("doNotPlayInline")) {
                    object.doNotPlayInline = message.doNotPlayInline;
                    if (options.oneofs)
                        object._doNotPlayInline = "doNotPlayInline";
                }
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) {
                    object.thumbnailDirectPath = message.thumbnailDirectPath;
                    if (options.oneofs)
                        object._thumbnailDirectPath = "thumbnailDirectPath";
                }
                if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) {
                    object.thumbnailSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailSha256, 0, message.thumbnailSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailSha256) : message.thumbnailSha256;
                    if (options.oneofs)
                        object._thumbnailSha256 = "thumbnailSha256";
                }
                if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) {
                    object.thumbnailEncSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailEncSha256, 0, message.thumbnailEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailEncSha256) : message.thumbnailEncSha256;
                    if (options.oneofs)
                        object._thumbnailEncSha256 = "thumbnailEncSha256";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey;
                    if (options.oneofs)
                        object._mediaKey = "mediaKey";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    if (typeof message.mediaKeyTimestamp === "number")
                        object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp;
                    else
                        object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp;
                    if (options.oneofs)
                        object._mediaKeyTimestamp = "mediaKeyTimestamp";
                }
                if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) {
                    object.thumbnailHeight = message.thumbnailHeight;
                    if (options.oneofs)
                        object._thumbnailHeight = "thumbnailHeight";
                }
                if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) {
                    object.thumbnailWidth = message.thumbnailWidth;
                    if (options.oneofs)
                        object._thumbnailWidth = "thumbnailWidth";
                }
                if (message.inviteLinkGroupType != null && message.hasOwnProperty("inviteLinkGroupType")) {
                    object.inviteLinkGroupType = options.enums === String ? $root.E2E.Message.ExtendedTextMessage.InviteLinkGroupType[message.inviteLinkGroupType] === undefined ? message.inviteLinkGroupType : $root.E2E.Message.ExtendedTextMessage.InviteLinkGroupType[message.inviteLinkGroupType] : message.inviteLinkGroupType;
                    if (options.oneofs)
                        object._inviteLinkGroupType = "inviteLinkGroupType";
                }
                if (message.inviteLinkParentGroupSubjectV2 != null && message.hasOwnProperty("inviteLinkParentGroupSubjectV2")) {
                    object.inviteLinkParentGroupSubjectV2 = message.inviteLinkParentGroupSubjectV2;
                    if (options.oneofs)
                        object._inviteLinkParentGroupSubjectV2 = "inviteLinkParentGroupSubjectV2";
                }
                if (message.inviteLinkParentGroupThumbnailV2 != null && message.hasOwnProperty("inviteLinkParentGroupThumbnailV2")) {
                    object.inviteLinkParentGroupThumbnailV2 = options.bytes === String ? $util.base64.encode(message.inviteLinkParentGroupThumbnailV2, 0, message.inviteLinkParentGroupThumbnailV2.length) : options.bytes === Array ? Array.prototype.slice.call(message.inviteLinkParentGroupThumbnailV2) : message.inviteLinkParentGroupThumbnailV2;
                    if (options.oneofs)
                        object._inviteLinkParentGroupThumbnailV2 = "inviteLinkParentGroupThumbnailV2";
                }
                if (message.inviteLinkGroupTypeV2 != null && message.hasOwnProperty("inviteLinkGroupTypeV2")) {
                    object.inviteLinkGroupTypeV2 = options.enums === String ? $root.E2E.Message.ExtendedTextMessage.InviteLinkGroupType[message.inviteLinkGroupTypeV2] === undefined ? message.inviteLinkGroupTypeV2 : $root.E2E.Message.ExtendedTextMessage.InviteLinkGroupType[message.inviteLinkGroupTypeV2] : message.inviteLinkGroupTypeV2;
                    if (options.oneofs)
                        object._inviteLinkGroupTypeV2 = "inviteLinkGroupTypeV2";
                }
                if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) {
                    object.viewOnce = message.viewOnce;
                    if (options.oneofs)
                        object._viewOnce = "viewOnce";
                }
                if (message.videoHeight != null && message.hasOwnProperty("videoHeight")) {
                    object.videoHeight = message.videoHeight;
                    if (options.oneofs)
                        object._videoHeight = "videoHeight";
                }
                if (message.videoWidth != null && message.hasOwnProperty("videoWidth")) {
                    object.videoWidth = message.videoWidth;
                    if (options.oneofs)
                        object._videoWidth = "videoWidth";
                }
                if (message.faviconMMSMetadata != null && message.hasOwnProperty("faviconMMSMetadata")) {
                    object.faviconMMSMetadata = $root.E2E.Message.MMSThumbnailMetadata.toObject(message.faviconMMSMetadata, options);
                    if (options.oneofs)
                        object._faviconMMSMetadata = "faviconMMSMetadata";
                }
                if (message.linkPreviewMetadata != null && message.hasOwnProperty("linkPreviewMetadata")) {
                    object.linkPreviewMetadata = $root.E2E.Message.LinkPreviewMetadata.toObject(message.linkPreviewMetadata, options);
                    if (options.oneofs)
                        object._linkPreviewMetadata = "linkPreviewMetadata";
                }
                if (message.paymentLinkMetadata != null && message.hasOwnProperty("paymentLinkMetadata")) {
                    object.paymentLinkMetadata = $root.E2E.Message.PaymentLinkMetadata.toObject(message.paymentLinkMetadata, options);
                    if (options.oneofs)
                        object._paymentLinkMetadata = "paymentLinkMetadata";
                }
                if (message.endCardTiles && message.endCardTiles.length) {
                    object.endCardTiles = [];
                    for (var j = 0; j < message.endCardTiles.length; ++j)
                        object.endCardTiles[j] = $root.E2E.Message.VideoEndCard.toObject(message.endCardTiles[j], options);
                }
                if (message.videoContentUrl != null && message.hasOwnProperty("videoContentUrl")) {
                    object.videoContentUrl = message.videoContentUrl;
                    if (options.oneofs)
                        object._videoContentUrl = "videoContentUrl";
                }
                if (message.musicMetadata != null && message.hasOwnProperty("musicMetadata")) {
                    object.musicMetadata = $root.E2E.EmbeddedMusic.toObject(message.musicMetadata, options);
                    if (options.oneofs)
                        object._musicMetadata = "musicMetadata";
                }
                if (message.paymentExtendedMetadata != null && message.hasOwnProperty("paymentExtendedMetadata")) {
                    object.paymentExtendedMetadata = $root.E2E.Message.PaymentExtendedMetadata.toObject(message.paymentExtendedMetadata, options);
                    if (options.oneofs)
                        object._paymentExtendedMetadata = "paymentExtendedMetadata";
                }
                return object;
            };

            /**
             * Converts this ExtendedTextMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.ExtendedTextMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ExtendedTextMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for ExtendedTextMessage
             * @function getTypeUrl
             * @memberof E2E.Message.ExtendedTextMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            ExtendedTextMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.ExtendedTextMessage";
            };

            /**
             * FontType enum.
             * @name E2E.Message.ExtendedTextMessage.FontType
             * @enum {number}
             * @property {number} SYSTEM=0 SYSTEM value
             * @property {number} SYSTEM_TEXT=1 SYSTEM_TEXT value
             * @property {number} FB_SCRIPT=2 FB_SCRIPT value
             * @property {number} SYSTEM_BOLD=6 SYSTEM_BOLD value
             * @property {number} MORNINGBREEZE_REGULAR=7 MORNINGBREEZE_REGULAR value
             * @property {number} CALISTOGA_REGULAR=8 CALISTOGA_REGULAR value
             * @property {number} EXO2_EXTRABOLD=9 EXO2_EXTRABOLD value
             * @property {number} COURIERPRIME_BOLD=10 COURIERPRIME_BOLD value
             */
            ExtendedTextMessage.FontType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "SYSTEM"] = 0;
                values[valuesById[1] = "SYSTEM_TEXT"] = 1;
                values[valuesById[2] = "FB_SCRIPT"] = 2;
                values[valuesById[6] = "SYSTEM_BOLD"] = 6;
                values[valuesById[7] = "MORNINGBREEZE_REGULAR"] = 7;
                values[valuesById[8] = "CALISTOGA_REGULAR"] = 8;
                values[valuesById[9] = "EXO2_EXTRABOLD"] = 9;
                values[valuesById[10] = "COURIERPRIME_BOLD"] = 10;
                return values;
            })();

            /**
             * InviteLinkGroupType enum.
             * @name E2E.Message.ExtendedTextMessage.InviteLinkGroupType
             * @enum {number}
             * @property {number} DEFAULT=0 DEFAULT value
             * @property {number} PARENT=1 PARENT value
             * @property {number} SUB=2 SUB value
             * @property {number} DEFAULT_SUB=3 DEFAULT_SUB value
             */
            ExtendedTextMessage.InviteLinkGroupType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "DEFAULT"] = 0;
                values[valuesById[1] = "PARENT"] = 1;
                values[valuesById[2] = "SUB"] = 2;
                values[valuesById[3] = "DEFAULT_SUB"] = 3;
                return values;
            })();

            /**
             * PreviewType enum.
             * @name E2E.Message.ExtendedTextMessage.PreviewType
             * @enum {number}
             * @property {number} NONE=0 NONE value
             * @property {number} VIDEO=1 VIDEO value
             * @property {number} PLACEHOLDER=4 PLACEHOLDER value
             * @property {number} IMAGE=5 IMAGE value
             * @property {number} PAYMENT_LINKS=6 PAYMENT_LINKS value
             * @property {number} PROFILE=7 PROFILE value
             */
            ExtendedTextMessage.PreviewType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "NONE"] = 0;
                values[valuesById[1] = "VIDEO"] = 1;
                values[valuesById[4] = "PLACEHOLDER"] = 4;
                values[valuesById[5] = "IMAGE"] = 5;
                values[valuesById[6] = "PAYMENT_LINKS"] = 6;
                values[valuesById[7] = "PROFILE"] = 7;
                return values;
            })();

            return ExtendedTextMessage;
        })();

        Message.FullHistorySyncOnDemandRequestMetadata = (function() {

            /**
             * Properties of a FullHistorySyncOnDemandRequestMetadata.
             * @memberof E2E.Message
             * @interface IFullHistorySyncOnDemandRequestMetadata
             * @property {string|null} [requestId] FullHistorySyncOnDemandRequestMetadata requestId
             */

            /**
             * Constructs a new FullHistorySyncOnDemandRequestMetadata.
             * @memberof E2E.Message
             * @classdesc Represents a FullHistorySyncOnDemandRequestMetadata.
             * @implements IFullHistorySyncOnDemandRequestMetadata
             * @constructor
             * @param {E2E.Message.IFullHistorySyncOnDemandRequestMetadata=} [properties] Properties to set
             */
            function FullHistorySyncOnDemandRequestMetadata(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]];
            }

            /**
             * FullHistorySyncOnDemandRequestMetadata requestId.
             * @member {string|null|undefined} requestId
             * @memberof E2E.Message.FullHistorySyncOnDemandRequestMetadata
             * @instance
             */
            FullHistorySyncOnDemandRequestMetadata.prototype.requestId = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * FullHistorySyncOnDemandRequestMetadata _requestId.
             * @member {"requestId"|undefined} _requestId
             * @memberof E2E.Message.FullHistorySyncOnDemandRequestMetadata
             * @instance
             */
            Object.defineProperty(FullHistorySyncOnDemandRequestMetadata.prototype, "_requestId", {
                get: $util.oneOfGetter($oneOfFields = ["requestId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new FullHistorySyncOnDemandRequestMetadata instance using the specified properties.
             * @function create
             * @memberof E2E.Message.FullHistorySyncOnDemandRequestMetadata
             * @static
             * @param {E2E.Message.IFullHistorySyncOnDemandRequestMetadata=} [properties] Properties to set
             * @returns {E2E.Message.FullHistorySyncOnDemandRequestMetadata} FullHistorySyncOnDemandRequestMetadata instance
             */
            FullHistorySyncOnDemandRequestMetadata.create = function create(properties) {
                return new FullHistorySyncOnDemandRequestMetadata(properties);
            };

            /**
             * Encodes the specified FullHistorySyncOnDemandRequestMetadata message. Does not implicitly {@link E2E.Message.FullHistorySyncOnDemandRequestMetadata.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.FullHistorySyncOnDemandRequestMetadata
             * @static
             * @param {E2E.Message.IFullHistorySyncOnDemandRequestMetadata} message FullHistorySyncOnDemandRequestMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FullHistorySyncOnDemandRequestMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.requestId);
                return writer;
            };

            /**
             * Encodes the specified FullHistorySyncOnDemandRequestMetadata message, length delimited. Does not implicitly {@link E2E.Message.FullHistorySyncOnDemandRequestMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.FullHistorySyncOnDemandRequestMetadata
             * @static
             * @param {E2E.Message.IFullHistorySyncOnDemandRequestMetadata} message FullHistorySyncOnDemandRequestMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FullHistorySyncOnDemandRequestMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FullHistorySyncOnDemandRequestMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.FullHistorySyncOnDemandRequestMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.FullHistorySyncOnDemandRequestMetadata} FullHistorySyncOnDemandRequestMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FullHistorySyncOnDemandRequestMetadata.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.E2E.Message.FullHistorySyncOnDemandRequestMetadata();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.requestId = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a FullHistorySyncOnDemandRequestMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.FullHistorySyncOnDemandRequestMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.FullHistorySyncOnDemandRequestMetadata} FullHistorySyncOnDemandRequestMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FullHistorySyncOnDemandRequestMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FullHistorySyncOnDemandRequestMetadata message.
             * @function verify
             * @memberof E2E.Message.FullHistorySyncOnDemandRequestMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FullHistorySyncOnDemandRequestMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.requestId != null && message.hasOwnProperty("requestId")) {
                    properties._requestId = 1;
                    if (!$util.isString(message.requestId))
                        return "requestId: string expected";
                }
                return null;
            };

            /**
             * Creates a FullHistorySyncOnDemandRequestMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.FullHistorySyncOnDemandRequestMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.FullHistorySyncOnDemandRequestMetadata} FullHistorySyncOnDemandRequestMetadata
             */
            FullHistorySyncOnDemandRequestMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata)
                    return object;
                var message = new $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata();
                if (object.requestId != null)
                    message.requestId = String(object.requestId);
                return message;
            };

            /**
             * Creates a plain object from a FullHistorySyncOnDemandRequestMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.FullHistorySyncOnDemandRequestMetadata
             * @static
             * @param {E2E.Message.FullHistorySyncOnDemandRequestMetadata} message FullHistorySyncOnDemandRequestMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FullHistorySyncOnDemandRequestMetadata.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.requestId != null && message.hasOwnProperty("requestId")) {
                    object.requestId = message.requestId;
                    if (options.oneofs)
                        object._requestId = "requestId";
                }
                return object;
            };

            /**
             * Converts this FullHistorySyncOnDemandRequestMetadata to JSON.
             * @function toJSON
             * @memberof E2E.Message.FullHistorySyncOnDemandRequestMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FullHistorySyncOnDemandRequestMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for FullHistorySyncOnDemandRequestMetadata
             * @function getTypeUrl
             * @memberof E2E.Message.FullHistorySyncOnDemandRequestMetadata
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            FullHistorySyncOnDemandRequestMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.FullHistorySyncOnDemandRequestMetadata";
            };

            return FullHistorySyncOnDemandRequestMetadata;
        })();

        Message.FutureProofMessage = (function() {

            /**
             * Properties of a FutureProofMessage.
             * @memberof E2E.Message
             * @interface IFutureProofMessage
             * @property {E2E.IMessage|null} [message] FutureProofMessage message
             */

            /**
             * Constructs a new FutureProofMessage.
             * @memberof E2E.Message
             * @classdesc Represents a FutureProofMessage.
             * @implements IFutureProofMessage
             * @constructor
             * @param {E2E.Message.IFutureProofMessage=} [properties] Properties to set
             */
            function FutureProofMessage(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]];
            }

            /**
             * FutureProofMessage message.
             * @member {E2E.IMessage|null|undefined} message
             * @memberof E2E.Message.FutureProofMessage
             * @instance
             */
            FutureProofMessage.prototype.message = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * FutureProofMessage _message.
             * @member {"message"|undefined} _message
             * @memberof E2E.Message.FutureProofMessage
             * @instance
             */
            Object.defineProperty(FutureProofMessage.prototype, "_message", {
                get: $util.oneOfGetter($oneOfFields = ["message"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new FutureProofMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.FutureProofMessage
             * @static
             * @param {E2E.Message.IFutureProofMessage=} [properties] Properties to set
             * @returns {E2E.Message.FutureProofMessage} FutureProofMessage instance
             */
            FutureProofMessage.create = function create(properties) {
                return new FutureProofMessage(properties);
            };

            /**
             * Encodes the specified FutureProofMessage message. Does not implicitly {@link E2E.Message.FutureProofMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.FutureProofMessage
             * @static
             * @param {E2E.Message.IFutureProofMessage} message FutureProofMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FutureProofMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.message != null && Object.hasOwnProperty.call(message, "message"))
                    $root.E2E.Message.encode(message.message, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified FutureProofMessage message, length delimited. Does not implicitly {@link E2E.Message.FutureProofMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.FutureProofMessage
             * @static
             * @param {E2E.Message.IFutureProofMessage} message FutureProofMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FutureProofMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FutureProofMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.FutureProofMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.FutureProofMessage} FutureProofMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FutureProofMessage.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.E2E.Message.FutureProofMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.message = $root.E2E.Message.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a FutureProofMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.FutureProofMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.FutureProofMessage} FutureProofMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FutureProofMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FutureProofMessage message.
             * @function verify
             * @memberof E2E.Message.FutureProofMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FutureProofMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.message != null && message.hasOwnProperty("message")) {
                    properties._message = 1;
                    {
                        var error = $root.E2E.Message.verify(message.message);
                        if (error)
                            return "message." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a FutureProofMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.FutureProofMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.FutureProofMessage} FutureProofMessage
             */
            FutureProofMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.FutureProofMessage)
                    return object;
                var message = new $root.E2E.Message.FutureProofMessage();
                if (object.message != null) {
                    if (typeof object.message !== "object")
                        throw TypeError(".E2E.Message.FutureProofMessage.message: object expected");
                    message.message = $root.E2E.Message.fromObject(object.message);
                }
                return message;
            };

            /**
             * Creates a plain object from a FutureProofMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.FutureProofMessage
             * @static
             * @param {E2E.Message.FutureProofMessage} message FutureProofMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FutureProofMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.message != null && message.hasOwnProperty("message")) {
                    object.message = $root.E2E.Message.toObject(message.message, options);
                    if (options.oneofs)
                        object._message = "message";
                }
                return object;
            };

            /**
             * Converts this FutureProofMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.FutureProofMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FutureProofMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for FutureProofMessage
             * @function getTypeUrl
             * @memberof E2E.Message.FutureProofMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            FutureProofMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.FutureProofMessage";
            };

            return FutureProofMessage;
        })();

        Message.GroupInviteMessage = (function() {

            /**
             * Properties of a GroupInviteMessage.
             * @memberof E2E.Message
             * @interface IGroupInviteMessage
             * @property {string|null} [groupJid] GroupInviteMessage groupJid
             * @property {string|null} [inviteCode] GroupInviteMessage inviteCode
             * @property {number|Long|null} [inviteExpiration] GroupInviteMessage inviteExpiration
             * @property {string|null} [groupName] GroupInviteMessage groupName
             * @property {Uint8Array|null} [jpegThumbnail] GroupInviteMessage jpegThumbnail
             * @property {string|null} [caption] GroupInviteMessage caption
             * @property {E2E.IContextInfo|null} [contextInfo] GroupInviteMessage contextInfo
             * @property {E2E.Message.GroupInviteMessage.GroupType|null} [groupType] GroupInviteMessage groupType
             */

            /**
             * Constructs a new GroupInviteMessage.
             * @memberof E2E.Message
             * @classdesc Represents a GroupInviteMessage.
             * @implements IGroupInviteMessage
             * @constructor
             * @param {E2E.Message.IGroupInviteMessage=} [properties] Properties to set
             */
            function GroupInviteMessage(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]];
            }

            /**
             * GroupInviteMessage groupJid.
             * @member {string|null|undefined} groupJid
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            GroupInviteMessage.prototype.groupJid = null;

            /**
             * GroupInviteMessage inviteCode.
             * @member {string|null|undefined} inviteCode
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            GroupInviteMessage.prototype.inviteCode = null;

            /**
             * GroupInviteMessage inviteExpiration.
             * @member {number|Long|null|undefined} inviteExpiration
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            GroupInviteMessage.prototype.inviteExpiration = null;

            /**
             * GroupInviteMessage groupName.
             * @member {string|null|undefined} groupName
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            GroupInviteMessage.prototype.groupName = null;

            /**
             * GroupInviteMessage jpegThumbnail.
             * @member {Uint8Array|null|undefined} jpegThumbnail
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            GroupInviteMessage.prototype.jpegThumbnail = null;

            /**
             * GroupInviteMessage caption.
             * @member {string|null|undefined} caption
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            GroupInviteMessage.prototype.caption = null;

            /**
             * GroupInviteMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            GroupInviteMessage.prototype.contextInfo = null;

            /**
             * GroupInviteMessage groupType.
             * @member {E2E.Message.GroupInviteMessage.GroupType|null|undefined} groupType
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            GroupInviteMessage.prototype.groupType = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * GroupInviteMessage _groupJid.
             * @member {"groupJid"|undefined} _groupJid
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            Object.defineProperty(GroupInviteMessage.prototype, "_groupJid", {
                get: $util.oneOfGetter($oneOfFields = ["groupJid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * GroupInviteMessage _inviteCode.
             * @member {"inviteCode"|undefined} _inviteCode
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            Object.defineProperty(GroupInviteMessage.prototype, "_inviteCode", {
                get: $util.oneOfGetter($oneOfFields = ["inviteCode"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * GroupInviteMessage _inviteExpiration.
             * @member {"inviteExpiration"|undefined} _inviteExpiration
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            Object.defineProperty(GroupInviteMessage.prototype, "_inviteExpiration", {
                get: $util.oneOfGetter($oneOfFields = ["inviteExpiration"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * GroupInviteMessage _groupName.
             * @member {"groupName"|undefined} _groupName
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            Object.defineProperty(GroupInviteMessage.prototype, "_groupName", {
                get: $util.oneOfGetter($oneOfFields = ["groupName"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * GroupInviteMessage _jpegThumbnail.
             * @member {"jpegThumbnail"|undefined} _jpegThumbnail
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            Object.defineProperty(GroupInviteMessage.prototype, "_jpegThumbnail", {
                get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * GroupInviteMessage _caption.
             * @member {"caption"|undefined} _caption
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            Object.defineProperty(GroupInviteMessage.prototype, "_caption", {
                get: $util.oneOfGetter($oneOfFields = ["caption"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * GroupInviteMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            Object.defineProperty(GroupInviteMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * GroupInviteMessage _groupType.
             * @member {"groupType"|undefined} _groupType
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             */
            Object.defineProperty(GroupInviteMessage.prototype, "_groupType", {
                get: $util.oneOfGetter($oneOfFields = ["groupType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new GroupInviteMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.GroupInviteMessage
             * @static
             * @param {E2E.Message.IGroupInviteMessage=} [properties] Properties to set
             * @returns {E2E.Message.GroupInviteMessage} GroupInviteMessage instance
             */
            GroupInviteMessage.create = function create(properties) {
                return new GroupInviteMessage(properties);
            };

            /**
             * Encodes the specified GroupInviteMessage message. Does not implicitly {@link E2E.Message.GroupInviteMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.GroupInviteMessage
             * @static
             * @param {E2E.Message.IGroupInviteMessage} message GroupInviteMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GroupInviteMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.groupJid != null && Object.hasOwnProperty.call(message, "groupJid"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.groupJid);
                if (message.inviteCode != null && Object.hasOwnProperty.call(message, "inviteCode"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.inviteCode);
                if (message.inviteExpiration != null && Object.hasOwnProperty.call(message, "inviteExpiration"))
                    writer.uint32(/* id 3, wireType 0 =*/24).int64(message.inviteExpiration);
                if (message.groupName != null && Object.hasOwnProperty.call(message, "groupName"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.groupName);
                if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail"))
                    writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.jpegThumbnail);
                if (message.caption != null && Object.hasOwnProperty.call(message, "caption"))
                    writer.uint32(/* id 6, wireType 2 =*/50).string(message.caption);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                if (message.groupType != null && Object.hasOwnProperty.call(message, "groupType"))
                    writer.uint32(/* id 8, wireType 0 =*/64).int32(message.groupType);
                return writer;
            };

            /**
             * Encodes the specified GroupInviteMessage message, length delimited. Does not implicitly {@link E2E.Message.GroupInviteMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.GroupInviteMessage
             * @static
             * @param {E2E.Message.IGroupInviteMessage} message GroupInviteMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GroupInviteMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a GroupInviteMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.GroupInviteMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.GroupInviteMessage} GroupInviteMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GroupInviteMessage.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.E2E.Message.GroupInviteMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.groupJid = reader.string();
                            break;
                        }
                    case 2: {
                            message.inviteCode = reader.string();
                            break;
                        }
                    case 3: {
                            message.inviteExpiration = reader.int64();
                            break;
                        }
                    case 4: {
                            message.groupName = reader.string();
                            break;
                        }
                    case 5: {
                            message.jpegThumbnail = reader.bytes();
                            break;
                        }
                    case 6: {
                            message.caption = reader.string();
                            break;
                        }
                    case 7: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 8: {
                            message.groupType = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a GroupInviteMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.GroupInviteMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.GroupInviteMessage} GroupInviteMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GroupInviteMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a GroupInviteMessage message.
             * @function verify
             * @memberof E2E.Message.GroupInviteMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            GroupInviteMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.groupJid != null && message.hasOwnProperty("groupJid")) {
                    properties._groupJid = 1;
                    if (!$util.isString(message.groupJid))
                        return "groupJid: string expected";
                }
                if (message.inviteCode != null && message.hasOwnProperty("inviteCode")) {
                    properties._inviteCode = 1;
                    if (!$util.isString(message.inviteCode))
                        return "inviteCode: string expected";
                }
                if (message.inviteExpiration != null && message.hasOwnProperty("inviteExpiration")) {
                    properties._inviteExpiration = 1;
                    if (!$util.isInteger(message.inviteExpiration) && !(message.inviteExpiration && $util.isInteger(message.inviteExpiration.low) && $util.isInteger(message.inviteExpiration.high)))
                        return "inviteExpiration: integer|Long expected";
                }
                if (message.groupName != null && message.hasOwnProperty("groupName")) {
                    properties._groupName = 1;
                    if (!$util.isString(message.groupName))
                        return "groupName: string expected";
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    properties._jpegThumbnail = 1;
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    properties._caption = 1;
                    if (!$util.isString(message.caption))
                        return "caption: string expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.groupType != null && message.hasOwnProperty("groupType")) {
                    properties._groupType = 1;
                    switch (message.groupType) {
                    default:
                        return "groupType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a GroupInviteMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.GroupInviteMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.GroupInviteMessage} GroupInviteMessage
             */
            GroupInviteMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.GroupInviteMessage)
                    return object;
                var message = new $root.E2E.Message.GroupInviteMessage();
                if (object.groupJid != null)
                    message.groupJid = String(object.groupJid);
                if (object.inviteCode != null)
                    message.inviteCode = String(object.inviteCode);
                if (object.inviteExpiration != null)
                    if ($util.Long)
                        (message.inviteExpiration = $util.Long.fromValue(object.inviteExpiration)).unsigned = false;
                    else if (typeof object.inviteExpiration === "string")
                        message.inviteExpiration = parseInt(object.inviteExpiration, 10);
                    else if (typeof object.inviteExpiration === "number")
                        message.inviteExpiration = object.inviteExpiration;
                    else if (typeof object.inviteExpiration === "object")
                        message.inviteExpiration = new $util.LongBits(object.inviteExpiration.low >>> 0, object.inviteExpiration.high >>> 0).toNumber();
                if (object.groupName != null)
                    message.groupName = String(object.groupName);
                if (object.jpegThumbnail != null)
                    if (typeof object.jpegThumbnail === "string")
                        $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0);
                    else if (object.jpegThumbnail.length >= 0)
                        message.jpegThumbnail = object.jpegThumbnail;
                if (object.caption != null)
                    message.caption = String(object.caption);
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.GroupInviteMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                switch (object.groupType) {
                default:
                    if (typeof object.groupType === "number") {
                        message.groupType = object.groupType;
                        break;
                    }
                    break;
                case "DEFAULT":
                case 0:
                    message.groupType = 0;
                    break;
                case "PARENT":
                case 1:
                    message.groupType = 1;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a GroupInviteMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.GroupInviteMessage
             * @static
             * @param {E2E.Message.GroupInviteMessage} message GroupInviteMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            GroupInviteMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.groupJid != null && message.hasOwnProperty("groupJid")) {
                    object.groupJid = message.groupJid;
                    if (options.oneofs)
                        object._groupJid = "groupJid";
                }
                if (message.inviteCode != null && message.hasOwnProperty("inviteCode")) {
                    object.inviteCode = message.inviteCode;
                    if (options.oneofs)
                        object._inviteCode = "inviteCode";
                }
                if (message.inviteExpiration != null && message.hasOwnProperty("inviteExpiration")) {
                    if (typeof message.inviteExpiration === "number")
                        object.inviteExpiration = options.longs === String ? String(message.inviteExpiration) : message.inviteExpiration;
                    else
                        object.inviteExpiration = options.longs === String ? $util.Long.prototype.toString.call(message.inviteExpiration) : options.longs === Number ? new $util.LongBits(message.inviteExpiration.low >>> 0, message.inviteExpiration.high >>> 0).toNumber() : message.inviteExpiration;
                    if (options.oneofs)
                        object._inviteExpiration = "inviteExpiration";
                }
                if (message.groupName != null && message.hasOwnProperty("groupName")) {
                    object.groupName = message.groupName;
                    if (options.oneofs)
                        object._groupName = "groupName";
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail;
                    if (options.oneofs)
                        object._jpegThumbnail = "jpegThumbnail";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    object.caption = message.caption;
                    if (options.oneofs)
                        object._caption = "caption";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.groupType != null && message.hasOwnProperty("groupType")) {
                    object.groupType = options.enums === String ? $root.E2E.Message.GroupInviteMessage.GroupType[message.groupType] === undefined ? message.groupType : $root.E2E.Message.GroupInviteMessage.GroupType[message.groupType] : message.groupType;
                    if (options.oneofs)
                        object._groupType = "groupType";
                }
                return object;
            };

            /**
             * Converts this GroupInviteMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.GroupInviteMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            GroupInviteMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for GroupInviteMessage
             * @function getTypeUrl
             * @memberof E2E.Message.GroupInviteMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            GroupInviteMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.GroupInviteMessage";
            };

            /**
             * GroupType enum.
             * @name E2E.Message.GroupInviteMessage.GroupType
             * @enum {number}
             * @property {number} DEFAULT=0 DEFAULT value
             * @property {number} PARENT=1 PARENT value
             */
            GroupInviteMessage.GroupType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "DEFAULT"] = 0;
                values[valuesById[1] = "PARENT"] = 1;
                return values;
            })();

            return GroupInviteMessage;
        })();

        Message.HighlyStructuredMessage = (function() {

            /**
             * Properties of a HighlyStructuredMessage.
             * @memberof E2E.Message
             * @interface IHighlyStructuredMessage
             * @property {string|null} [namespace] HighlyStructuredMessage namespace
             * @property {string|null} [elementName] HighlyStructuredMessage elementName
             * @property {Array.<string>|null} [params] HighlyStructuredMessage params
             * @property {string|null} [fallbackLg] HighlyStructuredMessage fallbackLg
             * @property {string|null} [fallbackLc] HighlyStructuredMessage fallbackLc
             * @property {Array.<E2E.Message.HighlyStructuredMessage.IHSMLocalizableParameter>|null} [localizableParams] HighlyStructuredMessage localizableParams
             * @property {string|null} [deterministicLg] HighlyStructuredMessage deterministicLg
             * @property {string|null} [deterministicLc] HighlyStructuredMessage deterministicLc
             * @property {E2E.Message.ITemplateMessage|null} [hydratedHsm] HighlyStructuredMessage hydratedHsm
             */

            /**
             * Constructs a new HighlyStructuredMessage.
             * @memberof E2E.Message
             * @classdesc Represents a HighlyStructuredMessage.
             * @implements IHighlyStructuredMessage
             * @constructor
             * @param {E2E.Message.IHighlyStructuredMessage=} [properties] Properties to set
             */
            function HighlyStructuredMessage(properties) {
                this.params = [];
                this.localizableParams = [];
                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]];
            }

            /**
             * HighlyStructuredMessage namespace.
             * @member {string|null|undefined} namespace
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            HighlyStructuredMessage.prototype.namespace = null;

            /**
             * HighlyStructuredMessage elementName.
             * @member {string|null|undefined} elementName
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            HighlyStructuredMessage.prototype.elementName = null;

            /**
             * HighlyStructuredMessage params.
             * @member {Array.<string>} params
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            HighlyStructuredMessage.prototype.params = $util.emptyArray;

            /**
             * HighlyStructuredMessage fallbackLg.
             * @member {string|null|undefined} fallbackLg
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            HighlyStructuredMessage.prototype.fallbackLg = null;

            /**
             * HighlyStructuredMessage fallbackLc.
             * @member {string|null|undefined} fallbackLc
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            HighlyStructuredMessage.prototype.fallbackLc = null;

            /**
             * HighlyStructuredMessage localizableParams.
             * @member {Array.<E2E.Message.HighlyStructuredMessage.IHSMLocalizableParameter>} localizableParams
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            HighlyStructuredMessage.prototype.localizableParams = $util.emptyArray;

            /**
             * HighlyStructuredMessage deterministicLg.
             * @member {string|null|undefined} deterministicLg
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            HighlyStructuredMessage.prototype.deterministicLg = null;

            /**
             * HighlyStructuredMessage deterministicLc.
             * @member {string|null|undefined} deterministicLc
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            HighlyStructuredMessage.prototype.deterministicLc = null;

            /**
             * HighlyStructuredMessage hydratedHsm.
             * @member {E2E.Message.ITemplateMessage|null|undefined} hydratedHsm
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            HighlyStructuredMessage.prototype.hydratedHsm = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * HighlyStructuredMessage _namespace.
             * @member {"namespace"|undefined} _namespace
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            Object.defineProperty(HighlyStructuredMessage.prototype, "_namespace", {
                get: $util.oneOfGetter($oneOfFields = ["namespace"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HighlyStructuredMessage _elementName.
             * @member {"elementName"|undefined} _elementName
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            Object.defineProperty(HighlyStructuredMessage.prototype, "_elementName", {
                get: $util.oneOfGetter($oneOfFields = ["elementName"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HighlyStructuredMessage _fallbackLg.
             * @member {"fallbackLg"|undefined} _fallbackLg
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            Object.defineProperty(HighlyStructuredMessage.prototype, "_fallbackLg", {
                get: $util.oneOfGetter($oneOfFields = ["fallbackLg"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HighlyStructuredMessage _fallbackLc.
             * @member {"fallbackLc"|undefined} _fallbackLc
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            Object.defineProperty(HighlyStructuredMessage.prototype, "_fallbackLc", {
                get: $util.oneOfGetter($oneOfFields = ["fallbackLc"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HighlyStructuredMessage _deterministicLg.
             * @member {"deterministicLg"|undefined} _deterministicLg
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            Object.defineProperty(HighlyStructuredMessage.prototype, "_deterministicLg", {
                get: $util.oneOfGetter($oneOfFields = ["deterministicLg"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HighlyStructuredMessage _deterministicLc.
             * @member {"deterministicLc"|undefined} _deterministicLc
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            Object.defineProperty(HighlyStructuredMessage.prototype, "_deterministicLc", {
                get: $util.oneOfGetter($oneOfFields = ["deterministicLc"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HighlyStructuredMessage _hydratedHsm.
             * @member {"hydratedHsm"|undefined} _hydratedHsm
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             */
            Object.defineProperty(HighlyStructuredMessage.prototype, "_hydratedHsm", {
                get: $util.oneOfGetter($oneOfFields = ["hydratedHsm"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new HighlyStructuredMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.HighlyStructuredMessage
             * @static
             * @param {E2E.Message.IHighlyStructuredMessage=} [properties] Properties to set
             * @returns {E2E.Message.HighlyStructuredMessage} HighlyStructuredMessage instance
             */
            HighlyStructuredMessage.create = function create(properties) {
                return new HighlyStructuredMessage(properties);
            };

            /**
             * Encodes the specified HighlyStructuredMessage message. Does not implicitly {@link E2E.Message.HighlyStructuredMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.HighlyStructuredMessage
             * @static
             * @param {E2E.Message.IHighlyStructuredMessage} message HighlyStructuredMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HighlyStructuredMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.namespace != null && Object.hasOwnProperty.call(message, "namespace"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.namespace);
                if (message.elementName != null && Object.hasOwnProperty.call(message, "elementName"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.elementName);
                if (message.params != null && message.params.length)
                    for (var i = 0; i < message.params.length; ++i)
                        writer.uint32(/* id 3, wireType 2 =*/26).string(message.params[i]);
                if (message.fallbackLg != null && Object.hasOwnProperty.call(message, "fallbackLg"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.fallbackLg);
                if (message.fallbackLc != null && Object.hasOwnProperty.call(message, "fallbackLc"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.fallbackLc);
                if (message.localizableParams != null && message.localizableParams.length)
                    for (var i = 0; i < message.localizableParams.length; ++i)
                        $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.encode(message.localizableParams[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                if (message.deterministicLg != null && Object.hasOwnProperty.call(message, "deterministicLg"))
                    writer.uint32(/* id 7, wireType 2 =*/58).string(message.deterministicLg);
                if (message.deterministicLc != null && Object.hasOwnProperty.call(message, "deterministicLc"))
                    writer.uint32(/* id 8, wireType 2 =*/66).string(message.deterministicLc);
                if (message.hydratedHsm != null && Object.hasOwnProperty.call(message, "hydratedHsm"))
                    $root.E2E.Message.TemplateMessage.encode(message.hydratedHsm, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified HighlyStructuredMessage message, length delimited. Does not implicitly {@link E2E.Message.HighlyStructuredMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.HighlyStructuredMessage
             * @static
             * @param {E2E.Message.IHighlyStructuredMessage} message HighlyStructuredMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HighlyStructuredMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a HighlyStructuredMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.HighlyStructuredMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.HighlyStructuredMessage} HighlyStructuredMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HighlyStructuredMessage.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.E2E.Message.HighlyStructuredMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.namespace = reader.string();
                            break;
                        }
                    case 2: {
                            message.elementName = reader.string();
                            break;
                        }
                    case 3: {
                            if (!(message.params && message.params.length))
                                message.params = [];
                            message.params.push(reader.string());
                            break;
                        }
                    case 4: {
                            message.fallbackLg = reader.string();
                            break;
                        }
                    case 5: {
                            message.fallbackLc = reader.string();
                            break;
                        }
                    case 6: {
                            if (!(message.localizableParams && message.localizableParams.length))
                                message.localizableParams = [];
                            message.localizableParams.push($root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.decode(reader, reader.uint32()));
                            break;
                        }
                    case 7: {
                            message.deterministicLg = reader.string();
                            break;
                        }
                    case 8: {
                            message.deterministicLc = reader.string();
                            break;
                        }
                    case 9: {
                            message.hydratedHsm = $root.E2E.Message.TemplateMessage.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a HighlyStructuredMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.HighlyStructuredMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.HighlyStructuredMessage} HighlyStructuredMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HighlyStructuredMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a HighlyStructuredMessage message.
             * @function verify
             * @memberof E2E.Message.HighlyStructuredMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            HighlyStructuredMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.namespace != null && message.hasOwnProperty("namespace")) {
                    properties._namespace = 1;
                    if (!$util.isString(message.namespace))
                        return "namespace: string expected";
                }
                if (message.elementName != null && message.hasOwnProperty("elementName")) {
                    properties._elementName = 1;
                    if (!$util.isString(message.elementName))
                        return "elementName: string expected";
                }
                if (message.params != null && message.hasOwnProperty("params")) {
                    if (!Array.isArray(message.params))
                        return "params: array expected";
                    for (var i = 0; i < message.params.length; ++i)
                        if (!$util.isString(message.params[i]))
                            return "params: string[] expected";
                }
                if (message.fallbackLg != null && message.hasOwnProperty("fallbackLg")) {
                    properties._fallbackLg = 1;
                    if (!$util.isString(message.fallbackLg))
                        return "fallbackLg: string expected";
                }
                if (message.fallbackLc != null && message.hasOwnProperty("fallbackLc")) {
                    properties._fallbackLc = 1;
                    if (!$util.isString(message.fallbackLc))
                        return "fallbackLc: string expected";
                }
                if (message.localizableParams != null && message.hasOwnProperty("localizableParams")) {
                    if (!Array.isArray(message.localizableParams))
                        return "localizableParams: array expected";
                    for (var i = 0; i < message.localizableParams.length; ++i) {
                        var error = $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.verify(message.localizableParams[i]);
                        if (error)
                            return "localizableParams." + error;
                    }
                }
                if (message.deterministicLg != null && message.hasOwnProperty("deterministicLg")) {
                    properties._deterministicLg = 1;
                    if (!$util.isString(message.deterministicLg))
                        return "deterministicLg: string expected";
                }
                if (message.deterministicLc != null && message.hasOwnProperty("deterministicLc")) {
                    properties._deterministicLc = 1;
                    if (!$util.isString(message.deterministicLc))
                        return "deterministicLc: string expected";
                }
                if (message.hydratedHsm != null && message.hasOwnProperty("hydratedHsm")) {
                    properties._hydratedHsm = 1;
                    {
                        var error = $root.E2E.Message.TemplateMessage.verify(message.hydratedHsm);
                        if (error)
                            return "hydratedHsm." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a HighlyStructuredMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.HighlyStructuredMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.HighlyStructuredMessage} HighlyStructuredMessage
             */
            HighlyStructuredMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.HighlyStructuredMessage)
                    return object;
                var message = new $root.E2E.Message.HighlyStructuredMessage();
                if (object.namespace != null)
                    message.namespace = String(object.namespace);
                if (object.elementName != null)
                    message.elementName = String(object.elementName);
                if (object.params) {
                    if (!Array.isArray(object.params))
                        throw TypeError(".E2E.Message.HighlyStructuredMessage.params: array expected");
                    message.params = [];
                    for (var i = 0; i < object.params.length; ++i)
                        message.params[i] = String(object.params[i]);
                }
                if (object.fallbackLg != null)
                    message.fallbackLg = String(object.fallbackLg);
                if (object.fallbackLc != null)
                    message.fallbackLc = String(object.fallbackLc);
                if (object.localizableParams) {
                    if (!Array.isArray(object.localizableParams))
                        throw TypeError(".E2E.Message.HighlyStructuredMessage.localizableParams: array expected");
                    message.localizableParams = [];
                    for (var i = 0; i < object.localizableParams.length; ++i) {
                        if (typeof object.localizableParams[i] !== "object")
                            throw TypeError(".E2E.Message.HighlyStructuredMessage.localizableParams: object expected");
                        message.localizableParams[i] = $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.fromObject(object.localizableParams[i]);
                    }
                }
                if (object.deterministicLg != null)
                    message.deterministicLg = String(object.deterministicLg);
                if (object.deterministicLc != null)
                    message.deterministicLc = String(object.deterministicLc);
                if (object.hydratedHsm != null) {
                    if (typeof object.hydratedHsm !== "object")
                        throw TypeError(".E2E.Message.HighlyStructuredMessage.hydratedHsm: object expected");
                    message.hydratedHsm = $root.E2E.Message.TemplateMessage.fromObject(object.hydratedHsm);
                }
                return message;
            };

            /**
             * Creates a plain object from a HighlyStructuredMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.HighlyStructuredMessage
             * @static
             * @param {E2E.Message.HighlyStructuredMessage} message HighlyStructuredMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            HighlyStructuredMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults) {
                    object.params = [];
                    object.localizableParams = [];
                }
                if (message.namespace != null && message.hasOwnProperty("namespace")) {
                    object.namespace = message.namespace;
                    if (options.oneofs)
                        object._namespace = "namespace";
                }
                if (message.elementName != null && message.hasOwnProperty("elementName")) {
                    object.elementName = message.elementName;
                    if (options.oneofs)
                        object._elementName = "elementName";
                }
                if (message.params && message.params.length) {
                    object.params = [];
                    for (var j = 0; j < message.params.length; ++j)
                        object.params[j] = message.params[j];
                }
                if (message.fallbackLg != null && message.hasOwnProperty("fallbackLg")) {
                    object.fallbackLg = message.fallbackLg;
                    if (options.oneofs)
                        object._fallbackLg = "fallbackLg";
                }
                if (message.fallbackLc != null && message.hasOwnProperty("fallbackLc")) {
                    object.fallbackLc = message.fallbackLc;
                    if (options.oneofs)
                        object._fallbackLc = "fallbackLc";
                }
                if (message.localizableParams && message.localizableParams.length) {
                    object.localizableParams = [];
                    for (var j = 0; j < message.localizableParams.length; ++j)
                        object.localizableParams[j] = $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.toObject(message.localizableParams[j], options);
                }
                if (message.deterministicLg != null && message.hasOwnProperty("deterministicLg")) {
                    object.deterministicLg = message.deterministicLg;
                    if (options.oneofs)
                        object._deterministicLg = "deterministicLg";
                }
                if (message.deterministicLc != null && message.hasOwnProperty("deterministicLc")) {
                    object.deterministicLc = message.deterministicLc;
                    if (options.oneofs)
                        object._deterministicLc = "deterministicLc";
                }
                if (message.hydratedHsm != null && message.hasOwnProperty("hydratedHsm")) {
                    object.hydratedHsm = $root.E2E.Message.TemplateMessage.toObject(message.hydratedHsm, options);
                    if (options.oneofs)
                        object._hydratedHsm = "hydratedHsm";
                }
                return object;
            };

            /**
             * Converts this HighlyStructuredMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.HighlyStructuredMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            HighlyStructuredMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for HighlyStructuredMessage
             * @function getTypeUrl
             * @memberof E2E.Message.HighlyStructuredMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            HighlyStructuredMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.HighlyStructuredMessage";
            };

            HighlyStructuredMessage.HSMLocalizableParameter = (function() {

                /**
                 * Properties of a HSMLocalizableParameter.
                 * @memberof E2E.Message.HighlyStructuredMessage
                 * @interface IHSMLocalizableParameter
                 * @property {string|null} ["default"] HSMLocalizableParameter default
                 * @property {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency|null} [currency] HSMLocalizableParameter currency
                 * @property {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMDateTime|null} [dateTime] HSMLocalizableParameter dateTime
                 */

                /**
                 * Constructs a new HSMLocalizableParameter.
                 * @memberof E2E.Message.HighlyStructuredMessage
                 * @classdesc Represents a HSMLocalizableParameter.
                 * @implements IHSMLocalizableParameter
                 * @constructor
                 * @param {E2E.Message.HighlyStructuredMessage.IHSMLocalizableParameter=} [properties] Properties to set
                 */
                function HSMLocalizableParameter(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]];
                }

                /**
                 * HSMLocalizableParameter default.
                 * @member {string|null|undefined} default
                 * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                 * @instance
                 */
                HSMLocalizableParameter.prototype["default"] = null;

                /**
                 * HSMLocalizableParameter currency.
                 * @member {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency|null|undefined} currency
                 * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                 * @instance
                 */
                HSMLocalizableParameter.prototype.currency = null;

                /**
                 * HSMLocalizableParameter dateTime.
                 * @member {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMDateTime|null|undefined} dateTime
                 * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                 * @instance
                 */
                HSMLocalizableParameter.prototype.dateTime = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * HSMLocalizableParameter _default.
                 * @member {"default"|undefined} _default
                 * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                 * @instance
                 */
                Object.defineProperty(HSMLocalizableParameter.prototype, "_default", {
                    get: $util.oneOfGetter($oneOfFields = ["default"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * HSMLocalizableParameter paramOneof.
                 * @member {"currency"|"dateTime"|undefined} paramOneof
                 * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                 * @instance
                 */
                Object.defineProperty(HSMLocalizableParameter.prototype, "paramOneof", {
                    get: $util.oneOfGetter($oneOfFields = ["currency", "dateTime"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new HSMLocalizableParameter instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                 * @static
                 * @param {E2E.Message.HighlyStructuredMessage.IHSMLocalizableParameter=} [properties] Properties to set
                 * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter} HSMLocalizableParameter instance
                 */
                HSMLocalizableParameter.create = function create(properties) {
                    return new HSMLocalizableParameter(properties);
                };

                /**
                 * Encodes the specified HSMLocalizableParameter message. Does not implicitly {@link E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                 * @static
                 * @param {E2E.Message.HighlyStructuredMessage.IHSMLocalizableParameter} message HSMLocalizableParameter message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                HSMLocalizableParameter.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message["default"] != null && Object.hasOwnProperty.call(message, "default"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message["default"]);
                    if (message.currency != null && Object.hasOwnProperty.call(message, "currency"))
                        $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency.encode(message.currency, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    if (message.dateTime != null && Object.hasOwnProperty.call(message, "dateTime"))
                        $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.encode(message.dateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                    return writer;
                };

                /**
                 * Encodes the specified HSMLocalizableParameter message, length delimited. Does not implicitly {@link E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                 * @static
                 * @param {E2E.Message.HighlyStructuredMessage.IHSMLocalizableParameter} message HSMLocalizableParameter message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                HSMLocalizableParameter.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a HSMLocalizableParameter message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter} HSMLocalizableParameter
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                HSMLocalizableParameter.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.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message["default"] = reader.string();
                                break;
                            }
                        case 2: {
                                message.currency = $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency.decode(reader, reader.uint32());
                                break;
                            }
                        case 3: {
                                message.dateTime = $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a HSMLocalizableParameter message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter} HSMLocalizableParameter
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                HSMLocalizableParameter.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a HSMLocalizableParameter message.
                 * @function verify
                 * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                HSMLocalizableParameter.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message["default"] != null && message.hasOwnProperty("default")) {
                        properties._default = 1;
                        if (!$util.isString(message["default"]))
                            return "default: string expected";
                    }
                    if (message.currency != null && message.hasOwnProperty("currency")) {
                        properties.paramOneof = 1;
                        {
                            var error = $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency.verify(message.currency);
                            if (error)
                                return "currency." + error;
                        }
                    }
                    if (message.dateTime != null && message.hasOwnProperty("dateTime")) {
                        if (properties.paramOneof === 1)
                            return "paramOneof: multiple values";
                        properties.paramOneof = 1;
                        {
                            var error = $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.verify(message.dateTime);
                            if (error)
                                return "dateTime." + error;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a HSMLocalizableParameter message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter} HSMLocalizableParameter
                 */
                HSMLocalizableParameter.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter)
                        return object;
                    var message = new $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter();
                    if (object["default"] != null)
                        message["default"] = String(object["default"]);
                    if (object.currency != null) {
                        if (typeof object.currency !== "object")
                            throw TypeError(".E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.currency: object expected");
                        message.currency = $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency.fromObject(object.currency);
                    }
                    if (object.dateTime != null) {
                        if (typeof object.dateTime !== "object")
                            throw TypeError(".E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.dateTime: object expected");
                        message.dateTime = $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.fromObject(object.dateTime);
                    }
                    return message;
                };

                /**
                 * Creates a plain object from a HSMLocalizableParameter message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                 * @static
                 * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter} message HSMLocalizableParameter
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                HSMLocalizableParameter.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message["default"] != null && message.hasOwnProperty("default")) {
                        object["default"] = message["default"];
                        if (options.oneofs)
                            object._default = "default";
                    }
                    if (message.currency != null && message.hasOwnProperty("currency")) {
                        object.currency = $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency.toObject(message.currency, options);
                        if (options.oneofs)
                            object.paramOneof = "currency";
                    }
                    if (message.dateTime != null && message.hasOwnProperty("dateTime")) {
                        object.dateTime = $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.toObject(message.dateTime, options);
                        if (options.oneofs)
                            object.paramOneof = "dateTime";
                    }
                    return object;
                };

                /**
                 * Converts this HSMLocalizableParameter to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                HSMLocalizableParameter.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for HSMLocalizableParameter
                 * @function getTypeUrl
                 * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                HSMLocalizableParameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter";
                };

                HSMLocalizableParameter.HSMCurrency = (function() {

                    /**
                     * Properties of a HSMCurrency.
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                     * @interface IHSMCurrency
                     * @property {string|null} [currencyCode] HSMCurrency currencyCode
                     * @property {number|Long|null} [amount1000] HSMCurrency amount1000
                     */

                    /**
                     * Constructs a new HSMCurrency.
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                     * @classdesc Represents a HSMCurrency.
                     * @implements IHSMCurrency
                     * @constructor
                     * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency=} [properties] Properties to set
                     */
                    function HSMCurrency(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]];
                    }

                    /**
                     * HSMCurrency currencyCode.
                     * @member {string|null|undefined} currencyCode
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency
                     * @instance
                     */
                    HSMCurrency.prototype.currencyCode = null;

                    /**
                     * HSMCurrency amount1000.
                     * @member {number|Long|null|undefined} amount1000
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency
                     * @instance
                     */
                    HSMCurrency.prototype.amount1000 = null;

                    // OneOf field names bound to virtual getters and setters
                    var $oneOfFields;

                    /**
                     * HSMCurrency _currencyCode.
                     * @member {"currencyCode"|undefined} _currencyCode
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency
                     * @instance
                     */
                    Object.defineProperty(HSMCurrency.prototype, "_currencyCode", {
                        get: $util.oneOfGetter($oneOfFields = ["currencyCode"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * HSMCurrency _amount1000.
                     * @member {"amount1000"|undefined} _amount1000
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency
                     * @instance
                     */
                    Object.defineProperty(HSMCurrency.prototype, "_amount1000", {
                        get: $util.oneOfGetter($oneOfFields = ["amount1000"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * Creates a new HSMCurrency instance using the specified properties.
                     * @function create
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency
                     * @static
                     * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency=} [properties] Properties to set
                     * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency} HSMCurrency instance
                     */
                    HSMCurrency.create = function create(properties) {
                        return new HSMCurrency(properties);
                    };

                    /**
                     * Encodes the specified HSMCurrency message. Does not implicitly {@link E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency.verify|verify} messages.
                     * @function encode
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency
                     * @static
                     * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency} message HSMCurrency message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    HSMCurrency.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode"))
                            writer.uint32(/* id 1, wireType 2 =*/10).string(message.currencyCode);
                        if (message.amount1000 != null && Object.hasOwnProperty.call(message, "amount1000"))
                            writer.uint32(/* id 2, wireType 0 =*/16).int64(message.amount1000);
                        return writer;
                    };

                    /**
                     * Encodes the specified HSMCurrency message, length delimited. Does not implicitly {@link E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency
                     * @static
                     * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency} message HSMCurrency message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    HSMCurrency.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a HSMCurrency message from the specified reader or buffer.
                     * @function decode
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency} HSMCurrency
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    HSMCurrency.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.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            if (tag === error)
                                break;
                            switch (tag >>> 3) {
                            case 1: {
                                    message.currencyCode = reader.string();
                                    break;
                                }
                            case 2: {
                                    message.amount1000 = reader.int64();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a HSMCurrency message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency} HSMCurrency
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    HSMCurrency.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a HSMCurrency message.
                     * @function verify
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    HSMCurrency.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        var properties = {};
                        if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) {
                            properties._currencyCode = 1;
                            if (!$util.isString(message.currencyCode))
                                return "currencyCode: string expected";
                        }
                        if (message.amount1000 != null && message.hasOwnProperty("amount1000")) {
                            properties._amount1000 = 1;
                            if (!$util.isInteger(message.amount1000) && !(message.amount1000 && $util.isInteger(message.amount1000.low) && $util.isInteger(message.amount1000.high)))
                                return "amount1000: integer|Long expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a HSMCurrency message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency} HSMCurrency
                     */
                    HSMCurrency.fromObject = function fromObject(object) {
                        if (object instanceof $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency)
                            return object;
                        var message = new $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency();
                        if (object.currencyCode != null)
                            message.currencyCode = String(object.currencyCode);
                        if (object.amount1000 != null)
                            if ($util.Long)
                                (message.amount1000 = $util.Long.fromValue(object.amount1000)).unsigned = false;
                            else if (typeof object.amount1000 === "string")
                                message.amount1000 = parseInt(object.amount1000, 10);
                            else if (typeof object.amount1000 === "number")
                                message.amount1000 = object.amount1000;
                            else if (typeof object.amount1000 === "object")
                                message.amount1000 = new $util.LongBits(object.amount1000.low >>> 0, object.amount1000.high >>> 0).toNumber();
                        return message;
                    };

                    /**
                     * Creates a plain object from a HSMCurrency message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency
                     * @static
                     * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency} message HSMCurrency
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    HSMCurrency.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) {
                            object.currencyCode = message.currencyCode;
                            if (options.oneofs)
                                object._currencyCode = "currencyCode";
                        }
                        if (message.amount1000 != null && message.hasOwnProperty("amount1000")) {
                            if (typeof message.amount1000 === "number")
                                object.amount1000 = options.longs === String ? String(message.amount1000) : message.amount1000;
                            else
                                object.amount1000 = options.longs === String ? $util.Long.prototype.toString.call(message.amount1000) : options.longs === Number ? new $util.LongBits(message.amount1000.low >>> 0, message.amount1000.high >>> 0).toNumber() : message.amount1000;
                            if (options.oneofs)
                                object._amount1000 = "amount1000";
                        }
                        return object;
                    };

                    /**
                     * Converts this HSMCurrency to JSON.
                     * @function toJSON
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    HSMCurrency.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for HSMCurrency
                     * @function getTypeUrl
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    HSMCurrency.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency";
                    };

                    return HSMCurrency;
                })();

                HSMLocalizableParameter.HSMDateTime = (function() {

                    /**
                     * Properties of a HSMDateTime.
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                     * @interface IHSMDateTime
                     * @property {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent|null} [component] HSMDateTime component
                     * @property {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch|null} [unixEpoch] HSMDateTime unixEpoch
                     */

                    /**
                     * Constructs a new HSMDateTime.
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter
                     * @classdesc Represents a HSMDateTime.
                     * @implements IHSMDateTime
                     * @constructor
                     * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMDateTime=} [properties] Properties to set
                     */
                    function HSMDateTime(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]];
                    }

                    /**
                     * HSMDateTime component.
                     * @member {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent|null|undefined} component
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime
                     * @instance
                     */
                    HSMDateTime.prototype.component = null;

                    /**
                     * HSMDateTime unixEpoch.
                     * @member {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch|null|undefined} unixEpoch
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime
                     * @instance
                     */
                    HSMDateTime.prototype.unixEpoch = null;

                    // OneOf field names bound to virtual getters and setters
                    var $oneOfFields;

                    /**
                     * HSMDateTime datetimeOneof.
                     * @member {"component"|"unixEpoch"|undefined} datetimeOneof
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime
                     * @instance
                     */
                    Object.defineProperty(HSMDateTime.prototype, "datetimeOneof", {
                        get: $util.oneOfGetter($oneOfFields = ["component", "unixEpoch"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * Creates a new HSMDateTime instance using the specified properties.
                     * @function create
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime
                     * @static
                     * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMDateTime=} [properties] Properties to set
                     * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime} HSMDateTime instance
                     */
                    HSMDateTime.create = function create(properties) {
                        return new HSMDateTime(properties);
                    };

                    /**
                     * Encodes the specified HSMDateTime message. Does not implicitly {@link E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.verify|verify} messages.
                     * @function encode
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime
                     * @static
                     * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMDateTime} message HSMDateTime message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    HSMDateTime.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.component != null && Object.hasOwnProperty.call(message, "component"))
                            $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.encode(message.component, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                        if (message.unixEpoch != null && Object.hasOwnProperty.call(message, "unixEpoch"))
                            $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch.encode(message.unixEpoch, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                        return writer;
                    };

                    /**
                     * Encodes the specified HSMDateTime message, length delimited. Does not implicitly {@link E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime
                     * @static
                     * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMDateTime} message HSMDateTime message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    HSMDateTime.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a HSMDateTime message from the specified reader or buffer.
                     * @function decode
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime} HSMDateTime
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    HSMDateTime.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.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            if (tag === error)
                                break;
                            switch (tag >>> 3) {
                            case 1: {
                                    message.component = $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.decode(reader, reader.uint32());
                                    break;
                                }
                            case 2: {
                                    message.unixEpoch = $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch.decode(reader, reader.uint32());
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a HSMDateTime message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime} HSMDateTime
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    HSMDateTime.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a HSMDateTime message.
                     * @function verify
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    HSMDateTime.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        var properties = {};
                        if (message.component != null && message.hasOwnProperty("component")) {
                            properties.datetimeOneof = 1;
                            {
                                var error = $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.verify(message.component);
                                if (error)
                                    return "component." + error;
                            }
                        }
                        if (message.unixEpoch != null && message.hasOwnProperty("unixEpoch")) {
                            if (properties.datetimeOneof === 1)
                                return "datetimeOneof: multiple values";
                            properties.datetimeOneof = 1;
                            {
                                var error = $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch.verify(message.unixEpoch);
                                if (error)
                                    return "unixEpoch." + error;
                            }
                        }
                        return null;
                    };

                    /**
                     * Creates a HSMDateTime message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime} HSMDateTime
                     */
                    HSMDateTime.fromObject = function fromObject(object) {
                        if (object instanceof $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime)
                            return object;
                        var message = new $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime();
                        if (object.component != null) {
                            if (typeof object.component !== "object")
                                throw TypeError(".E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.component: object expected");
                            message.component = $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.fromObject(object.component);
                        }
                        if (object.unixEpoch != null) {
                            if (typeof object.unixEpoch !== "object")
                                throw TypeError(".E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.unixEpoch: object expected");
                            message.unixEpoch = $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch.fromObject(object.unixEpoch);
                        }
                        return message;
                    };

                    /**
                     * Creates a plain object from a HSMDateTime message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime
                     * @static
                     * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime} message HSMDateTime
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    HSMDateTime.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (message.component != null && message.hasOwnProperty("component")) {
                            object.component = $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.toObject(message.component, options);
                            if (options.oneofs)
                                object.datetimeOneof = "component";
                        }
                        if (message.unixEpoch != null && message.hasOwnProperty("unixEpoch")) {
                            object.unixEpoch = $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch.toObject(message.unixEpoch, options);
                            if (options.oneofs)
                                object.datetimeOneof = "unixEpoch";
                        }
                        return object;
                    };

                    /**
                     * Converts this HSMDateTime to JSON.
                     * @function toJSON
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    HSMDateTime.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for HSMDateTime
                     * @function getTypeUrl
                     * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    HSMDateTime.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime";
                    };

                    HSMDateTime.HSMDateTimeComponent = (function() {

                        /**
                         * Properties of a HSMDateTimeComponent.
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime
                         * @interface IHSMDateTimeComponent
                         * @property {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType|null} [dayOfWeek] HSMDateTimeComponent dayOfWeek
                         * @property {number|null} [year] HSMDateTimeComponent year
                         * @property {number|null} [month] HSMDateTimeComponent month
                         * @property {number|null} [dayOfMonth] HSMDateTimeComponent dayOfMonth
                         * @property {number|null} [hour] HSMDateTimeComponent hour
                         * @property {number|null} [minute] HSMDateTimeComponent minute
                         * @property {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType|null} [calendar] HSMDateTimeComponent calendar
                         */

                        /**
                         * Constructs a new HSMDateTimeComponent.
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime
                         * @classdesc Represents a HSMDateTimeComponent.
                         * @implements IHSMDateTimeComponent
                         * @constructor
                         * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent=} [properties] Properties to set
                         */
                        function HSMDateTimeComponent(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]];
                        }

                        /**
                         * HSMDateTimeComponent dayOfWeek.
                         * @member {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType|null|undefined} dayOfWeek
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        HSMDateTimeComponent.prototype.dayOfWeek = null;

                        /**
                         * HSMDateTimeComponent year.
                         * @member {number|null|undefined} year
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        HSMDateTimeComponent.prototype.year = null;

                        /**
                         * HSMDateTimeComponent month.
                         * @member {number|null|undefined} month
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        HSMDateTimeComponent.prototype.month = null;

                        /**
                         * HSMDateTimeComponent dayOfMonth.
                         * @member {number|null|undefined} dayOfMonth
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        HSMDateTimeComponent.prototype.dayOfMonth = null;

                        /**
                         * HSMDateTimeComponent hour.
                         * @member {number|null|undefined} hour
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        HSMDateTimeComponent.prototype.hour = null;

                        /**
                         * HSMDateTimeComponent minute.
                         * @member {number|null|undefined} minute
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        HSMDateTimeComponent.prototype.minute = null;

                        /**
                         * HSMDateTimeComponent calendar.
                         * @member {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType|null|undefined} calendar
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        HSMDateTimeComponent.prototype.calendar = null;

                        // OneOf field names bound to virtual getters and setters
                        var $oneOfFields;

                        /**
                         * HSMDateTimeComponent _dayOfWeek.
                         * @member {"dayOfWeek"|undefined} _dayOfWeek
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        Object.defineProperty(HSMDateTimeComponent.prototype, "_dayOfWeek", {
                            get: $util.oneOfGetter($oneOfFields = ["dayOfWeek"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });

                        /**
                         * HSMDateTimeComponent _year.
                         * @member {"year"|undefined} _year
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        Object.defineProperty(HSMDateTimeComponent.prototype, "_year", {
                            get: $util.oneOfGetter($oneOfFields = ["year"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });

                        /**
                         * HSMDateTimeComponent _month.
                         * @member {"month"|undefined} _month
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        Object.defineProperty(HSMDateTimeComponent.prototype, "_month", {
                            get: $util.oneOfGetter($oneOfFields = ["month"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });

                        /**
                         * HSMDateTimeComponent _dayOfMonth.
                         * @member {"dayOfMonth"|undefined} _dayOfMonth
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        Object.defineProperty(HSMDateTimeComponent.prototype, "_dayOfMonth", {
                            get: $util.oneOfGetter($oneOfFields = ["dayOfMonth"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });

                        /**
                         * HSMDateTimeComponent _hour.
                         * @member {"hour"|undefined} _hour
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        Object.defineProperty(HSMDateTimeComponent.prototype, "_hour", {
                            get: $util.oneOfGetter($oneOfFields = ["hour"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });

                        /**
                         * HSMDateTimeComponent _minute.
                         * @member {"minute"|undefined} _minute
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        Object.defineProperty(HSMDateTimeComponent.prototype, "_minute", {
                            get: $util.oneOfGetter($oneOfFields = ["minute"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });

                        /**
                         * HSMDateTimeComponent _calendar.
                         * @member {"calendar"|undefined} _calendar
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         */
                        Object.defineProperty(HSMDateTimeComponent.prototype, "_calendar", {
                            get: $util.oneOfGetter($oneOfFields = ["calendar"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });

                        /**
                         * Creates a new HSMDateTimeComponent instance using the specified properties.
                         * @function create
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @static
                         * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent=} [properties] Properties to set
                         * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent} HSMDateTimeComponent instance
                         */
                        HSMDateTimeComponent.create = function create(properties) {
                            return new HSMDateTimeComponent(properties);
                        };

                        /**
                         * Encodes the specified HSMDateTimeComponent message. Does not implicitly {@link E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.verify|verify} messages.
                         * @function encode
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @static
                         * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent} message HSMDateTimeComponent message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        HSMDateTimeComponent.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dayOfWeek);
                            if (message.year != null && Object.hasOwnProperty.call(message, "year"))
                                writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.year);
                            if (message.month != null && Object.hasOwnProperty.call(message, "month"))
                                writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.month);
                            if (message.dayOfMonth != null && Object.hasOwnProperty.call(message, "dayOfMonth"))
                                writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.dayOfMonth);
                            if (message.hour != null && Object.hasOwnProperty.call(message, "hour"))
                                writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.hour);
                            if (message.minute != null && Object.hasOwnProperty.call(message, "minute"))
                                writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.minute);
                            if (message.calendar != null && Object.hasOwnProperty.call(message, "calendar"))
                                writer.uint32(/* id 7, wireType 0 =*/56).int32(message.calendar);
                            return writer;
                        };

                        /**
                         * Encodes the specified HSMDateTimeComponent message, length delimited. Does not implicitly {@link E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @static
                         * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent} message HSMDateTimeComponent message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        HSMDateTimeComponent.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };

                        /**
                         * Decodes a HSMDateTimeComponent message from the specified reader or buffer.
                         * @function decode
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent} HSMDateTimeComponent
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        HSMDateTimeComponent.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.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                if (tag === error)
                                    break;
                                switch (tag >>> 3) {
                                case 1: {
                                        message.dayOfWeek = reader.int32();
                                        break;
                                    }
                                case 2: {
                                        message.year = reader.uint32();
                                        break;
                                    }
                                case 3: {
                                        message.month = reader.uint32();
                                        break;
                                    }
                                case 4: {
                                        message.dayOfMonth = reader.uint32();
                                        break;
                                    }
                                case 5: {
                                        message.hour = reader.uint32();
                                        break;
                                    }
                                case 6: {
                                        message.minute = reader.uint32();
                                        break;
                                    }
                                case 7: {
                                        message.calendar = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };

                        /**
                         * Decodes a HSMDateTimeComponent message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent} HSMDateTimeComponent
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        HSMDateTimeComponent.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };

                        /**
                         * Verifies a HSMDateTimeComponent message.
                         * @function verify
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        HSMDateTimeComponent.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            var properties = {};
                            if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) {
                                properties._dayOfWeek = 1;
                                switch (message.dayOfWeek) {
                                default:
                                    return "dayOfWeek: enum value expected";
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                case 6:
                                case 7:
                                    break;
                                }
                            }
                            if (message.year != null && message.hasOwnProperty("year")) {
                                properties._year = 1;
                                if (!$util.isInteger(message.year))
                                    return "year: integer expected";
                            }
                            if (message.month != null && message.hasOwnProperty("month")) {
                                properties._month = 1;
                                if (!$util.isInteger(message.month))
                                    return "month: integer expected";
                            }
                            if (message.dayOfMonth != null && message.hasOwnProperty("dayOfMonth")) {
                                properties._dayOfMonth = 1;
                                if (!$util.isInteger(message.dayOfMonth))
                                    return "dayOfMonth: integer expected";
                            }
                            if (message.hour != null && message.hasOwnProperty("hour")) {
                                properties._hour = 1;
                                if (!$util.isInteger(message.hour))
                                    return "hour: integer expected";
                            }
                            if (message.minute != null && message.hasOwnProperty("minute")) {
                                properties._minute = 1;
                                if (!$util.isInteger(message.minute))
                                    return "minute: integer expected";
                            }
                            if (message.calendar != null && message.hasOwnProperty("calendar")) {
                                properties._calendar = 1;
                                switch (message.calendar) {
                                default:
                                    return "calendar: enum value expected";
                                case 1:
                                case 2:
                                    break;
                                }
                            }
                            return null;
                        };

                        /**
                         * Creates a HSMDateTimeComponent message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent} HSMDateTimeComponent
                         */
                        HSMDateTimeComponent.fromObject = function fromObject(object) {
                            if (object instanceof $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent)
                                return object;
                            var message = new $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent();
                            switch (object.dayOfWeek) {
                            default:
                                if (typeof object.dayOfWeek === "number") {
                                    message.dayOfWeek = object.dayOfWeek;
                                    break;
                                }
                                break;
                            case "MONDAY":
                            case 1:
                                message.dayOfWeek = 1;
                                break;
                            case "TUESDAY":
                            case 2:
                                message.dayOfWeek = 2;
                                break;
                            case "WEDNESDAY":
                            case 3:
                                message.dayOfWeek = 3;
                                break;
                            case "THURSDAY":
                            case 4:
                                message.dayOfWeek = 4;
                                break;
                            case "FRIDAY":
                            case 5:
                                message.dayOfWeek = 5;
                                break;
                            case "SATURDAY":
                            case 6:
                                message.dayOfWeek = 6;
                                break;
                            case "SUNDAY":
                            case 7:
                                message.dayOfWeek = 7;
                                break;
                            }
                            if (object.year != null)
                                message.year = object.year >>> 0;
                            if (object.month != null)
                                message.month = object.month >>> 0;
                            if (object.dayOfMonth != null)
                                message.dayOfMonth = object.dayOfMonth >>> 0;
                            if (object.hour != null)
                                message.hour = object.hour >>> 0;
                            if (object.minute != null)
                                message.minute = object.minute >>> 0;
                            switch (object.calendar) {
                            default:
                                if (typeof object.calendar === "number") {
                                    message.calendar = object.calendar;
                                    break;
                                }
                                break;
                            case "GREGORIAN":
                            case 1:
                                message.calendar = 1;
                                break;
                            case "SOLAR_HIJRI":
                            case 2:
                                message.calendar = 2;
                                break;
                            }
                            return message;
                        };

                        /**
                         * Creates a plain object from a HSMDateTimeComponent message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @static
                         * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent} message HSMDateTimeComponent
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        HSMDateTimeComponent.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) {
                                object.dayOfWeek = options.enums === String ? $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType[message.dayOfWeek] === undefined ? message.dayOfWeek : $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType[message.dayOfWeek] : message.dayOfWeek;
                                if (options.oneofs)
                                    object._dayOfWeek = "dayOfWeek";
                            }
                            if (message.year != null && message.hasOwnProperty("year")) {
                                object.year = message.year;
                                if (options.oneofs)
                                    object._year = "year";
                            }
                            if (message.month != null && message.hasOwnProperty("month")) {
                                object.month = message.month;
                                if (options.oneofs)
                                    object._month = "month";
                            }
                            if (message.dayOfMonth != null && message.hasOwnProperty("dayOfMonth")) {
                                object.dayOfMonth = message.dayOfMonth;
                                if (options.oneofs)
                                    object._dayOfMonth = "dayOfMonth";
                            }
                            if (message.hour != null && message.hasOwnProperty("hour")) {
                                object.hour = message.hour;
                                if (options.oneofs)
                                    object._hour = "hour";
                            }
                            if (message.minute != null && message.hasOwnProperty("minute")) {
                                object.minute = message.minute;
                                if (options.oneofs)
                                    object._minute = "minute";
                            }
                            if (message.calendar != null && message.hasOwnProperty("calendar")) {
                                object.calendar = options.enums === String ? $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType[message.calendar] === undefined ? message.calendar : $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType[message.calendar] : message.calendar;
                                if (options.oneofs)
                                    object._calendar = "calendar";
                            }
                            return object;
                        };

                        /**
                         * Converts this HSMDateTimeComponent to JSON.
                         * @function toJSON
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        HSMDateTimeComponent.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };

                        /**
                         * Gets the default type url for HSMDateTimeComponent
                         * @function getTypeUrl
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        HSMDateTimeComponent.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent";
                        };

                        /**
                         * CalendarType enum.
                         * @name E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType
                         * @enum {number}
                         * @property {number} GREGORIAN=1 GREGORIAN value
                         * @property {number} SOLAR_HIJRI=2 SOLAR_HIJRI value
                         */
                        HSMDateTimeComponent.CalendarType = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[1] = "GREGORIAN"] = 1;
                            values[valuesById[2] = "SOLAR_HIJRI"] = 2;
                            return values;
                        })();

                        /**
                         * DayOfWeekType enum.
                         * @name E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType
                         * @enum {number}
                         * @property {number} MONDAY=1 MONDAY value
                         * @property {number} TUESDAY=2 TUESDAY value
                         * @property {number} WEDNESDAY=3 WEDNESDAY value
                         * @property {number} THURSDAY=4 THURSDAY value
                         * @property {number} FRIDAY=5 FRIDAY value
                         * @property {number} SATURDAY=6 SATURDAY value
                         * @property {number} SUNDAY=7 SUNDAY value
                         */
                        HSMDateTimeComponent.DayOfWeekType = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[1] = "MONDAY"] = 1;
                            values[valuesById[2] = "TUESDAY"] = 2;
                            values[valuesById[3] = "WEDNESDAY"] = 3;
                            values[valuesById[4] = "THURSDAY"] = 4;
                            values[valuesById[5] = "FRIDAY"] = 5;
                            values[valuesById[6] = "SATURDAY"] = 6;
                            values[valuesById[7] = "SUNDAY"] = 7;
                            return values;
                        })();

                        return HSMDateTimeComponent;
                    })();

                    HSMDateTime.HSMDateTimeUnixEpoch = (function() {

                        /**
                         * Properties of a HSMDateTimeUnixEpoch.
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime
                         * @interface IHSMDateTimeUnixEpoch
                         * @property {number|Long|null} [timestamp] HSMDateTimeUnixEpoch timestamp
                         */

                        /**
                         * Constructs a new HSMDateTimeUnixEpoch.
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime
                         * @classdesc Represents a HSMDateTimeUnixEpoch.
                         * @implements IHSMDateTimeUnixEpoch
                         * @constructor
                         * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch=} [properties] Properties to set
                         */
                        function HSMDateTimeUnixEpoch(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]];
                        }

                        /**
                         * HSMDateTimeUnixEpoch timestamp.
                         * @member {number|Long|null|undefined} timestamp
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch
                         * @instance
                         */
                        HSMDateTimeUnixEpoch.prototype.timestamp = null;

                        // OneOf field names bound to virtual getters and setters
                        var $oneOfFields;

                        /**
                         * HSMDateTimeUnixEpoch _timestamp.
                         * @member {"timestamp"|undefined} _timestamp
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch
                         * @instance
                         */
                        Object.defineProperty(HSMDateTimeUnixEpoch.prototype, "_timestamp", {
                            get: $util.oneOfGetter($oneOfFields = ["timestamp"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });

                        /**
                         * Creates a new HSMDateTimeUnixEpoch instance using the specified properties.
                         * @function create
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch
                         * @static
                         * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch=} [properties] Properties to set
                         * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch} HSMDateTimeUnixEpoch instance
                         */
                        HSMDateTimeUnixEpoch.create = function create(properties) {
                            return new HSMDateTimeUnixEpoch(properties);
                        };

                        /**
                         * Encodes the specified HSMDateTimeUnixEpoch message. Does not implicitly {@link E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch.verify|verify} messages.
                         * @function encode
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch
                         * @static
                         * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch} message HSMDateTimeUnixEpoch message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        HSMDateTimeUnixEpoch.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int64(message.timestamp);
                            return writer;
                        };

                        /**
                         * Encodes the specified HSMDateTimeUnixEpoch message, length delimited. Does not implicitly {@link E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch
                         * @static
                         * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch} message HSMDateTimeUnixEpoch message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        HSMDateTimeUnixEpoch.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };

                        /**
                         * Decodes a HSMDateTimeUnixEpoch message from the specified reader or buffer.
                         * @function decode
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch} HSMDateTimeUnixEpoch
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        HSMDateTimeUnixEpoch.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.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                if (tag === error)
                                    break;
                                switch (tag >>> 3) {
                                case 1: {
                                        message.timestamp = reader.int64();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };

                        /**
                         * Decodes a HSMDateTimeUnixEpoch message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch} HSMDateTimeUnixEpoch
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        HSMDateTimeUnixEpoch.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };

                        /**
                         * Verifies a HSMDateTimeUnixEpoch message.
                         * @function verify
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        HSMDateTimeUnixEpoch.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            var properties = {};
                            if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
                                properties._timestamp = 1;
                                if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
                                    return "timestamp: integer|Long expected";
                            }
                            return null;
                        };

                        /**
                         * Creates a HSMDateTimeUnixEpoch message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch} HSMDateTimeUnixEpoch
                         */
                        HSMDateTimeUnixEpoch.fromObject = function fromObject(object) {
                            if (object instanceof $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch)
                                return object;
                            var message = new $root.E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch();
                            if (object.timestamp != null)
                                if ($util.Long)
                                    (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false;
                                else if (typeof object.timestamp === "string")
                                    message.timestamp = parseInt(object.timestamp, 10);
                                else if (typeof object.timestamp === "number")
                                    message.timestamp = object.timestamp;
                                else if (typeof object.timestamp === "object")
                                    message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber();
                            return message;
                        };

                        /**
                         * Creates a plain object from a HSMDateTimeUnixEpoch message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch
                         * @static
                         * @param {E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch} message HSMDateTimeUnixEpoch
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        HSMDateTimeUnixEpoch.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
                                if (typeof message.timestamp === "number")
                                    object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
                                else
                                    object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp;
                                if (options.oneofs)
                                    object._timestamp = "timestamp";
                            }
                            return object;
                        };

                        /**
                         * Converts this HSMDateTimeUnixEpoch to JSON.
                         * @function toJSON
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        HSMDateTimeUnixEpoch.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };

                        /**
                         * Gets the default type url for HSMDateTimeUnixEpoch
                         * @function getTypeUrl
                         * @memberof E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        HSMDateTimeUnixEpoch.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/E2E.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch";
                        };

                        return HSMDateTimeUnixEpoch;
                    })();

                    return HSMDateTime;
                })();

                return HSMLocalizableParameter;
            })();

            return HighlyStructuredMessage;
        })();

        Message.HistorySyncMessageAccessStatus = (function() {

            /**
             * Properties of a HistorySyncMessageAccessStatus.
             * @memberof E2E.Message
             * @interface IHistorySyncMessageAccessStatus
             * @property {boolean|null} [completeAccessGranted] HistorySyncMessageAccessStatus completeAccessGranted
             */

            /**
             * Constructs a new HistorySyncMessageAccessStatus.
             * @memberof E2E.Message
             * @classdesc Represents a HistorySyncMessageAccessStatus.
             * @implements IHistorySyncMessageAccessStatus
             * @constructor
             * @param {E2E.Message.IHistorySyncMessageAccessStatus=} [properties] Properties to set
             */
            function HistorySyncMessageAccessStatus(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]];
            }

            /**
             * HistorySyncMessageAccessStatus completeAccessGranted.
             * @member {boolean|null|undefined} completeAccessGranted
             * @memberof E2E.Message.HistorySyncMessageAccessStatus
             * @instance
             */
            HistorySyncMessageAccessStatus.prototype.completeAccessGranted = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * HistorySyncMessageAccessStatus _completeAccessGranted.
             * @member {"completeAccessGranted"|undefined} _completeAccessGranted
             * @memberof E2E.Message.HistorySyncMessageAccessStatus
             * @instance
             */
            Object.defineProperty(HistorySyncMessageAccessStatus.prototype, "_completeAccessGranted", {
                get: $util.oneOfGetter($oneOfFields = ["completeAccessGranted"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new HistorySyncMessageAccessStatus instance using the specified properties.
             * @function create
             * @memberof E2E.Message.HistorySyncMessageAccessStatus
             * @static
             * @param {E2E.Message.IHistorySyncMessageAccessStatus=} [properties] Properties to set
             * @returns {E2E.Message.HistorySyncMessageAccessStatus} HistorySyncMessageAccessStatus instance
             */
            HistorySyncMessageAccessStatus.create = function create(properties) {
                return new HistorySyncMessageAccessStatus(properties);
            };

            /**
             * Encodes the specified HistorySyncMessageAccessStatus message. Does not implicitly {@link E2E.Message.HistorySyncMessageAccessStatus.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.HistorySyncMessageAccessStatus
             * @static
             * @param {E2E.Message.IHistorySyncMessageAccessStatus} message HistorySyncMessageAccessStatus message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HistorySyncMessageAccessStatus.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.completeAccessGranted != null && Object.hasOwnProperty.call(message, "completeAccessGranted"))
                    writer.uint32(/* id 1, wireType 0 =*/8).bool(message.completeAccessGranted);
                return writer;
            };

            /**
             * Encodes the specified HistorySyncMessageAccessStatus message, length delimited. Does not implicitly {@link E2E.Message.HistorySyncMessageAccessStatus.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.HistorySyncMessageAccessStatus
             * @static
             * @param {E2E.Message.IHistorySyncMessageAccessStatus} message HistorySyncMessageAccessStatus message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HistorySyncMessageAccessStatus.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a HistorySyncMessageAccessStatus message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.HistorySyncMessageAccessStatus
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.HistorySyncMessageAccessStatus} HistorySyncMessageAccessStatus
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HistorySyncMessageAccessStatus.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.E2E.Message.HistorySyncMessageAccessStatus();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.completeAccessGranted = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a HistorySyncMessageAccessStatus message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.HistorySyncMessageAccessStatus
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.HistorySyncMessageAccessStatus} HistorySyncMessageAccessStatus
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HistorySyncMessageAccessStatus.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a HistorySyncMessageAccessStatus message.
             * @function verify
             * @memberof E2E.Message.HistorySyncMessageAccessStatus
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            HistorySyncMessageAccessStatus.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.completeAccessGranted != null && message.hasOwnProperty("completeAccessGranted")) {
                    properties._completeAccessGranted = 1;
                    if (typeof message.completeAccessGranted !== "boolean")
                        return "completeAccessGranted: boolean expected";
                }
                return null;
            };

            /**
             * Creates a HistorySyncMessageAccessStatus message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.HistorySyncMessageAccessStatus
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.HistorySyncMessageAccessStatus} HistorySyncMessageAccessStatus
             */
            HistorySyncMessageAccessStatus.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.HistorySyncMessageAccessStatus)
                    return object;
                var message = new $root.E2E.Message.HistorySyncMessageAccessStatus();
                if (object.completeAccessGranted != null)
                    message.completeAccessGranted = Boolean(object.completeAccessGranted);
                return message;
            };

            /**
             * Creates a plain object from a HistorySyncMessageAccessStatus message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.HistorySyncMessageAccessStatus
             * @static
             * @param {E2E.Message.HistorySyncMessageAccessStatus} message HistorySyncMessageAccessStatus
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            HistorySyncMessageAccessStatus.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.completeAccessGranted != null && message.hasOwnProperty("completeAccessGranted")) {
                    object.completeAccessGranted = message.completeAccessGranted;
                    if (options.oneofs)
                        object._completeAccessGranted = "completeAccessGranted";
                }
                return object;
            };

            /**
             * Converts this HistorySyncMessageAccessStatus to JSON.
             * @function toJSON
             * @memberof E2E.Message.HistorySyncMessageAccessStatus
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            HistorySyncMessageAccessStatus.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for HistorySyncMessageAccessStatus
             * @function getTypeUrl
             * @memberof E2E.Message.HistorySyncMessageAccessStatus
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            HistorySyncMessageAccessStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.HistorySyncMessageAccessStatus";
            };

            return HistorySyncMessageAccessStatus;
        })();

        Message.HistorySyncNotification = (function() {

            /**
             * Properties of a HistorySyncNotification.
             * @memberof E2E.Message
             * @interface IHistorySyncNotification
             * @property {Uint8Array|null} [fileSha256] HistorySyncNotification fileSha256
             * @property {number|Long|null} [fileLength] HistorySyncNotification fileLength
             * @property {Uint8Array|null} [mediaKey] HistorySyncNotification mediaKey
             * @property {Uint8Array|null} [fileEncSha256] HistorySyncNotification fileEncSha256
             * @property {string|null} [directPath] HistorySyncNotification directPath
             * @property {E2E.Message.HistorySyncType|null} [syncType] HistorySyncNotification syncType
             * @property {number|null} [chunkOrder] HistorySyncNotification chunkOrder
             * @property {string|null} [originalMessageId] HistorySyncNotification originalMessageId
             * @property {number|null} [progress] HistorySyncNotification progress
             * @property {number|Long|null} [oldestMsgInChunkTimestampSec] HistorySyncNotification oldestMsgInChunkTimestampSec
             * @property {Uint8Array|null} [initialHistBootstrapInlinePayload] HistorySyncNotification initialHistBootstrapInlinePayload
             * @property {string|null} [peerDataRequestSessionId] HistorySyncNotification peerDataRequestSessionId
             * @property {E2E.Message.IFullHistorySyncOnDemandRequestMetadata|null} [fullHistorySyncOnDemandRequestMetadata] HistorySyncNotification fullHistorySyncOnDemandRequestMetadata
             * @property {string|null} [encHandle] HistorySyncNotification encHandle
             * @property {E2E.Message.IHistorySyncMessageAccessStatus|null} [messageAccessStatus] HistorySyncNotification messageAccessStatus
             */

            /**
             * Constructs a new HistorySyncNotification.
             * @memberof E2E.Message
             * @classdesc Represents a HistorySyncNotification.
             * @implements IHistorySyncNotification
             * @constructor
             * @param {E2E.Message.IHistorySyncNotification=} [properties] Properties to set
             */
            function HistorySyncNotification(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]];
            }

            /**
             * HistorySyncNotification fileSha256.
             * @member {Uint8Array|null|undefined} fileSha256
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.fileSha256 = null;

            /**
             * HistorySyncNotification fileLength.
             * @member {number|Long|null|undefined} fileLength
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.fileLength = null;

            /**
             * HistorySyncNotification mediaKey.
             * @member {Uint8Array|null|undefined} mediaKey
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.mediaKey = null;

            /**
             * HistorySyncNotification fileEncSha256.
             * @member {Uint8Array|null|undefined} fileEncSha256
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.fileEncSha256 = null;

            /**
             * HistorySyncNotification directPath.
             * @member {string|null|undefined} directPath
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.directPath = null;

            /**
             * HistorySyncNotification syncType.
             * @member {E2E.Message.HistorySyncType|null|undefined} syncType
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.syncType = null;

            /**
             * HistorySyncNotification chunkOrder.
             * @member {number|null|undefined} chunkOrder
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.chunkOrder = null;

            /**
             * HistorySyncNotification originalMessageId.
             * @member {string|null|undefined} originalMessageId
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.originalMessageId = null;

            /**
             * HistorySyncNotification progress.
             * @member {number|null|undefined} progress
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.progress = null;

            /**
             * HistorySyncNotification oldestMsgInChunkTimestampSec.
             * @member {number|Long|null|undefined} oldestMsgInChunkTimestampSec
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.oldestMsgInChunkTimestampSec = null;

            /**
             * HistorySyncNotification initialHistBootstrapInlinePayload.
             * @member {Uint8Array|null|undefined} initialHistBootstrapInlinePayload
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.initialHistBootstrapInlinePayload = null;

            /**
             * HistorySyncNotification peerDataRequestSessionId.
             * @member {string|null|undefined} peerDataRequestSessionId
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.peerDataRequestSessionId = null;

            /**
             * HistorySyncNotification fullHistorySyncOnDemandRequestMetadata.
             * @member {E2E.Message.IFullHistorySyncOnDemandRequestMetadata|null|undefined} fullHistorySyncOnDemandRequestMetadata
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.fullHistorySyncOnDemandRequestMetadata = null;

            /**
             * HistorySyncNotification encHandle.
             * @member {string|null|undefined} encHandle
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.encHandle = null;

            /**
             * HistorySyncNotification messageAccessStatus.
             * @member {E2E.Message.IHistorySyncMessageAccessStatus|null|undefined} messageAccessStatus
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            HistorySyncNotification.prototype.messageAccessStatus = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * HistorySyncNotification _fileSha256.
             * @member {"fileSha256"|undefined} _fileSha256
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            Object.defineProperty(HistorySyncNotification.prototype, "_fileSha256", {
                get: $util.oneOfGetter($oneOfFields = ["fileSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncNotification _fileLength.
             * @member {"fileLength"|undefined} _fileLength
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            Object.defineProperty(HistorySyncNotification.prototype, "_fileLength", {
                get: $util.oneOfGetter($oneOfFields = ["fileLength"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncNotification _mediaKey.
             * @member {"mediaKey"|undefined} _mediaKey
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            Object.defineProperty(HistorySyncNotification.prototype, "_mediaKey", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncNotification _fileEncSha256.
             * @member {"fileEncSha256"|undefined} _fileEncSha256
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            Object.defineProperty(HistorySyncNotification.prototype, "_fileEncSha256", {
                get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncNotification _directPath.
             * @member {"directPath"|undefined} _directPath
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            Object.defineProperty(HistorySyncNotification.prototype, "_directPath", {
                get: $util.oneOfGetter($oneOfFields = ["directPath"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncNotification _syncType.
             * @member {"syncType"|undefined} _syncType
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            Object.defineProperty(HistorySyncNotification.prototype, "_syncType", {
                get: $util.oneOfGetter($oneOfFields = ["syncType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncNotification _chunkOrder.
             * @member {"chunkOrder"|undefined} _chunkOrder
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            Object.defineProperty(HistorySyncNotification.prototype, "_chunkOrder", {
                get: $util.oneOfGetter($oneOfFields = ["chunkOrder"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncNotification _originalMessageId.
             * @member {"originalMessageId"|undefined} _originalMessageId
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            Object.defineProperty(HistorySyncNotification.prototype, "_originalMessageId", {
                get: $util.oneOfGetter($oneOfFields = ["originalMessageId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncNotification _progress.
             * @member {"progress"|undefined} _progress
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            Object.defineProperty(HistorySyncNotification.prototype, "_progress", {
                get: $util.oneOfGetter($oneOfFields = ["progress"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncNotification _oldestMsgInChunkTimestampSec.
             * @member {"oldestMsgInChunkTimestampSec"|undefined} _oldestMsgInChunkTimestampSec
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            Object.defineProperty(HistorySyncNotification.prototype, "_oldestMsgInChunkTimestampSec", {
                get: $util.oneOfGetter($oneOfFields = ["oldestMsgInChunkTimestampSec"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncNotification _initialHistBootstrapInlinePayload.
             * @member {"initialHistBootstrapInlinePayload"|undefined} _initialHistBootstrapInlinePayload
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            Object.defineProperty(HistorySyncNotification.prototype, "_initialHistBootstrapInlinePayload", {
                get: $util.oneOfGetter($oneOfFields = ["initialHistBootstrapInlinePayload"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncNotification _peerDataRequestSessionId.
             * @member {"peerDataRequestSessionId"|undefined} _peerDataRequestSessionId
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            Object.defineProperty(HistorySyncNotification.prototype, "_peerDataRequestSessionId", {
                get: $util.oneOfGetter($oneOfFields = ["peerDataRequestSessionId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncNotification _fullHistorySyncOnDemandRequestMetadata.
             * @member {"fullHistorySyncOnDemandRequestMetadata"|undefined} _fullHistorySyncOnDemandRequestMetadata
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            Object.defineProperty(HistorySyncNotification.prototype, "_fullHistorySyncOnDemandRequestMetadata", {
                get: $util.oneOfGetter($oneOfFields = ["fullHistorySyncOnDemandRequestMetadata"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncNotification _encHandle.
             * @member {"encHandle"|undefined} _encHandle
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            Object.defineProperty(HistorySyncNotification.prototype, "_encHandle", {
                get: $util.oneOfGetter($oneOfFields = ["encHandle"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncNotification _messageAccessStatus.
             * @member {"messageAccessStatus"|undefined} _messageAccessStatus
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             */
            Object.defineProperty(HistorySyncNotification.prototype, "_messageAccessStatus", {
                get: $util.oneOfGetter($oneOfFields = ["messageAccessStatus"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new HistorySyncNotification instance using the specified properties.
             * @function create
             * @memberof E2E.Message.HistorySyncNotification
             * @static
             * @param {E2E.Message.IHistorySyncNotification=} [properties] Properties to set
             * @returns {E2E.Message.HistorySyncNotification} HistorySyncNotification instance
             */
            HistorySyncNotification.create = function create(properties) {
                return new HistorySyncNotification(properties);
            };

            /**
             * Encodes the specified HistorySyncNotification message. Does not implicitly {@link E2E.Message.HistorySyncNotification.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.HistorySyncNotification
             * @static
             * @param {E2E.Message.IHistorySyncNotification} message HistorySyncNotification message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HistorySyncNotification.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256"))
                    writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.fileSha256);
                if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength"))
                    writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.fileLength);
                if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey"))
                    writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.mediaKey);
                if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256"))
                    writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.fileEncSha256);
                if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.directPath);
                if (message.syncType != null && Object.hasOwnProperty.call(message, "syncType"))
                    writer.uint32(/* id 6, wireType 0 =*/48).int32(message.syncType);
                if (message.chunkOrder != null && Object.hasOwnProperty.call(message, "chunkOrder"))
                    writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.chunkOrder);
                if (message.originalMessageId != null && Object.hasOwnProperty.call(message, "originalMessageId"))
                    writer.uint32(/* id 8, wireType 2 =*/66).string(message.originalMessageId);
                if (message.progress != null && Object.hasOwnProperty.call(message, "progress"))
                    writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.progress);
                if (message.oldestMsgInChunkTimestampSec != null && Object.hasOwnProperty.call(message, "oldestMsgInChunkTimestampSec"))
                    writer.uint32(/* id 10, wireType 0 =*/80).int64(message.oldestMsgInChunkTimestampSec);
                if (message.initialHistBootstrapInlinePayload != null && Object.hasOwnProperty.call(message, "initialHistBootstrapInlinePayload"))
                    writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.initialHistBootstrapInlinePayload);
                if (message.peerDataRequestSessionId != null && Object.hasOwnProperty.call(message, "peerDataRequestSessionId"))
                    writer.uint32(/* id 12, wireType 2 =*/98).string(message.peerDataRequestSessionId);
                if (message.fullHistorySyncOnDemandRequestMetadata != null && Object.hasOwnProperty.call(message, "fullHistorySyncOnDemandRequestMetadata"))
                    $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.encode(message.fullHistorySyncOnDemandRequestMetadata, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
                if (message.encHandle != null && Object.hasOwnProperty.call(message, "encHandle"))
                    writer.uint32(/* id 14, wireType 2 =*/114).string(message.encHandle);
                if (message.messageAccessStatus != null && Object.hasOwnProperty.call(message, "messageAccessStatus"))
                    $root.E2E.Message.HistorySyncMessageAccessStatus.encode(message.messageAccessStatus, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified HistorySyncNotification message, length delimited. Does not implicitly {@link E2E.Message.HistorySyncNotification.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.HistorySyncNotification
             * @static
             * @param {E2E.Message.IHistorySyncNotification} message HistorySyncNotification message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HistorySyncNotification.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a HistorySyncNotification message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.HistorySyncNotification
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.HistorySyncNotification} HistorySyncNotification
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HistorySyncNotification.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.E2E.Message.HistorySyncNotification();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.fileSha256 = reader.bytes();
                            break;
                        }
                    case 2: {
                            message.fileLength = reader.uint64();
                            break;
                        }
                    case 3: {
                            message.mediaKey = reader.bytes();
                            break;
                        }
                    case 4: {
                            message.fileEncSha256 = reader.bytes();
                            break;
                        }
                    case 5: {
                            message.directPath = reader.string();
                            break;
                        }
                    case 6: {
                            message.syncType = reader.int32();
                            break;
                        }
                    case 7: {
                            message.chunkOrder = reader.uint32();
                            break;
                        }
                    case 8: {
                            message.originalMessageId = reader.string();
                            break;
                        }
                    case 9: {
                            message.progress = reader.uint32();
                            break;
                        }
                    case 10: {
                            message.oldestMsgInChunkTimestampSec = reader.int64();
                            break;
                        }
                    case 11: {
                            message.initialHistBootstrapInlinePayload = reader.bytes();
                            break;
                        }
                    case 12: {
                            message.peerDataRequestSessionId = reader.string();
                            break;
                        }
                    case 13: {
                            message.fullHistorySyncOnDemandRequestMetadata = $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    case 14: {
                            message.encHandle = reader.string();
                            break;
                        }
                    case 15: {
                            message.messageAccessStatus = $root.E2E.Message.HistorySyncMessageAccessStatus.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a HistorySyncNotification message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.HistorySyncNotification
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.HistorySyncNotification} HistorySyncNotification
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HistorySyncNotification.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a HistorySyncNotification message.
             * @function verify
             * @memberof E2E.Message.HistorySyncNotification
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            HistorySyncNotification.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                    properties._fileSha256 = 1;
                    if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                        return "fileSha256: buffer expected";
                }
                if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                    properties._fileLength = 1;
                    if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high)))
                        return "fileLength: integer|Long expected";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    properties._mediaKey = 1;
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                }
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                    properties._fileEncSha256 = 1;
                    if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                        return "fileEncSha256: buffer expected";
                }
                if (message.directPath != null && message.hasOwnProperty("directPath")) {
                    properties._directPath = 1;
                    if (!$util.isString(message.directPath))
                        return "directPath: string expected";
                }
                if (message.syncType != null && message.hasOwnProperty("syncType")) {
                    properties._syncType = 1;
                    switch (message.syncType) {
                    default:
                        return "syncType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                        break;
                    }
                }
                if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) {
                    properties._chunkOrder = 1;
                    if (!$util.isInteger(message.chunkOrder))
                        return "chunkOrder: integer expected";
                }
                if (message.originalMessageId != null && message.hasOwnProperty("originalMessageId")) {
                    properties._originalMessageId = 1;
                    if (!$util.isString(message.originalMessageId))
                        return "originalMessageId: string expected";
                }
                if (message.progress != null && message.hasOwnProperty("progress")) {
                    properties._progress = 1;
                    if (!$util.isInteger(message.progress))
                        return "progress: integer expected";
                }
                if (message.oldestMsgInChunkTimestampSec != null && message.hasOwnProperty("oldestMsgInChunkTimestampSec")) {
                    properties._oldestMsgInChunkTimestampSec = 1;
                    if (!$util.isInteger(message.oldestMsgInChunkTimestampSec) && !(message.oldestMsgInChunkTimestampSec && $util.isInteger(message.oldestMsgInChunkTimestampSec.low) && $util.isInteger(message.oldestMsgInChunkTimestampSec.high)))
                        return "oldestMsgInChunkTimestampSec: integer|Long expected";
                }
                if (message.initialHistBootstrapInlinePayload != null && message.hasOwnProperty("initialHistBootstrapInlinePayload")) {
                    properties._initialHistBootstrapInlinePayload = 1;
                    if (!(message.initialHistBootstrapInlinePayload && typeof message.initialHistBootstrapInlinePayload.length === "number" || $util.isString(message.initialHistBootstrapInlinePayload)))
                        return "initialHistBootstrapInlinePayload: buffer expected";
                }
                if (message.peerDataRequestSessionId != null && message.hasOwnProperty("peerDataRequestSessionId")) {
                    properties._peerDataRequestSessionId = 1;
                    if (!$util.isString(message.peerDataRequestSessionId))
                        return "peerDataRequestSessionId: string expected";
                }
                if (message.fullHistorySyncOnDemandRequestMetadata != null && message.hasOwnProperty("fullHistorySyncOnDemandRequestMetadata")) {
                    properties._fullHistorySyncOnDemandRequestMetadata = 1;
                    {
                        var error = $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.verify(message.fullHistorySyncOnDemandRequestMetadata);
                        if (error)
                            return "fullHistorySyncOnDemandRequestMetadata." + error;
                    }
                }
                if (message.encHandle != null && message.hasOwnProperty("encHandle")) {
                    properties._encHandle = 1;
                    if (!$util.isString(message.encHandle))
                        return "encHandle: string expected";
                }
                if (message.messageAccessStatus != null && message.hasOwnProperty("messageAccessStatus")) {
                    properties._messageAccessStatus = 1;
                    {
                        var error = $root.E2E.Message.HistorySyncMessageAccessStatus.verify(message.messageAccessStatus);
                        if (error)
                            return "messageAccessStatus." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a HistorySyncNotification message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.HistorySyncNotification
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.HistorySyncNotification} HistorySyncNotification
             */
            HistorySyncNotification.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.HistorySyncNotification)
                    return object;
                var message = new $root.E2E.Message.HistorySyncNotification();
                if (object.fileSha256 != null)
                    if (typeof object.fileSha256 === "string")
                        $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0);
                    else if (object.fileSha256.length >= 0)
                        message.fileSha256 = object.fileSha256;
                if (object.fileLength != null)
                    if ($util.Long)
                        (message.fileLength = $util.Long.fromValue(object.fileLength)).unsigned = true;
                    else if (typeof object.fileLength === "string")
                        message.fileLength = parseInt(object.fileLength, 10);
                    else if (typeof object.fileLength === "number")
                        message.fileLength = object.fileLength;
                    else if (typeof object.fileLength === "object")
                        message.fileLength = new $util.LongBits(object.fileLength.low >>> 0, object.fileLength.high >>> 0).toNumber(true);
                if (object.mediaKey != null)
                    if (typeof object.mediaKey === "string")
                        $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0);
                    else if (object.mediaKey.length >= 0)
                        message.mediaKey = object.mediaKey;
                if (object.fileEncSha256 != null)
                    if (typeof object.fileEncSha256 === "string")
                        $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0);
                    else if (object.fileEncSha256.length >= 0)
                        message.fileEncSha256 = object.fileEncSha256;
                if (object.directPath != null)
                    message.directPath = String(object.directPath);
                switch (object.syncType) {
                default:
                    if (typeof object.syncType === "number") {
                        message.syncType = object.syncType;
                        break;
                    }
                    break;
                case "INITIAL_BOOTSTRAP":
                case 0:
                    message.syncType = 0;
                    break;
                case "INITIAL_STATUS_V3":
                case 1:
                    message.syncType = 1;
                    break;
                case "FULL":
                case 2:
                    message.syncType = 2;
                    break;
                case "RECENT":
                case 3:
                    message.syncType = 3;
                    break;
                case "PUSH_NAME":
                case 4:
                    message.syncType = 4;
                    break;
                case "NON_BLOCKING_DATA":
                case 5:
                    message.syncType = 5;
                    break;
                case "ON_DEMAND":
                case 6:
                    message.syncType = 6;
                    break;
                case "NO_HISTORY":
                case 7:
                    message.syncType = 7;
                    break;
                case "MESSAGE_ACCESS_STATUS":
                case 8:
                    message.syncType = 8;
                    break;
                }
                if (object.chunkOrder != null)
                    message.chunkOrder = object.chunkOrder >>> 0;
                if (object.originalMessageId != null)
                    message.originalMessageId = String(object.originalMessageId);
                if (object.progress != null)
                    message.progress = object.progress >>> 0;
                if (object.oldestMsgInChunkTimestampSec != null)
                    if ($util.Long)
                        (message.oldestMsgInChunkTimestampSec = $util.Long.fromValue(object.oldestMsgInChunkTimestampSec)).unsigned = false;
                    else if (typeof object.oldestMsgInChunkTimestampSec === "string")
                        message.oldestMsgInChunkTimestampSec = parseInt(object.oldestMsgInChunkTimestampSec, 10);
                    else if (typeof object.oldestMsgInChunkTimestampSec === "number")
                        message.oldestMsgInChunkTimestampSec = object.oldestMsgInChunkTimestampSec;
                    else if (typeof object.oldestMsgInChunkTimestampSec === "object")
                        message.oldestMsgInChunkTimestampSec = new $util.LongBits(object.oldestMsgInChunkTimestampSec.low >>> 0, object.oldestMsgInChunkTimestampSec.high >>> 0).toNumber();
                if (object.initialHistBootstrapInlinePayload != null)
                    if (typeof object.initialHistBootstrapInlinePayload === "string")
                        $util.base64.decode(object.initialHistBootstrapInlinePayload, message.initialHistBootstrapInlinePayload = $util.newBuffer($util.base64.length(object.initialHistBootstrapInlinePayload)), 0);
                    else if (object.initialHistBootstrapInlinePayload.length >= 0)
                        message.initialHistBootstrapInlinePayload = object.initialHistBootstrapInlinePayload;
                if (object.peerDataRequestSessionId != null)
                    message.peerDataRequestSessionId = String(object.peerDataRequestSessionId);
                if (object.fullHistorySyncOnDemandRequestMetadata != null) {
                    if (typeof object.fullHistorySyncOnDemandRequestMetadata !== "object")
                        throw TypeError(".E2E.Message.HistorySyncNotification.fullHistorySyncOnDemandRequestMetadata: object expected");
                    message.fullHistorySyncOnDemandRequestMetadata = $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.fromObject(object.fullHistorySyncOnDemandRequestMetadata);
                }
                if (object.encHandle != null)
                    message.encHandle = String(object.encHandle);
                if (object.messageAccessStatus != null) {
                    if (typeof object.messageAccessStatus !== "object")
                        throw TypeError(".E2E.Message.HistorySyncNotification.messageAccessStatus: object expected");
                    message.messageAccessStatus = $root.E2E.Message.HistorySyncMessageAccessStatus.fromObject(object.messageAccessStatus);
                }
                return message;
            };

            /**
             * Creates a plain object from a HistorySyncNotification message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.HistorySyncNotification
             * @static
             * @param {E2E.Message.HistorySyncNotification} message HistorySyncNotification
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            HistorySyncNotification.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                    object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256;
                    if (options.oneofs)
                        object._fileSha256 = "fileSha256";
                }
                if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                    if (typeof message.fileLength === "number")
                        object.fileLength = options.longs === String ? String(message.fileLength) : message.fileLength;
                    else
                        object.fileLength = options.longs === String ? $util.Long.prototype.toString.call(message.fileLength) : options.longs === Number ? new $util.LongBits(message.fileLength.low >>> 0, message.fileLength.high >>> 0).toNumber(true) : message.fileLength;
                    if (options.oneofs)
                        object._fileLength = "fileLength";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey;
                    if (options.oneofs)
                        object._mediaKey = "mediaKey";
                }
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                    object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256;
                    if (options.oneofs)
                        object._fileEncSha256 = "fileEncSha256";
                }
                if (message.directPath != null && message.hasOwnProperty("directPath")) {
                    object.directPath = message.directPath;
                    if (options.oneofs)
                        object._directPath = "directPath";
                }
                if (message.syncType != null && message.hasOwnProperty("syncType")) {
                    object.syncType = options.enums === String ? $root.E2E.Message.HistorySyncType[message.syncType] === undefined ? message.syncType : $root.E2E.Message.HistorySyncType[message.syncType] : message.syncType;
                    if (options.oneofs)
                        object._syncType = "syncType";
                }
                if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) {
                    object.chunkOrder = message.chunkOrder;
                    if (options.oneofs)
                        object._chunkOrder = "chunkOrder";
                }
                if (message.originalMessageId != null && message.hasOwnProperty("originalMessageId")) {
                    object.originalMessageId = message.originalMessageId;
                    if (options.oneofs)
                        object._originalMessageId = "originalMessageId";
                }
                if (message.progress != null && message.hasOwnProperty("progress")) {
                    object.progress = message.progress;
                    if (options.oneofs)
                        object._progress = "progress";
                }
                if (message.oldestMsgInChunkTimestampSec != null && message.hasOwnProperty("oldestMsgInChunkTimestampSec")) {
                    if (typeof message.oldestMsgInChunkTimestampSec === "number")
                        object.oldestMsgInChunkTimestampSec = options.longs === String ? String(message.oldestMsgInChunkTimestampSec) : message.oldestMsgInChunkTimestampSec;
                    else
                        object.oldestMsgInChunkTimestampSec = options.longs === String ? $util.Long.prototype.toString.call(message.oldestMsgInChunkTimestampSec) : options.longs === Number ? new $util.LongBits(message.oldestMsgInChunkTimestampSec.low >>> 0, message.oldestMsgInChunkTimestampSec.high >>> 0).toNumber() : message.oldestMsgInChunkTimestampSec;
                    if (options.oneofs)
                        object._oldestMsgInChunkTimestampSec = "oldestMsgInChunkTimestampSec";
                }
                if (message.initialHistBootstrapInlinePayload != null && message.hasOwnProperty("initialHistBootstrapInlinePayload")) {
                    object.initialHistBootstrapInlinePayload = options.bytes === String ? $util.base64.encode(message.initialHistBootstrapInlinePayload, 0, message.initialHistBootstrapInlinePayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.initialHistBootstrapInlinePayload) : message.initialHistBootstrapInlinePayload;
                    if (options.oneofs)
                        object._initialHistBootstrapInlinePayload = "initialHistBootstrapInlinePayload";
                }
                if (message.peerDataRequestSessionId != null && message.hasOwnProperty("peerDataRequestSessionId")) {
                    object.peerDataRequestSessionId = message.peerDataRequestSessionId;
                    if (options.oneofs)
                        object._peerDataRequestSessionId = "peerDataRequestSessionId";
                }
                if (message.fullHistorySyncOnDemandRequestMetadata != null && message.hasOwnProperty("fullHistorySyncOnDemandRequestMetadata")) {
                    object.fullHistorySyncOnDemandRequestMetadata = $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.toObject(message.fullHistorySyncOnDemandRequestMetadata, options);
                    if (options.oneofs)
                        object._fullHistorySyncOnDemandRequestMetadata = "fullHistorySyncOnDemandRequestMetadata";
                }
                if (message.encHandle != null && message.hasOwnProperty("encHandle")) {
                    object.encHandle = message.encHandle;
                    if (options.oneofs)
                        object._encHandle = "encHandle";
                }
                if (message.messageAccessStatus != null && message.hasOwnProperty("messageAccessStatus")) {
                    object.messageAccessStatus = $root.E2E.Message.HistorySyncMessageAccessStatus.toObject(message.messageAccessStatus, options);
                    if (options.oneofs)
                        object._messageAccessStatus = "messageAccessStatus";
                }
                return object;
            };

            /**
             * Converts this HistorySyncNotification to JSON.
             * @function toJSON
             * @memberof E2E.Message.HistorySyncNotification
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            HistorySyncNotification.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for HistorySyncNotification
             * @function getTypeUrl
             * @memberof E2E.Message.HistorySyncNotification
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            HistorySyncNotification.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.HistorySyncNotification";
            };

            return HistorySyncNotification;
        })();

        /**
         * HistorySyncType enum.
         * @name E2E.Message.HistorySyncType
         * @enum {number}
         * @property {number} INITIAL_BOOTSTRAP=0 INITIAL_BOOTSTRAP value
         * @property {number} INITIAL_STATUS_V3=1 INITIAL_STATUS_V3 value
         * @property {number} FULL=2 FULL value
         * @property {number} RECENT=3 RECENT value
         * @property {number} PUSH_NAME=4 PUSH_NAME value
         * @property {number} NON_BLOCKING_DATA=5 NON_BLOCKING_DATA value
         * @property {number} ON_DEMAND=6 ON_DEMAND value
         * @property {number} NO_HISTORY=7 NO_HISTORY value
         * @property {number} MESSAGE_ACCESS_STATUS=8 MESSAGE_ACCESS_STATUS value
         */
        Message.HistorySyncType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "INITIAL_BOOTSTRAP"] = 0;
            values[valuesById[1] = "INITIAL_STATUS_V3"] = 1;
            values[valuesById[2] = "FULL"] = 2;
            values[valuesById[3] = "RECENT"] = 3;
            values[valuesById[4] = "PUSH_NAME"] = 4;
            values[valuesById[5] = "NON_BLOCKING_DATA"] = 5;
            values[valuesById[6] = "ON_DEMAND"] = 6;
            values[valuesById[7] = "NO_HISTORY"] = 7;
            values[valuesById[8] = "MESSAGE_ACCESS_STATUS"] = 8;
            return values;
        })();

        Message.ImageMessage = (function() {

            /**
             * Properties of an ImageMessage.
             * @memberof E2E.Message
             * @interface IImageMessage
             * @property {string|null} [url] ImageMessage url
             * @property {string|null} [mimetype] ImageMessage mimetype
             * @property {string|null} [caption] ImageMessage caption
             * @property {Uint8Array|null} [fileSha256] ImageMessage fileSha256
             * @property {number|Long|null} [fileLength] ImageMessage fileLength
             * @property {number|null} [height] ImageMessage height
             * @property {number|null} [width] ImageMessage width
             * @property {Uint8Array|null} [mediaKey] ImageMessage mediaKey
             * @property {Uint8Array|null} [fileEncSha256] ImageMessage fileEncSha256
             * @property {Array.<E2E.IInteractiveAnnotation>|null} [interactiveAnnotations] ImageMessage interactiveAnnotations
             * @property {string|null} [directPath] ImageMessage directPath
             * @property {number|Long|null} [mediaKeyTimestamp] ImageMessage mediaKeyTimestamp
             * @property {Uint8Array|null} [jpegThumbnail] ImageMessage jpegThumbnail
             * @property {E2E.IContextInfo|null} [contextInfo] ImageMessage contextInfo
             * @property {Uint8Array|null} [firstScanSidecar] ImageMessage firstScanSidecar
             * @property {number|null} [firstScanLength] ImageMessage firstScanLength
             * @property {number|null} [experimentGroupId] ImageMessage experimentGroupId
             * @property {Uint8Array|null} [scansSidecar] ImageMessage scansSidecar
             * @property {Array.<number>|null} [scanLengths] ImageMessage scanLengths
             * @property {Uint8Array|null} [midQualityFileSha256] ImageMessage midQualityFileSha256
             * @property {Uint8Array|null} [midQualityFileEncSha256] ImageMessage midQualityFileEncSha256
             * @property {boolean|null} [viewOnce] ImageMessage viewOnce
             * @property {string|null} [thumbnailDirectPath] ImageMessage thumbnailDirectPath
             * @property {Uint8Array|null} [thumbnailSha256] ImageMessage thumbnailSha256
             * @property {Uint8Array|null} [thumbnailEncSha256] ImageMessage thumbnailEncSha256
             * @property {string|null} [staticUrl] ImageMessage staticUrl
             * @property {Array.<E2E.IInteractiveAnnotation>|null} [annotations] ImageMessage annotations
             * @property {E2E.Message.ImageMessage.ImageSourceType|null} [imageSourceType] ImageMessage imageSourceType
             * @property {string|null} [accessibilityLabel] ImageMessage accessibilityLabel
             * @property {E2E.Message.MediaKeyDomain|null} [mediaKeyDomain] ImageMessage mediaKeyDomain
             * @property {string|null} [qrUrl] ImageMessage qrUrl
             */

            /**
             * Constructs a new ImageMessage.
             * @memberof E2E.Message
             * @classdesc Represents an ImageMessage.
             * @implements IImageMessage
             * @constructor
             * @param {E2E.Message.IImageMessage=} [properties] Properties to set
             */
            function ImageMessage(properties) {
                this.interactiveAnnotations = [];
                this.scanLengths = [];
                this.annotations = [];
                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]];
            }

            /**
             * ImageMessage url.
             * @member {string|null|undefined} url
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.url = null;

            /**
             * ImageMessage mimetype.
             * @member {string|null|undefined} mimetype
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.mimetype = null;

            /**
             * ImageMessage caption.
             * @member {string|null|undefined} caption
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.caption = null;

            /**
             * ImageMessage fileSha256.
             * @member {Uint8Array|null|undefined} fileSha256
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.fileSha256 = null;

            /**
             * ImageMessage fileLength.
             * @member {number|Long|null|undefined} fileLength
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.fileLength = null;

            /**
             * ImageMessage height.
             * @member {number|null|undefined} height
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.height = null;

            /**
             * ImageMessage width.
             * @member {number|null|undefined} width
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.width = null;

            /**
             * ImageMessage mediaKey.
             * @member {Uint8Array|null|undefined} mediaKey
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.mediaKey = null;

            /**
             * ImageMessage fileEncSha256.
             * @member {Uint8Array|null|undefined} fileEncSha256
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.fileEncSha256 = null;

            /**
             * ImageMessage interactiveAnnotations.
             * @member {Array.<E2E.IInteractiveAnnotation>} interactiveAnnotations
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.interactiveAnnotations = $util.emptyArray;

            /**
             * ImageMessage directPath.
             * @member {string|null|undefined} directPath
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.directPath = null;

            /**
             * ImageMessage mediaKeyTimestamp.
             * @member {number|Long|null|undefined} mediaKeyTimestamp
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.mediaKeyTimestamp = null;

            /**
             * ImageMessage jpegThumbnail.
             * @member {Uint8Array|null|undefined} jpegThumbnail
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.jpegThumbnail = null;

            /**
             * ImageMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.contextInfo = null;

            /**
             * ImageMessage firstScanSidecar.
             * @member {Uint8Array|null|undefined} firstScanSidecar
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.firstScanSidecar = null;

            /**
             * ImageMessage firstScanLength.
             * @member {number|null|undefined} firstScanLength
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.firstScanLength = null;

            /**
             * ImageMessage experimentGroupId.
             * @member {number|null|undefined} experimentGroupId
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.experimentGroupId = null;

            /**
             * ImageMessage scansSidecar.
             * @member {Uint8Array|null|undefined} scansSidecar
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.scansSidecar = null;

            /**
             * ImageMessage scanLengths.
             * @member {Array.<number>} scanLengths
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.scanLengths = $util.emptyArray;

            /**
             * ImageMessage midQualityFileSha256.
             * @member {Uint8Array|null|undefined} midQualityFileSha256
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.midQualityFileSha256 = null;

            /**
             * ImageMessage midQualityFileEncSha256.
             * @member {Uint8Array|null|undefined} midQualityFileEncSha256
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.midQualityFileEncSha256 = null;

            /**
             * ImageMessage viewOnce.
             * @member {boolean|null|undefined} viewOnce
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.viewOnce = null;

            /**
             * ImageMessage thumbnailDirectPath.
             * @member {string|null|undefined} thumbnailDirectPath
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.thumbnailDirectPath = null;

            /**
             * ImageMessage thumbnailSha256.
             * @member {Uint8Array|null|undefined} thumbnailSha256
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.thumbnailSha256 = null;

            /**
             * ImageMessage thumbnailEncSha256.
             * @member {Uint8Array|null|undefined} thumbnailEncSha256
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.thumbnailEncSha256 = null;

            /**
             * ImageMessage staticUrl.
             * @member {string|null|undefined} staticUrl
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.staticUrl = null;

            /**
             * ImageMessage annotations.
             * @member {Array.<E2E.IInteractiveAnnotation>} annotations
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.annotations = $util.emptyArray;

            /**
             * ImageMessage imageSourceType.
             * @member {E2E.Message.ImageMessage.ImageSourceType|null|undefined} imageSourceType
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.imageSourceType = null;

            /**
             * ImageMessage accessibilityLabel.
             * @member {string|null|undefined} accessibilityLabel
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.accessibilityLabel = null;

            /**
             * ImageMessage mediaKeyDomain.
             * @member {E2E.Message.MediaKeyDomain|null|undefined} mediaKeyDomain
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.mediaKeyDomain = null;

            /**
             * ImageMessage qrUrl.
             * @member {string|null|undefined} qrUrl
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            ImageMessage.prototype.qrUrl = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * ImageMessage _url.
             * @member {"url"|undefined} _url
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_url", {
                get: $util.oneOfGetter($oneOfFields = ["url"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _mimetype.
             * @member {"mimetype"|undefined} _mimetype
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_mimetype", {
                get: $util.oneOfGetter($oneOfFields = ["mimetype"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _caption.
             * @member {"caption"|undefined} _caption
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_caption", {
                get: $util.oneOfGetter($oneOfFields = ["caption"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _fileSha256.
             * @member {"fileSha256"|undefined} _fileSha256
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_fileSha256", {
                get: $util.oneOfGetter($oneOfFields = ["fileSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _fileLength.
             * @member {"fileLength"|undefined} _fileLength
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_fileLength", {
                get: $util.oneOfGetter($oneOfFields = ["fileLength"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _height.
             * @member {"height"|undefined} _height
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_height", {
                get: $util.oneOfGetter($oneOfFields = ["height"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _width.
             * @member {"width"|undefined} _width
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_width", {
                get: $util.oneOfGetter($oneOfFields = ["width"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _mediaKey.
             * @member {"mediaKey"|undefined} _mediaKey
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_mediaKey", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _fileEncSha256.
             * @member {"fileEncSha256"|undefined} _fileEncSha256
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_fileEncSha256", {
                get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _directPath.
             * @member {"directPath"|undefined} _directPath
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_directPath", {
                get: $util.oneOfGetter($oneOfFields = ["directPath"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _mediaKeyTimestamp.
             * @member {"mediaKeyTimestamp"|undefined} _mediaKeyTimestamp
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_mediaKeyTimestamp", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _jpegThumbnail.
             * @member {"jpegThumbnail"|undefined} _jpegThumbnail
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_jpegThumbnail", {
                get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _firstScanSidecar.
             * @member {"firstScanSidecar"|undefined} _firstScanSidecar
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_firstScanSidecar", {
                get: $util.oneOfGetter($oneOfFields = ["firstScanSidecar"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _firstScanLength.
             * @member {"firstScanLength"|undefined} _firstScanLength
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_firstScanLength", {
                get: $util.oneOfGetter($oneOfFields = ["firstScanLength"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _experimentGroupId.
             * @member {"experimentGroupId"|undefined} _experimentGroupId
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_experimentGroupId", {
                get: $util.oneOfGetter($oneOfFields = ["experimentGroupId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _scansSidecar.
             * @member {"scansSidecar"|undefined} _scansSidecar
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_scansSidecar", {
                get: $util.oneOfGetter($oneOfFields = ["scansSidecar"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _midQualityFileSha256.
             * @member {"midQualityFileSha256"|undefined} _midQualityFileSha256
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_midQualityFileSha256", {
                get: $util.oneOfGetter($oneOfFields = ["midQualityFileSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _midQualityFileEncSha256.
             * @member {"midQualityFileEncSha256"|undefined} _midQualityFileEncSha256
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_midQualityFileEncSha256", {
                get: $util.oneOfGetter($oneOfFields = ["midQualityFileEncSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _viewOnce.
             * @member {"viewOnce"|undefined} _viewOnce
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_viewOnce", {
                get: $util.oneOfGetter($oneOfFields = ["viewOnce"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _thumbnailDirectPath.
             * @member {"thumbnailDirectPath"|undefined} _thumbnailDirectPath
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_thumbnailDirectPath", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailDirectPath"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _thumbnailSha256.
             * @member {"thumbnailSha256"|undefined} _thumbnailSha256
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_thumbnailSha256", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _thumbnailEncSha256.
             * @member {"thumbnailEncSha256"|undefined} _thumbnailEncSha256
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_thumbnailEncSha256", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailEncSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _staticUrl.
             * @member {"staticUrl"|undefined} _staticUrl
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_staticUrl", {
                get: $util.oneOfGetter($oneOfFields = ["staticUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _imageSourceType.
             * @member {"imageSourceType"|undefined} _imageSourceType
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_imageSourceType", {
                get: $util.oneOfGetter($oneOfFields = ["imageSourceType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _accessibilityLabel.
             * @member {"accessibilityLabel"|undefined} _accessibilityLabel
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_accessibilityLabel", {
                get: $util.oneOfGetter($oneOfFields = ["accessibilityLabel"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _mediaKeyDomain.
             * @member {"mediaKeyDomain"|undefined} _mediaKeyDomain
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_mediaKeyDomain", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKeyDomain"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ImageMessage _qrUrl.
             * @member {"qrUrl"|undefined} _qrUrl
             * @memberof E2E.Message.ImageMessage
             * @instance
             */
            Object.defineProperty(ImageMessage.prototype, "_qrUrl", {
                get: $util.oneOfGetter($oneOfFields = ["qrUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new ImageMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.ImageMessage
             * @static
             * @param {E2E.Message.IImageMessage=} [properties] Properties to set
             * @returns {E2E.Message.ImageMessage} ImageMessage instance
             */
            ImageMessage.create = function create(properties) {
                return new ImageMessage(properties);
            };

            /**
             * Encodes the specified ImageMessage message. Does not implicitly {@link E2E.Message.ImageMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.ImageMessage
             * @static
             * @param {E2E.Message.IImageMessage} message ImageMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ImageMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.url);
                if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimetype);
                if (message.caption != null && Object.hasOwnProperty.call(message, "caption"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.caption);
                if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256"))
                    writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.fileSha256);
                if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength"))
                    writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.fileLength);
                if (message.height != null && Object.hasOwnProperty.call(message, "height"))
                    writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.height);
                if (message.width != null && Object.hasOwnProperty.call(message, "width"))
                    writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.width);
                if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey"))
                    writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.mediaKey);
                if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256"))
                    writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.fileEncSha256);
                if (message.interactiveAnnotations != null && message.interactiveAnnotations.length)
                    for (var i = 0; i < message.interactiveAnnotations.length; ++i)
                        $root.E2E.InteractiveAnnotation.encode(message.interactiveAnnotations[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
                if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath"))
                    writer.uint32(/* id 11, wireType 2 =*/90).string(message.directPath);
                if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp"))
                    writer.uint32(/* id 12, wireType 0 =*/96).int64(message.mediaKeyTimestamp);
                if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail"))
                    writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.jpegThumbnail);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
                if (message.firstScanSidecar != null && Object.hasOwnProperty.call(message, "firstScanSidecar"))
                    writer.uint32(/* id 18, wireType 2 =*/146).bytes(message.firstScanSidecar);
                if (message.firstScanLength != null && Object.hasOwnProperty.call(message, "firstScanLength"))
                    writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.firstScanLength);
                if (message.experimentGroupId != null && Object.hasOwnProperty.call(message, "experimentGroupId"))
                    writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.experimentGroupId);
                if (message.scansSidecar != null && Object.hasOwnProperty.call(message, "scansSidecar"))
                    writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.scansSidecar);
                if (message.scanLengths != null && message.scanLengths.length) {
                    writer.uint32(/* id 22, wireType 2 =*/178).fork();
                    for (var i = 0; i < message.scanLengths.length; ++i)
                        writer.uint32(message.scanLengths[i]);
                    writer.ldelim();
                }
                if (message.midQualityFileSha256 != null && Object.hasOwnProperty.call(message, "midQualityFileSha256"))
                    writer.uint32(/* id 23, wireType 2 =*/186).bytes(message.midQualityFileSha256);
                if (message.midQualityFileEncSha256 != null && Object.hasOwnProperty.call(message, "midQualityFileEncSha256"))
                    writer.uint32(/* id 24, wireType 2 =*/194).bytes(message.midQualityFileEncSha256);
                if (message.viewOnce != null && Object.hasOwnProperty.call(message, "viewOnce"))
                    writer.uint32(/* id 25, wireType 0 =*/200).bool(message.viewOnce);
                if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath"))
                    writer.uint32(/* id 26, wireType 2 =*/210).string(message.thumbnailDirectPath);
                if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256"))
                    writer.uint32(/* id 27, wireType 2 =*/218).bytes(message.thumbnailSha256);
                if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256"))
                    writer.uint32(/* id 28, wireType 2 =*/226).bytes(message.thumbnailEncSha256);
                if (message.staticUrl != null && Object.hasOwnProperty.call(message, "staticUrl"))
                    writer.uint32(/* id 29, wireType 2 =*/234).string(message.staticUrl);
                if (message.annotations != null && message.annotations.length)
                    for (var i = 0; i < message.annotations.length; ++i)
                        $root.E2E.InteractiveAnnotation.encode(message.annotations[i], writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim();
                if (message.imageSourceType != null && Object.hasOwnProperty.call(message, "imageSourceType"))
                    writer.uint32(/* id 31, wireType 0 =*/248).int32(message.imageSourceType);
                if (message.accessibilityLabel != null && Object.hasOwnProperty.call(message, "accessibilityLabel"))
                    writer.uint32(/* id 32, wireType 2 =*/258).string(message.accessibilityLabel);
                if (message.mediaKeyDomain != null && Object.hasOwnProperty.call(message, "mediaKeyDomain"))
                    writer.uint32(/* id 33, wireType 0 =*/264).int32(message.mediaKeyDomain);
                if (message.qrUrl != null && Object.hasOwnProperty.call(message, "qrUrl"))
                    writer.uint32(/* id 34, wireType 2 =*/274).string(message.qrUrl);
                return writer;
            };

            /**
             * Encodes the specified ImageMessage message, length delimited. Does not implicitly {@link E2E.Message.ImageMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.ImageMessage
             * @static
             * @param {E2E.Message.IImageMessage} message ImageMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ImageMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an ImageMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.ImageMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.ImageMessage} ImageMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ImageMessage.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.E2E.Message.ImageMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.url = reader.string();
                            break;
                        }
                    case 2: {
                            message.mimetype = reader.string();
                            break;
                        }
                    case 3: {
                            message.caption = reader.string();
                            break;
                        }
                    case 4: {
                            message.fileSha256 = reader.bytes();
                            break;
                        }
                    case 5: {
                            message.fileLength = reader.uint64();
                            break;
                        }
                    case 6: {
                            message.height = reader.uint32();
                            break;
                        }
                    case 7: {
                            message.width = reader.uint32();
                            break;
                        }
                    case 8: {
                            message.mediaKey = reader.bytes();
                            break;
                        }
                    case 9: {
                            message.fileEncSha256 = reader.bytes();
                            break;
                        }
                    case 10: {
                            if (!(message.interactiveAnnotations && message.interactiveAnnotations.length))
                                message.interactiveAnnotations = [];
                            message.interactiveAnnotations.push($root.E2E.InteractiveAnnotation.decode(reader, reader.uint32()));
                            break;
                        }
                    case 11: {
                            message.directPath = reader.string();
                            break;
                        }
                    case 12: {
                            message.mediaKeyTimestamp = reader.int64();
                            break;
                        }
                    case 16: {
                            message.jpegThumbnail = reader.bytes();
                            break;
                        }
                    case 17: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 18: {
                            message.firstScanSidecar = reader.bytes();
                            break;
                        }
                    case 19: {
                            message.firstScanLength = reader.uint32();
                            break;
                        }
                    case 20: {
                            message.experimentGroupId = reader.uint32();
                            break;
                        }
                    case 21: {
                            message.scansSidecar = reader.bytes();
                            break;
                        }
                    case 22: {
                            if (!(message.scanLengths && message.scanLengths.length))
                                message.scanLengths = [];
                            if ((tag & 7) === 2) {
                                var end2 = reader.uint32() + reader.pos;
                                while (reader.pos < end2)
                                    message.scanLengths.push(reader.uint32());
                            } else
                                message.scanLengths.push(reader.uint32());
                            break;
                        }
                    case 23: {
                            message.midQualityFileSha256 = reader.bytes();
                            break;
                        }
                    case 24: {
                            message.midQualityFileEncSha256 = reader.bytes();
                            break;
                        }
                    case 25: {
                            message.viewOnce = reader.bool();
                            break;
                        }
                    case 26: {
                            message.thumbnailDirectPath = reader.string();
                            break;
                        }
                    case 27: {
                            message.thumbnailSha256 = reader.bytes();
                            break;
                        }
                    case 28: {
                            message.thumbnailEncSha256 = reader.bytes();
                            break;
                        }
                    case 29: {
                            message.staticUrl = reader.string();
                            break;
                        }
                    case 30: {
                            if (!(message.annotations && message.annotations.length))
                                message.annotations = [];
                            message.annotations.push($root.E2E.InteractiveAnnotation.decode(reader, reader.uint32()));
                            break;
                        }
                    case 31: {
                            message.imageSourceType = reader.int32();
                            break;
                        }
                    case 32: {
                            message.accessibilityLabel = reader.string();
                            break;
                        }
                    case 33: {
                            message.mediaKeyDomain = reader.int32();
                            break;
                        }
                    case 34: {
                            message.qrUrl = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an ImageMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.ImageMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.ImageMessage} ImageMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ImageMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an ImageMessage message.
             * @function verify
             * @memberof E2E.Message.ImageMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ImageMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.url != null && message.hasOwnProperty("url")) {
                    properties._url = 1;
                    if (!$util.isString(message.url))
                        return "url: string expected";
                }
                if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                    properties._mimetype = 1;
                    if (!$util.isString(message.mimetype))
                        return "mimetype: string expected";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    properties._caption = 1;
                    if (!$util.isString(message.caption))
                        return "caption: string expected";
                }
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                    properties._fileSha256 = 1;
                    if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                        return "fileSha256: buffer expected";
                }
                if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                    properties._fileLength = 1;
                    if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high)))
                        return "fileLength: integer|Long expected";
                }
                if (message.height != null && message.hasOwnProperty("height")) {
                    properties._height = 1;
                    if (!$util.isInteger(message.height))
                        return "height: integer expected";
                }
                if (message.width != null && message.hasOwnProperty("width")) {
                    properties._width = 1;
                    if (!$util.isInteger(message.width))
                        return "width: integer expected";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    properties._mediaKey = 1;
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                }
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                    properties._fileEncSha256 = 1;
                    if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                        return "fileEncSha256: buffer expected";
                }
                if (message.interactiveAnnotations != null && message.hasOwnProperty("interactiveAnnotations")) {
                    if (!Array.isArray(message.interactiveAnnotations))
                        return "interactiveAnnotations: array expected";
                    for (var i = 0; i < message.interactiveAnnotations.length; ++i) {
                        var error = $root.E2E.InteractiveAnnotation.verify(message.interactiveAnnotations[i]);
                        if (error)
                            return "interactiveAnnotations." + error;
                    }
                }
                if (message.directPath != null && message.hasOwnProperty("directPath")) {
                    properties._directPath = 1;
                    if (!$util.isString(message.directPath))
                        return "directPath: string expected";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    properties._mediaKeyTimestamp = 1;
                    if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high)))
                        return "mediaKeyTimestamp: integer|Long expected";
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    properties._jpegThumbnail = 1;
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.firstScanSidecar != null && message.hasOwnProperty("firstScanSidecar")) {
                    properties._firstScanSidecar = 1;
                    if (!(message.firstScanSidecar && typeof message.firstScanSidecar.length === "number" || $util.isString(message.firstScanSidecar)))
                        return "firstScanSidecar: buffer expected";
                }
                if (message.firstScanLength != null && message.hasOwnProperty("firstScanLength")) {
                    properties._firstScanLength = 1;
                    if (!$util.isInteger(message.firstScanLength))
                        return "firstScanLength: integer expected";
                }
                if (message.experimentGroupId != null && message.hasOwnProperty("experimentGroupId")) {
                    properties._experimentGroupId = 1;
                    if (!$util.isInteger(message.experimentGroupId))
                        return "experimentGroupId: integer expected";
                }
                if (message.scansSidecar != null && message.hasOwnProperty("scansSidecar")) {
                    properties._scansSidecar = 1;
                    if (!(message.scansSidecar && typeof message.scansSidecar.length === "number" || $util.isString(message.scansSidecar)))
                        return "scansSidecar: buffer expected";
                }
                if (message.scanLengths != null && message.hasOwnProperty("scanLengths")) {
                    if (!Array.isArray(message.scanLengths))
                        return "scanLengths: array expected";
                    for (var i = 0; i < message.scanLengths.length; ++i)
                        if (!$util.isInteger(message.scanLengths[i]))
                            return "scanLengths: integer[] expected";
                }
                if (message.midQualityFileSha256 != null && message.hasOwnProperty("midQualityFileSha256")) {
                    properties._midQualityFileSha256 = 1;
                    if (!(message.midQualityFileSha256 && typeof message.midQualityFileSha256.length === "number" || $util.isString(message.midQualityFileSha256)))
                        return "midQualityFileSha256: buffer expected";
                }
                if (message.midQualityFileEncSha256 != null && message.hasOwnProperty("midQualityFileEncSha256")) {
                    properties._midQualityFileEncSha256 = 1;
                    if (!(message.midQualityFileEncSha256 && typeof message.midQualityFileEncSha256.length === "number" || $util.isString(message.midQualityFileEncSha256)))
                        return "midQualityFileEncSha256: buffer expected";
                }
                if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) {
                    properties._viewOnce = 1;
                    if (typeof message.viewOnce !== "boolean")
                        return "viewOnce: boolean expected";
                }
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) {
                    properties._thumbnailDirectPath = 1;
                    if (!$util.isString(message.thumbnailDirectPath))
                        return "thumbnailDirectPath: string expected";
                }
                if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) {
                    properties._thumbnailSha256 = 1;
                    if (!(message.thumbnailSha256 && typeof message.thumbnailSha256.length === "number" || $util.isString(message.thumbnailSha256)))
                        return "thumbnailSha256: buffer expected";
                }
                if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) {
                    properties._thumbnailEncSha256 = 1;
                    if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256)))
                        return "thumbnailEncSha256: buffer expected";
                }
                if (message.staticUrl != null && message.hasOwnProperty("staticUrl")) {
                    properties._staticUrl = 1;
                    if (!$util.isString(message.staticUrl))
                        return "staticUrl: string expected";
                }
                if (message.annotations != null && message.hasOwnProperty("annotations")) {
                    if (!Array.isArray(message.annotations))
                        return "annotations: array expected";
                    for (var i = 0; i < message.annotations.length; ++i) {
                        var error = $root.E2E.InteractiveAnnotation.verify(message.annotations[i]);
                        if (error)
                            return "annotations." + error;
                    }
                }
                if (message.imageSourceType != null && message.hasOwnProperty("imageSourceType")) {
                    properties._imageSourceType = 1;
                    switch (message.imageSourceType) {
                    default:
                        return "imageSourceType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) {
                    properties._accessibilityLabel = 1;
                    if (!$util.isString(message.accessibilityLabel))
                        return "accessibilityLabel: string expected";
                }
                if (message.mediaKeyDomain != null && message.hasOwnProperty("mediaKeyDomain")) {
                    properties._mediaKeyDomain = 1;
                    switch (message.mediaKeyDomain) {
                    default:
                        return "mediaKeyDomain: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                        break;
                    }
                }
                if (message.qrUrl != null && message.hasOwnProperty("qrUrl")) {
                    properties._qrUrl = 1;
                    if (!$util.isString(message.qrUrl))
                        return "qrUrl: string expected";
                }
                return null;
            };

            /**
             * Creates an ImageMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.ImageMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.ImageMessage} ImageMessage
             */
            ImageMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.ImageMessage)
                    return object;
                var message = new $root.E2E.Message.ImageMessage();
                if (object.url != null)
                    message.url = String(object.url);
                if (object.mimetype != null)
                    message.mimetype = String(object.mimetype);
                if (object.caption != null)
                    message.caption = String(object.caption);
                if (object.fileSha256 != null)
                    if (typeof object.fileSha256 === "string")
                        $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0);
                    else if (object.fileSha256.length >= 0)
                        message.fileSha256 = object.fileSha256;
                if (object.fileLength != null)
                    if ($util.Long)
                        (message.fileLength = $util.Long.fromValue(object.fileLength)).unsigned = true;
                    else if (typeof object.fileLength === "string")
                        message.fileLength = parseInt(object.fileLength, 10);
                    else if (typeof object.fileLength === "number")
                        message.fileLength = object.fileLength;
                    else if (typeof object.fileLength === "object")
                        message.fileLength = new $util.LongBits(object.fileLength.low >>> 0, object.fileLength.high >>> 0).toNumber(true);
                if (object.height != null)
                    message.height = object.height >>> 0;
                if (object.width != null)
                    message.width = object.width >>> 0;
                if (object.mediaKey != null)
                    if (typeof object.mediaKey === "string")
                        $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0);
                    else if (object.mediaKey.length >= 0)
                        message.mediaKey = object.mediaKey;
                if (object.fileEncSha256 != null)
                    if (typeof object.fileEncSha256 === "string")
                        $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0);
                    else if (object.fileEncSha256.length >= 0)
                        message.fileEncSha256 = object.fileEncSha256;
                if (object.interactiveAnnotations) {
                    if (!Array.isArray(object.interactiveAnnotations))
                        throw TypeError(".E2E.Message.ImageMessage.interactiveAnnotations: array expected");
                    message.interactiveAnnotations = [];
                    for (var i = 0; i < object.interactiveAnnotations.length; ++i) {
                        if (typeof object.interactiveAnnotations[i] !== "object")
                            throw TypeError(".E2E.Message.ImageMessage.interactiveAnnotations: object expected");
                        message.interactiveAnnotations[i] = $root.E2E.InteractiveAnnotation.fromObject(object.interactiveAnnotations[i]);
                    }
                }
                if (object.directPath != null)
                    message.directPath = String(object.directPath);
                if (object.mediaKeyTimestamp != null)
                    if ($util.Long)
                        (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false;
                    else if (typeof object.mediaKeyTimestamp === "string")
                        message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10);
                    else if (typeof object.mediaKeyTimestamp === "number")
                        message.mediaKeyTimestamp = object.mediaKeyTimestamp;
                    else if (typeof object.mediaKeyTimestamp === "object")
                        message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber();
                if (object.jpegThumbnail != null)
                    if (typeof object.jpegThumbnail === "string")
                        $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0);
                    else if (object.jpegThumbnail.length >= 0)
                        message.jpegThumbnail = object.jpegThumbnail;
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.ImageMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                if (object.firstScanSidecar != null)
                    if (typeof object.firstScanSidecar === "string")
                        $util.base64.decode(object.firstScanSidecar, message.firstScanSidecar = $util.newBuffer($util.base64.length(object.firstScanSidecar)), 0);
                    else if (object.firstScanSidecar.length >= 0)
                        message.firstScanSidecar = object.firstScanSidecar;
                if (object.firstScanLength != null)
                    message.firstScanLength = object.firstScanLength >>> 0;
                if (object.experimentGroupId != null)
                    message.experimentGroupId = object.experimentGroupId >>> 0;
                if (object.scansSidecar != null)
                    if (typeof object.scansSidecar === "string")
                        $util.base64.decode(object.scansSidecar, message.scansSidecar = $util.newBuffer($util.base64.length(object.scansSidecar)), 0);
                    else if (object.scansSidecar.length >= 0)
                        message.scansSidecar = object.scansSidecar;
                if (object.scanLengths) {
                    if (!Array.isArray(object.scanLengths))
                        throw TypeError(".E2E.Message.ImageMessage.scanLengths: array expected");
                    message.scanLengths = [];
                    for (var i = 0; i < object.scanLengths.length; ++i)
                        message.scanLengths[i] = object.scanLengths[i] >>> 0;
                }
                if (object.midQualityFileSha256 != null)
                    if (typeof object.midQualityFileSha256 === "string")
                        $util.base64.decode(object.midQualityFileSha256, message.midQualityFileSha256 = $util.newBuffer($util.base64.length(object.midQualityFileSha256)), 0);
                    else if (object.midQualityFileSha256.length >= 0)
                        message.midQualityFileSha256 = object.midQualityFileSha256;
                if (object.midQualityFileEncSha256 != null)
                    if (typeof object.midQualityFileEncSha256 === "string")
                        $util.base64.decode(object.midQualityFileEncSha256, message.midQualityFileEncSha256 = $util.newBuffer($util.base64.length(object.midQualityFileEncSha256)), 0);
                    else if (object.midQualityFileEncSha256.length >= 0)
                        message.midQualityFileEncSha256 = object.midQualityFileEncSha256;
                if (object.viewOnce != null)
                    message.viewOnce = Boolean(object.viewOnce);
                if (object.thumbnailDirectPath != null)
                    message.thumbnailDirectPath = String(object.thumbnailDirectPath);
                if (object.thumbnailSha256 != null)
                    if (typeof object.thumbnailSha256 === "string")
                        $util.base64.decode(object.thumbnailSha256, message.thumbnailSha256 = $util.newBuffer($util.base64.length(object.thumbnailSha256)), 0);
                    else if (object.thumbnailSha256.length >= 0)
                        message.thumbnailSha256 = object.thumbnailSha256;
                if (object.thumbnailEncSha256 != null)
                    if (typeof object.thumbnailEncSha256 === "string")
                        $util.base64.decode(object.thumbnailEncSha256, message.thumbnailEncSha256 = $util.newBuffer($util.base64.length(object.thumbnailEncSha256)), 0);
                    else if (object.thumbnailEncSha256.length >= 0)
                        message.thumbnailEncSha256 = object.thumbnailEncSha256;
                if (object.staticUrl != null)
                    message.staticUrl = String(object.staticUrl);
                if (object.annotations) {
                    if (!Array.isArray(object.annotations))
                        throw TypeError(".E2E.Message.ImageMessage.annotations: array expected");
                    message.annotations = [];
                    for (var i = 0; i < object.annotations.length; ++i) {
                        if (typeof object.annotations[i] !== "object")
                            throw TypeError(".E2E.Message.ImageMessage.annotations: object expected");
                        message.annotations[i] = $root.E2E.InteractiveAnnotation.fromObject(object.annotations[i]);
                    }
                }
                switch (object.imageSourceType) {
                default:
                    if (typeof object.imageSourceType === "number") {
                        message.imageSourceType = object.imageSourceType;
                        break;
                    }
                    break;
                case "USER_IMAGE":
                case 0:
                    message.imageSourceType = 0;
                    break;
                case "AI_GENERATED":
                case 1:
                    message.imageSourceType = 1;
                    break;
                case "AI_MODIFIED":
                case 2:
                    message.imageSourceType = 2;
                    break;
                case "RASTERIZED_TEXT_STATUS":
                case 3:
                    message.imageSourceType = 3;
                    break;
                }
                if (object.accessibilityLabel != null)
                    message.accessibilityLabel = String(object.accessibilityLabel);
                switch (object.mediaKeyDomain) {
                default:
                    if (typeof object.mediaKeyDomain === "number") {
                        message.mediaKeyDomain = object.mediaKeyDomain;
                        break;
                    }
                    break;
                case "UNSET":
                case 0:
                    message.mediaKeyDomain = 0;
                    break;
                case "E2EE_CHAT":
                case 1:
                    message.mediaKeyDomain = 1;
                    break;
                case "STATUS":
                case 2:
                    message.mediaKeyDomain = 2;
                    break;
                case "CAPI":
                case 3:
                    message.mediaKeyDomain = 3;
                    break;
                case "BOT":
                case 4:
                    message.mediaKeyDomain = 4;
                    break;
                }
                if (object.qrUrl != null)
                    message.qrUrl = String(object.qrUrl);
                return message;
            };

            /**
             * Creates a plain object from an ImageMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.ImageMessage
             * @static
             * @param {E2E.Message.ImageMessage} message ImageMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ImageMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults) {
                    object.interactiveAnnotations = [];
                    object.scanLengths = [];
                    object.annotations = [];
                }
                if (message.url != null && message.hasOwnProperty("url")) {
                    object.url = message.url;
                    if (options.oneofs)
                        object._url = "url";
                }
                if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                    object.mimetype = message.mimetype;
                    if (options.oneofs)
                        object._mimetype = "mimetype";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    object.caption = message.caption;
                    if (options.oneofs)
                        object._caption = "caption";
                }
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                    object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256;
                    if (options.oneofs)
                        object._fileSha256 = "fileSha256";
                }
                if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                    if (typeof message.fileLength === "number")
                        object.fileLength = options.longs === String ? String(message.fileLength) : message.fileLength;
                    else
                        object.fileLength = options.longs === String ? $util.Long.prototype.toString.call(message.fileLength) : options.longs === Number ? new $util.LongBits(message.fileLength.low >>> 0, message.fileLength.high >>> 0).toNumber(true) : message.fileLength;
                    if (options.oneofs)
                        object._fileLength = "fileLength";
                }
                if (message.height != null && message.hasOwnProperty("height")) {
                    object.height = message.height;
                    if (options.oneofs)
                        object._height = "height";
                }
                if (message.width != null && message.hasOwnProperty("width")) {
                    object.width = message.width;
                    if (options.oneofs)
                        object._width = "width";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey;
                    if (options.oneofs)
                        object._mediaKey = "mediaKey";
                }
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                    object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256;
                    if (options.oneofs)
                        object._fileEncSha256 = "fileEncSha256";
                }
                if (message.interactiveAnnotations && message.interactiveAnnotations.length) {
                    object.interactiveAnnotations = [];
                    for (var j = 0; j < message.interactiveAnnotations.length; ++j)
                        object.interactiveAnnotations[j] = $root.E2E.InteractiveAnnotation.toObject(message.interactiveAnnotations[j], options);
                }
                if (message.directPath != null && message.hasOwnProperty("directPath")) {
                    object.directPath = message.directPath;
                    if (options.oneofs)
                        object._directPath = "directPath";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    if (typeof message.mediaKeyTimestamp === "number")
                        object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp;
                    else
                        object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp;
                    if (options.oneofs)
                        object._mediaKeyTimestamp = "mediaKeyTimestamp";
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail;
                    if (options.oneofs)
                        object._jpegThumbnail = "jpegThumbnail";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.firstScanSidecar != null && message.hasOwnProperty("firstScanSidecar")) {
                    object.firstScanSidecar = options.bytes === String ? $util.base64.encode(message.firstScanSidecar, 0, message.firstScanSidecar.length) : options.bytes === Array ? Array.prototype.slice.call(message.firstScanSidecar) : message.firstScanSidecar;
                    if (options.oneofs)
                        object._firstScanSidecar = "firstScanSidecar";
                }
                if (message.firstScanLength != null && message.hasOwnProperty("firstScanLength")) {
                    object.firstScanLength = message.firstScanLength;
                    if (options.oneofs)
                        object._firstScanLength = "firstScanLength";
                }
                if (message.experimentGroupId != null && message.hasOwnProperty("experimentGroupId")) {
                    object.experimentGroupId = message.experimentGroupId;
                    if (options.oneofs)
                        object._experimentGroupId = "experimentGroupId";
                }
                if (message.scansSidecar != null && message.hasOwnProperty("scansSidecar")) {
                    object.scansSidecar = options.bytes === String ? $util.base64.encode(message.scansSidecar, 0, message.scansSidecar.length) : options.bytes === Array ? Array.prototype.slice.call(message.scansSidecar) : message.scansSidecar;
                    if (options.oneofs)
                        object._scansSidecar = "scansSidecar";
                }
                if (message.scanLengths && message.scanLengths.length) {
                    object.scanLengths = [];
                    for (var j = 0; j < message.scanLengths.length; ++j)
                        object.scanLengths[j] = message.scanLengths[j];
                }
                if (message.midQualityFileSha256 != null && message.hasOwnProperty("midQualityFileSha256")) {
                    object.midQualityFileSha256 = options.bytes === String ? $util.base64.encode(message.midQualityFileSha256, 0, message.midQualityFileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.midQualityFileSha256) : message.midQualityFileSha256;
                    if (options.oneofs)
                        object._midQualityFileSha256 = "midQualityFileSha256";
                }
                if (message.midQualityFileEncSha256 != null && message.hasOwnProperty("midQualityFileEncSha256")) {
                    object.midQualityFileEncSha256 = options.bytes === String ? $util.base64.encode(message.midQualityFileEncSha256, 0, message.midQualityFileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.midQualityFileEncSha256) : message.midQualityFileEncSha256;
                    if (options.oneofs)
                        object._midQualityFileEncSha256 = "midQualityFileEncSha256";
                }
                if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) {
                    object.viewOnce = message.viewOnce;
                    if (options.oneofs)
                        object._viewOnce = "viewOnce";
                }
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) {
                    object.thumbnailDirectPath = message.thumbnailDirectPath;
                    if (options.oneofs)
                        object._thumbnailDirectPath = "thumbnailDirectPath";
                }
                if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) {
                    object.thumbnailSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailSha256, 0, message.thumbnailSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailSha256) : message.thumbnailSha256;
                    if (options.oneofs)
                        object._thumbnailSha256 = "thumbnailSha256";
                }
                if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) {
                    object.thumbnailEncSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailEncSha256, 0, message.thumbnailEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailEncSha256) : message.thumbnailEncSha256;
                    if (options.oneofs)
                        object._thumbnailEncSha256 = "thumbnailEncSha256";
                }
                if (message.staticUrl != null && message.hasOwnProperty("staticUrl")) {
                    object.staticUrl = message.staticUrl;
                    if (options.oneofs)
                        object._staticUrl = "staticUrl";
                }
                if (message.annotations && message.annotations.length) {
                    object.annotations = [];
                    for (var j = 0; j < message.annotations.length; ++j)
                        object.annotations[j] = $root.E2E.InteractiveAnnotation.toObject(message.annotations[j], options);
                }
                if (message.imageSourceType != null && message.hasOwnProperty("imageSourceType")) {
                    object.imageSourceType = options.enums === String ? $root.E2E.Message.ImageMessage.ImageSourceType[message.imageSourceType] === undefined ? message.imageSourceType : $root.E2E.Message.ImageMessage.ImageSourceType[message.imageSourceType] : message.imageSourceType;
                    if (options.oneofs)
                        object._imageSourceType = "imageSourceType";
                }
                if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) {
                    object.accessibilityLabel = message.accessibilityLabel;
                    if (options.oneofs)
                        object._accessibilityLabel = "accessibilityLabel";
                }
                if (message.mediaKeyDomain != null && message.hasOwnProperty("mediaKeyDomain")) {
                    object.mediaKeyDomain = options.enums === String ? $root.E2E.Message.MediaKeyDomain[message.mediaKeyDomain] === undefined ? message.mediaKeyDomain : $root.E2E.Message.MediaKeyDomain[message.mediaKeyDomain] : message.mediaKeyDomain;
                    if (options.oneofs)
                        object._mediaKeyDomain = "mediaKeyDomain";
                }
                if (message.qrUrl != null && message.hasOwnProperty("qrUrl")) {
                    object.qrUrl = message.qrUrl;
                    if (options.oneofs)
                        object._qrUrl = "qrUrl";
                }
                return object;
            };

            /**
             * Converts this ImageMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.ImageMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ImageMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for ImageMessage
             * @function getTypeUrl
             * @memberof E2E.Message.ImageMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            ImageMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.ImageMessage";
            };

            /**
             * ImageSourceType enum.
             * @name E2E.Message.ImageMessage.ImageSourceType
             * @enum {number}
             * @property {number} USER_IMAGE=0 USER_IMAGE value
             * @property {number} AI_GENERATED=1 AI_GENERATED value
             * @property {number} AI_MODIFIED=2 AI_MODIFIED value
             * @property {number} RASTERIZED_TEXT_STATUS=3 RASTERIZED_TEXT_STATUS value
             */
            ImageMessage.ImageSourceType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "USER_IMAGE"] = 0;
                values[valuesById[1] = "AI_GENERATED"] = 1;
                values[valuesById[2] = "AI_MODIFIED"] = 2;
                values[valuesById[3] = "RASTERIZED_TEXT_STATUS"] = 3;
                return values;
            })();

            return ImageMessage;
        })();

        Message.InitialSecurityNotificationSettingSync = (function() {

            /**
             * Properties of an InitialSecurityNotificationSettingSync.
             * @memberof E2E.Message
             * @interface IInitialSecurityNotificationSettingSync
             * @property {boolean|null} [securityNotificationEnabled] InitialSecurityNotificationSettingSync securityNotificationEnabled
             */

            /**
             * Constructs a new InitialSecurityNotificationSettingSync.
             * @memberof E2E.Message
             * @classdesc Represents an InitialSecurityNotificationSettingSync.
             * @implements IInitialSecurityNotificationSettingSync
             * @constructor
             * @param {E2E.Message.IInitialSecurityNotificationSettingSync=} [properties] Properties to set
             */
            function InitialSecurityNotificationSettingSync(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]];
            }

            /**
             * InitialSecurityNotificationSettingSync securityNotificationEnabled.
             * @member {boolean|null|undefined} securityNotificationEnabled
             * @memberof E2E.Message.InitialSecurityNotificationSettingSync
             * @instance
             */
            InitialSecurityNotificationSettingSync.prototype.securityNotificationEnabled = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * InitialSecurityNotificationSettingSync _securityNotificationEnabled.
             * @member {"securityNotificationEnabled"|undefined} _securityNotificationEnabled
             * @memberof E2E.Message.InitialSecurityNotificationSettingSync
             * @instance
             */
            Object.defineProperty(InitialSecurityNotificationSettingSync.prototype, "_securityNotificationEnabled", {
                get: $util.oneOfGetter($oneOfFields = ["securityNotificationEnabled"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new InitialSecurityNotificationSettingSync instance using the specified properties.
             * @function create
             * @memberof E2E.Message.InitialSecurityNotificationSettingSync
             * @static
             * @param {E2E.Message.IInitialSecurityNotificationSettingSync=} [properties] Properties to set
             * @returns {E2E.Message.InitialSecurityNotificationSettingSync} InitialSecurityNotificationSettingSync instance
             */
            InitialSecurityNotificationSettingSync.create = function create(properties) {
                return new InitialSecurityNotificationSettingSync(properties);
            };

            /**
             * Encodes the specified InitialSecurityNotificationSettingSync message. Does not implicitly {@link E2E.Message.InitialSecurityNotificationSettingSync.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.InitialSecurityNotificationSettingSync
             * @static
             * @param {E2E.Message.IInitialSecurityNotificationSettingSync} message InitialSecurityNotificationSettingSync message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InitialSecurityNotificationSettingSync.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.securityNotificationEnabled != null && Object.hasOwnProperty.call(message, "securityNotificationEnabled"))
                    writer.uint32(/* id 1, wireType 0 =*/8).bool(message.securityNotificationEnabled);
                return writer;
            };

            /**
             * Encodes the specified InitialSecurityNotificationSettingSync message, length delimited. Does not implicitly {@link E2E.Message.InitialSecurityNotificationSettingSync.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.InitialSecurityNotificationSettingSync
             * @static
             * @param {E2E.Message.IInitialSecurityNotificationSettingSync} message InitialSecurityNotificationSettingSync message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InitialSecurityNotificationSettingSync.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an InitialSecurityNotificationSettingSync message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.InitialSecurityNotificationSettingSync
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.InitialSecurityNotificationSettingSync} InitialSecurityNotificationSettingSync
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InitialSecurityNotificationSettingSync.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.E2E.Message.InitialSecurityNotificationSettingSync();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.securityNotificationEnabled = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an InitialSecurityNotificationSettingSync message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.InitialSecurityNotificationSettingSync
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.InitialSecurityNotificationSettingSync} InitialSecurityNotificationSettingSync
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InitialSecurityNotificationSettingSync.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an InitialSecurityNotificationSettingSync message.
             * @function verify
             * @memberof E2E.Message.InitialSecurityNotificationSettingSync
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            InitialSecurityNotificationSettingSync.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.securityNotificationEnabled != null && message.hasOwnProperty("securityNotificationEnabled")) {
                    properties._securityNotificationEnabled = 1;
                    if (typeof message.securityNotificationEnabled !== "boolean")
                        return "securityNotificationEnabled: boolean expected";
                }
                return null;
            };

            /**
             * Creates an InitialSecurityNotificationSettingSync message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.InitialSecurityNotificationSettingSync
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.InitialSecurityNotificationSettingSync} InitialSecurityNotificationSettingSync
             */
            InitialSecurityNotificationSettingSync.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.InitialSecurityNotificationSettingSync)
                    return object;
                var message = new $root.E2E.Message.InitialSecurityNotificationSettingSync();
                if (object.securityNotificationEnabled != null)
                    message.securityNotificationEnabled = Boolean(object.securityNotificationEnabled);
                return message;
            };

            /**
             * Creates a plain object from an InitialSecurityNotificationSettingSync message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.InitialSecurityNotificationSettingSync
             * @static
             * @param {E2E.Message.InitialSecurityNotificationSettingSync} message InitialSecurityNotificationSettingSync
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            InitialSecurityNotificationSettingSync.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.securityNotificationEnabled != null && message.hasOwnProperty("securityNotificationEnabled")) {
                    object.securityNotificationEnabled = message.securityNotificationEnabled;
                    if (options.oneofs)
                        object._securityNotificationEnabled = "securityNotificationEnabled";
                }
                return object;
            };

            /**
             * Converts this InitialSecurityNotificationSettingSync to JSON.
             * @function toJSON
             * @memberof E2E.Message.InitialSecurityNotificationSettingSync
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            InitialSecurityNotificationSettingSync.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for InitialSecurityNotificationSettingSync
             * @function getTypeUrl
             * @memberof E2E.Message.InitialSecurityNotificationSettingSync
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            InitialSecurityNotificationSettingSync.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.InitialSecurityNotificationSettingSync";
            };

            return InitialSecurityNotificationSettingSync;
        })();

        Message.InteractiveMessage = (function() {

            /**
             * Properties of an InteractiveMessage.
             * @memberof E2E.Message
             * @interface IInteractiveMessage
             * @property {E2E.Message.InteractiveMessage.IHeader|null} [header] InteractiveMessage header
             * @property {E2E.Message.InteractiveMessage.IBody|null} [body] InteractiveMessage body
             * @property {E2E.Message.InteractiveMessage.IFooter|null} [footer] InteractiveMessage footer
             * @property {E2E.IContextInfo|null} [contextInfo] InteractiveMessage contextInfo
             * @property {E2E.IUrlTrackingMap|null} [urlTrackingMap] InteractiveMessage urlTrackingMap
             * @property {E2E.Message.InteractiveMessage.IShopMessage|null} [shopStorefrontMessage] InteractiveMessage shopStorefrontMessage
             * @property {E2E.Message.InteractiveMessage.ICollectionMessage|null} [collectionMessage] InteractiveMessage collectionMessage
             * @property {E2E.Message.InteractiveMessage.INativeFlowMessage|null} [nativeFlowMessage] InteractiveMessage nativeFlowMessage
             * @property {E2E.Message.InteractiveMessage.ICarouselMessage|null} [carouselMessage] InteractiveMessage carouselMessage
             */

            /**
             * Constructs a new InteractiveMessage.
             * @memberof E2E.Message
             * @classdesc Represents an InteractiveMessage.
             * @implements IInteractiveMessage
             * @constructor
             * @param {E2E.Message.IInteractiveMessage=} [properties] Properties to set
             */
            function InteractiveMessage(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]];
            }

            /**
             * InteractiveMessage header.
             * @member {E2E.Message.InteractiveMessage.IHeader|null|undefined} header
             * @memberof E2E.Message.InteractiveMessage
             * @instance
             */
            InteractiveMessage.prototype.header = null;

            /**
             * InteractiveMessage body.
             * @member {E2E.Message.InteractiveMessage.IBody|null|undefined} body
             * @memberof E2E.Message.InteractiveMessage
             * @instance
             */
            InteractiveMessage.prototype.body = null;

            /**
             * InteractiveMessage footer.
             * @member {E2E.Message.InteractiveMessage.IFooter|null|undefined} footer
             * @memberof E2E.Message.InteractiveMessage
             * @instance
             */
            InteractiveMessage.prototype.footer = null;

            /**
             * InteractiveMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.InteractiveMessage
             * @instance
             */
            InteractiveMessage.prototype.contextInfo = null;

            /**
             * InteractiveMessage urlTrackingMap.
             * @member {E2E.IUrlTrackingMap|null|undefined} urlTrackingMap
             * @memberof E2E.Message.InteractiveMessage
             * @instance
             */
            InteractiveMessage.prototype.urlTrackingMap = null;

            /**
             * InteractiveMessage shopStorefrontMessage.
             * @member {E2E.Message.InteractiveMessage.IShopMessage|null|undefined} shopStorefrontMessage
             * @memberof E2E.Message.InteractiveMessage
             * @instance
             */
            InteractiveMessage.prototype.shopStorefrontMessage = null;

            /**
             * InteractiveMessage collectionMessage.
             * @member {E2E.Message.InteractiveMessage.ICollectionMessage|null|undefined} collectionMessage
             * @memberof E2E.Message.InteractiveMessage
             * @instance
             */
            InteractiveMessage.prototype.collectionMessage = null;

            /**
             * InteractiveMessage nativeFlowMessage.
             * @member {E2E.Message.InteractiveMessage.INativeFlowMessage|null|undefined} nativeFlowMessage
             * @memberof E2E.Message.InteractiveMessage
             * @instance
             */
            InteractiveMessage.prototype.nativeFlowMessage = null;

            /**
             * InteractiveMessage carouselMessage.
             * @member {E2E.Message.InteractiveMessage.ICarouselMessage|null|undefined} carouselMessage
             * @memberof E2E.Message.InteractiveMessage
             * @instance
             */
            InteractiveMessage.prototype.carouselMessage = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * InteractiveMessage _header.
             * @member {"header"|undefined} _header
             * @memberof E2E.Message.InteractiveMessage
             * @instance
             */
            Object.defineProperty(InteractiveMessage.prototype, "_header", {
                get: $util.oneOfGetter($oneOfFields = ["header"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InteractiveMessage _body.
             * @member {"body"|undefined} _body
             * @memberof E2E.Message.InteractiveMessage
             * @instance
             */
            Object.defineProperty(InteractiveMessage.prototype, "_body", {
                get: $util.oneOfGetter($oneOfFields = ["body"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InteractiveMessage _footer.
             * @member {"footer"|undefined} _footer
             * @memberof E2E.Message.InteractiveMessage
             * @instance
             */
            Object.defineProperty(InteractiveMessage.prototype, "_footer", {
                get: $util.oneOfGetter($oneOfFields = ["footer"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InteractiveMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.InteractiveMessage
             * @instance
             */
            Object.defineProperty(InteractiveMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InteractiveMessage _urlTrackingMap.
             * @member {"urlTrackingMap"|undefined} _urlTrackingMap
             * @memberof E2E.Message.InteractiveMessage
             * @instance
             */
            Object.defineProperty(InteractiveMessage.prototype, "_urlTrackingMap", {
                get: $util.oneOfGetter($oneOfFields = ["urlTrackingMap"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InteractiveMessage interactiveMessage.
             * @member {"shopStorefrontMessage"|"collectionMessage"|"nativeFlowMessage"|"carouselMessage"|undefined} interactiveMessage
             * @memberof E2E.Message.InteractiveMessage
             * @instance
             */
            Object.defineProperty(InteractiveMessage.prototype, "interactiveMessage", {
                get: $util.oneOfGetter($oneOfFields = ["shopStorefrontMessage", "collectionMessage", "nativeFlowMessage", "carouselMessage"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new InteractiveMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.InteractiveMessage
             * @static
             * @param {E2E.Message.IInteractiveMessage=} [properties] Properties to set
             * @returns {E2E.Message.InteractiveMessage} InteractiveMessage instance
             */
            InteractiveMessage.create = function create(properties) {
                return new InteractiveMessage(properties);
            };

            /**
             * Encodes the specified InteractiveMessage message. Does not implicitly {@link E2E.Message.InteractiveMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.InteractiveMessage
             * @static
             * @param {E2E.Message.IInteractiveMessage} message InteractiveMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InteractiveMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.header != null && Object.hasOwnProperty.call(message, "header"))
                    $root.E2E.Message.InteractiveMessage.Header.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.body != null && Object.hasOwnProperty.call(message, "body"))
                    $root.E2E.Message.InteractiveMessage.Body.encode(message.body, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                if (message.footer != null && Object.hasOwnProperty.call(message, "footer"))
                    $root.E2E.Message.InteractiveMessage.Footer.encode(message.footer, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                if (message.shopStorefrontMessage != null && Object.hasOwnProperty.call(message, "shopStorefrontMessage"))
                    $root.E2E.Message.InteractiveMessage.ShopMessage.encode(message.shopStorefrontMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                if (message.collectionMessage != null && Object.hasOwnProperty.call(message, "collectionMessage"))
                    $root.E2E.Message.InteractiveMessage.CollectionMessage.encode(message.collectionMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                if (message.nativeFlowMessage != null && Object.hasOwnProperty.call(message, "nativeFlowMessage"))
                    $root.E2E.Message.InteractiveMessage.NativeFlowMessage.encode(message.nativeFlowMessage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                if (message.carouselMessage != null && Object.hasOwnProperty.call(message, "carouselMessage"))
                    $root.E2E.Message.InteractiveMessage.CarouselMessage.encode(message.carouselMessage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
                if (message.urlTrackingMap != null && Object.hasOwnProperty.call(message, "urlTrackingMap"))
                    $root.E2E.UrlTrackingMap.encode(message.urlTrackingMap, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified InteractiveMessage message, length delimited. Does not implicitly {@link E2E.Message.InteractiveMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.InteractiveMessage
             * @static
             * @param {E2E.Message.IInteractiveMessage} message InteractiveMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InteractiveMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an InteractiveMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.InteractiveMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.InteractiveMessage} InteractiveMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InteractiveMessage.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.E2E.Message.InteractiveMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.header = $root.E2E.Message.InteractiveMessage.Header.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.body = $root.E2E.Message.InteractiveMessage.Body.decode(reader, reader.uint32());
                            break;
                        }
                    case 3: {
                            message.footer = $root.E2E.Message.InteractiveMessage.Footer.decode(reader, reader.uint32());
                            break;
                        }
                    case 15: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 16: {
                            message.urlTrackingMap = $root.E2E.UrlTrackingMap.decode(reader, reader.uint32());
                            break;
                        }
                    case 4: {
                            message.shopStorefrontMessage = $root.E2E.Message.InteractiveMessage.ShopMessage.decode(reader, reader.uint32());
                            break;
                        }
                    case 5: {
                            message.collectionMessage = $root.E2E.Message.InteractiveMessage.CollectionMessage.decode(reader, reader.uint32());
                            break;
                        }
                    case 6: {
                            message.nativeFlowMessage = $root.E2E.Message.InteractiveMessage.NativeFlowMessage.decode(reader, reader.uint32());
                            break;
                        }
                    case 7: {
                            message.carouselMessage = $root.E2E.Message.InteractiveMessage.CarouselMessage.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an InteractiveMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.InteractiveMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.InteractiveMessage} InteractiveMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InteractiveMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an InteractiveMessage message.
             * @function verify
             * @memberof E2E.Message.InteractiveMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            InteractiveMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.header != null && message.hasOwnProperty("header")) {
                    properties._header = 1;
                    {
                        var error = $root.E2E.Message.InteractiveMessage.Header.verify(message.header);
                        if (error)
                            return "header." + error;
                    }
                }
                if (message.body != null && message.hasOwnProperty("body")) {
                    properties._body = 1;
                    {
                        var error = $root.E2E.Message.InteractiveMessage.Body.verify(message.body);
                        if (error)
                            return "body." + error;
                    }
                }
                if (message.footer != null && message.hasOwnProperty("footer")) {
                    properties._footer = 1;
                    {
                        var error = $root.E2E.Message.InteractiveMessage.Footer.verify(message.footer);
                        if (error)
                            return "footer." + error;
                    }
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.urlTrackingMap != null && message.hasOwnProperty("urlTrackingMap")) {
                    properties._urlTrackingMap = 1;
                    {
                        var error = $root.E2E.UrlTrackingMap.verify(message.urlTrackingMap);
                        if (error)
                            return "urlTrackingMap." + error;
                    }
                }
                if (message.shopStorefrontMessage != null && message.hasOwnProperty("shopStorefrontMessage")) {
                    properties.interactiveMessage = 1;
                    {
                        var error = $root.E2E.Message.InteractiveMessage.ShopMessage.verify(message.shopStorefrontMessage);
                        if (error)
                            return "shopStorefrontMessage." + error;
                    }
                }
                if (message.collectionMessage != null && message.hasOwnProperty("collectionMessage")) {
                    if (properties.interactiveMessage === 1)
                        return "interactiveMessage: multiple values";
                    properties.interactiveMessage = 1;
                    {
                        var error = $root.E2E.Message.InteractiveMessage.CollectionMessage.verify(message.collectionMessage);
                        if (error)
                            return "collectionMessage." + error;
                    }
                }
                if (message.nativeFlowMessage != null && message.hasOwnProperty("nativeFlowMessage")) {
                    if (properties.interactiveMessage === 1)
                        return "interactiveMessage: multiple values";
                    properties.interactiveMessage = 1;
                    {
                        var error = $root.E2E.Message.InteractiveMessage.NativeFlowMessage.verify(message.nativeFlowMessage);
                        if (error)
                            return "nativeFlowMessage." + error;
                    }
                }
                if (message.carouselMessage != null && message.hasOwnProperty("carouselMessage")) {
                    if (properties.interactiveMessage === 1)
                        return "interactiveMessage: multiple values";
                    properties.interactiveMessage = 1;
                    {
                        var error = $root.E2E.Message.InteractiveMessage.CarouselMessage.verify(message.carouselMessage);
                        if (error)
                            return "carouselMessage." + error;
                    }
                }
                return null;
            };

            /**
             * Creates an InteractiveMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.InteractiveMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.InteractiveMessage} InteractiveMessage
             */
            InteractiveMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.InteractiveMessage)
                    return object;
                var message = new $root.E2E.Message.InteractiveMessage();
                if (object.header != null) {
                    if (typeof object.header !== "object")
                        throw TypeError(".E2E.Message.InteractiveMessage.header: object expected");
                    message.header = $root.E2E.Message.InteractiveMessage.Header.fromObject(object.header);
                }
                if (object.body != null) {
                    if (typeof object.body !== "object")
                        throw TypeError(".E2E.Message.InteractiveMessage.body: object expected");
                    message.body = $root.E2E.Message.InteractiveMessage.Body.fromObject(object.body);
                }
                if (object.footer != null) {
                    if (typeof object.footer !== "object")
                        throw TypeError(".E2E.Message.InteractiveMessage.footer: object expected");
                    message.footer = $root.E2E.Message.InteractiveMessage.Footer.fromObject(object.footer);
                }
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.InteractiveMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                if (object.urlTrackingMap != null) {
                    if (typeof object.urlTrackingMap !== "object")
                        throw TypeError(".E2E.Message.InteractiveMessage.urlTrackingMap: object expected");
                    message.urlTrackingMap = $root.E2E.UrlTrackingMap.fromObject(object.urlTrackingMap);
                }
                if (object.shopStorefrontMessage != null) {
                    if (typeof object.shopStorefrontMessage !== "object")
                        throw TypeError(".E2E.Message.InteractiveMessage.shopStorefrontMessage: object expected");
                    message.shopStorefrontMessage = $root.E2E.Message.InteractiveMessage.ShopMessage.fromObject(object.shopStorefrontMessage);
                }
                if (object.collectionMessage != null) {
                    if (typeof object.collectionMessage !== "object")
                        throw TypeError(".E2E.Message.InteractiveMessage.collectionMessage: object expected");
                    message.collectionMessage = $root.E2E.Message.InteractiveMessage.CollectionMessage.fromObject(object.collectionMessage);
                }
                if (object.nativeFlowMessage != null) {
                    if (typeof object.nativeFlowMessage !== "object")
                        throw TypeError(".E2E.Message.InteractiveMessage.nativeFlowMessage: object expected");
                    message.nativeFlowMessage = $root.E2E.Message.InteractiveMessage.NativeFlowMessage.fromObject(object.nativeFlowMessage);
                }
                if (object.carouselMessage != null) {
                    if (typeof object.carouselMessage !== "object")
                        throw TypeError(".E2E.Message.InteractiveMessage.carouselMessage: object expected");
                    message.carouselMessage = $root.E2E.Message.InteractiveMessage.CarouselMessage.fromObject(object.carouselMessage);
                }
                return message;
            };

            /**
             * Creates a plain object from an InteractiveMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.InteractiveMessage
             * @static
             * @param {E2E.Message.InteractiveMessage} message InteractiveMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            InteractiveMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.header != null && message.hasOwnProperty("header")) {
                    object.header = $root.E2E.Message.InteractiveMessage.Header.toObject(message.header, options);
                    if (options.oneofs)
                        object._header = "header";
                }
                if (message.body != null && message.hasOwnProperty("body")) {
                    object.body = $root.E2E.Message.InteractiveMessage.Body.toObject(message.body, options);
                    if (options.oneofs)
                        object._body = "body";
                }
                if (message.footer != null && message.hasOwnProperty("footer")) {
                    object.footer = $root.E2E.Message.InteractiveMessage.Footer.toObject(message.footer, options);
                    if (options.oneofs)
                        object._footer = "footer";
                }
                if (message.shopStorefrontMessage != null && message.hasOwnProperty("shopStorefrontMessage")) {
                    object.shopStorefrontMessage = $root.E2E.Message.InteractiveMessage.ShopMessage.toObject(message.shopStorefrontMessage, options);
                    if (options.oneofs)
                        object.interactiveMessage = "shopStorefrontMessage";
                }
                if (message.collectionMessage != null && message.hasOwnProperty("collectionMessage")) {
                    object.collectionMessage = $root.E2E.Message.InteractiveMessage.CollectionMessage.toObject(message.collectionMessage, options);
                    if (options.oneofs)
                        object.interactiveMessage = "collectionMessage";
                }
                if (message.nativeFlowMessage != null && message.hasOwnProperty("nativeFlowMessage")) {
                    object.nativeFlowMessage = $root.E2E.Message.InteractiveMessage.NativeFlowMessage.toObject(message.nativeFlowMessage, options);
                    if (options.oneofs)
                        object.interactiveMessage = "nativeFlowMessage";
                }
                if (message.carouselMessage != null && message.hasOwnProperty("carouselMessage")) {
                    object.carouselMessage = $root.E2E.Message.InteractiveMessage.CarouselMessage.toObject(message.carouselMessage, options);
                    if (options.oneofs)
                        object.interactiveMessage = "carouselMessage";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.urlTrackingMap != null && message.hasOwnProperty("urlTrackingMap")) {
                    object.urlTrackingMap = $root.E2E.UrlTrackingMap.toObject(message.urlTrackingMap, options);
                    if (options.oneofs)
                        object._urlTrackingMap = "urlTrackingMap";
                }
                return object;
            };

            /**
             * Converts this InteractiveMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.InteractiveMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            InteractiveMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for InteractiveMessage
             * @function getTypeUrl
             * @memberof E2E.Message.InteractiveMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            InteractiveMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.InteractiveMessage";
            };

            InteractiveMessage.Body = (function() {

                /**
                 * Properties of a Body.
                 * @memberof E2E.Message.InteractiveMessage
                 * @interface IBody
                 * @property {string|null} [text] Body text
                 */

                /**
                 * Constructs a new Body.
                 * @memberof E2E.Message.InteractiveMessage
                 * @classdesc Represents a Body.
                 * @implements IBody
                 * @constructor
                 * @param {E2E.Message.InteractiveMessage.IBody=} [properties] Properties to set
                 */
                function Body(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]];
                }

                /**
                 * Body text.
                 * @member {string|null|undefined} text
                 * @memberof E2E.Message.InteractiveMessage.Body
                 * @instance
                 */
                Body.prototype.text = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * Body _text.
                 * @member {"text"|undefined} _text
                 * @memberof E2E.Message.InteractiveMessage.Body
                 * @instance
                 */
                Object.defineProperty(Body.prototype, "_text", {
                    get: $util.oneOfGetter($oneOfFields = ["text"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new Body instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.InteractiveMessage.Body
                 * @static
                 * @param {E2E.Message.InteractiveMessage.IBody=} [properties] Properties to set
                 * @returns {E2E.Message.InteractiveMessage.Body} Body instance
                 */
                Body.create = function create(properties) {
                    return new Body(properties);
                };

                /**
                 * Encodes the specified Body message. Does not implicitly {@link E2E.Message.InteractiveMessage.Body.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.InteractiveMessage.Body
                 * @static
                 * @param {E2E.Message.InteractiveMessage.IBody} message Body message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Body.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.text);
                    return writer;
                };

                /**
                 * Encodes the specified Body message, length delimited. Does not implicitly {@link E2E.Message.InteractiveMessage.Body.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.InteractiveMessage.Body
                 * @static
                 * @param {E2E.Message.InteractiveMessage.IBody} message Body message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Body.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Body message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.InteractiveMessage.Body
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.InteractiveMessage.Body} Body
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Body.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.E2E.Message.InteractiveMessage.Body();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.text = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a Body message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.InteractiveMessage.Body
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.InteractiveMessage.Body} Body
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Body.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Body message.
                 * @function verify
                 * @memberof E2E.Message.InteractiveMessage.Body
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Body.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.text != null && message.hasOwnProperty("text")) {
                        properties._text = 1;
                        if (!$util.isString(message.text))
                            return "text: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a Body message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.InteractiveMessage.Body
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.InteractiveMessage.Body} Body
                 */
                Body.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.InteractiveMessage.Body)
                        return object;
                    var message = new $root.E2E.Message.InteractiveMessage.Body();
                    if (object.text != null)
                        message.text = String(object.text);
                    return message;
                };

                /**
                 * Creates a plain object from a Body message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.InteractiveMessage.Body
                 * @static
                 * @param {E2E.Message.InteractiveMessage.Body} message Body
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Body.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.text != null && message.hasOwnProperty("text")) {
                        object.text = message.text;
                        if (options.oneofs)
                            object._text = "text";
                    }
                    return object;
                };

                /**
                 * Converts this Body to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.InteractiveMessage.Body
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Body.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for Body
                 * @function getTypeUrl
                 * @memberof E2E.Message.InteractiveMessage.Body
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Body.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.InteractiveMessage.Body";
                };

                return Body;
            })();

            InteractiveMessage.CarouselMessage = (function() {

                /**
                 * Properties of a CarouselMessage.
                 * @memberof E2E.Message.InteractiveMessage
                 * @interface ICarouselMessage
                 * @property {Array.<E2E.Message.IInteractiveMessage>|null} [cards] CarouselMessage cards
                 * @property {number|null} [messageVersion] CarouselMessage messageVersion
                 * @property {E2E.Message.InteractiveMessage.CarouselMessage.CarouselCardType|null} [carouselCardType] CarouselMessage carouselCardType
                 */

                /**
                 * Constructs a new CarouselMessage.
                 * @memberof E2E.Message.InteractiveMessage
                 * @classdesc Represents a CarouselMessage.
                 * @implements ICarouselMessage
                 * @constructor
                 * @param {E2E.Message.InteractiveMessage.ICarouselMessage=} [properties] Properties to set
                 */
                function CarouselMessage(properties) {
                    this.cards = [];
                    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]];
                }

                /**
                 * CarouselMessage cards.
                 * @member {Array.<E2E.Message.IInteractiveMessage>} cards
                 * @memberof E2E.Message.InteractiveMessage.CarouselMessage
                 * @instance
                 */
                CarouselMessage.prototype.cards = $util.emptyArray;

                /**
                 * CarouselMessage messageVersion.
                 * @member {number|null|undefined} messageVersion
                 * @memberof E2E.Message.InteractiveMessage.CarouselMessage
                 * @instance
                 */
                CarouselMessage.prototype.messageVersion = null;

                /**
                 * CarouselMessage carouselCardType.
                 * @member {E2E.Message.InteractiveMessage.CarouselMessage.CarouselCardType|null|undefined} carouselCardType
                 * @memberof E2E.Message.InteractiveMessage.CarouselMessage
                 * @instance
                 */
                CarouselMessage.prototype.carouselCardType = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * CarouselMessage _messageVersion.
                 * @member {"messageVersion"|undefined} _messageVersion
                 * @memberof E2E.Message.InteractiveMessage.CarouselMessage
                 * @instance
                 */
                Object.defineProperty(CarouselMessage.prototype, "_messageVersion", {
                    get: $util.oneOfGetter($oneOfFields = ["messageVersion"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * CarouselMessage _carouselCardType.
                 * @member {"carouselCardType"|undefined} _carouselCardType
                 * @memberof E2E.Message.InteractiveMessage.CarouselMessage
                 * @instance
                 */
                Object.defineProperty(CarouselMessage.prototype, "_carouselCardType", {
                    get: $util.oneOfGetter($oneOfFields = ["carouselCardType"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new CarouselMessage instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.InteractiveMessage.CarouselMessage
                 * @static
                 * @param {E2E.Message.InteractiveMessage.ICarouselMessage=} [properties] Properties to set
                 * @returns {E2E.Message.InteractiveMessage.CarouselMessage} CarouselMessage instance
                 */
                CarouselMessage.create = function create(properties) {
                    return new CarouselMessage(properties);
                };

                /**
                 * Encodes the specified CarouselMessage message. Does not implicitly {@link E2E.Message.InteractiveMessage.CarouselMessage.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.InteractiveMessage.CarouselMessage
                 * @static
                 * @param {E2E.Message.InteractiveMessage.ICarouselMessage} message CarouselMessage message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CarouselMessage.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.cards != null && message.cards.length)
                        for (var i = 0; i < message.cards.length; ++i)
                            $root.E2E.Message.InteractiveMessage.encode(message.cards[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    if (message.messageVersion != null && Object.hasOwnProperty.call(message, "messageVersion"))
                        writer.uint32(/* id 2, wireType 0 =*/16).int32(message.messageVersion);
                    if (message.carouselCardType != null && Object.hasOwnProperty.call(message, "carouselCardType"))
                        writer.uint32(/* id 3, wireType 0 =*/24).int32(message.carouselCardType);
                    return writer;
                };

                /**
                 * Encodes the specified CarouselMessage message, length delimited. Does not implicitly {@link E2E.Message.InteractiveMessage.CarouselMessage.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.InteractiveMessage.CarouselMessage
                 * @static
                 * @param {E2E.Message.InteractiveMessage.ICarouselMessage} message CarouselMessage message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CarouselMessage.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a CarouselMessage message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.InteractiveMessage.CarouselMessage
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.InteractiveMessage.CarouselMessage} CarouselMessage
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CarouselMessage.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.E2E.Message.InteractiveMessage.CarouselMessage();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                if (!(message.cards && message.cards.length))
                                    message.cards = [];
                                message.cards.push($root.E2E.Message.InteractiveMessage.decode(reader, reader.uint32()));
                                break;
                            }
                        case 2: {
                                message.messageVersion = reader.int32();
                                break;
                            }
                        case 3: {
                                message.carouselCardType = reader.int32();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a CarouselMessage message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.InteractiveMessage.CarouselMessage
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.InteractiveMessage.CarouselMessage} CarouselMessage
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CarouselMessage.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a CarouselMessage message.
                 * @function verify
                 * @memberof E2E.Message.InteractiveMessage.CarouselMessage
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CarouselMessage.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.cards != null && message.hasOwnProperty("cards")) {
                        if (!Array.isArray(message.cards))
                            return "cards: array expected";
                        for (var i = 0; i < message.cards.length; ++i) {
                            var error = $root.E2E.Message.InteractiveMessage.verify(message.cards[i]);
                            if (error)
                                return "cards." + error;
                        }
                    }
                    if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) {
                        properties._messageVersion = 1;
                        if (!$util.isInteger(message.messageVersion))
                            return "messageVersion: integer expected";
                    }
                    if (message.carouselCardType != null && message.hasOwnProperty("carouselCardType")) {
                        properties._carouselCardType = 1;
                        switch (message.carouselCardType) {
                        default:
                            return "carouselCardType: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a CarouselMessage message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.InteractiveMessage.CarouselMessage
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.InteractiveMessage.CarouselMessage} CarouselMessage
                 */
                CarouselMessage.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.InteractiveMessage.CarouselMessage)
                        return object;
                    var message = new $root.E2E.Message.InteractiveMessage.CarouselMessage();
                    if (object.cards) {
                        if (!Array.isArray(object.cards))
                            throw TypeError(".E2E.Message.InteractiveMessage.CarouselMessage.cards: array expected");
                        message.cards = [];
                        for (var i = 0; i < object.cards.length; ++i) {
                            if (typeof object.cards[i] !== "object")
                                throw TypeError(".E2E.Message.InteractiveMessage.CarouselMessage.cards: object expected");
                            message.cards[i] = $root.E2E.Message.InteractiveMessage.fromObject(object.cards[i]);
                        }
                    }
                    if (object.messageVersion != null)
                        message.messageVersion = object.messageVersion | 0;
                    switch (object.carouselCardType) {
                    default:
                        if (typeof object.carouselCardType === "number") {
                            message.carouselCardType = object.carouselCardType;
                            break;
                        }
                        break;
                    case "UNKNOWN":
                    case 0:
                        message.carouselCardType = 0;
                        break;
                    case "HSCROLL_CARDS":
                    case 1:
                        message.carouselCardType = 1;
                        break;
                    case "ALBUM_IMAGE":
                    case 2:
                        message.carouselCardType = 2;
                        break;
                    }
                    return message;
                };

                /**
                 * Creates a plain object from a CarouselMessage message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.InteractiveMessage.CarouselMessage
                 * @static
                 * @param {E2E.Message.InteractiveMessage.CarouselMessage} message CarouselMessage
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CarouselMessage.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.cards = [];
                    if (message.cards && message.cards.length) {
                        object.cards = [];
                        for (var j = 0; j < message.cards.length; ++j)
                            object.cards[j] = $root.E2E.Message.InteractiveMessage.toObject(message.cards[j], options);
                    }
                    if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) {
                        object.messageVersion = message.messageVersion;
                        if (options.oneofs)
                            object._messageVersion = "messageVersion";
                    }
                    if (message.carouselCardType != null && message.hasOwnProperty("carouselCardType")) {
                        object.carouselCardType = options.enums === String ? $root.E2E.Message.InteractiveMessage.CarouselMessage.CarouselCardType[message.carouselCardType] === undefined ? message.carouselCardType : $root.E2E.Message.InteractiveMessage.CarouselMessage.CarouselCardType[message.carouselCardType] : message.carouselCardType;
                        if (options.oneofs)
                            object._carouselCardType = "carouselCardType";
                    }
                    return object;
                };

                /**
                 * Converts this CarouselMessage to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.InteractiveMessage.CarouselMessage
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CarouselMessage.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for CarouselMessage
                 * @function getTypeUrl
                 * @memberof E2E.Message.InteractiveMessage.CarouselMessage
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                CarouselMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.InteractiveMessage.CarouselMessage";
                };

                /**
                 * CarouselCardType enum.
                 * @name E2E.Message.InteractiveMessage.CarouselMessage.CarouselCardType
                 * @enum {number}
                 * @property {number} UNKNOWN=0 UNKNOWN value
                 * @property {number} HSCROLL_CARDS=1 HSCROLL_CARDS value
                 * @property {number} ALBUM_IMAGE=2 ALBUM_IMAGE value
                 */
                CarouselMessage.CarouselCardType = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "UNKNOWN"] = 0;
                    values[valuesById[1] = "HSCROLL_CARDS"] = 1;
                    values[valuesById[2] = "ALBUM_IMAGE"] = 2;
                    return values;
                })();

                return CarouselMessage;
            })();

            InteractiveMessage.CollectionMessage = (function() {

                /**
                 * Properties of a CollectionMessage.
                 * @memberof E2E.Message.InteractiveMessage
                 * @interface ICollectionMessage
                 * @property {string|null} [bizJid] CollectionMessage bizJid
                 * @property {string|null} [id] CollectionMessage id
                 * @property {number|null} [messageVersion] CollectionMessage messageVersion
                 */

                /**
                 * Constructs a new CollectionMessage.
                 * @memberof E2E.Message.InteractiveMessage
                 * @classdesc Represents a CollectionMessage.
                 * @implements ICollectionMessage
                 * @constructor
                 * @param {E2E.Message.InteractiveMessage.ICollectionMessage=} [properties] Properties to set
                 */
                function CollectionMessage(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]];
                }

                /**
                 * CollectionMessage bizJid.
                 * @member {string|null|undefined} bizJid
                 * @memberof E2E.Message.InteractiveMessage.CollectionMessage
                 * @instance
                 */
                CollectionMessage.prototype.bizJid = null;

                /**
                 * CollectionMessage id.
                 * @member {string|null|undefined} id
                 * @memberof E2E.Message.InteractiveMessage.CollectionMessage
                 * @instance
                 */
                CollectionMessage.prototype.id = null;

                /**
                 * CollectionMessage messageVersion.
                 * @member {number|null|undefined} messageVersion
                 * @memberof E2E.Message.InteractiveMessage.CollectionMessage
                 * @instance
                 */
                CollectionMessage.prototype.messageVersion = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * CollectionMessage _bizJid.
                 * @member {"bizJid"|undefined} _bizJid
                 * @memberof E2E.Message.InteractiveMessage.CollectionMessage
                 * @instance
                 */
                Object.defineProperty(CollectionMessage.prototype, "_bizJid", {
                    get: $util.oneOfGetter($oneOfFields = ["bizJid"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * CollectionMessage _id.
                 * @member {"id"|undefined} _id
                 * @memberof E2E.Message.InteractiveMessage.CollectionMessage
                 * @instance
                 */
                Object.defineProperty(CollectionMessage.prototype, "_id", {
                    get: $util.oneOfGetter($oneOfFields = ["id"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * CollectionMessage _messageVersion.
                 * @member {"messageVersion"|undefined} _messageVersion
                 * @memberof E2E.Message.InteractiveMessage.CollectionMessage
                 * @instance
                 */
                Object.defineProperty(CollectionMessage.prototype, "_messageVersion", {
                    get: $util.oneOfGetter($oneOfFields = ["messageVersion"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new CollectionMessage instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.InteractiveMessage.CollectionMessage
                 * @static
                 * @param {E2E.Message.InteractiveMessage.ICollectionMessage=} [properties] Properties to set
                 * @returns {E2E.Message.InteractiveMessage.CollectionMessage} CollectionMessage instance
                 */
                CollectionMessage.create = function create(properties) {
                    return new CollectionMessage(properties);
                };

                /**
                 * Encodes the specified CollectionMessage message. Does not implicitly {@link E2E.Message.InteractiveMessage.CollectionMessage.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.InteractiveMessage.CollectionMessage
                 * @static
                 * @param {E2E.Message.InteractiveMessage.ICollectionMessage} message CollectionMessage message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CollectionMessage.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.bizJid != null && Object.hasOwnProperty.call(message, "bizJid"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.bizJid);
                    if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.id);
                    if (message.messageVersion != null && Object.hasOwnProperty.call(message, "messageVersion"))
                        writer.uint32(/* id 3, wireType 0 =*/24).int32(message.messageVersion);
                    return writer;
                };

                /**
                 * Encodes the specified CollectionMessage message, length delimited. Does not implicitly {@link E2E.Message.InteractiveMessage.CollectionMessage.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.InteractiveMessage.CollectionMessage
                 * @static
                 * @param {E2E.Message.InteractiveMessage.ICollectionMessage} message CollectionMessage message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CollectionMessage.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a CollectionMessage message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.InteractiveMessage.CollectionMessage
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.InteractiveMessage.CollectionMessage} CollectionMessage
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CollectionMessage.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.E2E.Message.InteractiveMessage.CollectionMessage();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.bizJid = reader.string();
                                break;
                            }
                        case 2: {
                                message.id = reader.string();
                                break;
                            }
                        case 3: {
                                message.messageVersion = reader.int32();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a CollectionMessage message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.InteractiveMessage.CollectionMessage
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.InteractiveMessage.CollectionMessage} CollectionMessage
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CollectionMessage.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a CollectionMessage message.
                 * @function verify
                 * @memberof E2E.Message.InteractiveMessage.CollectionMessage
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CollectionMessage.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.bizJid != null && message.hasOwnProperty("bizJid")) {
                        properties._bizJid = 1;
                        if (!$util.isString(message.bizJid))
                            return "bizJid: string expected";
                    }
                    if (message.id != null && message.hasOwnProperty("id")) {
                        properties._id = 1;
                        if (!$util.isString(message.id))
                            return "id: string expected";
                    }
                    if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) {
                        properties._messageVersion = 1;
                        if (!$util.isInteger(message.messageVersion))
                            return "messageVersion: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a CollectionMessage message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.InteractiveMessage.CollectionMessage
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.InteractiveMessage.CollectionMessage} CollectionMessage
                 */
                CollectionMessage.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.InteractiveMessage.CollectionMessage)
                        return object;
                    var message = new $root.E2E.Message.InteractiveMessage.CollectionMessage();
                    if (object.bizJid != null)
                        message.bizJid = String(object.bizJid);
                    if (object.id != null)
                        message.id = String(object.id);
                    if (object.messageVersion != null)
                        message.messageVersion = object.messageVersion | 0;
                    return message;
                };

                /**
                 * Creates a plain object from a CollectionMessage message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.InteractiveMessage.CollectionMessage
                 * @static
                 * @param {E2E.Message.InteractiveMessage.CollectionMessage} message CollectionMessage
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CollectionMessage.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.bizJid != null && message.hasOwnProperty("bizJid")) {
                        object.bizJid = message.bizJid;
                        if (options.oneofs)
                            object._bizJid = "bizJid";
                    }
                    if (message.id != null && message.hasOwnProperty("id")) {
                        object.id = message.id;
                        if (options.oneofs)
                            object._id = "id";
                    }
                    if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) {
                        object.messageVersion = message.messageVersion;
                        if (options.oneofs)
                            object._messageVersion = "messageVersion";
                    }
                    return object;
                };

                /**
                 * Converts this CollectionMessage to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.InteractiveMessage.CollectionMessage
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CollectionMessage.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for CollectionMessage
                 * @function getTypeUrl
                 * @memberof E2E.Message.InteractiveMessage.CollectionMessage
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                CollectionMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.InteractiveMessage.CollectionMessage";
                };

                return CollectionMessage;
            })();

            InteractiveMessage.Footer = (function() {

                /**
                 * Properties of a Footer.
                 * @memberof E2E.Message.InteractiveMessage
                 * @interface IFooter
                 * @property {string|null} [text] Footer text
                 * @property {boolean|null} [hasMediaAttachment] Footer hasMediaAttachment
                 * @property {E2E.Message.IAudioMessage|null} [audioMessage] Footer audioMessage
                 */

                /**
                 * Constructs a new Footer.
                 * @memberof E2E.Message.InteractiveMessage
                 * @classdesc Represents a Footer.
                 * @implements IFooter
                 * @constructor
                 * @param {E2E.Message.InteractiveMessage.IFooter=} [properties] Properties to set
                 */
                function Footer(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]];
                }

                /**
                 * Footer text.
                 * @member {string|null|undefined} text
                 * @memberof E2E.Message.InteractiveMessage.Footer
                 * @instance
                 */
                Footer.prototype.text = null;

                /**
                 * Footer hasMediaAttachment.
                 * @member {boolean|null|undefined} hasMediaAttachment
                 * @memberof E2E.Message.InteractiveMessage.Footer
                 * @instance
                 */
                Footer.prototype.hasMediaAttachment = null;

                /**
                 * Footer audioMessage.
                 * @member {E2E.Message.IAudioMessage|null|undefined} audioMessage
                 * @memberof E2E.Message.InteractiveMessage.Footer
                 * @instance
                 */
                Footer.prototype.audioMessage = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * Footer _text.
                 * @member {"text"|undefined} _text
                 * @memberof E2E.Message.InteractiveMessage.Footer
                 * @instance
                 */
                Object.defineProperty(Footer.prototype, "_text", {
                    get: $util.oneOfGetter($oneOfFields = ["text"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Footer _hasMediaAttachment.
                 * @member {"hasMediaAttachment"|undefined} _hasMediaAttachment
                 * @memberof E2E.Message.InteractiveMessage.Footer
                 * @instance
                 */
                Object.defineProperty(Footer.prototype, "_hasMediaAttachment", {
                    get: $util.oneOfGetter($oneOfFields = ["hasMediaAttachment"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Footer media.
                 * @member {"audioMessage"|undefined} media
                 * @memberof E2E.Message.InteractiveMessage.Footer
                 * @instance
                 */
                Object.defineProperty(Footer.prototype, "media", {
                    get: $util.oneOfGetter($oneOfFields = ["audioMessage"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new Footer instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.InteractiveMessage.Footer
                 * @static
                 * @param {E2E.Message.InteractiveMessage.IFooter=} [properties] Properties to set
                 * @returns {E2E.Message.InteractiveMessage.Footer} Footer instance
                 */
                Footer.create = function create(properties) {
                    return new Footer(properties);
                };

                /**
                 * Encodes the specified Footer message. Does not implicitly {@link E2E.Message.InteractiveMessage.Footer.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.InteractiveMessage.Footer
                 * @static
                 * @param {E2E.Message.InteractiveMessage.IFooter} message Footer message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Footer.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.text);
                    if (message.audioMessage != null && Object.hasOwnProperty.call(message, "audioMessage"))
                        $root.E2E.Message.AudioMessage.encode(message.audioMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    if (message.hasMediaAttachment != null && Object.hasOwnProperty.call(message, "hasMediaAttachment"))
                        writer.uint32(/* id 3, wireType 0 =*/24).bool(message.hasMediaAttachment);
                    return writer;
                };

                /**
                 * Encodes the specified Footer message, length delimited. Does not implicitly {@link E2E.Message.InteractiveMessage.Footer.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.InteractiveMessage.Footer
                 * @static
                 * @param {E2E.Message.InteractiveMessage.IFooter} message Footer message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Footer.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Footer message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.InteractiveMessage.Footer
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.InteractiveMessage.Footer} Footer
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Footer.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.E2E.Message.InteractiveMessage.Footer();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.text = reader.string();
                                break;
                            }
                        case 3: {
                                message.hasMediaAttachment = reader.bool();
                                break;
                            }
                        case 2: {
                                message.audioMessage = $root.E2E.Message.AudioMessage.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a Footer message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.InteractiveMessage.Footer
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.InteractiveMessage.Footer} Footer
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Footer.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Footer message.
                 * @function verify
                 * @memberof E2E.Message.InteractiveMessage.Footer
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Footer.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.text != null && message.hasOwnProperty("text")) {
                        properties._text = 1;
                        if (!$util.isString(message.text))
                            return "text: string expected";
                    }
                    if (message.hasMediaAttachment != null && message.hasOwnProperty("hasMediaAttachment")) {
                        properties._hasMediaAttachment = 1;
                        if (typeof message.hasMediaAttachment !== "boolean")
                            return "hasMediaAttachment: boolean expected";
                    }
                    if (message.audioMessage != null && message.hasOwnProperty("audioMessage")) {
                        properties.media = 1;
                        {
                            var error = $root.E2E.Message.AudioMessage.verify(message.audioMessage);
                            if (error)
                                return "audioMessage." + error;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Footer message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.InteractiveMessage.Footer
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.InteractiveMessage.Footer} Footer
                 */
                Footer.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.InteractiveMessage.Footer)
                        return object;
                    var message = new $root.E2E.Message.InteractiveMessage.Footer();
                    if (object.text != null)
                        message.text = String(object.text);
                    if (object.hasMediaAttachment != null)
                        message.hasMediaAttachment = Boolean(object.hasMediaAttachment);
                    if (object.audioMessage != null) {
                        if (typeof object.audioMessage !== "object")
                            throw TypeError(".E2E.Message.InteractiveMessage.Footer.audioMessage: object expected");
                        message.audioMessage = $root.E2E.Message.AudioMessage.fromObject(object.audioMessage);
                    }
                    return message;
                };

                /**
                 * Creates a plain object from a Footer message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.InteractiveMessage.Footer
                 * @static
                 * @param {E2E.Message.InteractiveMessage.Footer} message Footer
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Footer.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.text != null && message.hasOwnProperty("text")) {
                        object.text = message.text;
                        if (options.oneofs)
                            object._text = "text";
                    }
                    if (message.audioMessage != null && message.hasOwnProperty("audioMessage")) {
                        object.audioMessage = $root.E2E.Message.AudioMessage.toObject(message.audioMessage, options);
                        if (options.oneofs)
                            object.media = "audioMessage";
                    }
                    if (message.hasMediaAttachment != null && message.hasOwnProperty("hasMediaAttachment")) {
                        object.hasMediaAttachment = message.hasMediaAttachment;
                        if (options.oneofs)
                            object._hasMediaAttachment = "hasMediaAttachment";
                    }
                    return object;
                };

                /**
                 * Converts this Footer to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.InteractiveMessage.Footer
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Footer.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for Footer
                 * @function getTypeUrl
                 * @memberof E2E.Message.InteractiveMessage.Footer
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Footer.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.InteractiveMessage.Footer";
                };

                return Footer;
            })();

            InteractiveMessage.Header = (function() {

                /**
                 * Properties of a Header.
                 * @memberof E2E.Message.InteractiveMessage
                 * @interface IHeader
                 * @property {string|null} [title] Header title
                 * @property {string|null} [subtitle] Header subtitle
                 * @property {boolean|null} [hasMediaAttachment] Header hasMediaAttachment
                 * @property {E2E.Message.IDocumentMessage|null} [documentMessage] Header documentMessage
                 * @property {E2E.Message.IImageMessage|null} [imageMessage] Header imageMessage
                 * @property {Uint8Array|null} [jpegThumbnail] Header jpegThumbnail
                 * @property {E2E.Message.IVideoMessage|null} [videoMessage] Header videoMessage
                 * @property {E2E.Message.ILocationMessage|null} [locationMessage] Header locationMessage
                 * @property {E2E.Message.IProductMessage|null} [productMessage] Header productMessage
                 */

                /**
                 * Constructs a new Header.
                 * @memberof E2E.Message.InteractiveMessage
                 * @classdesc Represents a Header.
                 * @implements IHeader
                 * @constructor
                 * @param {E2E.Message.InteractiveMessage.IHeader=} [properties] Properties to set
                 */
                function Header(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]];
                }

                /**
                 * Header title.
                 * @member {string|null|undefined} title
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @instance
                 */
                Header.prototype.title = null;

                /**
                 * Header subtitle.
                 * @member {string|null|undefined} subtitle
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @instance
                 */
                Header.prototype.subtitle = null;

                /**
                 * Header hasMediaAttachment.
                 * @member {boolean|null|undefined} hasMediaAttachment
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @instance
                 */
                Header.prototype.hasMediaAttachment = null;

                /**
                 * Header documentMessage.
                 * @member {E2E.Message.IDocumentMessage|null|undefined} documentMessage
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @instance
                 */
                Header.prototype.documentMessage = null;

                /**
                 * Header imageMessage.
                 * @member {E2E.Message.IImageMessage|null|undefined} imageMessage
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @instance
                 */
                Header.prototype.imageMessage = null;

                /**
                 * Header jpegThumbnail.
                 * @member {Uint8Array|null|undefined} jpegThumbnail
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @instance
                 */
                Header.prototype.jpegThumbnail = null;

                /**
                 * Header videoMessage.
                 * @member {E2E.Message.IVideoMessage|null|undefined} videoMessage
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @instance
                 */
                Header.prototype.videoMessage = null;

                /**
                 * Header locationMessage.
                 * @member {E2E.Message.ILocationMessage|null|undefined} locationMessage
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @instance
                 */
                Header.prototype.locationMessage = null;

                /**
                 * Header productMessage.
                 * @member {E2E.Message.IProductMessage|null|undefined} productMessage
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @instance
                 */
                Header.prototype.productMessage = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * Header _title.
                 * @member {"title"|undefined} _title
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @instance
                 */
                Object.defineProperty(Header.prototype, "_title", {
                    get: $util.oneOfGetter($oneOfFields = ["title"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Header _subtitle.
                 * @member {"subtitle"|undefined} _subtitle
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @instance
                 */
                Object.defineProperty(Header.prototype, "_subtitle", {
                    get: $util.oneOfGetter($oneOfFields = ["subtitle"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Header _hasMediaAttachment.
                 * @member {"hasMediaAttachment"|undefined} _hasMediaAttachment
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @instance
                 */
                Object.defineProperty(Header.prototype, "_hasMediaAttachment", {
                    get: $util.oneOfGetter($oneOfFields = ["hasMediaAttachment"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Header media.
                 * @member {"documentMessage"|"imageMessage"|"jpegThumbnail"|"videoMessage"|"locationMessage"|"productMessage"|undefined} media
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @instance
                 */
                Object.defineProperty(Header.prototype, "media", {
                    get: $util.oneOfGetter($oneOfFields = ["documentMessage", "imageMessage", "jpegThumbnail", "videoMessage", "locationMessage", "productMessage"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new Header instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @static
                 * @param {E2E.Message.InteractiveMessage.IHeader=} [properties] Properties to set
                 * @returns {E2E.Message.InteractiveMessage.Header} Header instance
                 */
                Header.create = function create(properties) {
                    return new Header(properties);
                };

                /**
                 * Encodes the specified Header message. Does not implicitly {@link E2E.Message.InteractiveMessage.Header.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @static
                 * @param {E2E.Message.InteractiveMessage.IHeader} message Header message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Header.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.title);
                    if (message.subtitle != null && Object.hasOwnProperty.call(message, "subtitle"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.subtitle);
                    if (message.documentMessage != null && Object.hasOwnProperty.call(message, "documentMessage"))
                        $root.E2E.Message.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                    if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage"))
                        $root.E2E.Message.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                    if (message.hasMediaAttachment != null && Object.hasOwnProperty.call(message, "hasMediaAttachment"))
                        writer.uint32(/* id 5, wireType 0 =*/40).bool(message.hasMediaAttachment);
                    if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail"))
                        writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.jpegThumbnail);
                    if (message.videoMessage != null && Object.hasOwnProperty.call(message, "videoMessage"))
                        $root.E2E.Message.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                    if (message.locationMessage != null && Object.hasOwnProperty.call(message, "locationMessage"))
                        $root.E2E.Message.LocationMessage.encode(message.locationMessage, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                    if (message.productMessage != null && Object.hasOwnProperty.call(message, "productMessage"))
                        $root.E2E.Message.ProductMessage.encode(message.productMessage, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                    return writer;
                };

                /**
                 * Encodes the specified Header message, length delimited. Does not implicitly {@link E2E.Message.InteractiveMessage.Header.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @static
                 * @param {E2E.Message.InteractiveMessage.IHeader} message Header message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Header.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Header message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.InteractiveMessage.Header} Header
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Header.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.E2E.Message.InteractiveMessage.Header();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.title = reader.string();
                                break;
                            }
                        case 2: {
                                message.subtitle = reader.string();
                                break;
                            }
                        case 5: {
                                message.hasMediaAttachment = reader.bool();
                                break;
                            }
                        case 3: {
                                message.documentMessage = $root.E2E.Message.DocumentMessage.decode(reader, reader.uint32());
                                break;
                            }
                        case 4: {
                                message.imageMessage = $root.E2E.Message.ImageMessage.decode(reader, reader.uint32());
                                break;
                            }
                        case 6: {
                                message.jpegThumbnail = reader.bytes();
                                break;
                            }
                        case 7: {
                                message.videoMessage = $root.E2E.Message.VideoMessage.decode(reader, reader.uint32());
                                break;
                            }
                        case 8: {
                                message.locationMessage = $root.E2E.Message.LocationMessage.decode(reader, reader.uint32());
                                break;
                            }
                        case 9: {
                                message.productMessage = $root.E2E.Message.ProductMessage.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a Header message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.InteractiveMessage.Header} Header
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Header.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Header message.
                 * @function verify
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Header.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.title != null && message.hasOwnProperty("title")) {
                        properties._title = 1;
                        if (!$util.isString(message.title))
                            return "title: string expected";
                    }
                    if (message.subtitle != null && message.hasOwnProperty("subtitle")) {
                        properties._subtitle = 1;
                        if (!$util.isString(message.subtitle))
                            return "subtitle: string expected";
                    }
                    if (message.hasMediaAttachment != null && message.hasOwnProperty("hasMediaAttachment")) {
                        properties._hasMediaAttachment = 1;
                        if (typeof message.hasMediaAttachment !== "boolean")
                            return "hasMediaAttachment: boolean expected";
                    }
                    if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) {
                        properties.media = 1;
                        {
                            var error = $root.E2E.Message.DocumentMessage.verify(message.documentMessage);
                            if (error)
                                return "documentMessage." + error;
                        }
                    }
                    if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) {
                        if (properties.media === 1)
                            return "media: multiple values";
                        properties.media = 1;
                        {
                            var error = $root.E2E.Message.ImageMessage.verify(message.imageMessage);
                            if (error)
                                return "imageMessage." + error;
                        }
                    }
                    if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                        if (properties.media === 1)
                            return "media: multiple values";
                        properties.media = 1;
                        if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                            return "jpegThumbnail: buffer expected";
                    }
                    if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) {
                        if (properties.media === 1)
                            return "media: multiple values";
                        properties.media = 1;
                        {
                            var error = $root.E2E.Message.VideoMessage.verify(message.videoMessage);
                            if (error)
                                return "videoMessage." + error;
                        }
                    }
                    if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) {
                        if (properties.media === 1)
                            return "media: multiple values";
                        properties.media = 1;
                        {
                            var error = $root.E2E.Message.LocationMessage.verify(message.locationMessage);
                            if (error)
                                return "locationMessage." + error;
                        }
                    }
                    if (message.productMessage != null && message.hasOwnProperty("productMessage")) {
                        if (properties.media === 1)
                            return "media: multiple values";
                        properties.media = 1;
                        {
                            var error = $root.E2E.Message.ProductMessage.verify(message.productMessage);
                            if (error)
                                return "productMessage." + error;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Header message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.InteractiveMessage.Header} Header
                 */
                Header.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.InteractiveMessage.Header)
                        return object;
                    var message = new $root.E2E.Message.InteractiveMessage.Header();
                    if (object.title != null)
                        message.title = String(object.title);
                    if (object.subtitle != null)
                        message.subtitle = String(object.subtitle);
                    if (object.hasMediaAttachment != null)
                        message.hasMediaAttachment = Boolean(object.hasMediaAttachment);
                    if (object.documentMessage != null) {
                        if (typeof object.documentMessage !== "object")
                            throw TypeError(".E2E.Message.InteractiveMessage.Header.documentMessage: object expected");
                        message.documentMessage = $root.E2E.Message.DocumentMessage.fromObject(object.documentMessage);
                    }
                    if (object.imageMessage != null) {
                        if (typeof object.imageMessage !== "object")
                            throw TypeError(".E2E.Message.InteractiveMessage.Header.imageMessage: object expected");
                        message.imageMessage = $root.E2E.Message.ImageMessage.fromObject(object.imageMessage);
                    }
                    if (object.jpegThumbnail != null)
                        if (typeof object.jpegThumbnail === "string")
                            $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0);
                        else if (object.jpegThumbnail.length >= 0)
                            message.jpegThumbnail = object.jpegThumbnail;
                    if (object.videoMessage != null) {
                        if (typeof object.videoMessage !== "object")
                            throw TypeError(".E2E.Message.InteractiveMessage.Header.videoMessage: object expected");
                        message.videoMessage = $root.E2E.Message.VideoMessage.fromObject(object.videoMessage);
                    }
                    if (object.locationMessage != null) {
                        if (typeof object.locationMessage !== "object")
                            throw TypeError(".E2E.Message.InteractiveMessage.Header.locationMessage: object expected");
                        message.locationMessage = $root.E2E.Message.LocationMessage.fromObject(object.locationMessage);
                    }
                    if (object.productMessage != null) {
                        if (typeof object.productMessage !== "object")
                            throw TypeError(".E2E.Message.InteractiveMessage.Header.productMessage: object expected");
                        message.productMessage = $root.E2E.Message.ProductMessage.fromObject(object.productMessage);
                    }
                    return message;
                };

                /**
                 * Creates a plain object from a Header message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @static
                 * @param {E2E.Message.InteractiveMessage.Header} message Header
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Header.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.title != null && message.hasOwnProperty("title")) {
                        object.title = message.title;
                        if (options.oneofs)
                            object._title = "title";
                    }
                    if (message.subtitle != null && message.hasOwnProperty("subtitle")) {
                        object.subtitle = message.subtitle;
                        if (options.oneofs)
                            object._subtitle = "subtitle";
                    }
                    if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) {
                        object.documentMessage = $root.E2E.Message.DocumentMessage.toObject(message.documentMessage, options);
                        if (options.oneofs)
                            object.media = "documentMessage";
                    }
                    if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) {
                        object.imageMessage = $root.E2E.Message.ImageMessage.toObject(message.imageMessage, options);
                        if (options.oneofs)
                            object.media = "imageMessage";
                    }
                    if (message.hasMediaAttachment != null && message.hasOwnProperty("hasMediaAttachment")) {
                        object.hasMediaAttachment = message.hasMediaAttachment;
                        if (options.oneofs)
                            object._hasMediaAttachment = "hasMediaAttachment";
                    }
                    if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                        object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail;
                        if (options.oneofs)
                            object.media = "jpegThumbnail";
                    }
                    if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) {
                        object.videoMessage = $root.E2E.Message.VideoMessage.toObject(message.videoMessage, options);
                        if (options.oneofs)
                            object.media = "videoMessage";
                    }
                    if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) {
                        object.locationMessage = $root.E2E.Message.LocationMessage.toObject(message.locationMessage, options);
                        if (options.oneofs)
                            object.media = "locationMessage";
                    }
                    if (message.productMessage != null && message.hasOwnProperty("productMessage")) {
                        object.productMessage = $root.E2E.Message.ProductMessage.toObject(message.productMessage, options);
                        if (options.oneofs)
                            object.media = "productMessage";
                    }
                    return object;
                };

                /**
                 * Converts this Header to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Header.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for Header
                 * @function getTypeUrl
                 * @memberof E2E.Message.InteractiveMessage.Header
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Header.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.InteractiveMessage.Header";
                };

                return Header;
            })();

            InteractiveMessage.NativeFlowMessage = (function() {

                /**
                 * Properties of a NativeFlowMessage.
                 * @memberof E2E.Message.InteractiveMessage
                 * @interface INativeFlowMessage
                 * @property {Array.<E2E.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton>|null} [buttons] NativeFlowMessage buttons
                 * @property {string|null} [messageParamsJson] NativeFlowMessage messageParamsJson
                 * @property {number|null} [messageVersion] NativeFlowMessage messageVersion
                 */

                /**
                 * Constructs a new NativeFlowMessage.
                 * @memberof E2E.Message.InteractiveMessage
                 * @classdesc Represents a NativeFlowMessage.
                 * @implements INativeFlowMessage
                 * @constructor
                 * @param {E2E.Message.InteractiveMessage.INativeFlowMessage=} [properties] Properties to set
                 */
                function NativeFlowMessage(properties) {
                    this.buttons = [];
                    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]];
                }

                /**
                 * NativeFlowMessage buttons.
                 * @member {Array.<E2E.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton>} buttons
                 * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage
                 * @instance
                 */
                NativeFlowMessage.prototype.buttons = $util.emptyArray;

                /**
                 * NativeFlowMessage messageParamsJson.
                 * @member {string|null|undefined} messageParamsJson
                 * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage
                 * @instance
                 */
                NativeFlowMessage.prototype.messageParamsJson = null;

                /**
                 * NativeFlowMessage messageVersion.
                 * @member {number|null|undefined} messageVersion
                 * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage
                 * @instance
                 */
                NativeFlowMessage.prototype.messageVersion = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * NativeFlowMessage _messageParamsJson.
                 * @member {"messageParamsJson"|undefined} _messageParamsJson
                 * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage
                 * @instance
                 */
                Object.defineProperty(NativeFlowMessage.prototype, "_messageParamsJson", {
                    get: $util.oneOfGetter($oneOfFields = ["messageParamsJson"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * NativeFlowMessage _messageVersion.
                 * @member {"messageVersion"|undefined} _messageVersion
                 * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage
                 * @instance
                 */
                Object.defineProperty(NativeFlowMessage.prototype, "_messageVersion", {
                    get: $util.oneOfGetter($oneOfFields = ["messageVersion"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new NativeFlowMessage instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage
                 * @static
                 * @param {E2E.Message.InteractiveMessage.INativeFlowMessage=} [properties] Properties to set
                 * @returns {E2E.Message.InteractiveMessage.NativeFlowMessage} NativeFlowMessage instance
                 */
                NativeFlowMessage.create = function create(properties) {
                    return new NativeFlowMessage(properties);
                };

                /**
                 * Encodes the specified NativeFlowMessage message. Does not implicitly {@link E2E.Message.InteractiveMessage.NativeFlowMessage.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage
                 * @static
                 * @param {E2E.Message.InteractiveMessage.INativeFlowMessage} message NativeFlowMessage message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                NativeFlowMessage.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.buttons != null && message.buttons.length)
                        for (var i = 0; i < message.buttons.length; ++i)
                            $root.E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton.encode(message.buttons[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    if (message.messageParamsJson != null && Object.hasOwnProperty.call(message, "messageParamsJson"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.messageParamsJson);
                    if (message.messageVersion != null && Object.hasOwnProperty.call(message, "messageVersion"))
                        writer.uint32(/* id 3, wireType 0 =*/24).int32(message.messageVersion);
                    return writer;
                };

                /**
                 * Encodes the specified NativeFlowMessage message, length delimited. Does not implicitly {@link E2E.Message.InteractiveMessage.NativeFlowMessage.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage
                 * @static
                 * @param {E2E.Message.InteractiveMessage.INativeFlowMessage} message NativeFlowMessage message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                NativeFlowMessage.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a NativeFlowMessage message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.InteractiveMessage.NativeFlowMessage} NativeFlowMessage
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                NativeFlowMessage.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.E2E.Message.InteractiveMessage.NativeFlowMessage();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                if (!(message.buttons && message.buttons.length))
                                    message.buttons = [];
                                message.buttons.push($root.E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton.decode(reader, reader.uint32()));
                                break;
                            }
                        case 2: {
                                message.messageParamsJson = reader.string();
                                break;
                            }
                        case 3: {
                                message.messageVersion = reader.int32();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a NativeFlowMessage message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.InteractiveMessage.NativeFlowMessage} NativeFlowMessage
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                NativeFlowMessage.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a NativeFlowMessage message.
                 * @function verify
                 * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                NativeFlowMessage.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.buttons != null && message.hasOwnProperty("buttons")) {
                        if (!Array.isArray(message.buttons))
                            return "buttons: array expected";
                        for (var i = 0; i < message.buttons.length; ++i) {
                            var error = $root.E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton.verify(message.buttons[i]);
                            if (error)
                                return "buttons." + error;
                        }
                    }
                    if (message.messageParamsJson != null && message.hasOwnProperty("messageParamsJson")) {
                        properties._messageParamsJson = 1;
                        if (!$util.isString(message.messageParamsJson))
                            return "messageParamsJson: string expected";
                    }
                    if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) {
                        properties._messageVersion = 1;
                        if (!$util.isInteger(message.messageVersion))
                            return "messageVersion: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a NativeFlowMessage message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.InteractiveMessage.NativeFlowMessage} NativeFlowMessage
                 */
                NativeFlowMessage.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.InteractiveMessage.NativeFlowMessage)
                        return object;
                    var message = new $root.E2E.Message.InteractiveMessage.NativeFlowMessage();
                    if (object.buttons) {
                        if (!Array.isArray(object.buttons))
                            throw TypeError(".E2E.Message.InteractiveMessage.NativeFlowMessage.buttons: array expected");
                        message.buttons = [];
                        for (var i = 0; i < object.buttons.length; ++i) {
                            if (typeof object.buttons[i] !== "object")
                                throw TypeError(".E2E.Message.InteractiveMessage.NativeFlowMessage.buttons: object expected");
                            message.buttons[i] = $root.E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton.fromObject(object.buttons[i]);
                        }
                    }
                    if (object.messageParamsJson != null)
                        message.messageParamsJson = String(object.messageParamsJson);
                    if (object.messageVersion != null)
                        message.messageVersion = object.messageVersion | 0;
                    return message;
                };

                /**
                 * Creates a plain object from a NativeFlowMessage message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage
                 * @static
                 * @param {E2E.Message.InteractiveMessage.NativeFlowMessage} message NativeFlowMessage
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                NativeFlowMessage.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.buttons = [];
                    if (message.buttons && message.buttons.length) {
                        object.buttons = [];
                        for (var j = 0; j < message.buttons.length; ++j)
                            object.buttons[j] = $root.E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton.toObject(message.buttons[j], options);
                    }
                    if (message.messageParamsJson != null && message.hasOwnProperty("messageParamsJson")) {
                        object.messageParamsJson = message.messageParamsJson;
                        if (options.oneofs)
                            object._messageParamsJson = "messageParamsJson";
                    }
                    if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) {
                        object.messageVersion = message.messageVersion;
                        if (options.oneofs)
                            object._messageVersion = "messageVersion";
                    }
                    return object;
                };

                /**
                 * Converts this NativeFlowMessage to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                NativeFlowMessage.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for NativeFlowMessage
                 * @function getTypeUrl
                 * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                NativeFlowMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.InteractiveMessage.NativeFlowMessage";
                };

                NativeFlowMessage.NativeFlowButton = (function() {

                    /**
                     * Properties of a NativeFlowButton.
                     * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage
                     * @interface INativeFlowButton
                     * @property {string|null} [name] NativeFlowButton name
                     * @property {string|null} [buttonParamsJson] NativeFlowButton buttonParamsJson
                     */

                    /**
                     * Constructs a new NativeFlowButton.
                     * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage
                     * @classdesc Represents a NativeFlowButton.
                     * @implements INativeFlowButton
                     * @constructor
                     * @param {E2E.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton=} [properties] Properties to set
                     */
                    function NativeFlowButton(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]];
                    }

                    /**
                     * NativeFlowButton name.
                     * @member {string|null|undefined} name
                     * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton
                     * @instance
                     */
                    NativeFlowButton.prototype.name = null;

                    /**
                     * NativeFlowButton buttonParamsJson.
                     * @member {string|null|undefined} buttonParamsJson
                     * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton
                     * @instance
                     */
                    NativeFlowButton.prototype.buttonParamsJson = null;

                    // OneOf field names bound to virtual getters and setters
                    var $oneOfFields;

                    /**
                     * NativeFlowButton _name.
                     * @member {"name"|undefined} _name
                     * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton
                     * @instance
                     */
                    Object.defineProperty(NativeFlowButton.prototype, "_name", {
                        get: $util.oneOfGetter($oneOfFields = ["name"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * NativeFlowButton _buttonParamsJson.
                     * @member {"buttonParamsJson"|undefined} _buttonParamsJson
                     * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton
                     * @instance
                     */
                    Object.defineProperty(NativeFlowButton.prototype, "_buttonParamsJson", {
                        get: $util.oneOfGetter($oneOfFields = ["buttonParamsJson"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * Creates a new NativeFlowButton instance using the specified properties.
                     * @function create
                     * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton
                     * @static
                     * @param {E2E.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton=} [properties] Properties to set
                     * @returns {E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton} NativeFlowButton instance
                     */
                    NativeFlowButton.create = function create(properties) {
                        return new NativeFlowButton(properties);
                    };

                    /**
                     * Encodes the specified NativeFlowButton message. Does not implicitly {@link E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton.verify|verify} messages.
                     * @function encode
                     * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton
                     * @static
                     * @param {E2E.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton} message NativeFlowButton message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    NativeFlowButton.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                            writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                        if (message.buttonParamsJson != null && Object.hasOwnProperty.call(message, "buttonParamsJson"))
                            writer.uint32(/* id 2, wireType 2 =*/18).string(message.buttonParamsJson);
                        return writer;
                    };

                    /**
                     * Encodes the specified NativeFlowButton message, length delimited. Does not implicitly {@link E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton
                     * @static
                     * @param {E2E.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton} message NativeFlowButton message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    NativeFlowButton.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a NativeFlowButton message from the specified reader or buffer.
                     * @function decode
                     * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton} NativeFlowButton
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    NativeFlowButton.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.E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            if (tag === error)
                                break;
                            switch (tag >>> 3) {
                            case 1: {
                                    message.name = reader.string();
                                    break;
                                }
                            case 2: {
                                    message.buttonParamsJson = reader.string();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a NativeFlowButton message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton} NativeFlowButton
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    NativeFlowButton.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a NativeFlowButton message.
                     * @function verify
                     * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    NativeFlowButton.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        var properties = {};
                        if (message.name != null && message.hasOwnProperty("name")) {
                            properties._name = 1;
                            if (!$util.isString(message.name))
                                return "name: string expected";
                        }
                        if (message.buttonParamsJson != null && message.hasOwnProperty("buttonParamsJson")) {
                            properties._buttonParamsJson = 1;
                            if (!$util.isString(message.buttonParamsJson))
                                return "buttonParamsJson: string expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a NativeFlowButton message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton} NativeFlowButton
                     */
                    NativeFlowButton.fromObject = function fromObject(object) {
                        if (object instanceof $root.E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton)
                            return object;
                        var message = new $root.E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton();
                        if (object.name != null)
                            message.name = String(object.name);
                        if (object.buttonParamsJson != null)
                            message.buttonParamsJson = String(object.buttonParamsJson);
                        return message;
                    };

                    /**
                     * Creates a plain object from a NativeFlowButton message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton
                     * @static
                     * @param {E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton} message NativeFlowButton
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    NativeFlowButton.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (message.name != null && message.hasOwnProperty("name")) {
                            object.name = message.name;
                            if (options.oneofs)
                                object._name = "name";
                        }
                        if (message.buttonParamsJson != null && message.hasOwnProperty("buttonParamsJson")) {
                            object.buttonParamsJson = message.buttonParamsJson;
                            if (options.oneofs)
                                object._buttonParamsJson = "buttonParamsJson";
                        }
                        return object;
                    };

                    /**
                     * Converts this NativeFlowButton to JSON.
                     * @function toJSON
                     * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    NativeFlowButton.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for NativeFlowButton
                     * @function getTypeUrl
                     * @memberof E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    NativeFlowButton.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/E2E.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton";
                    };

                    return NativeFlowButton;
                })();

                return NativeFlowMessage;
            })();

            InteractiveMessage.ShopMessage = (function() {

                /**
                 * Properties of a ShopMessage.
                 * @memberof E2E.Message.InteractiveMessage
                 * @interface IShopMessage
                 * @property {string|null} [id] ShopMessage id
                 * @property {E2E.Message.InteractiveMessage.ShopMessage.Surface|null} [surface] ShopMessage surface
                 * @property {number|null} [messageVersion] ShopMessage messageVersion
                 */

                /**
                 * Constructs a new ShopMessage.
                 * @memberof E2E.Message.InteractiveMessage
                 * @classdesc Represents a ShopMessage.
                 * @implements IShopMessage
                 * @constructor
                 * @param {E2E.Message.InteractiveMessage.IShopMessage=} [properties] Properties to set
                 */
                function ShopMessage(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]];
                }

                /**
                 * ShopMessage id.
                 * @member {string|null|undefined} id
                 * @memberof E2E.Message.InteractiveMessage.ShopMessage
                 * @instance
                 */
                ShopMessage.prototype.id = null;

                /**
                 * ShopMessage surface.
                 * @member {E2E.Message.InteractiveMessage.ShopMessage.Surface|null|undefined} surface
                 * @memberof E2E.Message.InteractiveMessage.ShopMessage
                 * @instance
                 */
                ShopMessage.prototype.surface = null;

                /**
                 * ShopMessage messageVersion.
                 * @member {number|null|undefined} messageVersion
                 * @memberof E2E.Message.InteractiveMessage.ShopMessage
                 * @instance
                 */
                ShopMessage.prototype.messageVersion = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * ShopMessage _id.
                 * @member {"id"|undefined} _id
                 * @memberof E2E.Message.InteractiveMessage.ShopMessage
                 * @instance
                 */
                Object.defineProperty(ShopMessage.prototype, "_id", {
                    get: $util.oneOfGetter($oneOfFields = ["id"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * ShopMessage _surface.
                 * @member {"surface"|undefined} _surface
                 * @memberof E2E.Message.InteractiveMessage.ShopMessage
                 * @instance
                 */
                Object.defineProperty(ShopMessage.prototype, "_surface", {
                    get: $util.oneOfGetter($oneOfFields = ["surface"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * ShopMessage _messageVersion.
                 * @member {"messageVersion"|undefined} _messageVersion
                 * @memberof E2E.Message.InteractiveMessage.ShopMessage
                 * @instance
                 */
                Object.defineProperty(ShopMessage.prototype, "_messageVersion", {
                    get: $util.oneOfGetter($oneOfFields = ["messageVersion"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new ShopMessage instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.InteractiveMessage.ShopMessage
                 * @static
                 * @param {E2E.Message.InteractiveMessage.IShopMessage=} [properties] Properties to set
                 * @returns {E2E.Message.InteractiveMessage.ShopMessage} ShopMessage instance
                 */
                ShopMessage.create = function create(properties) {
                    return new ShopMessage(properties);
                };

                /**
                 * Encodes the specified ShopMessage message. Does not implicitly {@link E2E.Message.InteractiveMessage.ShopMessage.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.InteractiveMessage.ShopMessage
                 * @static
                 * @param {E2E.Message.InteractiveMessage.IShopMessage} message ShopMessage message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ShopMessage.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.id);
                    if (message.surface != null && Object.hasOwnProperty.call(message, "surface"))
                        writer.uint32(/* id 2, wireType 0 =*/16).int32(message.surface);
                    if (message.messageVersion != null && Object.hasOwnProperty.call(message, "messageVersion"))
                        writer.uint32(/* id 3, wireType 0 =*/24).int32(message.messageVersion);
                    return writer;
                };

                /**
                 * Encodes the specified ShopMessage message, length delimited. Does not implicitly {@link E2E.Message.InteractiveMessage.ShopMessage.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.InteractiveMessage.ShopMessage
                 * @static
                 * @param {E2E.Message.InteractiveMessage.IShopMessage} message ShopMessage message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ShopMessage.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ShopMessage message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.InteractiveMessage.ShopMessage
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.InteractiveMessage.ShopMessage} ShopMessage
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ShopMessage.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.E2E.Message.InteractiveMessage.ShopMessage();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.id = reader.string();
                                break;
                            }
                        case 2: {
                                message.surface = reader.int32();
                                break;
                            }
                        case 3: {
                                message.messageVersion = reader.int32();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a ShopMessage message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.InteractiveMessage.ShopMessage
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.InteractiveMessage.ShopMessage} ShopMessage
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ShopMessage.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ShopMessage message.
                 * @function verify
                 * @memberof E2E.Message.InteractiveMessage.ShopMessage
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ShopMessage.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.id != null && message.hasOwnProperty("id")) {
                        properties._id = 1;
                        if (!$util.isString(message.id))
                            return "id: string expected";
                    }
                    if (message.surface != null && message.hasOwnProperty("surface")) {
                        properties._surface = 1;
                        switch (message.surface) {
                        default:
                            return "surface: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                            break;
                        }
                    }
                    if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) {
                        properties._messageVersion = 1;
                        if (!$util.isInteger(message.messageVersion))
                            return "messageVersion: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a ShopMessage message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.InteractiveMessage.ShopMessage
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.InteractiveMessage.ShopMessage} ShopMessage
                 */
                ShopMessage.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.InteractiveMessage.ShopMessage)
                        return object;
                    var message = new $root.E2E.Message.InteractiveMessage.ShopMessage();
                    if (object.id != null)
                        message.id = String(object.id);
                    switch (object.surface) {
                    default:
                        if (typeof object.surface === "number") {
                            message.surface = object.surface;
                            break;
                        }
                        break;
                    case "UNKNOWN_SURFACE":
                    case 0:
                        message.surface = 0;
                        break;
                    case "FB":
                    case 1:
                        message.surface = 1;
                        break;
                    case "IG":
                    case 2:
                        message.surface = 2;
                        break;
                    case "WA":
                    case 3:
                        message.surface = 3;
                        break;
                    }
                    if (object.messageVersion != null)
                        message.messageVersion = object.messageVersion | 0;
                    return message;
                };

                /**
                 * Creates a plain object from a ShopMessage message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.InteractiveMessage.ShopMessage
                 * @static
                 * @param {E2E.Message.InteractiveMessage.ShopMessage} message ShopMessage
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ShopMessage.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.id != null && message.hasOwnProperty("id")) {
                        object.id = message.id;
                        if (options.oneofs)
                            object._id = "id";
                    }
                    if (message.surface != null && message.hasOwnProperty("surface")) {
                        object.surface = options.enums === String ? $root.E2E.Message.InteractiveMessage.ShopMessage.Surface[message.surface] === undefined ? message.surface : $root.E2E.Message.InteractiveMessage.ShopMessage.Surface[message.surface] : message.surface;
                        if (options.oneofs)
                            object._surface = "surface";
                    }
                    if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) {
                        object.messageVersion = message.messageVersion;
                        if (options.oneofs)
                            object._messageVersion = "messageVersion";
                    }
                    return object;
                };

                /**
                 * Converts this ShopMessage to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.InteractiveMessage.ShopMessage
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ShopMessage.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for ShopMessage
                 * @function getTypeUrl
                 * @memberof E2E.Message.InteractiveMessage.ShopMessage
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                ShopMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.InteractiveMessage.ShopMessage";
                };

                /**
                 * Surface enum.
                 * @name E2E.Message.InteractiveMessage.ShopMessage.Surface
                 * @enum {number}
                 * @property {number} UNKNOWN_SURFACE=0 UNKNOWN_SURFACE value
                 * @property {number} FB=1 FB value
                 * @property {number} IG=2 IG value
                 * @property {number} WA=3 WA value
                 */
                ShopMessage.Surface = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "UNKNOWN_SURFACE"] = 0;
                    values[valuesById[1] = "FB"] = 1;
                    values[valuesById[2] = "IG"] = 2;
                    values[valuesById[3] = "WA"] = 3;
                    return values;
                })();

                return ShopMessage;
            })();

            return InteractiveMessage;
        })();

        Message.InteractiveResponseMessage = (function() {

            /**
             * Properties of an InteractiveResponseMessage.
             * @memberof E2E.Message
             * @interface IInteractiveResponseMessage
             * @property {E2E.Message.InteractiveResponseMessage.IBody|null} [body] InteractiveResponseMessage body
             * @property {E2E.IContextInfo|null} [contextInfo] InteractiveResponseMessage contextInfo
             * @property {E2E.Message.InteractiveResponseMessage.INativeFlowResponseMessage|null} [nativeFlowResponseMessage] InteractiveResponseMessage nativeFlowResponseMessage
             */

            /**
             * Constructs a new InteractiveResponseMessage.
             * @memberof E2E.Message
             * @classdesc Represents an InteractiveResponseMessage.
             * @implements IInteractiveResponseMessage
             * @constructor
             * @param {E2E.Message.IInteractiveResponseMessage=} [properties] Properties to set
             */
            function InteractiveResponseMessage(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]];
            }

            /**
             * InteractiveResponseMessage body.
             * @member {E2E.Message.InteractiveResponseMessage.IBody|null|undefined} body
             * @memberof E2E.Message.InteractiveResponseMessage
             * @instance
             */
            InteractiveResponseMessage.prototype.body = null;

            /**
             * InteractiveResponseMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.InteractiveResponseMessage
             * @instance
             */
            InteractiveResponseMessage.prototype.contextInfo = null;

            /**
             * InteractiveResponseMessage nativeFlowResponseMessage.
             * @member {E2E.Message.InteractiveResponseMessage.INativeFlowResponseMessage|null|undefined} nativeFlowResponseMessage
             * @memberof E2E.Message.InteractiveResponseMessage
             * @instance
             */
            InteractiveResponseMessage.prototype.nativeFlowResponseMessage = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * InteractiveResponseMessage _body.
             * @member {"body"|undefined} _body
             * @memberof E2E.Message.InteractiveResponseMessage
             * @instance
             */
            Object.defineProperty(InteractiveResponseMessage.prototype, "_body", {
                get: $util.oneOfGetter($oneOfFields = ["body"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InteractiveResponseMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.InteractiveResponseMessage
             * @instance
             */
            Object.defineProperty(InteractiveResponseMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InteractiveResponseMessage interactiveResponseMessage.
             * @member {"nativeFlowResponseMessage"|undefined} interactiveResponseMessage
             * @memberof E2E.Message.InteractiveResponseMessage
             * @instance
             */
            Object.defineProperty(InteractiveResponseMessage.prototype, "interactiveResponseMessage", {
                get: $util.oneOfGetter($oneOfFields = ["nativeFlowResponseMessage"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new InteractiveResponseMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.InteractiveResponseMessage
             * @static
             * @param {E2E.Message.IInteractiveResponseMessage=} [properties] Properties to set
             * @returns {E2E.Message.InteractiveResponseMessage} InteractiveResponseMessage instance
             */
            InteractiveResponseMessage.create = function create(properties) {
                return new InteractiveResponseMessage(properties);
            };

            /**
             * Encodes the specified InteractiveResponseMessage message. Does not implicitly {@link E2E.Message.InteractiveResponseMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.InteractiveResponseMessage
             * @static
             * @param {E2E.Message.IInteractiveResponseMessage} message InteractiveResponseMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InteractiveResponseMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.body != null && Object.hasOwnProperty.call(message, "body"))
                    $root.E2E.Message.InteractiveResponseMessage.Body.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.nativeFlowResponseMessage != null && Object.hasOwnProperty.call(message, "nativeFlowResponseMessage"))
                    $root.E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage.encode(message.nativeFlowResponseMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified InteractiveResponseMessage message, length delimited. Does not implicitly {@link E2E.Message.InteractiveResponseMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.InteractiveResponseMessage
             * @static
             * @param {E2E.Message.IInteractiveResponseMessage} message InteractiveResponseMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InteractiveResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an InteractiveResponseMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.InteractiveResponseMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.InteractiveResponseMessage} InteractiveResponseMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InteractiveResponseMessage.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.E2E.Message.InteractiveResponseMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.body = $root.E2E.Message.InteractiveResponseMessage.Body.decode(reader, reader.uint32());
                            break;
                        }
                    case 15: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.nativeFlowResponseMessage = $root.E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an InteractiveResponseMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.InteractiveResponseMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.InteractiveResponseMessage} InteractiveResponseMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InteractiveResponseMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an InteractiveResponseMessage message.
             * @function verify
             * @memberof E2E.Message.InteractiveResponseMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            InteractiveResponseMessage.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;
                    {
                        var error = $root.E2E.Message.InteractiveResponseMessage.Body.verify(message.body);
                        if (error)
                            return "body." + error;
                    }
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.nativeFlowResponseMessage != null && message.hasOwnProperty("nativeFlowResponseMessage")) {
                    properties.interactiveResponseMessage = 1;
                    {
                        var error = $root.E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage.verify(message.nativeFlowResponseMessage);
                        if (error)
                            return "nativeFlowResponseMessage." + error;
                    }
                }
                return null;
            };

            /**
             * Creates an InteractiveResponseMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.InteractiveResponseMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.InteractiveResponseMessage} InteractiveResponseMessage
             */
            InteractiveResponseMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.InteractiveResponseMessage)
                    return object;
                var message = new $root.E2E.Message.InteractiveResponseMessage();
                if (object.body != null) {
                    if (typeof object.body !== "object")
                        throw TypeError(".E2E.Message.InteractiveResponseMessage.body: object expected");
                    message.body = $root.E2E.Message.InteractiveResponseMessage.Body.fromObject(object.body);
                }
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.InteractiveResponseMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                if (object.nativeFlowResponseMessage != null) {
                    if (typeof object.nativeFlowResponseMessage !== "object")
                        throw TypeError(".E2E.Message.InteractiveResponseMessage.nativeFlowResponseMessage: object expected");
                    message.nativeFlowResponseMessage = $root.E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage.fromObject(object.nativeFlowResponseMessage);
                }
                return message;
            };

            /**
             * Creates a plain object from an InteractiveResponseMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.InteractiveResponseMessage
             * @static
             * @param {E2E.Message.InteractiveResponseMessage} message InteractiveResponseMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            InteractiveResponseMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.body != null && message.hasOwnProperty("body")) {
                    object.body = $root.E2E.Message.InteractiveResponseMessage.Body.toObject(message.body, options);
                    if (options.oneofs)
                        object._body = "body";
                }
                if (message.nativeFlowResponseMessage != null && message.hasOwnProperty("nativeFlowResponseMessage")) {
                    object.nativeFlowResponseMessage = $root.E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage.toObject(message.nativeFlowResponseMessage, options);
                    if (options.oneofs)
                        object.interactiveResponseMessage = "nativeFlowResponseMessage";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                return object;
            };

            /**
             * Converts this InteractiveResponseMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.InteractiveResponseMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            InteractiveResponseMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for InteractiveResponseMessage
             * @function getTypeUrl
             * @memberof E2E.Message.InteractiveResponseMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            InteractiveResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.InteractiveResponseMessage";
            };

            InteractiveResponseMessage.Body = (function() {

                /**
                 * Properties of a Body.
                 * @memberof E2E.Message.InteractiveResponseMessage
                 * @interface IBody
                 * @property {string|null} [text] Body text
                 * @property {E2E.Message.InteractiveResponseMessage.Body.Format|null} [format] Body format
                 */

                /**
                 * Constructs a new Body.
                 * @memberof E2E.Message.InteractiveResponseMessage
                 * @classdesc Represents a Body.
                 * @implements IBody
                 * @constructor
                 * @param {E2E.Message.InteractiveResponseMessage.IBody=} [properties] Properties to set
                 */
                function Body(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]];
                }

                /**
                 * Body text.
                 * @member {string|null|undefined} text
                 * @memberof E2E.Message.InteractiveResponseMessage.Body
                 * @instance
                 */
                Body.prototype.text = null;

                /**
                 * Body format.
                 * @member {E2E.Message.InteractiveResponseMessage.Body.Format|null|undefined} format
                 * @memberof E2E.Message.InteractiveResponseMessage.Body
                 * @instance
                 */
                Body.prototype.format = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * Body _text.
                 * @member {"text"|undefined} _text
                 * @memberof E2E.Message.InteractiveResponseMessage.Body
                 * @instance
                 */
                Object.defineProperty(Body.prototype, "_text", {
                    get: $util.oneOfGetter($oneOfFields = ["text"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Body _format.
                 * @member {"format"|undefined} _format
                 * @memberof E2E.Message.InteractiveResponseMessage.Body
                 * @instance
                 */
                Object.defineProperty(Body.prototype, "_format", {
                    get: $util.oneOfGetter($oneOfFields = ["format"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new Body instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.InteractiveResponseMessage.Body
                 * @static
                 * @param {E2E.Message.InteractiveResponseMessage.IBody=} [properties] Properties to set
                 * @returns {E2E.Message.InteractiveResponseMessage.Body} Body instance
                 */
                Body.create = function create(properties) {
                    return new Body(properties);
                };

                /**
                 * Encodes the specified Body message. Does not implicitly {@link E2E.Message.InteractiveResponseMessage.Body.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.InteractiveResponseMessage.Body
                 * @static
                 * @param {E2E.Message.InteractiveResponseMessage.IBody} message Body message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Body.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.text);
                    if (message.format != null && Object.hasOwnProperty.call(message, "format"))
                        writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format);
                    return writer;
                };

                /**
                 * Encodes the specified Body message, length delimited. Does not implicitly {@link E2E.Message.InteractiveResponseMessage.Body.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.InteractiveResponseMessage.Body
                 * @static
                 * @param {E2E.Message.InteractiveResponseMessage.IBody} message Body message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Body.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Body message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.InteractiveResponseMessage.Body
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.InteractiveResponseMessage.Body} Body
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Body.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.E2E.Message.InteractiveResponseMessage.Body();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.text = reader.string();
                                break;
                            }
                        case 2: {
                                message.format = reader.int32();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a Body message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.InteractiveResponseMessage.Body
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.InteractiveResponseMessage.Body} Body
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Body.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Body message.
                 * @function verify
                 * @memberof E2E.Message.InteractiveResponseMessage.Body
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Body.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.text != null && message.hasOwnProperty("text")) {
                        properties._text = 1;
                        if (!$util.isString(message.text))
                            return "text: string expected";
                    }
                    if (message.format != null && message.hasOwnProperty("format")) {
                        properties._format = 1;
                        switch (message.format) {
                        default:
                            return "format: enum value expected";
                        case 0:
                        case 1:
                            break;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Body message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.InteractiveResponseMessage.Body
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.InteractiveResponseMessage.Body} Body
                 */
                Body.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.InteractiveResponseMessage.Body)
                        return object;
                    var message = new $root.E2E.Message.InteractiveResponseMessage.Body();
                    if (object.text != null)
                        message.text = String(object.text);
                    switch (object.format) {
                    default:
                        if (typeof object.format === "number") {
                            message.format = object.format;
                            break;
                        }
                        break;
                    case "DEFAULT":
                    case 0:
                        message.format = 0;
                        break;
                    case "EXTENSIONS_1":
                    case 1:
                        message.format = 1;
                        break;
                    }
                    return message;
                };

                /**
                 * Creates a plain object from a Body message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.InteractiveResponseMessage.Body
                 * @static
                 * @param {E2E.Message.InteractiveResponseMessage.Body} message Body
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Body.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.text != null && message.hasOwnProperty("text")) {
                        object.text = message.text;
                        if (options.oneofs)
                            object._text = "text";
                    }
                    if (message.format != null && message.hasOwnProperty("format")) {
                        object.format = options.enums === String ? $root.E2E.Message.InteractiveResponseMessage.Body.Format[message.format] === undefined ? message.format : $root.E2E.Message.InteractiveResponseMessage.Body.Format[message.format] : message.format;
                        if (options.oneofs)
                            object._format = "format";
                    }
                    return object;
                };

                /**
                 * Converts this Body to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.InteractiveResponseMessage.Body
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Body.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for Body
                 * @function getTypeUrl
                 * @memberof E2E.Message.InteractiveResponseMessage.Body
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Body.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.InteractiveResponseMessage.Body";
                };

                /**
                 * Format enum.
                 * @name E2E.Message.InteractiveResponseMessage.Body.Format
                 * @enum {number}
                 * @property {number} DEFAULT=0 DEFAULT value
                 * @property {number} EXTENSIONS_1=1 EXTENSIONS_1 value
                 */
                Body.Format = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "DEFAULT"] = 0;
                    values[valuesById[1] = "EXTENSIONS_1"] = 1;
                    return values;
                })();

                return Body;
            })();

            InteractiveResponseMessage.NativeFlowResponseMessage = (function() {

                /**
                 * Properties of a NativeFlowResponseMessage.
                 * @memberof E2E.Message.InteractiveResponseMessage
                 * @interface INativeFlowResponseMessage
                 * @property {string|null} [name] NativeFlowResponseMessage name
                 * @property {string|null} [paramsJson] NativeFlowResponseMessage paramsJson
                 * @property {number|null} [version] NativeFlowResponseMessage version
                 */

                /**
                 * Constructs a new NativeFlowResponseMessage.
                 * @memberof E2E.Message.InteractiveResponseMessage
                 * @classdesc Represents a NativeFlowResponseMessage.
                 * @implements INativeFlowResponseMessage
                 * @constructor
                 * @param {E2E.Message.InteractiveResponseMessage.INativeFlowResponseMessage=} [properties] Properties to set
                 */
                function NativeFlowResponseMessage(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]];
                }

                /**
                 * NativeFlowResponseMessage name.
                 * @member {string|null|undefined} name
                 * @memberof E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage
                 * @instance
                 */
                NativeFlowResponseMessage.prototype.name = null;

                /**
                 * NativeFlowResponseMessage paramsJson.
                 * @member {string|null|undefined} paramsJson
                 * @memberof E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage
                 * @instance
                 */
                NativeFlowResponseMessage.prototype.paramsJson = null;

                /**
                 * NativeFlowResponseMessage version.
                 * @member {number|null|undefined} version
                 * @memberof E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage
                 * @instance
                 */
                NativeFlowResponseMessage.prototype.version = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * NativeFlowResponseMessage _name.
                 * @member {"name"|undefined} _name
                 * @memberof E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage
                 * @instance
                 */
                Object.defineProperty(NativeFlowResponseMessage.prototype, "_name", {
                    get: $util.oneOfGetter($oneOfFields = ["name"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * NativeFlowResponseMessage _paramsJson.
                 * @member {"paramsJson"|undefined} _paramsJson
                 * @memberof E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage
                 * @instance
                 */
                Object.defineProperty(NativeFlowResponseMessage.prototype, "_paramsJson", {
                    get: $util.oneOfGetter($oneOfFields = ["paramsJson"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * NativeFlowResponseMessage _version.
                 * @member {"version"|undefined} _version
                 * @memberof E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage
                 * @instance
                 */
                Object.defineProperty(NativeFlowResponseMessage.prototype, "_version", {
                    get: $util.oneOfGetter($oneOfFields = ["version"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new NativeFlowResponseMessage instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage
                 * @static
                 * @param {E2E.Message.InteractiveResponseMessage.INativeFlowResponseMessage=} [properties] Properties to set
                 * @returns {E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage} NativeFlowResponseMessage instance
                 */
                NativeFlowResponseMessage.create = function create(properties) {
                    return new NativeFlowResponseMessage(properties);
                };

                /**
                 * Encodes the specified NativeFlowResponseMessage message. Does not implicitly {@link E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage
                 * @static
                 * @param {E2E.Message.InteractiveResponseMessage.INativeFlowResponseMessage} message NativeFlowResponseMessage message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                NativeFlowResponseMessage.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                    if (message.paramsJson != null && Object.hasOwnProperty.call(message, "paramsJson"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.paramsJson);
                    if (message.version != null && Object.hasOwnProperty.call(message, "version"))
                        writer.uint32(/* id 3, wireType 0 =*/24).int32(message.version);
                    return writer;
                };

                /**
                 * Encodes the specified NativeFlowResponseMessage message, length delimited. Does not implicitly {@link E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage
                 * @static
                 * @param {E2E.Message.InteractiveResponseMessage.INativeFlowResponseMessage} message NativeFlowResponseMessage message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                NativeFlowResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a NativeFlowResponseMessage message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage} NativeFlowResponseMessage
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                NativeFlowResponseMessage.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.E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.name = reader.string();
                                break;
                            }
                        case 2: {
                                message.paramsJson = reader.string();
                                break;
                            }
                        case 3: {
                                message.version = reader.int32();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a NativeFlowResponseMessage message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage} NativeFlowResponseMessage
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                NativeFlowResponseMessage.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a NativeFlowResponseMessage message.
                 * @function verify
                 * @memberof E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                NativeFlowResponseMessage.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.name != null && message.hasOwnProperty("name")) {
                        properties._name = 1;
                        if (!$util.isString(message.name))
                            return "name: string expected";
                    }
                    if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) {
                        properties._paramsJson = 1;
                        if (!$util.isString(message.paramsJson))
                            return "paramsJson: string expected";
                    }
                    if (message.version != null && message.hasOwnProperty("version")) {
                        properties._version = 1;
                        if (!$util.isInteger(message.version))
                            return "version: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a NativeFlowResponseMessage message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage} NativeFlowResponseMessage
                 */
                NativeFlowResponseMessage.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage)
                        return object;
                    var message = new $root.E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage();
                    if (object.name != null)
                        message.name = String(object.name);
                    if (object.paramsJson != null)
                        message.paramsJson = String(object.paramsJson);
                    if (object.version != null)
                        message.version = object.version | 0;
                    return message;
                };

                /**
                 * Creates a plain object from a NativeFlowResponseMessage message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage
                 * @static
                 * @param {E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage} message NativeFlowResponseMessage
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                NativeFlowResponseMessage.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.name != null && message.hasOwnProperty("name")) {
                        object.name = message.name;
                        if (options.oneofs)
                            object._name = "name";
                    }
                    if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) {
                        object.paramsJson = message.paramsJson;
                        if (options.oneofs)
                            object._paramsJson = "paramsJson";
                    }
                    if (message.version != null && message.hasOwnProperty("version")) {
                        object.version = message.version;
                        if (options.oneofs)
                            object._version = "version";
                    }
                    return object;
                };

                /**
                 * Converts this NativeFlowResponseMessage to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                NativeFlowResponseMessage.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for NativeFlowResponseMessage
                 * @function getTypeUrl
                 * @memberof E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                NativeFlowResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.InteractiveResponseMessage.NativeFlowResponseMessage";
                };

                return NativeFlowResponseMessage;
            })();

            return InteractiveResponseMessage;
        })();

        Message.InvoiceMessage = (function() {

            /**
             * Properties of an InvoiceMessage.
             * @memberof E2E.Message
             * @interface IInvoiceMessage
             * @property {string|null} [note] InvoiceMessage note
             * @property {string|null} [token] InvoiceMessage token
             * @property {E2E.Message.InvoiceMessage.AttachmentType|null} [attachmentType] InvoiceMessage attachmentType
             * @property {string|null} [attachmentMimetype] InvoiceMessage attachmentMimetype
             * @property {Uint8Array|null} [attachmentMediaKey] InvoiceMessage attachmentMediaKey
             * @property {number|Long|null} [attachmentMediaKeyTimestamp] InvoiceMessage attachmentMediaKeyTimestamp
             * @property {Uint8Array|null} [attachmentFileSha256] InvoiceMessage attachmentFileSha256
             * @property {Uint8Array|null} [attachmentFileEncSha256] InvoiceMessage attachmentFileEncSha256
             * @property {string|null} [attachmentDirectPath] InvoiceMessage attachmentDirectPath
             * @property {Uint8Array|null} [attachmentJpegThumbnail] InvoiceMessage attachmentJpegThumbnail
             */

            /**
             * Constructs a new InvoiceMessage.
             * @memberof E2E.Message
             * @classdesc Represents an InvoiceMessage.
             * @implements IInvoiceMessage
             * @constructor
             * @param {E2E.Message.IInvoiceMessage=} [properties] Properties to set
             */
            function InvoiceMessage(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]];
            }

            /**
             * InvoiceMessage note.
             * @member {string|null|undefined} note
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.note = null;

            /**
             * InvoiceMessage token.
             * @member {string|null|undefined} token
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.token = null;

            /**
             * InvoiceMessage attachmentType.
             * @member {E2E.Message.InvoiceMessage.AttachmentType|null|undefined} attachmentType
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.attachmentType = null;

            /**
             * InvoiceMessage attachmentMimetype.
             * @member {string|null|undefined} attachmentMimetype
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.attachmentMimetype = null;

            /**
             * InvoiceMessage attachmentMediaKey.
             * @member {Uint8Array|null|undefined} attachmentMediaKey
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.attachmentMediaKey = null;

            /**
             * InvoiceMessage attachmentMediaKeyTimestamp.
             * @member {number|Long|null|undefined} attachmentMediaKeyTimestamp
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.attachmentMediaKeyTimestamp = null;

            /**
             * InvoiceMessage attachmentFileSha256.
             * @member {Uint8Array|null|undefined} attachmentFileSha256
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.attachmentFileSha256 = null;

            /**
             * InvoiceMessage attachmentFileEncSha256.
             * @member {Uint8Array|null|undefined} attachmentFileEncSha256
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.attachmentFileEncSha256 = null;

            /**
             * InvoiceMessage attachmentDirectPath.
             * @member {string|null|undefined} attachmentDirectPath
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.attachmentDirectPath = null;

            /**
             * InvoiceMessage attachmentJpegThumbnail.
             * @member {Uint8Array|null|undefined} attachmentJpegThumbnail
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            InvoiceMessage.prototype.attachmentJpegThumbnail = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * InvoiceMessage _note.
             * @member {"note"|undefined} _note
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            Object.defineProperty(InvoiceMessage.prototype, "_note", {
                get: $util.oneOfGetter($oneOfFields = ["note"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InvoiceMessage _token.
             * @member {"token"|undefined} _token
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            Object.defineProperty(InvoiceMessage.prototype, "_token", {
                get: $util.oneOfGetter($oneOfFields = ["token"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InvoiceMessage _attachmentType.
             * @member {"attachmentType"|undefined} _attachmentType
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            Object.defineProperty(InvoiceMessage.prototype, "_attachmentType", {
                get: $util.oneOfGetter($oneOfFields = ["attachmentType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InvoiceMessage _attachmentMimetype.
             * @member {"attachmentMimetype"|undefined} _attachmentMimetype
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            Object.defineProperty(InvoiceMessage.prototype, "_attachmentMimetype", {
                get: $util.oneOfGetter($oneOfFields = ["attachmentMimetype"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InvoiceMessage _attachmentMediaKey.
             * @member {"attachmentMediaKey"|undefined} _attachmentMediaKey
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            Object.defineProperty(InvoiceMessage.prototype, "_attachmentMediaKey", {
                get: $util.oneOfGetter($oneOfFields = ["attachmentMediaKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InvoiceMessage _attachmentMediaKeyTimestamp.
             * @member {"attachmentMediaKeyTimestamp"|undefined} _attachmentMediaKeyTimestamp
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            Object.defineProperty(InvoiceMessage.prototype, "_attachmentMediaKeyTimestamp", {
                get: $util.oneOfGetter($oneOfFields = ["attachmentMediaKeyTimestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InvoiceMessage _attachmentFileSha256.
             * @member {"attachmentFileSha256"|undefined} _attachmentFileSha256
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            Object.defineProperty(InvoiceMessage.prototype, "_attachmentFileSha256", {
                get: $util.oneOfGetter($oneOfFields = ["attachmentFileSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InvoiceMessage _attachmentFileEncSha256.
             * @member {"attachmentFileEncSha256"|undefined} _attachmentFileEncSha256
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            Object.defineProperty(InvoiceMessage.prototype, "_attachmentFileEncSha256", {
                get: $util.oneOfGetter($oneOfFields = ["attachmentFileEncSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InvoiceMessage _attachmentDirectPath.
             * @member {"attachmentDirectPath"|undefined} _attachmentDirectPath
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            Object.defineProperty(InvoiceMessage.prototype, "_attachmentDirectPath", {
                get: $util.oneOfGetter($oneOfFields = ["attachmentDirectPath"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InvoiceMessage _attachmentJpegThumbnail.
             * @member {"attachmentJpegThumbnail"|undefined} _attachmentJpegThumbnail
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             */
            Object.defineProperty(InvoiceMessage.prototype, "_attachmentJpegThumbnail", {
                get: $util.oneOfGetter($oneOfFields = ["attachmentJpegThumbnail"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new InvoiceMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.InvoiceMessage
             * @static
             * @param {E2E.Message.IInvoiceMessage=} [properties] Properties to set
             * @returns {E2E.Message.InvoiceMessage} InvoiceMessage instance
             */
            InvoiceMessage.create = function create(properties) {
                return new InvoiceMessage(properties);
            };

            /**
             * Encodes the specified InvoiceMessage message. Does not implicitly {@link E2E.Message.InvoiceMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.InvoiceMessage
             * @static
             * @param {E2E.Message.IInvoiceMessage} message InvoiceMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InvoiceMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.note != null && Object.hasOwnProperty.call(message, "note"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.note);
                if (message.token != null && Object.hasOwnProperty.call(message, "token"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.token);
                if (message.attachmentType != null && Object.hasOwnProperty.call(message, "attachmentType"))
                    writer.uint32(/* id 3, wireType 0 =*/24).int32(message.attachmentType);
                if (message.attachmentMimetype != null && Object.hasOwnProperty.call(message, "attachmentMimetype"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.attachmentMimetype);
                if (message.attachmentMediaKey != null && Object.hasOwnProperty.call(message, "attachmentMediaKey"))
                    writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.attachmentMediaKey);
                if (message.attachmentMediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "attachmentMediaKeyTimestamp"))
                    writer.uint32(/* id 6, wireType 0 =*/48).int64(message.attachmentMediaKeyTimestamp);
                if (message.attachmentFileSha256 != null && Object.hasOwnProperty.call(message, "attachmentFileSha256"))
                    writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.attachmentFileSha256);
                if (message.attachmentFileEncSha256 != null && Object.hasOwnProperty.call(message, "attachmentFileEncSha256"))
                    writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.attachmentFileEncSha256);
                if (message.attachmentDirectPath != null && Object.hasOwnProperty.call(message, "attachmentDirectPath"))
                    writer.uint32(/* id 9, wireType 2 =*/74).string(message.attachmentDirectPath);
                if (message.attachmentJpegThumbnail != null && Object.hasOwnProperty.call(message, "attachmentJpegThumbnail"))
                    writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.attachmentJpegThumbnail);
                return writer;
            };

            /**
             * Encodes the specified InvoiceMessage message, length delimited. Does not implicitly {@link E2E.Message.InvoiceMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.InvoiceMessage
             * @static
             * @param {E2E.Message.IInvoiceMessage} message InvoiceMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InvoiceMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an InvoiceMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.InvoiceMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.InvoiceMessage} InvoiceMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InvoiceMessage.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.E2E.Message.InvoiceMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.note = reader.string();
                            break;
                        }
                    case 2: {
                            message.token = reader.string();
                            break;
                        }
                    case 3: {
                            message.attachmentType = reader.int32();
                            break;
                        }
                    case 4: {
                            message.attachmentMimetype = reader.string();
                            break;
                        }
                    case 5: {
                            message.attachmentMediaKey = reader.bytes();
                            break;
                        }
                    case 6: {
                            message.attachmentMediaKeyTimestamp = reader.int64();
                            break;
                        }
                    case 7: {
                            message.attachmentFileSha256 = reader.bytes();
                            break;
                        }
                    case 8: {
                            message.attachmentFileEncSha256 = reader.bytes();
                            break;
                        }
                    case 9: {
                            message.attachmentDirectPath = reader.string();
                            break;
                        }
                    case 10: {
                            message.attachmentJpegThumbnail = reader.bytes();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an InvoiceMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.InvoiceMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.InvoiceMessage} InvoiceMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InvoiceMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an InvoiceMessage message.
             * @function verify
             * @memberof E2E.Message.InvoiceMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            InvoiceMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.note != null && message.hasOwnProperty("note")) {
                    properties._note = 1;
                    if (!$util.isString(message.note))
                        return "note: string expected";
                }
                if (message.token != null && message.hasOwnProperty("token")) {
                    properties._token = 1;
                    if (!$util.isString(message.token))
                        return "token: string expected";
                }
                if (message.attachmentType != null && message.hasOwnProperty("attachmentType")) {
                    properties._attachmentType = 1;
                    switch (message.attachmentType) {
                    default:
                        return "attachmentType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                if (message.attachmentMimetype != null && message.hasOwnProperty("attachmentMimetype")) {
                    properties._attachmentMimetype = 1;
                    if (!$util.isString(message.attachmentMimetype))
                        return "attachmentMimetype: string expected";
                }
                if (message.attachmentMediaKey != null && message.hasOwnProperty("attachmentMediaKey")) {
                    properties._attachmentMediaKey = 1;
                    if (!(message.attachmentMediaKey && typeof message.attachmentMediaKey.length === "number" || $util.isString(message.attachmentMediaKey)))
                        return "attachmentMediaKey: buffer expected";
                }
                if (message.attachmentMediaKeyTimestamp != null && message.hasOwnProperty("attachmentMediaKeyTimestamp")) {
                    properties._attachmentMediaKeyTimestamp = 1;
                    if (!$util.isInteger(message.attachmentMediaKeyTimestamp) && !(message.attachmentMediaKeyTimestamp && $util.isInteger(message.attachmentMediaKeyTimestamp.low) && $util.isInteger(message.attachmentMediaKeyTimestamp.high)))
                        return "attachmentMediaKeyTimestamp: integer|Long expected";
                }
                if (message.attachmentFileSha256 != null && message.hasOwnProperty("attachmentFileSha256")) {
                    properties._attachmentFileSha256 = 1;
                    if (!(message.attachmentFileSha256 && typeof message.attachmentFileSha256.length === "number" || $util.isString(message.attachmentFileSha256)))
                        return "attachmentFileSha256: buffer expected";
                }
                if (message.attachmentFileEncSha256 != null && message.hasOwnProperty("attachmentFileEncSha256")) {
                    properties._attachmentFileEncSha256 = 1;
                    if (!(message.attachmentFileEncSha256 && typeof message.attachmentFileEncSha256.length === "number" || $util.isString(message.attachmentFileEncSha256)))
                        return "attachmentFileEncSha256: buffer expected";
                }
                if (message.attachmentDirectPath != null && message.hasOwnProperty("attachmentDirectPath")) {
                    properties._attachmentDirectPath = 1;
                    if (!$util.isString(message.attachmentDirectPath))
                        return "attachmentDirectPath: string expected";
                }
                if (message.attachmentJpegThumbnail != null && message.hasOwnProperty("attachmentJpegThumbnail")) {
                    properties._attachmentJpegThumbnail = 1;
                    if (!(message.attachmentJpegThumbnail && typeof message.attachmentJpegThumbnail.length === "number" || $util.isString(message.attachmentJpegThumbnail)))
                        return "attachmentJpegThumbnail: buffer expected";
                }
                return null;
            };

            /**
             * Creates an InvoiceMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.InvoiceMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.InvoiceMessage} InvoiceMessage
             */
            InvoiceMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.InvoiceMessage)
                    return object;
                var message = new $root.E2E.Message.InvoiceMessage();
                if (object.note != null)
                    message.note = String(object.note);
                if (object.token != null)
                    message.token = String(object.token);
                switch (object.attachmentType) {
                default:
                    if (typeof object.attachmentType === "number") {
                        message.attachmentType = object.attachmentType;
                        break;
                    }
                    break;
                case "IMAGE":
                case 0:
                    message.attachmentType = 0;
                    break;
                case "PDF":
                case 1:
                    message.attachmentType = 1;
                    break;
                }
                if (object.attachmentMimetype != null)
                    message.attachmentMimetype = String(object.attachmentMimetype);
                if (object.attachmentMediaKey != null)
                    if (typeof object.attachmentMediaKey === "string")
                        $util.base64.decode(object.attachmentMediaKey, message.attachmentMediaKey = $util.newBuffer($util.base64.length(object.attachmentMediaKey)), 0);
                    else if (object.attachmentMediaKey.length >= 0)
                        message.attachmentMediaKey = object.attachmentMediaKey;
                if (object.attachmentMediaKeyTimestamp != null)
                    if ($util.Long)
                        (message.attachmentMediaKeyTimestamp = $util.Long.fromValue(object.attachmentMediaKeyTimestamp)).unsigned = false;
                    else if (typeof object.attachmentMediaKeyTimestamp === "string")
                        message.attachmentMediaKeyTimestamp = parseInt(object.attachmentMediaKeyTimestamp, 10);
                    else if (typeof object.attachmentMediaKeyTimestamp === "number")
                        message.attachmentMediaKeyTimestamp = object.attachmentMediaKeyTimestamp;
                    else if (typeof object.attachmentMediaKeyTimestamp === "object")
                        message.attachmentMediaKeyTimestamp = new $util.LongBits(object.attachmentMediaKeyTimestamp.low >>> 0, object.attachmentMediaKeyTimestamp.high >>> 0).toNumber();
                if (object.attachmentFileSha256 != null)
                    if (typeof object.attachmentFileSha256 === "string")
                        $util.base64.decode(object.attachmentFileSha256, message.attachmentFileSha256 = $util.newBuffer($util.base64.length(object.attachmentFileSha256)), 0);
                    else if (object.attachmentFileSha256.length >= 0)
                        message.attachmentFileSha256 = object.attachmentFileSha256;
                if (object.attachmentFileEncSha256 != null)
                    if (typeof object.attachmentFileEncSha256 === "string")
                        $util.base64.decode(object.attachmentFileEncSha256, message.attachmentFileEncSha256 = $util.newBuffer($util.base64.length(object.attachmentFileEncSha256)), 0);
                    else if (object.attachmentFileEncSha256.length >= 0)
                        message.attachmentFileEncSha256 = object.attachmentFileEncSha256;
                if (object.attachmentDirectPath != null)
                    message.attachmentDirectPath = String(object.attachmentDirectPath);
                if (object.attachmentJpegThumbnail != null)
                    if (typeof object.attachmentJpegThumbnail === "string")
                        $util.base64.decode(object.attachmentJpegThumbnail, message.attachmentJpegThumbnail = $util.newBuffer($util.base64.length(object.attachmentJpegThumbnail)), 0);
                    else if (object.attachmentJpegThumbnail.length >= 0)
                        message.attachmentJpegThumbnail = object.attachmentJpegThumbnail;
                return message;
            };

            /**
             * Creates a plain object from an InvoiceMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.InvoiceMessage
             * @static
             * @param {E2E.Message.InvoiceMessage} message InvoiceMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            InvoiceMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.note != null && message.hasOwnProperty("note")) {
                    object.note = message.note;
                    if (options.oneofs)
                        object._note = "note";
                }
                if (message.token != null && message.hasOwnProperty("token")) {
                    object.token = message.token;
                    if (options.oneofs)
                        object._token = "token";
                }
                if (message.attachmentType != null && message.hasOwnProperty("attachmentType")) {
                    object.attachmentType = options.enums === String ? $root.E2E.Message.InvoiceMessage.AttachmentType[message.attachmentType] === undefined ? message.attachmentType : $root.E2E.Message.InvoiceMessage.AttachmentType[message.attachmentType] : message.attachmentType;
                    if (options.oneofs)
                        object._attachmentType = "attachmentType";
                }
                if (message.attachmentMimetype != null && message.hasOwnProperty("attachmentMimetype")) {
                    object.attachmentMimetype = message.attachmentMimetype;
                    if (options.oneofs)
                        object._attachmentMimetype = "attachmentMimetype";
                }
                if (message.attachmentMediaKey != null && message.hasOwnProperty("attachmentMediaKey")) {
                    object.attachmentMediaKey = options.bytes === String ? $util.base64.encode(message.attachmentMediaKey, 0, message.attachmentMediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.attachmentMediaKey) : message.attachmentMediaKey;
                    if (options.oneofs)
                        object._attachmentMediaKey = "attachmentMediaKey";
                }
                if (message.attachmentMediaKeyTimestamp != null && message.hasOwnProperty("attachmentMediaKeyTimestamp")) {
                    if (typeof message.attachmentMediaKeyTimestamp === "number")
                        object.attachmentMediaKeyTimestamp = options.longs === String ? String(message.attachmentMediaKeyTimestamp) : message.attachmentMediaKeyTimestamp;
                    else
                        object.attachmentMediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.attachmentMediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.attachmentMediaKeyTimestamp.low >>> 0, message.attachmentMediaKeyTimestamp.high >>> 0).toNumber() : message.attachmentMediaKeyTimestamp;
                    if (options.oneofs)
                        object._attachmentMediaKeyTimestamp = "attachmentMediaKeyTimestamp";
                }
                if (message.attachmentFileSha256 != null && message.hasOwnProperty("attachmentFileSha256")) {
                    object.attachmentFileSha256 = options.bytes === String ? $util.base64.encode(message.attachmentFileSha256, 0, message.attachmentFileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.attachmentFileSha256) : message.attachmentFileSha256;
                    if (options.oneofs)
                        object._attachmentFileSha256 = "attachmentFileSha256";
                }
                if (message.attachmentFileEncSha256 != null && message.hasOwnProperty("attachmentFileEncSha256")) {
                    object.attachmentFileEncSha256 = options.bytes === String ? $util.base64.encode(message.attachmentFileEncSha256, 0, message.attachmentFileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.attachmentFileEncSha256) : message.attachmentFileEncSha256;
                    if (options.oneofs)
                        object._attachmentFileEncSha256 = "attachmentFileEncSha256";
                }
                if (message.attachmentDirectPath != null && message.hasOwnProperty("attachmentDirectPath")) {
                    object.attachmentDirectPath = message.attachmentDirectPath;
                    if (options.oneofs)
                        object._attachmentDirectPath = "attachmentDirectPath";
                }
                if (message.attachmentJpegThumbnail != null && message.hasOwnProperty("attachmentJpegThumbnail")) {
                    object.attachmentJpegThumbnail = options.bytes === String ? $util.base64.encode(message.attachmentJpegThumbnail, 0, message.attachmentJpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.attachmentJpegThumbnail) : message.attachmentJpegThumbnail;
                    if (options.oneofs)
                        object._attachmentJpegThumbnail = "attachmentJpegThumbnail";
                }
                return object;
            };

            /**
             * Converts this InvoiceMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.InvoiceMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            InvoiceMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for InvoiceMessage
             * @function getTypeUrl
             * @memberof E2E.Message.InvoiceMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            InvoiceMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.InvoiceMessage";
            };

            /**
             * AttachmentType enum.
             * @name E2E.Message.InvoiceMessage.AttachmentType
             * @enum {number}
             * @property {number} IMAGE=0 IMAGE value
             * @property {number} PDF=1 PDF value
             */
            InvoiceMessage.AttachmentType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "IMAGE"] = 0;
                values[valuesById[1] = "PDF"] = 1;
                return values;
            })();

            return InvoiceMessage;
        })();

        Message.KeepInChatMessage = (function() {

            /**
             * Properties of a KeepInChatMessage.
             * @memberof E2E.Message
             * @interface IKeepInChatMessage
             * @property {Protocol.IMessageKey|null} [key] KeepInChatMessage key
             * @property {E2E.KeepType|null} [keepType] KeepInChatMessage keepType
             * @property {number|Long|null} [timestampMs] KeepInChatMessage timestampMs
             */

            /**
             * Constructs a new KeepInChatMessage.
             * @memberof E2E.Message
             * @classdesc Represents a KeepInChatMessage.
             * @implements IKeepInChatMessage
             * @constructor
             * @param {E2E.Message.IKeepInChatMessage=} [properties] Properties to set
             */
            function KeepInChatMessage(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]];
            }

            /**
             * KeepInChatMessage key.
             * @member {Protocol.IMessageKey|null|undefined} key
             * @memberof E2E.Message.KeepInChatMessage
             * @instance
             */
            KeepInChatMessage.prototype.key = null;

            /**
             * KeepInChatMessage keepType.
             * @member {E2E.KeepType|null|undefined} keepType
             * @memberof E2E.Message.KeepInChatMessage
             * @instance
             */
            KeepInChatMessage.prototype.keepType = null;

            /**
             * KeepInChatMessage timestampMs.
             * @member {number|Long|null|undefined} timestampMs
             * @memberof E2E.Message.KeepInChatMessage
             * @instance
             */
            KeepInChatMessage.prototype.timestampMs = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * KeepInChatMessage _key.
             * @member {"key"|undefined} _key
             * @memberof E2E.Message.KeepInChatMessage
             * @instance
             */
            Object.defineProperty(KeepInChatMessage.prototype, "_key", {
                get: $util.oneOfGetter($oneOfFields = ["key"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * KeepInChatMessage _keepType.
             * @member {"keepType"|undefined} _keepType
             * @memberof E2E.Message.KeepInChatMessage
             * @instance
             */
            Object.defineProperty(KeepInChatMessage.prototype, "_keepType", {
                get: $util.oneOfGetter($oneOfFields = ["keepType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * KeepInChatMessage _timestampMs.
             * @member {"timestampMs"|undefined} _timestampMs
             * @memberof E2E.Message.KeepInChatMessage
             * @instance
             */
            Object.defineProperty(KeepInChatMessage.prototype, "_timestampMs", {
                get: $util.oneOfGetter($oneOfFields = ["timestampMs"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new KeepInChatMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.KeepInChatMessage
             * @static
             * @param {E2E.Message.IKeepInChatMessage=} [properties] Properties to set
             * @returns {E2E.Message.KeepInChatMessage} KeepInChatMessage instance
             */
            KeepInChatMessage.create = function create(properties) {
                return new KeepInChatMessage(properties);
            };

            /**
             * Encodes the specified KeepInChatMessage message. Does not implicitly {@link E2E.Message.KeepInChatMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.KeepInChatMessage
             * @static
             * @param {E2E.Message.IKeepInChatMessage} message KeepInChatMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KeepInChatMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.key != null && Object.hasOwnProperty.call(message, "key"))
                    $root.Protocol.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.keepType != null && Object.hasOwnProperty.call(message, "keepType"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int32(message.keepType);
                if (message.timestampMs != null && Object.hasOwnProperty.call(message, "timestampMs"))
                    writer.uint32(/* id 3, wireType 0 =*/24).int64(message.timestampMs);
                return writer;
            };

            /**
             * Encodes the specified KeepInChatMessage message, length delimited. Does not implicitly {@link E2E.Message.KeepInChatMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.KeepInChatMessage
             * @static
             * @param {E2E.Message.IKeepInChatMessage} message KeepInChatMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KeepInChatMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KeepInChatMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.KeepInChatMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.KeepInChatMessage} KeepInChatMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KeepInChatMessage.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.E2E.Message.KeepInChatMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.key = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.keepType = reader.int32();
                            break;
                        }
                    case 3: {
                            message.timestampMs = reader.int64();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a KeepInChatMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.KeepInChatMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.KeepInChatMessage} KeepInChatMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KeepInChatMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KeepInChatMessage message.
             * @function verify
             * @memberof E2E.Message.KeepInChatMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KeepInChatMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    properties._key = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.key);
                        if (error)
                            return "key." + error;
                    }
                }
                if (message.keepType != null && message.hasOwnProperty("keepType")) {
                    properties._keepType = 1;
                    switch (message.keepType) {
                    default:
                        return "keepType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) {
                    properties._timestampMs = 1;
                    if (!$util.isInteger(message.timestampMs) && !(message.timestampMs && $util.isInteger(message.timestampMs.low) && $util.isInteger(message.timestampMs.high)))
                        return "timestampMs: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KeepInChatMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.KeepInChatMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.KeepInChatMessage} KeepInChatMessage
             */
            KeepInChatMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.KeepInChatMessage)
                    return object;
                var message = new $root.E2E.Message.KeepInChatMessage();
                if (object.key != null) {
                    if (typeof object.key !== "object")
                        throw TypeError(".E2E.Message.KeepInChatMessage.key: object expected");
                    message.key = $root.Protocol.MessageKey.fromObject(object.key);
                }
                switch (object.keepType) {
                default:
                    if (typeof object.keepType === "number") {
                        message.keepType = object.keepType;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.keepType = 0;
                    break;
                case "KEEP_FOR_ALL":
                case 1:
                    message.keepType = 1;
                    break;
                case "UNDO_KEEP_FOR_ALL":
                case 2:
                    message.keepType = 2;
                    break;
                }
                if (object.timestampMs != null)
                    if ($util.Long)
                        (message.timestampMs = $util.Long.fromValue(object.timestampMs)).unsigned = false;
                    else if (typeof object.timestampMs === "string")
                        message.timestampMs = parseInt(object.timestampMs, 10);
                    else if (typeof object.timestampMs === "number")
                        message.timestampMs = object.timestampMs;
                    else if (typeof object.timestampMs === "object")
                        message.timestampMs = new $util.LongBits(object.timestampMs.low >>> 0, object.timestampMs.high >>> 0).toNumber();
                return message;
            };

            /**
             * Creates a plain object from a KeepInChatMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.KeepInChatMessage
             * @static
             * @param {E2E.Message.KeepInChatMessage} message KeepInChatMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KeepInChatMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                    if (options.oneofs)
                        object._key = "key";
                }
                if (message.keepType != null && message.hasOwnProperty("keepType")) {
                    object.keepType = options.enums === String ? $root.E2E.KeepType[message.keepType] === undefined ? message.keepType : $root.E2E.KeepType[message.keepType] : message.keepType;
                    if (options.oneofs)
                        object._keepType = "keepType";
                }
                if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) {
                    if (typeof message.timestampMs === "number")
                        object.timestampMs = options.longs === String ? String(message.timestampMs) : message.timestampMs;
                    else
                        object.timestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.timestampMs) : options.longs === Number ? new $util.LongBits(message.timestampMs.low >>> 0, message.timestampMs.high >>> 0).toNumber() : message.timestampMs;
                    if (options.oneofs)
                        object._timestampMs = "timestampMs";
                }
                return object;
            };

            /**
             * Converts this KeepInChatMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.KeepInChatMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KeepInChatMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for KeepInChatMessage
             * @function getTypeUrl
             * @memberof E2E.Message.KeepInChatMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            KeepInChatMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.KeepInChatMessage";
            };

            return KeepInChatMessage;
        })();

        Message.LinkPreviewMetadata = (function() {

            /**
             * Properties of a LinkPreviewMetadata.
             * @memberof E2E.Message
             * @interface ILinkPreviewMetadata
             * @property {E2E.Message.IPaymentLinkMetadata|null} [paymentLinkMetadata] LinkPreviewMetadata paymentLinkMetadata
             * @property {E2E.Message.IURLMetadata|null} [urlMetadata] LinkPreviewMetadata urlMetadata
             * @property {number|null} [fbExperimentId] LinkPreviewMetadata fbExperimentId
             * @property {number|null} [linkMediaDuration] LinkPreviewMetadata linkMediaDuration
             * @property {E2E.Message.LinkPreviewMetadata.SocialMediaPostType|null} [socialMediaPostType] LinkPreviewMetadata socialMediaPostType
             * @property {boolean|null} [linkInlineVideoMuted] LinkPreviewMetadata linkInlineVideoMuted
             * @property {string|null} [videoContentUrl] LinkPreviewMetadata videoContentUrl
             * @property {E2E.IEmbeddedMusic|null} [musicMetadata] LinkPreviewMetadata musicMetadata
             * @property {string|null} [videoContentCaption] LinkPreviewMetadata videoContentCaption
             */

            /**
             * Constructs a new LinkPreviewMetadata.
             * @memberof E2E.Message
             * @classdesc Represents a LinkPreviewMetadata.
             * @implements ILinkPreviewMetadata
             * @constructor
             * @param {E2E.Message.ILinkPreviewMetadata=} [properties] Properties to set
             */
            function LinkPreviewMetadata(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]];
            }

            /**
             * LinkPreviewMetadata paymentLinkMetadata.
             * @member {E2E.Message.IPaymentLinkMetadata|null|undefined} paymentLinkMetadata
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            LinkPreviewMetadata.prototype.paymentLinkMetadata = null;

            /**
             * LinkPreviewMetadata urlMetadata.
             * @member {E2E.Message.IURLMetadata|null|undefined} urlMetadata
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            LinkPreviewMetadata.prototype.urlMetadata = null;

            /**
             * LinkPreviewMetadata fbExperimentId.
             * @member {number|null|undefined} fbExperimentId
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            LinkPreviewMetadata.prototype.fbExperimentId = null;

            /**
             * LinkPreviewMetadata linkMediaDuration.
             * @member {number|null|undefined} linkMediaDuration
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            LinkPreviewMetadata.prototype.linkMediaDuration = null;

            /**
             * LinkPreviewMetadata socialMediaPostType.
             * @member {E2E.Message.LinkPreviewMetadata.SocialMediaPostType|null|undefined} socialMediaPostType
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            LinkPreviewMetadata.prototype.socialMediaPostType = null;

            /**
             * LinkPreviewMetadata linkInlineVideoMuted.
             * @member {boolean|null|undefined} linkInlineVideoMuted
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            LinkPreviewMetadata.prototype.linkInlineVideoMuted = null;

            /**
             * LinkPreviewMetadata videoContentUrl.
             * @member {string|null|undefined} videoContentUrl
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            LinkPreviewMetadata.prototype.videoContentUrl = null;

            /**
             * LinkPreviewMetadata musicMetadata.
             * @member {E2E.IEmbeddedMusic|null|undefined} musicMetadata
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            LinkPreviewMetadata.prototype.musicMetadata = null;

            /**
             * LinkPreviewMetadata videoContentCaption.
             * @member {string|null|undefined} videoContentCaption
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            LinkPreviewMetadata.prototype.videoContentCaption = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * LinkPreviewMetadata _paymentLinkMetadata.
             * @member {"paymentLinkMetadata"|undefined} _paymentLinkMetadata
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            Object.defineProperty(LinkPreviewMetadata.prototype, "_paymentLinkMetadata", {
                get: $util.oneOfGetter($oneOfFields = ["paymentLinkMetadata"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LinkPreviewMetadata _urlMetadata.
             * @member {"urlMetadata"|undefined} _urlMetadata
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            Object.defineProperty(LinkPreviewMetadata.prototype, "_urlMetadata", {
                get: $util.oneOfGetter($oneOfFields = ["urlMetadata"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LinkPreviewMetadata _fbExperimentId.
             * @member {"fbExperimentId"|undefined} _fbExperimentId
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            Object.defineProperty(LinkPreviewMetadata.prototype, "_fbExperimentId", {
                get: $util.oneOfGetter($oneOfFields = ["fbExperimentId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LinkPreviewMetadata _linkMediaDuration.
             * @member {"linkMediaDuration"|undefined} _linkMediaDuration
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            Object.defineProperty(LinkPreviewMetadata.prototype, "_linkMediaDuration", {
                get: $util.oneOfGetter($oneOfFields = ["linkMediaDuration"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LinkPreviewMetadata _socialMediaPostType.
             * @member {"socialMediaPostType"|undefined} _socialMediaPostType
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            Object.defineProperty(LinkPreviewMetadata.prototype, "_socialMediaPostType", {
                get: $util.oneOfGetter($oneOfFields = ["socialMediaPostType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LinkPreviewMetadata _linkInlineVideoMuted.
             * @member {"linkInlineVideoMuted"|undefined} _linkInlineVideoMuted
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            Object.defineProperty(LinkPreviewMetadata.prototype, "_linkInlineVideoMuted", {
                get: $util.oneOfGetter($oneOfFields = ["linkInlineVideoMuted"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LinkPreviewMetadata _videoContentUrl.
             * @member {"videoContentUrl"|undefined} _videoContentUrl
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            Object.defineProperty(LinkPreviewMetadata.prototype, "_videoContentUrl", {
                get: $util.oneOfGetter($oneOfFields = ["videoContentUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LinkPreviewMetadata _musicMetadata.
             * @member {"musicMetadata"|undefined} _musicMetadata
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            Object.defineProperty(LinkPreviewMetadata.prototype, "_musicMetadata", {
                get: $util.oneOfGetter($oneOfFields = ["musicMetadata"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LinkPreviewMetadata _videoContentCaption.
             * @member {"videoContentCaption"|undefined} _videoContentCaption
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             */
            Object.defineProperty(LinkPreviewMetadata.prototype, "_videoContentCaption", {
                get: $util.oneOfGetter($oneOfFields = ["videoContentCaption"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new LinkPreviewMetadata instance using the specified properties.
             * @function create
             * @memberof E2E.Message.LinkPreviewMetadata
             * @static
             * @param {E2E.Message.ILinkPreviewMetadata=} [properties] Properties to set
             * @returns {E2E.Message.LinkPreviewMetadata} LinkPreviewMetadata instance
             */
            LinkPreviewMetadata.create = function create(properties) {
                return new LinkPreviewMetadata(properties);
            };

            /**
             * Encodes the specified LinkPreviewMetadata message. Does not implicitly {@link E2E.Message.LinkPreviewMetadata.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.LinkPreviewMetadata
             * @static
             * @param {E2E.Message.ILinkPreviewMetadata} message LinkPreviewMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LinkPreviewMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.paymentLinkMetadata != null && Object.hasOwnProperty.call(message, "paymentLinkMetadata"))
                    $root.E2E.Message.PaymentLinkMetadata.encode(message.paymentLinkMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.urlMetadata != null && Object.hasOwnProperty.call(message, "urlMetadata"))
                    $root.E2E.Message.URLMetadata.encode(message.urlMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                if (message.fbExperimentId != null && Object.hasOwnProperty.call(message, "fbExperimentId"))
                    writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.fbExperimentId);
                if (message.linkMediaDuration != null && Object.hasOwnProperty.call(message, "linkMediaDuration"))
                    writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.linkMediaDuration);
                if (message.socialMediaPostType != null && Object.hasOwnProperty.call(message, "socialMediaPostType"))
                    writer.uint32(/* id 5, wireType 0 =*/40).int32(message.socialMediaPostType);
                if (message.linkInlineVideoMuted != null && Object.hasOwnProperty.call(message, "linkInlineVideoMuted"))
                    writer.uint32(/* id 6, wireType 0 =*/48).bool(message.linkInlineVideoMuted);
                if (message.videoContentUrl != null && Object.hasOwnProperty.call(message, "videoContentUrl"))
                    writer.uint32(/* id 7, wireType 2 =*/58).string(message.videoContentUrl);
                if (message.musicMetadata != null && Object.hasOwnProperty.call(message, "musicMetadata"))
                    $root.E2E.EmbeddedMusic.encode(message.musicMetadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                if (message.videoContentCaption != null && Object.hasOwnProperty.call(message, "videoContentCaption"))
                    writer.uint32(/* id 9, wireType 2 =*/74).string(message.videoContentCaption);
                return writer;
            };

            /**
             * Encodes the specified LinkPreviewMetadata message, length delimited. Does not implicitly {@link E2E.Message.LinkPreviewMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.LinkPreviewMetadata
             * @static
             * @param {E2E.Message.ILinkPreviewMetadata} message LinkPreviewMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LinkPreviewMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a LinkPreviewMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.LinkPreviewMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.LinkPreviewMetadata} LinkPreviewMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LinkPreviewMetadata.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.E2E.Message.LinkPreviewMetadata();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.paymentLinkMetadata = $root.E2E.Message.PaymentLinkMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.urlMetadata = $root.E2E.Message.URLMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    case 3: {
                            message.fbExperimentId = reader.uint32();
                            break;
                        }
                    case 4: {
                            message.linkMediaDuration = reader.uint32();
                            break;
                        }
                    case 5: {
                            message.socialMediaPostType = reader.int32();
                            break;
                        }
                    case 6: {
                            message.linkInlineVideoMuted = reader.bool();
                            break;
                        }
                    case 7: {
                            message.videoContentUrl = reader.string();
                            break;
                        }
                    case 8: {
                            message.musicMetadata = $root.E2E.EmbeddedMusic.decode(reader, reader.uint32());
                            break;
                        }
                    case 9: {
                            message.videoContentCaption = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a LinkPreviewMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.LinkPreviewMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.LinkPreviewMetadata} LinkPreviewMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LinkPreviewMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a LinkPreviewMetadata message.
             * @function verify
             * @memberof E2E.Message.LinkPreviewMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            LinkPreviewMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.paymentLinkMetadata != null && message.hasOwnProperty("paymentLinkMetadata")) {
                    properties._paymentLinkMetadata = 1;
                    {
                        var error = $root.E2E.Message.PaymentLinkMetadata.verify(message.paymentLinkMetadata);
                        if (error)
                            return "paymentLinkMetadata." + error;
                    }
                }
                if (message.urlMetadata != null && message.hasOwnProperty("urlMetadata")) {
                    properties._urlMetadata = 1;
                    {
                        var error = $root.E2E.Message.URLMetadata.verify(message.urlMetadata);
                        if (error)
                            return "urlMetadata." + error;
                    }
                }
                if (message.fbExperimentId != null && message.hasOwnProperty("fbExperimentId")) {
                    properties._fbExperimentId = 1;
                    if (!$util.isInteger(message.fbExperimentId))
                        return "fbExperimentId: integer expected";
                }
                if (message.linkMediaDuration != null && message.hasOwnProperty("linkMediaDuration")) {
                    properties._linkMediaDuration = 1;
                    if (!$util.isInteger(message.linkMediaDuration))
                        return "linkMediaDuration: integer expected";
                }
                if (message.socialMediaPostType != null && message.hasOwnProperty("socialMediaPostType")) {
                    properties._socialMediaPostType = 1;
                    switch (message.socialMediaPostType) {
                    default:
                        return "socialMediaPostType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                        break;
                    }
                }
                if (message.linkInlineVideoMuted != null && message.hasOwnProperty("linkInlineVideoMuted")) {
                    properties._linkInlineVideoMuted = 1;
                    if (typeof message.linkInlineVideoMuted !== "boolean")
                        return "linkInlineVideoMuted: boolean expected";
                }
                if (message.videoContentUrl != null && message.hasOwnProperty("videoContentUrl")) {
                    properties._videoContentUrl = 1;
                    if (!$util.isString(message.videoContentUrl))
                        return "videoContentUrl: string expected";
                }
                if (message.musicMetadata != null && message.hasOwnProperty("musicMetadata")) {
                    properties._musicMetadata = 1;
                    {
                        var error = $root.E2E.EmbeddedMusic.verify(message.musicMetadata);
                        if (error)
                            return "musicMetadata." + error;
                    }
                }
                if (message.videoContentCaption != null && message.hasOwnProperty("videoContentCaption")) {
                    properties._videoContentCaption = 1;
                    if (!$util.isString(message.videoContentCaption))
                        return "videoContentCaption: string expected";
                }
                return null;
            };

            /**
             * Creates a LinkPreviewMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.LinkPreviewMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.LinkPreviewMetadata} LinkPreviewMetadata
             */
            LinkPreviewMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.LinkPreviewMetadata)
                    return object;
                var message = new $root.E2E.Message.LinkPreviewMetadata();
                if (object.paymentLinkMetadata != null) {
                    if (typeof object.paymentLinkMetadata !== "object")
                        throw TypeError(".E2E.Message.LinkPreviewMetadata.paymentLinkMetadata: object expected");
                    message.paymentLinkMetadata = $root.E2E.Message.PaymentLinkMetadata.fromObject(object.paymentLinkMetadata);
                }
                if (object.urlMetadata != null) {
                    if (typeof object.urlMetadata !== "object")
                        throw TypeError(".E2E.Message.LinkPreviewMetadata.urlMetadata: object expected");
                    message.urlMetadata = $root.E2E.Message.URLMetadata.fromObject(object.urlMetadata);
                }
                if (object.fbExperimentId != null)
                    message.fbExperimentId = object.fbExperimentId >>> 0;
                if (object.linkMediaDuration != null)
                    message.linkMediaDuration = object.linkMediaDuration >>> 0;
                switch (object.socialMediaPostType) {
                default:
                    if (typeof object.socialMediaPostType === "number") {
                        message.socialMediaPostType = object.socialMediaPostType;
                        break;
                    }
                    break;
                case "NONE":
                case 0:
                    message.socialMediaPostType = 0;
                    break;
                case "REEL":
                case 1:
                    message.socialMediaPostType = 1;
                    break;
                case "LIVE_VIDEO":
                case 2:
                    message.socialMediaPostType = 2;
                    break;
                case "LONG_VIDEO":
                case 3:
                    message.socialMediaPostType = 3;
                    break;
                case "SINGLE_IMAGE":
                case 4:
                    message.socialMediaPostType = 4;
                    break;
                case "CAROUSEL":
                case 5:
                    message.socialMediaPostType = 5;
                    break;
                }
                if (object.linkInlineVideoMuted != null)
                    message.linkInlineVideoMuted = Boolean(object.linkInlineVideoMuted);
                if (object.videoContentUrl != null)
                    message.videoContentUrl = String(object.videoContentUrl);
                if (object.musicMetadata != null) {
                    if (typeof object.musicMetadata !== "object")
                        throw TypeError(".E2E.Message.LinkPreviewMetadata.musicMetadata: object expected");
                    message.musicMetadata = $root.E2E.EmbeddedMusic.fromObject(object.musicMetadata);
                }
                if (object.videoContentCaption != null)
                    message.videoContentCaption = String(object.videoContentCaption);
                return message;
            };

            /**
             * Creates a plain object from a LinkPreviewMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.LinkPreviewMetadata
             * @static
             * @param {E2E.Message.LinkPreviewMetadata} message LinkPreviewMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            LinkPreviewMetadata.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.paymentLinkMetadata != null && message.hasOwnProperty("paymentLinkMetadata")) {
                    object.paymentLinkMetadata = $root.E2E.Message.PaymentLinkMetadata.toObject(message.paymentLinkMetadata, options);
                    if (options.oneofs)
                        object._paymentLinkMetadata = "paymentLinkMetadata";
                }
                if (message.urlMetadata != null && message.hasOwnProperty("urlMetadata")) {
                    object.urlMetadata = $root.E2E.Message.URLMetadata.toObject(message.urlMetadata, options);
                    if (options.oneofs)
                        object._urlMetadata = "urlMetadata";
                }
                if (message.fbExperimentId != null && message.hasOwnProperty("fbExperimentId")) {
                    object.fbExperimentId = message.fbExperimentId;
                    if (options.oneofs)
                        object._fbExperimentId = "fbExperimentId";
                }
                if (message.linkMediaDuration != null && message.hasOwnProperty("linkMediaDuration")) {
                    object.linkMediaDuration = message.linkMediaDuration;
                    if (options.oneofs)
                        object._linkMediaDuration = "linkMediaDuration";
                }
                if (message.socialMediaPostType != null && message.hasOwnProperty("socialMediaPostType")) {
                    object.socialMediaPostType = options.enums === String ? $root.E2E.Message.LinkPreviewMetadata.SocialMediaPostType[message.socialMediaPostType] === undefined ? message.socialMediaPostType : $root.E2E.Message.LinkPreviewMetadata.SocialMediaPostType[message.socialMediaPostType] : message.socialMediaPostType;
                    if (options.oneofs)
                        object._socialMediaPostType = "socialMediaPostType";
                }
                if (message.linkInlineVideoMuted != null && message.hasOwnProperty("linkInlineVideoMuted")) {
                    object.linkInlineVideoMuted = message.linkInlineVideoMuted;
                    if (options.oneofs)
                        object._linkInlineVideoMuted = "linkInlineVideoMuted";
                }
                if (message.videoContentUrl != null && message.hasOwnProperty("videoContentUrl")) {
                    object.videoContentUrl = message.videoContentUrl;
                    if (options.oneofs)
                        object._videoContentUrl = "videoContentUrl";
                }
                if (message.musicMetadata != null && message.hasOwnProperty("musicMetadata")) {
                    object.musicMetadata = $root.E2E.EmbeddedMusic.toObject(message.musicMetadata, options);
                    if (options.oneofs)
                        object._musicMetadata = "musicMetadata";
                }
                if (message.videoContentCaption != null && message.hasOwnProperty("videoContentCaption")) {
                    object.videoContentCaption = message.videoContentCaption;
                    if (options.oneofs)
                        object._videoContentCaption = "videoContentCaption";
                }
                return object;
            };

            /**
             * Converts this LinkPreviewMetadata to JSON.
             * @function toJSON
             * @memberof E2E.Message.LinkPreviewMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            LinkPreviewMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for LinkPreviewMetadata
             * @function getTypeUrl
             * @memberof E2E.Message.LinkPreviewMetadata
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            LinkPreviewMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.LinkPreviewMetadata";
            };

            /**
             * SocialMediaPostType enum.
             * @name E2E.Message.LinkPreviewMetadata.SocialMediaPostType
             * @enum {number}
             * @property {number} NONE=0 NONE value
             * @property {number} REEL=1 REEL value
             * @property {number} LIVE_VIDEO=2 LIVE_VIDEO value
             * @property {number} LONG_VIDEO=3 LONG_VIDEO value
             * @property {number} SINGLE_IMAGE=4 SINGLE_IMAGE value
             * @property {number} CAROUSEL=5 CAROUSEL value
             */
            LinkPreviewMetadata.SocialMediaPostType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "NONE"] = 0;
                values[valuesById[1] = "REEL"] = 1;
                values[valuesById[2] = "LIVE_VIDEO"] = 2;
                values[valuesById[3] = "LONG_VIDEO"] = 3;
                values[valuesById[4] = "SINGLE_IMAGE"] = 4;
                values[valuesById[5] = "CAROUSEL"] = 5;
                return values;
            })();

            return LinkPreviewMetadata;
        })();

        Message.ListMessage = (function() {

            /**
             * Properties of a ListMessage.
             * @memberof E2E.Message
             * @interface IListMessage
             * @property {string|null} [title] ListMessage title
             * @property {string|null} [description] ListMessage description
             * @property {string|null} [buttonText] ListMessage buttonText
             * @property {E2E.Message.ListMessage.ListType|null} [listType] ListMessage listType
             * @property {Array.<E2E.Message.ListMessage.ISection>|null} [sections] ListMessage sections
             * @property {E2E.Message.ListMessage.IProductListInfo|null} [productListInfo] ListMessage productListInfo
             * @property {string|null} [footerText] ListMessage footerText
             * @property {E2E.IContextInfo|null} [contextInfo] ListMessage contextInfo
             */

            /**
             * Constructs a new ListMessage.
             * @memberof E2E.Message
             * @classdesc Represents a ListMessage.
             * @implements IListMessage
             * @constructor
             * @param {E2E.Message.IListMessage=} [properties] Properties to set
             */
            function ListMessage(properties) {
                this.sections = [];
                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]];
            }

            /**
             * ListMessage title.
             * @member {string|null|undefined} title
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            ListMessage.prototype.title = null;

            /**
             * ListMessage description.
             * @member {string|null|undefined} description
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            ListMessage.prototype.description = null;

            /**
             * ListMessage buttonText.
             * @member {string|null|undefined} buttonText
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            ListMessage.prototype.buttonText = null;

            /**
             * ListMessage listType.
             * @member {E2E.Message.ListMessage.ListType|null|undefined} listType
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            ListMessage.prototype.listType = null;

            /**
             * ListMessage sections.
             * @member {Array.<E2E.Message.ListMessage.ISection>} sections
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            ListMessage.prototype.sections = $util.emptyArray;

            /**
             * ListMessage productListInfo.
             * @member {E2E.Message.ListMessage.IProductListInfo|null|undefined} productListInfo
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            ListMessage.prototype.productListInfo = null;

            /**
             * ListMessage footerText.
             * @member {string|null|undefined} footerText
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            ListMessage.prototype.footerText = null;

            /**
             * ListMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            ListMessage.prototype.contextInfo = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * ListMessage _title.
             * @member {"title"|undefined} _title
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            Object.defineProperty(ListMessage.prototype, "_title", {
                get: $util.oneOfGetter($oneOfFields = ["title"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ListMessage _description.
             * @member {"description"|undefined} _description
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            Object.defineProperty(ListMessage.prototype, "_description", {
                get: $util.oneOfGetter($oneOfFields = ["description"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ListMessage _buttonText.
             * @member {"buttonText"|undefined} _buttonText
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            Object.defineProperty(ListMessage.prototype, "_buttonText", {
                get: $util.oneOfGetter($oneOfFields = ["buttonText"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ListMessage _listType.
             * @member {"listType"|undefined} _listType
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            Object.defineProperty(ListMessage.prototype, "_listType", {
                get: $util.oneOfGetter($oneOfFields = ["listType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ListMessage _productListInfo.
             * @member {"productListInfo"|undefined} _productListInfo
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            Object.defineProperty(ListMessage.prototype, "_productListInfo", {
                get: $util.oneOfGetter($oneOfFields = ["productListInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ListMessage _footerText.
             * @member {"footerText"|undefined} _footerText
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            Object.defineProperty(ListMessage.prototype, "_footerText", {
                get: $util.oneOfGetter($oneOfFields = ["footerText"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ListMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.ListMessage
             * @instance
             */
            Object.defineProperty(ListMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new ListMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.ListMessage
             * @static
             * @param {E2E.Message.IListMessage=} [properties] Properties to set
             * @returns {E2E.Message.ListMessage} ListMessage instance
             */
            ListMessage.create = function create(properties) {
                return new ListMessage(properties);
            };

            /**
             * Encodes the specified ListMessage message. Does not implicitly {@link E2E.Message.ListMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.ListMessage
             * @static
             * @param {E2E.Message.IListMessage} message ListMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ListMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.title);
                if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.description);
                if (message.buttonText != null && Object.hasOwnProperty.call(message, "buttonText"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.buttonText);
                if (message.listType != null && Object.hasOwnProperty.call(message, "listType"))
                    writer.uint32(/* id 4, wireType 0 =*/32).int32(message.listType);
                if (message.sections != null && message.sections.length)
                    for (var i = 0; i < message.sections.length; ++i)
                        $root.E2E.Message.ListMessage.Section.encode(message.sections[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                if (message.productListInfo != null && Object.hasOwnProperty.call(message, "productListInfo"))
                    $root.E2E.Message.ListMessage.ProductListInfo.encode(message.productListInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                if (message.footerText != null && Object.hasOwnProperty.call(message, "footerText"))
                    writer.uint32(/* id 7, wireType 2 =*/58).string(message.footerText);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified ListMessage message, length delimited. Does not implicitly {@link E2E.Message.ListMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.ListMessage
             * @static
             * @param {E2E.Message.IListMessage} message ListMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ListMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ListMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.ListMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.ListMessage} ListMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ListMessage.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.E2E.Message.ListMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.title = reader.string();
                            break;
                        }
                    case 2: {
                            message.description = reader.string();
                            break;
                        }
                    case 3: {
                            message.buttonText = reader.string();
                            break;
                        }
                    case 4: {
                            message.listType = reader.int32();
                            break;
                        }
                    case 5: {
                            if (!(message.sections && message.sections.length))
                                message.sections = [];
                            message.sections.push($root.E2E.Message.ListMessage.Section.decode(reader, reader.uint32()));
                            break;
                        }
                    case 6: {
                            message.productListInfo = $root.E2E.Message.ListMessage.ProductListInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 7: {
                            message.footerText = reader.string();
                            break;
                        }
                    case 8: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a ListMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.ListMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.ListMessage} ListMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ListMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ListMessage message.
             * @function verify
             * @memberof E2E.Message.ListMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ListMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                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.buttonText != null && message.hasOwnProperty("buttonText")) {
                    properties._buttonText = 1;
                    if (!$util.isString(message.buttonText))
                        return "buttonText: string expected";
                }
                if (message.listType != null && message.hasOwnProperty("listType")) {
                    properties._listType = 1;
                    switch (message.listType) {
                    default:
                        return "listType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                if (message.sections != null && message.hasOwnProperty("sections")) {
                    if (!Array.isArray(message.sections))
                        return "sections: array expected";
                    for (var i = 0; i < message.sections.length; ++i) {
                        var error = $root.E2E.Message.ListMessage.Section.verify(message.sections[i]);
                        if (error)
                            return "sections." + error;
                    }
                }
                if (message.productListInfo != null && message.hasOwnProperty("productListInfo")) {
                    properties._productListInfo = 1;
                    {
                        var error = $root.E2E.Message.ListMessage.ProductListInfo.verify(message.productListInfo);
                        if (error)
                            return "productListInfo." + error;
                    }
                }
                if (message.footerText != null && message.hasOwnProperty("footerText")) {
                    properties._footerText = 1;
                    if (!$util.isString(message.footerText))
                        return "footerText: string expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a ListMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.ListMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.ListMessage} ListMessage
             */
            ListMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.ListMessage)
                    return object;
                var message = new $root.E2E.Message.ListMessage();
                if (object.title != null)
                    message.title = String(object.title);
                if (object.description != null)
                    message.description = String(object.description);
                if (object.buttonText != null)
                    message.buttonText = String(object.buttonText);
                switch (object.listType) {
                default:
                    if (typeof object.listType === "number") {
                        message.listType = object.listType;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.listType = 0;
                    break;
                case "SINGLE_SELECT":
                case 1:
                    message.listType = 1;
                    break;
                case "PRODUCT_LIST":
                case 2:
                    message.listType = 2;
                    break;
                }
                if (object.sections) {
                    if (!Array.isArray(object.sections))
                        throw TypeError(".E2E.Message.ListMessage.sections: array expected");
                    message.sections = [];
                    for (var i = 0; i < object.sections.length; ++i) {
                        if (typeof object.sections[i] !== "object")
                            throw TypeError(".E2E.Message.ListMessage.sections: object expected");
                        message.sections[i] = $root.E2E.Message.ListMessage.Section.fromObject(object.sections[i]);
                    }
                }
                if (object.productListInfo != null) {
                    if (typeof object.productListInfo !== "object")
                        throw TypeError(".E2E.Message.ListMessage.productListInfo: object expected");
                    message.productListInfo = $root.E2E.Message.ListMessage.ProductListInfo.fromObject(object.productListInfo);
                }
                if (object.footerText != null)
                    message.footerText = String(object.footerText);
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.ListMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                return message;
            };

            /**
             * Creates a plain object from a ListMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.ListMessage
             * @static
             * @param {E2E.Message.ListMessage} message ListMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ListMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.sections = [];
                if (message.title != null && message.hasOwnProperty("title")) {
                    object.title = message.title;
                    if (options.oneofs)
                        object._title = "title";
                }
                if (message.description != null && message.hasOwnProperty("description")) {
                    object.description = message.description;
                    if (options.oneofs)
                        object._description = "description";
                }
                if (message.buttonText != null && message.hasOwnProperty("buttonText")) {
                    object.buttonText = message.buttonText;
                    if (options.oneofs)
                        object._buttonText = "buttonText";
                }
                if (message.listType != null && message.hasOwnProperty("listType")) {
                    object.listType = options.enums === String ? $root.E2E.Message.ListMessage.ListType[message.listType] === undefined ? message.listType : $root.E2E.Message.ListMessage.ListType[message.listType] : message.listType;
                    if (options.oneofs)
                        object._listType = "listType";
                }
                if (message.sections && message.sections.length) {
                    object.sections = [];
                    for (var j = 0; j < message.sections.length; ++j)
                        object.sections[j] = $root.E2E.Message.ListMessage.Section.toObject(message.sections[j], options);
                }
                if (message.productListInfo != null && message.hasOwnProperty("productListInfo")) {
                    object.productListInfo = $root.E2E.Message.ListMessage.ProductListInfo.toObject(message.productListInfo, options);
                    if (options.oneofs)
                        object._productListInfo = "productListInfo";
                }
                if (message.footerText != null && message.hasOwnProperty("footerText")) {
                    object.footerText = message.footerText;
                    if (options.oneofs)
                        object._footerText = "footerText";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                return object;
            };

            /**
             * Converts this ListMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.ListMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ListMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for ListMessage
             * @function getTypeUrl
             * @memberof E2E.Message.ListMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            ListMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.ListMessage";
            };

            /**
             * ListType enum.
             * @name E2E.Message.ListMessage.ListType
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} SINGLE_SELECT=1 SINGLE_SELECT value
             * @property {number} PRODUCT_LIST=2 PRODUCT_LIST value
             */
            ListMessage.ListType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "SINGLE_SELECT"] = 1;
                values[valuesById[2] = "PRODUCT_LIST"] = 2;
                return values;
            })();

            ListMessage.Product = (function() {

                /**
                 * Properties of a Product.
                 * @memberof E2E.Message.ListMessage
                 * @interface IProduct
                 * @property {string|null} [productId] Product productId
                 */

                /**
                 * Constructs a new Product.
                 * @memberof E2E.Message.ListMessage
                 * @classdesc Represents a Product.
                 * @implements IProduct
                 * @constructor
                 * @param {E2E.Message.ListMessage.IProduct=} [properties] Properties to set
                 */
                function Product(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]];
                }

                /**
                 * Product productId.
                 * @member {string|null|undefined} productId
                 * @memberof E2E.Message.ListMessage.Product
                 * @instance
                 */
                Product.prototype.productId = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * Product _productId.
                 * @member {"productId"|undefined} _productId
                 * @memberof E2E.Message.ListMessage.Product
                 * @instance
                 */
                Object.defineProperty(Product.prototype, "_productId", {
                    get: $util.oneOfGetter($oneOfFields = ["productId"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new Product instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.ListMessage.Product
                 * @static
                 * @param {E2E.Message.ListMessage.IProduct=} [properties] Properties to set
                 * @returns {E2E.Message.ListMessage.Product} Product instance
                 */
                Product.create = function create(properties) {
                    return new Product(properties);
                };

                /**
                 * Encodes the specified Product message. Does not implicitly {@link E2E.Message.ListMessage.Product.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.ListMessage.Product
                 * @static
                 * @param {E2E.Message.ListMessage.IProduct} message Product message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Product.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.productId != null && Object.hasOwnProperty.call(message, "productId"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.productId);
                    return writer;
                };

                /**
                 * Encodes the specified Product message, length delimited. Does not implicitly {@link E2E.Message.ListMessage.Product.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.ListMessage.Product
                 * @static
                 * @param {E2E.Message.ListMessage.IProduct} message Product message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Product.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Product message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.ListMessage.Product
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.ListMessage.Product} Product
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Product.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.E2E.Message.ListMessage.Product();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.productId = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a Product message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.ListMessage.Product
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.ListMessage.Product} Product
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Product.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Product message.
                 * @function verify
                 * @memberof E2E.Message.ListMessage.Product
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Product.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.productId != null && message.hasOwnProperty("productId")) {
                        properties._productId = 1;
                        if (!$util.isString(message.productId))
                            return "productId: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a Product message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.ListMessage.Product
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.ListMessage.Product} Product
                 */
                Product.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.ListMessage.Product)
                        return object;
                    var message = new $root.E2E.Message.ListMessage.Product();
                    if (object.productId != null)
                        message.productId = String(object.productId);
                    return message;
                };

                /**
                 * Creates a plain object from a Product message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.ListMessage.Product
                 * @static
                 * @param {E2E.Message.ListMessage.Product} message Product
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Product.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.productId != null && message.hasOwnProperty("productId")) {
                        object.productId = message.productId;
                        if (options.oneofs)
                            object._productId = "productId";
                    }
                    return object;
                };

                /**
                 * Converts this Product to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.ListMessage.Product
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Product.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for Product
                 * @function getTypeUrl
                 * @memberof E2E.Message.ListMessage.Product
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Product.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.ListMessage.Product";
                };

                return Product;
            })();

            ListMessage.ProductListHeaderImage = (function() {

                /**
                 * Properties of a ProductListHeaderImage.
                 * @memberof E2E.Message.ListMessage
                 * @interface IProductListHeaderImage
                 * @property {string|null} [productId] ProductListHeaderImage productId
                 * @property {Uint8Array|null} [jpegThumbnail] ProductListHeaderImage jpegThumbnail
                 */

                /**
                 * Constructs a new ProductListHeaderImage.
                 * @memberof E2E.Message.ListMessage
                 * @classdesc Represents a ProductListHeaderImage.
                 * @implements IProductListHeaderImage
                 * @constructor
                 * @param {E2E.Message.ListMessage.IProductListHeaderImage=} [properties] Properties to set
                 */
                function ProductListHeaderImage(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]];
                }

                /**
                 * ProductListHeaderImage productId.
                 * @member {string|null|undefined} productId
                 * @memberof E2E.Message.ListMessage.ProductListHeaderImage
                 * @instance
                 */
                ProductListHeaderImage.prototype.productId = null;

                /**
                 * ProductListHeaderImage jpegThumbnail.
                 * @member {Uint8Array|null|undefined} jpegThumbnail
                 * @memberof E2E.Message.ListMessage.ProductListHeaderImage
                 * @instance
                 */
                ProductListHeaderImage.prototype.jpegThumbnail = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * ProductListHeaderImage _productId.
                 * @member {"productId"|undefined} _productId
                 * @memberof E2E.Message.ListMessage.ProductListHeaderImage
                 * @instance
                 */
                Object.defineProperty(ProductListHeaderImage.prototype, "_productId", {
                    get: $util.oneOfGetter($oneOfFields = ["productId"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * ProductListHeaderImage _jpegThumbnail.
                 * @member {"jpegThumbnail"|undefined} _jpegThumbnail
                 * @memberof E2E.Message.ListMessage.ProductListHeaderImage
                 * @instance
                 */
                Object.defineProperty(ProductListHeaderImage.prototype, "_jpegThumbnail", {
                    get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new ProductListHeaderImage instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.ListMessage.ProductListHeaderImage
                 * @static
                 * @param {E2E.Message.ListMessage.IProductListHeaderImage=} [properties] Properties to set
                 * @returns {E2E.Message.ListMessage.ProductListHeaderImage} ProductListHeaderImage instance
                 */
                ProductListHeaderImage.create = function create(properties) {
                    return new ProductListHeaderImage(properties);
                };

                /**
                 * Encodes the specified ProductListHeaderImage message. Does not implicitly {@link E2E.Message.ListMessage.ProductListHeaderImage.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.ListMessage.ProductListHeaderImage
                 * @static
                 * @param {E2E.Message.ListMessage.IProductListHeaderImage} message ProductListHeaderImage message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProductListHeaderImage.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.productId != null && Object.hasOwnProperty.call(message, "productId"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.productId);
                    if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail"))
                        writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.jpegThumbnail);
                    return writer;
                };

                /**
                 * Encodes the specified ProductListHeaderImage message, length delimited. Does not implicitly {@link E2E.Message.ListMessage.ProductListHeaderImage.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.ListMessage.ProductListHeaderImage
                 * @static
                 * @param {E2E.Message.ListMessage.IProductListHeaderImage} message ProductListHeaderImage message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProductListHeaderImage.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ProductListHeaderImage message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.ListMessage.ProductListHeaderImage
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.ListMessage.ProductListHeaderImage} ProductListHeaderImage
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProductListHeaderImage.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.E2E.Message.ListMessage.ProductListHeaderImage();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.productId = reader.string();
                                break;
                            }
                        case 2: {
                                message.jpegThumbnail = reader.bytes();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a ProductListHeaderImage message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.ListMessage.ProductListHeaderImage
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.ListMessage.ProductListHeaderImage} ProductListHeaderImage
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProductListHeaderImage.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ProductListHeaderImage message.
                 * @function verify
                 * @memberof E2E.Message.ListMessage.ProductListHeaderImage
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ProductListHeaderImage.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.productId != null && message.hasOwnProperty("productId")) {
                        properties._productId = 1;
                        if (!$util.isString(message.productId))
                            return "productId: string expected";
                    }
                    if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                        properties._jpegThumbnail = 1;
                        if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                            return "jpegThumbnail: buffer expected";
                    }
                    return null;
                };

                /**
                 * Creates a ProductListHeaderImage message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.ListMessage.ProductListHeaderImage
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.ListMessage.ProductListHeaderImage} ProductListHeaderImage
                 */
                ProductListHeaderImage.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.ListMessage.ProductListHeaderImage)
                        return object;
                    var message = new $root.E2E.Message.ListMessage.ProductListHeaderImage();
                    if (object.productId != null)
                        message.productId = String(object.productId);
                    if (object.jpegThumbnail != null)
                        if (typeof object.jpegThumbnail === "string")
                            $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0);
                        else if (object.jpegThumbnail.length >= 0)
                            message.jpegThumbnail = object.jpegThumbnail;
                    return message;
                };

                /**
                 * Creates a plain object from a ProductListHeaderImage message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.ListMessage.ProductListHeaderImage
                 * @static
                 * @param {E2E.Message.ListMessage.ProductListHeaderImage} message ProductListHeaderImage
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ProductListHeaderImage.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.productId != null && message.hasOwnProperty("productId")) {
                        object.productId = message.productId;
                        if (options.oneofs)
                            object._productId = "productId";
                    }
                    if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                        object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail;
                        if (options.oneofs)
                            object._jpegThumbnail = "jpegThumbnail";
                    }
                    return object;
                };

                /**
                 * Converts this ProductListHeaderImage to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.ListMessage.ProductListHeaderImage
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ProductListHeaderImage.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for ProductListHeaderImage
                 * @function getTypeUrl
                 * @memberof E2E.Message.ListMessage.ProductListHeaderImage
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                ProductListHeaderImage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.ListMessage.ProductListHeaderImage";
                };

                return ProductListHeaderImage;
            })();

            ListMessage.ProductListInfo = (function() {

                /**
                 * Properties of a ProductListInfo.
                 * @memberof E2E.Message.ListMessage
                 * @interface IProductListInfo
                 * @property {Array.<E2E.Message.ListMessage.IProductSection>|null} [productSections] ProductListInfo productSections
                 * @property {E2E.Message.ListMessage.IProductListHeaderImage|null} [headerImage] ProductListInfo headerImage
                 * @property {string|null} [businessOwnerJid] ProductListInfo businessOwnerJid
                 */

                /**
                 * Constructs a new ProductListInfo.
                 * @memberof E2E.Message.ListMessage
                 * @classdesc Represents a ProductListInfo.
                 * @implements IProductListInfo
                 * @constructor
                 * @param {E2E.Message.ListMessage.IProductListInfo=} [properties] Properties to set
                 */
                function ProductListInfo(properties) {
                    this.productSections = [];
                    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]];
                }

                /**
                 * ProductListInfo productSections.
                 * @member {Array.<E2E.Message.ListMessage.IProductSection>} productSections
                 * @memberof E2E.Message.ListMessage.ProductListInfo
                 * @instance
                 */
                ProductListInfo.prototype.productSections = $util.emptyArray;

                /**
                 * ProductListInfo headerImage.
                 * @member {E2E.Message.ListMessage.IProductListHeaderImage|null|undefined} headerImage
                 * @memberof E2E.Message.ListMessage.ProductListInfo
                 * @instance
                 */
                ProductListInfo.prototype.headerImage = null;

                /**
                 * ProductListInfo businessOwnerJid.
                 * @member {string|null|undefined} businessOwnerJid
                 * @memberof E2E.Message.ListMessage.ProductListInfo
                 * @instance
                 */
                ProductListInfo.prototype.businessOwnerJid = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * ProductListInfo _headerImage.
                 * @member {"headerImage"|undefined} _headerImage
                 * @memberof E2E.Message.ListMessage.ProductListInfo
                 * @instance
                 */
                Object.defineProperty(ProductListInfo.prototype, "_headerImage", {
                    get: $util.oneOfGetter($oneOfFields = ["headerImage"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * ProductListInfo _businessOwnerJid.
                 * @member {"businessOwnerJid"|undefined} _businessOwnerJid
                 * @memberof E2E.Message.ListMessage.ProductListInfo
                 * @instance
                 */
                Object.defineProperty(ProductListInfo.prototype, "_businessOwnerJid", {
                    get: $util.oneOfGetter($oneOfFields = ["businessOwnerJid"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new ProductListInfo instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.ListMessage.ProductListInfo
                 * @static
                 * @param {E2E.Message.ListMessage.IProductListInfo=} [properties] Properties to set
                 * @returns {E2E.Message.ListMessage.ProductListInfo} ProductListInfo instance
                 */
                ProductListInfo.create = function create(properties) {
                    return new ProductListInfo(properties);
                };

                /**
                 * Encodes the specified ProductListInfo message. Does not implicitly {@link E2E.Message.ListMessage.ProductListInfo.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.ListMessage.ProductListInfo
                 * @static
                 * @param {E2E.Message.ListMessage.IProductListInfo} message ProductListInfo message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProductListInfo.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.productSections != null && message.productSections.length)
                        for (var i = 0; i < message.productSections.length; ++i)
                            $root.E2E.Message.ListMessage.ProductSection.encode(message.productSections[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    if (message.headerImage != null && Object.hasOwnProperty.call(message, "headerImage"))
                        $root.E2E.Message.ListMessage.ProductListHeaderImage.encode(message.headerImage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    if (message.businessOwnerJid != null && Object.hasOwnProperty.call(message, "businessOwnerJid"))
                        writer.uint32(/* id 3, wireType 2 =*/26).string(message.businessOwnerJid);
                    return writer;
                };

                /**
                 * Encodes the specified ProductListInfo message, length delimited. Does not implicitly {@link E2E.Message.ListMessage.ProductListInfo.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.ListMessage.ProductListInfo
                 * @static
                 * @param {E2E.Message.ListMessage.IProductListInfo} message ProductListInfo message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProductListInfo.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ProductListInfo message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.ListMessage.ProductListInfo
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.ListMessage.ProductListInfo} ProductListInfo
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProductListInfo.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.E2E.Message.ListMessage.ProductListInfo();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                if (!(message.productSections && message.productSections.length))
                                    message.productSections = [];
                                message.productSections.push($root.E2E.Message.ListMessage.ProductSection.decode(reader, reader.uint32()));
                                break;
                            }
                        case 2: {
                                message.headerImage = $root.E2E.Message.ListMessage.ProductListHeaderImage.decode(reader, reader.uint32());
                                break;
                            }
                        case 3: {
                                message.businessOwnerJid = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a ProductListInfo message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.ListMessage.ProductListInfo
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.ListMessage.ProductListInfo} ProductListInfo
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProductListInfo.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ProductListInfo message.
                 * @function verify
                 * @memberof E2E.Message.ListMessage.ProductListInfo
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ProductListInfo.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.productSections != null && message.hasOwnProperty("productSections")) {
                        if (!Array.isArray(message.productSections))
                            return "productSections: array expected";
                        for (var i = 0; i < message.productSections.length; ++i) {
                            var error = $root.E2E.Message.ListMessage.ProductSection.verify(message.productSections[i]);
                            if (error)
                                return "productSections." + error;
                        }
                    }
                    if (message.headerImage != null && message.hasOwnProperty("headerImage")) {
                        properties._headerImage = 1;
                        {
                            var error = $root.E2E.Message.ListMessage.ProductListHeaderImage.verify(message.headerImage);
                            if (error)
                                return "headerImage." + error;
                        }
                    }
                    if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) {
                        properties._businessOwnerJid = 1;
                        if (!$util.isString(message.businessOwnerJid))
                            return "businessOwnerJid: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a ProductListInfo message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.ListMessage.ProductListInfo
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.ListMessage.ProductListInfo} ProductListInfo
                 */
                ProductListInfo.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.ListMessage.ProductListInfo)
                        return object;
                    var message = new $root.E2E.Message.ListMessage.ProductListInfo();
                    if (object.productSections) {
                        if (!Array.isArray(object.productSections))
                            throw TypeError(".E2E.Message.ListMessage.ProductListInfo.productSections: array expected");
                        message.productSections = [];
                        for (var i = 0; i < object.productSections.length; ++i) {
                            if (typeof object.productSections[i] !== "object")
                                throw TypeError(".E2E.Message.ListMessage.ProductListInfo.productSections: object expected");
                            message.productSections[i] = $root.E2E.Message.ListMessage.ProductSection.fromObject(object.productSections[i]);
                        }
                    }
                    if (object.headerImage != null) {
                        if (typeof object.headerImage !== "object")
                            throw TypeError(".E2E.Message.ListMessage.ProductListInfo.headerImage: object expected");
                        message.headerImage = $root.E2E.Message.ListMessage.ProductListHeaderImage.fromObject(object.headerImage);
                    }
                    if (object.businessOwnerJid != null)
                        message.businessOwnerJid = String(object.businessOwnerJid);
                    return message;
                };

                /**
                 * Creates a plain object from a ProductListInfo message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.ListMessage.ProductListInfo
                 * @static
                 * @param {E2E.Message.ListMessage.ProductListInfo} message ProductListInfo
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ProductListInfo.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.productSections = [];
                    if (message.productSections && message.productSections.length) {
                        object.productSections = [];
                        for (var j = 0; j < message.productSections.length; ++j)
                            object.productSections[j] = $root.E2E.Message.ListMessage.ProductSection.toObject(message.productSections[j], options);
                    }
                    if (message.headerImage != null && message.hasOwnProperty("headerImage")) {
                        object.headerImage = $root.E2E.Message.ListMessage.ProductListHeaderImage.toObject(message.headerImage, options);
                        if (options.oneofs)
                            object._headerImage = "headerImage";
                    }
                    if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) {
                        object.businessOwnerJid = message.businessOwnerJid;
                        if (options.oneofs)
                            object._businessOwnerJid = "businessOwnerJid";
                    }
                    return object;
                };

                /**
                 * Converts this ProductListInfo to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.ListMessage.ProductListInfo
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ProductListInfo.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for ProductListInfo
                 * @function getTypeUrl
                 * @memberof E2E.Message.ListMessage.ProductListInfo
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                ProductListInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.ListMessage.ProductListInfo";
                };

                return ProductListInfo;
            })();

            ListMessage.ProductSection = (function() {

                /**
                 * Properties of a ProductSection.
                 * @memberof E2E.Message.ListMessage
                 * @interface IProductSection
                 * @property {string|null} [title] ProductSection title
                 * @property {Array.<E2E.Message.ListMessage.IProduct>|null} [products] ProductSection products
                 */

                /**
                 * Constructs a new ProductSection.
                 * @memberof E2E.Message.ListMessage
                 * @classdesc Represents a ProductSection.
                 * @implements IProductSection
                 * @constructor
                 * @param {E2E.Message.ListMessage.IProductSection=} [properties] Properties to set
                 */
                function ProductSection(properties) {
                    this.products = [];
                    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]];
                }

                /**
                 * ProductSection title.
                 * @member {string|null|undefined} title
                 * @memberof E2E.Message.ListMessage.ProductSection
                 * @instance
                 */
                ProductSection.prototype.title = null;

                /**
                 * ProductSection products.
                 * @member {Array.<E2E.Message.ListMessage.IProduct>} products
                 * @memberof E2E.Message.ListMessage.ProductSection
                 * @instance
                 */
                ProductSection.prototype.products = $util.emptyArray;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * ProductSection _title.
                 * @member {"title"|undefined} _title
                 * @memberof E2E.Message.ListMessage.ProductSection
                 * @instance
                 */
                Object.defineProperty(ProductSection.prototype, "_title", {
                    get: $util.oneOfGetter($oneOfFields = ["title"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new ProductSection instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.ListMessage.ProductSection
                 * @static
                 * @param {E2E.Message.ListMessage.IProductSection=} [properties] Properties to set
                 * @returns {E2E.Message.ListMessage.ProductSection} ProductSection instance
                 */
                ProductSection.create = function create(properties) {
                    return new ProductSection(properties);
                };

                /**
                 * Encodes the specified ProductSection message. Does not implicitly {@link E2E.Message.ListMessage.ProductSection.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.ListMessage.ProductSection
                 * @static
                 * @param {E2E.Message.ListMessage.IProductSection} message ProductSection message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProductSection.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.title);
                    if (message.products != null && message.products.length)
                        for (var i = 0; i < message.products.length; ++i)
                            $root.E2E.Message.ListMessage.Product.encode(message.products[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    return writer;
                };

                /**
                 * Encodes the specified ProductSection message, length delimited. Does not implicitly {@link E2E.Message.ListMessage.ProductSection.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.ListMessage.ProductSection
                 * @static
                 * @param {E2E.Message.ListMessage.IProductSection} message ProductSection message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProductSection.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ProductSection message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.ListMessage.ProductSection
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.ListMessage.ProductSection} ProductSection
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProductSection.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.E2E.Message.ListMessage.ProductSection();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.title = reader.string();
                                break;
                            }
                        case 2: {
                                if (!(message.products && message.products.length))
                                    message.products = [];
                                message.products.push($root.E2E.Message.ListMessage.Product.decode(reader, reader.uint32()));
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a ProductSection message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.ListMessage.ProductSection
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.ListMessage.ProductSection} ProductSection
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProductSection.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ProductSection message.
                 * @function verify
                 * @memberof E2E.Message.ListMessage.ProductSection
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ProductSection.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.title != null && message.hasOwnProperty("title")) {
                        properties._title = 1;
                        if (!$util.isString(message.title))
                            return "title: string expected";
                    }
                    if (message.products != null && message.hasOwnProperty("products")) {
                        if (!Array.isArray(message.products))
                            return "products: array expected";
                        for (var i = 0; i < message.products.length; ++i) {
                            var error = $root.E2E.Message.ListMessage.Product.verify(message.products[i]);
                            if (error)
                                return "products." + error;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a ProductSection message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.ListMessage.ProductSection
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.ListMessage.ProductSection} ProductSection
                 */
                ProductSection.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.ListMessage.ProductSection)
                        return object;
                    var message = new $root.E2E.Message.ListMessage.ProductSection();
                    if (object.title != null)
                        message.title = String(object.title);
                    if (object.products) {
                        if (!Array.isArray(object.products))
                            throw TypeError(".E2E.Message.ListMessage.ProductSection.products: array expected");
                        message.products = [];
                        for (var i = 0; i < object.products.length; ++i) {
                            if (typeof object.products[i] !== "object")
                                throw TypeError(".E2E.Message.ListMessage.ProductSection.products: object expected");
                            message.products[i] = $root.E2E.Message.ListMessage.Product.fromObject(object.products[i]);
                        }
                    }
                    return message;
                };

                /**
                 * Creates a plain object from a ProductSection message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.ListMessage.ProductSection
                 * @static
                 * @param {E2E.Message.ListMessage.ProductSection} message ProductSection
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ProductSection.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.products = [];
                    if (message.title != null && message.hasOwnProperty("title")) {
                        object.title = message.title;
                        if (options.oneofs)
                            object._title = "title";
                    }
                    if (message.products && message.products.length) {
                        object.products = [];
                        for (var j = 0; j < message.products.length; ++j)
                            object.products[j] = $root.E2E.Message.ListMessage.Product.toObject(message.products[j], options);
                    }
                    return object;
                };

                /**
                 * Converts this ProductSection to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.ListMessage.ProductSection
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ProductSection.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for ProductSection
                 * @function getTypeUrl
                 * @memberof E2E.Message.ListMessage.ProductSection
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                ProductSection.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.ListMessage.ProductSection";
                };

                return ProductSection;
            })();

            ListMessage.Row = (function() {

                /**
                 * Properties of a Row.
                 * @memberof E2E.Message.ListMessage
                 * @interface IRow
                 * @property {string|null} [title] Row title
                 * @property {string|null} [description] Row description
                 * @property {string|null} [rowId] Row rowId
                 */

                /**
                 * Constructs a new Row.
                 * @memberof E2E.Message.ListMessage
                 * @classdesc Represents a Row.
                 * @implements IRow
                 * @constructor
                 * @param {E2E.Message.ListMessage.IRow=} [properties] Properties to set
                 */
                function Row(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]];
                }

                /**
                 * Row title.
                 * @member {string|null|undefined} title
                 * @memberof E2E.Message.ListMessage.Row
                 * @instance
                 */
                Row.prototype.title = null;

                /**
                 * Row description.
                 * @member {string|null|undefined} description
                 * @memberof E2E.Message.ListMessage.Row
                 * @instance
                 */
                Row.prototype.description = null;

                /**
                 * Row rowId.
                 * @member {string|null|undefined} rowId
                 * @memberof E2E.Message.ListMessage.Row
                 * @instance
                 */
                Row.prototype.rowId = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * Row _title.
                 * @member {"title"|undefined} _title
                 * @memberof E2E.Message.ListMessage.Row
                 * @instance
                 */
                Object.defineProperty(Row.prototype, "_title", {
                    get: $util.oneOfGetter($oneOfFields = ["title"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Row _description.
                 * @member {"description"|undefined} _description
                 * @memberof E2E.Message.ListMessage.Row
                 * @instance
                 */
                Object.defineProperty(Row.prototype, "_description", {
                    get: $util.oneOfGetter($oneOfFields = ["description"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Row _rowId.
                 * @member {"rowId"|undefined} _rowId
                 * @memberof E2E.Message.ListMessage.Row
                 * @instance
                 */
                Object.defineProperty(Row.prototype, "_rowId", {
                    get: $util.oneOfGetter($oneOfFields = ["rowId"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new Row instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.ListMessage.Row
                 * @static
                 * @param {E2E.Message.ListMessage.IRow=} [properties] Properties to set
                 * @returns {E2E.Message.ListMessage.Row} Row instance
                 */
                Row.create = function create(properties) {
                    return new Row(properties);
                };

                /**
                 * Encodes the specified Row message. Does not implicitly {@link E2E.Message.ListMessage.Row.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.ListMessage.Row
                 * @static
                 * @param {E2E.Message.ListMessage.IRow} message Row message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Row.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.title);
                    if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.description);
                    if (message.rowId != null && Object.hasOwnProperty.call(message, "rowId"))
                        writer.uint32(/* id 3, wireType 2 =*/26).string(message.rowId);
                    return writer;
                };

                /**
                 * Encodes the specified Row message, length delimited. Does not implicitly {@link E2E.Message.ListMessage.Row.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.ListMessage.Row
                 * @static
                 * @param {E2E.Message.ListMessage.IRow} message Row message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Row.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Row message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.ListMessage.Row
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.ListMessage.Row} Row
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Row.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.E2E.Message.ListMessage.Row();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.title = reader.string();
                                break;
                            }
                        case 2: {
                                message.description = reader.string();
                                break;
                            }
                        case 3: {
                                message.rowId = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a Row message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.ListMessage.Row
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.ListMessage.Row} Row
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Row.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Row message.
                 * @function verify
                 * @memberof E2E.Message.ListMessage.Row
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Row.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    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.rowId != null && message.hasOwnProperty("rowId")) {
                        properties._rowId = 1;
                        if (!$util.isString(message.rowId))
                            return "rowId: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a Row message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.ListMessage.Row
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.ListMessage.Row} Row
                 */
                Row.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.ListMessage.Row)
                        return object;
                    var message = new $root.E2E.Message.ListMessage.Row();
                    if (object.title != null)
                        message.title = String(object.title);
                    if (object.description != null)
                        message.description = String(object.description);
                    if (object.rowId != null)
                        message.rowId = String(object.rowId);
                    return message;
                };

                /**
                 * Creates a plain object from a Row message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.ListMessage.Row
                 * @static
                 * @param {E2E.Message.ListMessage.Row} message Row
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Row.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.title != null && message.hasOwnProperty("title")) {
                        object.title = message.title;
                        if (options.oneofs)
                            object._title = "title";
                    }
                    if (message.description != null && message.hasOwnProperty("description")) {
                        object.description = message.description;
                        if (options.oneofs)
                            object._description = "description";
                    }
                    if (message.rowId != null && message.hasOwnProperty("rowId")) {
                        object.rowId = message.rowId;
                        if (options.oneofs)
                            object._rowId = "rowId";
                    }
                    return object;
                };

                /**
                 * Converts this Row to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.ListMessage.Row
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Row.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for Row
                 * @function getTypeUrl
                 * @memberof E2E.Message.ListMessage.Row
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.ListMessage.Row";
                };

                return Row;
            })();

            ListMessage.Section = (function() {

                /**
                 * Properties of a Section.
                 * @memberof E2E.Message.ListMessage
                 * @interface ISection
                 * @property {string|null} [title] Section title
                 * @property {Array.<E2E.Message.ListMessage.IRow>|null} [rows] Section rows
                 */

                /**
                 * Constructs a new Section.
                 * @memberof E2E.Message.ListMessage
                 * @classdesc Represents a Section.
                 * @implements ISection
                 * @constructor
                 * @param {E2E.Message.ListMessage.ISection=} [properties] Properties to set
                 */
                function Section(properties) {
                    this.rows = [];
                    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]];
                }

                /**
                 * Section title.
                 * @member {string|null|undefined} title
                 * @memberof E2E.Message.ListMessage.Section
                 * @instance
                 */
                Section.prototype.title = null;

                /**
                 * Section rows.
                 * @member {Array.<E2E.Message.ListMessage.IRow>} rows
                 * @memberof E2E.Message.ListMessage.Section
                 * @instance
                 */
                Section.prototype.rows = $util.emptyArray;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * Section _title.
                 * @member {"title"|undefined} _title
                 * @memberof E2E.Message.ListMessage.Section
                 * @instance
                 */
                Object.defineProperty(Section.prototype, "_title", {
                    get: $util.oneOfGetter($oneOfFields = ["title"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new Section instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.ListMessage.Section
                 * @static
                 * @param {E2E.Message.ListMessage.ISection=} [properties] Properties to set
                 * @returns {E2E.Message.ListMessage.Section} Section instance
                 */
                Section.create = function create(properties) {
                    return new Section(properties);
                };

                /**
                 * Encodes the specified Section message. Does not implicitly {@link E2E.Message.ListMessage.Section.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.ListMessage.Section
                 * @static
                 * @param {E2E.Message.ListMessage.ISection} message Section message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Section.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.title);
                    if (message.rows != null && message.rows.length)
                        for (var i = 0; i < message.rows.length; ++i)
                            $root.E2E.Message.ListMessage.Row.encode(message.rows[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    return writer;
                };

                /**
                 * Encodes the specified Section message, length delimited. Does not implicitly {@link E2E.Message.ListMessage.Section.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.ListMessage.Section
                 * @static
                 * @param {E2E.Message.ListMessage.ISection} message Section message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Section.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Section message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.ListMessage.Section
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.ListMessage.Section} Section
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Section.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.E2E.Message.ListMessage.Section();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.title = reader.string();
                                break;
                            }
                        case 2: {
                                if (!(message.rows && message.rows.length))
                                    message.rows = [];
                                message.rows.push($root.E2E.Message.ListMessage.Row.decode(reader, reader.uint32()));
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a Section message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.ListMessage.Section
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.ListMessage.Section} Section
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Section.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Section message.
                 * @function verify
                 * @memberof E2E.Message.ListMessage.Section
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Section.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.title != null && message.hasOwnProperty("title")) {
                        properties._title = 1;
                        if (!$util.isString(message.title))
                            return "title: string expected";
                    }
                    if (message.rows != null && message.hasOwnProperty("rows")) {
                        if (!Array.isArray(message.rows))
                            return "rows: array expected";
                        for (var i = 0; i < message.rows.length; ++i) {
                            var error = $root.E2E.Message.ListMessage.Row.verify(message.rows[i]);
                            if (error)
                                return "rows." + error;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Section message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.ListMessage.Section
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.ListMessage.Section} Section
                 */
                Section.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.ListMessage.Section)
                        return object;
                    var message = new $root.E2E.Message.ListMessage.Section();
                    if (object.title != null)
                        message.title = String(object.title);
                    if (object.rows) {
                        if (!Array.isArray(object.rows))
                            throw TypeError(".E2E.Message.ListMessage.Section.rows: array expected");
                        message.rows = [];
                        for (var i = 0; i < object.rows.length; ++i) {
                            if (typeof object.rows[i] !== "object")
                                throw TypeError(".E2E.Message.ListMessage.Section.rows: object expected");
                            message.rows[i] = $root.E2E.Message.ListMessage.Row.fromObject(object.rows[i]);
                        }
                    }
                    return message;
                };

                /**
                 * Creates a plain object from a Section message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.ListMessage.Section
                 * @static
                 * @param {E2E.Message.ListMessage.Section} message Section
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Section.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.rows = [];
                    if (message.title != null && message.hasOwnProperty("title")) {
                        object.title = message.title;
                        if (options.oneofs)
                            object._title = "title";
                    }
                    if (message.rows && message.rows.length) {
                        object.rows = [];
                        for (var j = 0; j < message.rows.length; ++j)
                            object.rows[j] = $root.E2E.Message.ListMessage.Row.toObject(message.rows[j], options);
                    }
                    return object;
                };

                /**
                 * Converts this Section to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.ListMessage.Section
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Section.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for Section
                 * @function getTypeUrl
                 * @memberof E2E.Message.ListMessage.Section
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Section.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.ListMessage.Section";
                };

                return Section;
            })();

            return ListMessage;
        })();

        Message.ListResponseMessage = (function() {

            /**
             * Properties of a ListResponseMessage.
             * @memberof E2E.Message
             * @interface IListResponseMessage
             * @property {string|null} [title] ListResponseMessage title
             * @property {E2E.Message.ListResponseMessage.ListType|null} [listType] ListResponseMessage listType
             * @property {E2E.Message.ListResponseMessage.ISingleSelectReply|null} [singleSelectReply] ListResponseMessage singleSelectReply
             * @property {E2E.IContextInfo|null} [contextInfo] ListResponseMessage contextInfo
             * @property {string|null} [description] ListResponseMessage description
             */

            /**
             * Constructs a new ListResponseMessage.
             * @memberof E2E.Message
             * @classdesc Represents a ListResponseMessage.
             * @implements IListResponseMessage
             * @constructor
             * @param {E2E.Message.IListResponseMessage=} [properties] Properties to set
             */
            function ListResponseMessage(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]];
            }

            /**
             * ListResponseMessage title.
             * @member {string|null|undefined} title
             * @memberof E2E.Message.ListResponseMessage
             * @instance
             */
            ListResponseMessage.prototype.title = null;

            /**
             * ListResponseMessage listType.
             * @member {E2E.Message.ListResponseMessage.ListType|null|undefined} listType
             * @memberof E2E.Message.ListResponseMessage
             * @instance
             */
            ListResponseMessage.prototype.listType = null;

            /**
             * ListResponseMessage singleSelectReply.
             * @member {E2E.Message.ListResponseMessage.ISingleSelectReply|null|undefined} singleSelectReply
             * @memberof E2E.Message.ListResponseMessage
             * @instance
             */
            ListResponseMessage.prototype.singleSelectReply = null;

            /**
             * ListResponseMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.ListResponseMessage
             * @instance
             */
            ListResponseMessage.prototype.contextInfo = null;

            /**
             * ListResponseMessage description.
             * @member {string|null|undefined} description
             * @memberof E2E.Message.ListResponseMessage
             * @instance
             */
            ListResponseMessage.prototype.description = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * ListResponseMessage _title.
             * @member {"title"|undefined} _title
             * @memberof E2E.Message.ListResponseMessage
             * @instance
             */
            Object.defineProperty(ListResponseMessage.prototype, "_title", {
                get: $util.oneOfGetter($oneOfFields = ["title"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ListResponseMessage _listType.
             * @member {"listType"|undefined} _listType
             * @memberof E2E.Message.ListResponseMessage
             * @instance
             */
            Object.defineProperty(ListResponseMessage.prototype, "_listType", {
                get: $util.oneOfGetter($oneOfFields = ["listType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ListResponseMessage _singleSelectReply.
             * @member {"singleSelectReply"|undefined} _singleSelectReply
             * @memberof E2E.Message.ListResponseMessage
             * @instance
             */
            Object.defineProperty(ListResponseMessage.prototype, "_singleSelectReply", {
                get: $util.oneOfGetter($oneOfFields = ["singleSelectReply"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ListResponseMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.ListResponseMessage
             * @instance
             */
            Object.defineProperty(ListResponseMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ListResponseMessage _description.
             * @member {"description"|undefined} _description
             * @memberof E2E.Message.ListResponseMessage
             * @instance
             */
            Object.defineProperty(ListResponseMessage.prototype, "_description", {
                get: $util.oneOfGetter($oneOfFields = ["description"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new ListResponseMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.ListResponseMessage
             * @static
             * @param {E2E.Message.IListResponseMessage=} [properties] Properties to set
             * @returns {E2E.Message.ListResponseMessage} ListResponseMessage instance
             */
            ListResponseMessage.create = function create(properties) {
                return new ListResponseMessage(properties);
            };

            /**
             * Encodes the specified ListResponseMessage message. Does not implicitly {@link E2E.Message.ListResponseMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.ListResponseMessage
             * @static
             * @param {E2E.Message.IListResponseMessage} message ListResponseMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ListResponseMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.title);
                if (message.listType != null && Object.hasOwnProperty.call(message, "listType"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int32(message.listType);
                if (message.singleSelectReply != null && Object.hasOwnProperty.call(message, "singleSelectReply"))
                    $root.E2E.Message.ListResponseMessage.SingleSelectReply.encode(message.singleSelectReply, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.description);
                return writer;
            };

            /**
             * Encodes the specified ListResponseMessage message, length delimited. Does not implicitly {@link E2E.Message.ListResponseMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.ListResponseMessage
             * @static
             * @param {E2E.Message.IListResponseMessage} message ListResponseMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ListResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ListResponseMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.ListResponseMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.ListResponseMessage} ListResponseMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ListResponseMessage.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.E2E.Message.ListResponseMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.title = reader.string();
                            break;
                        }
                    case 2: {
                            message.listType = reader.int32();
                            break;
                        }
                    case 3: {
                            message.singleSelectReply = $root.E2E.Message.ListResponseMessage.SingleSelectReply.decode(reader, reader.uint32());
                            break;
                        }
                    case 4: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 5: {
                            message.description = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a ListResponseMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.ListResponseMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.ListResponseMessage} ListResponseMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ListResponseMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ListResponseMessage message.
             * @function verify
             * @memberof E2E.Message.ListResponseMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ListResponseMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.title != null && message.hasOwnProperty("title")) {
                    properties._title = 1;
                    if (!$util.isString(message.title))
                        return "title: string expected";
                }
                if (message.listType != null && message.hasOwnProperty("listType")) {
                    properties._listType = 1;
                    switch (message.listType) {
                    default:
                        return "listType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                if (message.singleSelectReply != null && message.hasOwnProperty("singleSelectReply")) {
                    properties._singleSelectReply = 1;
                    {
                        var error = $root.E2E.Message.ListResponseMessage.SingleSelectReply.verify(message.singleSelectReply);
                        if (error)
                            return "singleSelectReply." + error;
                    }
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.description != null && message.hasOwnProperty("description")) {
                    properties._description = 1;
                    if (!$util.isString(message.description))
                        return "description: string expected";
                }
                return null;
            };

            /**
             * Creates a ListResponseMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.ListResponseMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.ListResponseMessage} ListResponseMessage
             */
            ListResponseMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.ListResponseMessage)
                    return object;
                var message = new $root.E2E.Message.ListResponseMessage();
                if (object.title != null)
                    message.title = String(object.title);
                switch (object.listType) {
                default:
                    if (typeof object.listType === "number") {
                        message.listType = object.listType;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.listType = 0;
                    break;
                case "SINGLE_SELECT":
                case 1:
                    message.listType = 1;
                    break;
                }
                if (object.singleSelectReply != null) {
                    if (typeof object.singleSelectReply !== "object")
                        throw TypeError(".E2E.Message.ListResponseMessage.singleSelectReply: object expected");
                    message.singleSelectReply = $root.E2E.Message.ListResponseMessage.SingleSelectReply.fromObject(object.singleSelectReply);
                }
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.ListResponseMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                if (object.description != null)
                    message.description = String(object.description);
                return message;
            };

            /**
             * Creates a plain object from a ListResponseMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.ListResponseMessage
             * @static
             * @param {E2E.Message.ListResponseMessage} message ListResponseMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ListResponseMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.title != null && message.hasOwnProperty("title")) {
                    object.title = message.title;
                    if (options.oneofs)
                        object._title = "title";
                }
                if (message.listType != null && message.hasOwnProperty("listType")) {
                    object.listType = options.enums === String ? $root.E2E.Message.ListResponseMessage.ListType[message.listType] === undefined ? message.listType : $root.E2E.Message.ListResponseMessage.ListType[message.listType] : message.listType;
                    if (options.oneofs)
                        object._listType = "listType";
                }
                if (message.singleSelectReply != null && message.hasOwnProperty("singleSelectReply")) {
                    object.singleSelectReply = $root.E2E.Message.ListResponseMessage.SingleSelectReply.toObject(message.singleSelectReply, options);
                    if (options.oneofs)
                        object._singleSelectReply = "singleSelectReply";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.description != null && message.hasOwnProperty("description")) {
                    object.description = message.description;
                    if (options.oneofs)
                        object._description = "description";
                }
                return object;
            };

            /**
             * Converts this ListResponseMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.ListResponseMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ListResponseMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for ListResponseMessage
             * @function getTypeUrl
             * @memberof E2E.Message.ListResponseMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            ListResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.ListResponseMessage";
            };

            /**
             * ListType enum.
             * @name E2E.Message.ListResponseMessage.ListType
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} SINGLE_SELECT=1 SINGLE_SELECT value
             */
            ListResponseMessage.ListType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "SINGLE_SELECT"] = 1;
                return values;
            })();

            ListResponseMessage.SingleSelectReply = (function() {

                /**
                 * Properties of a SingleSelectReply.
                 * @memberof E2E.Message.ListResponseMessage
                 * @interface ISingleSelectReply
                 * @property {string|null} [selectedRowId] SingleSelectReply selectedRowId
                 */

                /**
                 * Constructs a new SingleSelectReply.
                 * @memberof E2E.Message.ListResponseMessage
                 * @classdesc Represents a SingleSelectReply.
                 * @implements ISingleSelectReply
                 * @constructor
                 * @param {E2E.Message.ListResponseMessage.ISingleSelectReply=} [properties] Properties to set
                 */
                function SingleSelectReply(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]];
                }

                /**
                 * SingleSelectReply selectedRowId.
                 * @member {string|null|undefined} selectedRowId
                 * @memberof E2E.Message.ListResponseMessage.SingleSelectReply
                 * @instance
                 */
                SingleSelectReply.prototype.selectedRowId = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * SingleSelectReply _selectedRowId.
                 * @member {"selectedRowId"|undefined} _selectedRowId
                 * @memberof E2E.Message.ListResponseMessage.SingleSelectReply
                 * @instance
                 */
                Object.defineProperty(SingleSelectReply.prototype, "_selectedRowId", {
                    get: $util.oneOfGetter($oneOfFields = ["selectedRowId"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new SingleSelectReply instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.ListResponseMessage.SingleSelectReply
                 * @static
                 * @param {E2E.Message.ListResponseMessage.ISingleSelectReply=} [properties] Properties to set
                 * @returns {E2E.Message.ListResponseMessage.SingleSelectReply} SingleSelectReply instance
                 */
                SingleSelectReply.create = function create(properties) {
                    return new SingleSelectReply(properties);
                };

                /**
                 * Encodes the specified SingleSelectReply message. Does not implicitly {@link E2E.Message.ListResponseMessage.SingleSelectReply.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.ListResponseMessage.SingleSelectReply
                 * @static
                 * @param {E2E.Message.ListResponseMessage.ISingleSelectReply} message SingleSelectReply message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                SingleSelectReply.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.selectedRowId != null && Object.hasOwnProperty.call(message, "selectedRowId"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedRowId);
                    return writer;
                };

                /**
                 * Encodes the specified SingleSelectReply message, length delimited. Does not implicitly {@link E2E.Message.ListResponseMessage.SingleSelectReply.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.ListResponseMessage.SingleSelectReply
                 * @static
                 * @param {E2E.Message.ListResponseMessage.ISingleSelectReply} message SingleSelectReply message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                SingleSelectReply.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a SingleSelectReply message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.ListResponseMessage.SingleSelectReply
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.ListResponseMessage.SingleSelectReply} SingleSelectReply
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                SingleSelectReply.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.E2E.Message.ListResponseMessage.SingleSelectReply();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.selectedRowId = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a SingleSelectReply message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.ListResponseMessage.SingleSelectReply
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.ListResponseMessage.SingleSelectReply} SingleSelectReply
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                SingleSelectReply.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a SingleSelectReply message.
                 * @function verify
                 * @memberof E2E.Message.ListResponseMessage.SingleSelectReply
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                SingleSelectReply.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.selectedRowId != null && message.hasOwnProperty("selectedRowId")) {
                        properties._selectedRowId = 1;
                        if (!$util.isString(message.selectedRowId))
                            return "selectedRowId: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a SingleSelectReply message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.ListResponseMessage.SingleSelectReply
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.ListResponseMessage.SingleSelectReply} SingleSelectReply
                 */
                SingleSelectReply.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.ListResponseMessage.SingleSelectReply)
                        return object;
                    var message = new $root.E2E.Message.ListResponseMessage.SingleSelectReply();
                    if (object.selectedRowId != null)
                        message.selectedRowId = String(object.selectedRowId);
                    return message;
                };

                /**
                 * Creates a plain object from a SingleSelectReply message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.ListResponseMessage.SingleSelectReply
                 * @static
                 * @param {E2E.Message.ListResponseMessage.SingleSelectReply} message SingleSelectReply
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                SingleSelectReply.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.selectedRowId != null && message.hasOwnProperty("selectedRowId")) {
                        object.selectedRowId = message.selectedRowId;
                        if (options.oneofs)
                            object._selectedRowId = "selectedRowId";
                    }
                    return object;
                };

                /**
                 * Converts this SingleSelectReply to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.ListResponseMessage.SingleSelectReply
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                SingleSelectReply.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for SingleSelectReply
                 * @function getTypeUrl
                 * @memberof E2E.Message.ListResponseMessage.SingleSelectReply
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                SingleSelectReply.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.ListResponseMessage.SingleSelectReply";
                };

                return SingleSelectReply;
            })();

            return ListResponseMessage;
        })();

        Message.LiveLocationMessage = (function() {

            /**
             * Properties of a LiveLocationMessage.
             * @memberof E2E.Message
             * @interface ILiveLocationMessage
             * @property {number|null} [degreesLatitude] LiveLocationMessage degreesLatitude
             * @property {number|null} [degreesLongitude] LiveLocationMessage degreesLongitude
             * @property {number|null} [accuracyInMeters] LiveLocationMessage accuracyInMeters
             * @property {number|null} [speedInMps] LiveLocationMessage speedInMps
             * @property {number|null} [degreesClockwiseFromMagneticNorth] LiveLocationMessage degreesClockwiseFromMagneticNorth
             * @property {string|null} [caption] LiveLocationMessage caption
             * @property {number|Long|null} [sequenceNumber] LiveLocationMessage sequenceNumber
             * @property {number|null} [timeOffset] LiveLocationMessage timeOffset
             * @property {Uint8Array|null} [jpegThumbnail] LiveLocationMessage jpegThumbnail
             * @property {E2E.IContextInfo|null} [contextInfo] LiveLocationMessage contextInfo
             */

            /**
             * Constructs a new LiveLocationMessage.
             * @memberof E2E.Message
             * @classdesc Represents a LiveLocationMessage.
             * @implements ILiveLocationMessage
             * @constructor
             * @param {E2E.Message.ILiveLocationMessage=} [properties] Properties to set
             */
            function LiveLocationMessage(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]];
            }

            /**
             * LiveLocationMessage degreesLatitude.
             * @member {number|null|undefined} degreesLatitude
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            LiveLocationMessage.prototype.degreesLatitude = null;

            /**
             * LiveLocationMessage degreesLongitude.
             * @member {number|null|undefined} degreesLongitude
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            LiveLocationMessage.prototype.degreesLongitude = null;

            /**
             * LiveLocationMessage accuracyInMeters.
             * @member {number|null|undefined} accuracyInMeters
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            LiveLocationMessage.prototype.accuracyInMeters = null;

            /**
             * LiveLocationMessage speedInMps.
             * @member {number|null|undefined} speedInMps
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            LiveLocationMessage.prototype.speedInMps = null;

            /**
             * LiveLocationMessage degreesClockwiseFromMagneticNorth.
             * @member {number|null|undefined} degreesClockwiseFromMagneticNorth
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            LiveLocationMessage.prototype.degreesClockwiseFromMagneticNorth = null;

            /**
             * LiveLocationMessage caption.
             * @member {string|null|undefined} caption
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            LiveLocationMessage.prototype.caption = null;

            /**
             * LiveLocationMessage sequenceNumber.
             * @member {number|Long|null|undefined} sequenceNumber
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            LiveLocationMessage.prototype.sequenceNumber = null;

            /**
             * LiveLocationMessage timeOffset.
             * @member {number|null|undefined} timeOffset
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            LiveLocationMessage.prototype.timeOffset = null;

            /**
             * LiveLocationMessage jpegThumbnail.
             * @member {Uint8Array|null|undefined} jpegThumbnail
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            LiveLocationMessage.prototype.jpegThumbnail = null;

            /**
             * LiveLocationMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            LiveLocationMessage.prototype.contextInfo = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * LiveLocationMessage _degreesLatitude.
             * @member {"degreesLatitude"|undefined} _degreesLatitude
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            Object.defineProperty(LiveLocationMessage.prototype, "_degreesLatitude", {
                get: $util.oneOfGetter($oneOfFields = ["degreesLatitude"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LiveLocationMessage _degreesLongitude.
             * @member {"degreesLongitude"|undefined} _degreesLongitude
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            Object.defineProperty(LiveLocationMessage.prototype, "_degreesLongitude", {
                get: $util.oneOfGetter($oneOfFields = ["degreesLongitude"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LiveLocationMessage _accuracyInMeters.
             * @member {"accuracyInMeters"|undefined} _accuracyInMeters
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            Object.defineProperty(LiveLocationMessage.prototype, "_accuracyInMeters", {
                get: $util.oneOfGetter($oneOfFields = ["accuracyInMeters"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LiveLocationMessage _speedInMps.
             * @member {"speedInMps"|undefined} _speedInMps
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            Object.defineProperty(LiveLocationMessage.prototype, "_speedInMps", {
                get: $util.oneOfGetter($oneOfFields = ["speedInMps"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LiveLocationMessage _degreesClockwiseFromMagneticNorth.
             * @member {"degreesClockwiseFromMagneticNorth"|undefined} _degreesClockwiseFromMagneticNorth
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            Object.defineProperty(LiveLocationMessage.prototype, "_degreesClockwiseFromMagneticNorth", {
                get: $util.oneOfGetter($oneOfFields = ["degreesClockwiseFromMagneticNorth"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LiveLocationMessage _caption.
             * @member {"caption"|undefined} _caption
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            Object.defineProperty(LiveLocationMessage.prototype, "_caption", {
                get: $util.oneOfGetter($oneOfFields = ["caption"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LiveLocationMessage _sequenceNumber.
             * @member {"sequenceNumber"|undefined} _sequenceNumber
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            Object.defineProperty(LiveLocationMessage.prototype, "_sequenceNumber", {
                get: $util.oneOfGetter($oneOfFields = ["sequenceNumber"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LiveLocationMessage _timeOffset.
             * @member {"timeOffset"|undefined} _timeOffset
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            Object.defineProperty(LiveLocationMessage.prototype, "_timeOffset", {
                get: $util.oneOfGetter($oneOfFields = ["timeOffset"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LiveLocationMessage _jpegThumbnail.
             * @member {"jpegThumbnail"|undefined} _jpegThumbnail
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            Object.defineProperty(LiveLocationMessage.prototype, "_jpegThumbnail", {
                get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LiveLocationMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             */
            Object.defineProperty(LiveLocationMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new LiveLocationMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.LiveLocationMessage
             * @static
             * @param {E2E.Message.ILiveLocationMessage=} [properties] Properties to set
             * @returns {E2E.Message.LiveLocationMessage} LiveLocationMessage instance
             */
            LiveLocationMessage.create = function create(properties) {
                return new LiveLocationMessage(properties);
            };

            /**
             * Encodes the specified LiveLocationMessage message. Does not implicitly {@link E2E.Message.LiveLocationMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.LiveLocationMessage
             * @static
             * @param {E2E.Message.ILiveLocationMessage} message LiveLocationMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LiveLocationMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.degreesLatitude != null && Object.hasOwnProperty.call(message, "degreesLatitude"))
                    writer.uint32(/* id 1, wireType 1 =*/9).double(message.degreesLatitude);
                if (message.degreesLongitude != null && Object.hasOwnProperty.call(message, "degreesLongitude"))
                    writer.uint32(/* id 2, wireType 1 =*/17).double(message.degreesLongitude);
                if (message.accuracyInMeters != null && Object.hasOwnProperty.call(message, "accuracyInMeters"))
                    writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.accuracyInMeters);
                if (message.speedInMps != null && Object.hasOwnProperty.call(message, "speedInMps"))
                    writer.uint32(/* id 4, wireType 5 =*/37).float(message.speedInMps);
                if (message.degreesClockwiseFromMagneticNorth != null && Object.hasOwnProperty.call(message, "degreesClockwiseFromMagneticNorth"))
                    writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.degreesClockwiseFromMagneticNorth);
                if (message.caption != null && Object.hasOwnProperty.call(message, "caption"))
                    writer.uint32(/* id 6, wireType 2 =*/50).string(message.caption);
                if (message.sequenceNumber != null && Object.hasOwnProperty.call(message, "sequenceNumber"))
                    writer.uint32(/* id 7, wireType 0 =*/56).int64(message.sequenceNumber);
                if (message.timeOffset != null && Object.hasOwnProperty.call(message, "timeOffset"))
                    writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.timeOffset);
                if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail"))
                    writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.jpegThumbnail);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified LiveLocationMessage message, length delimited. Does not implicitly {@link E2E.Message.LiveLocationMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.LiveLocationMessage
             * @static
             * @param {E2E.Message.ILiveLocationMessage} message LiveLocationMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LiveLocationMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a LiveLocationMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.LiveLocationMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.LiveLocationMessage} LiveLocationMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LiveLocationMessage.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.E2E.Message.LiveLocationMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.degreesLatitude = reader.double();
                            break;
                        }
                    case 2: {
                            message.degreesLongitude = reader.double();
                            break;
                        }
                    case 3: {
                            message.accuracyInMeters = reader.uint32();
                            break;
                        }
                    case 4: {
                            message.speedInMps = reader.float();
                            break;
                        }
                    case 5: {
                            message.degreesClockwiseFromMagneticNorth = reader.uint32();
                            break;
                        }
                    case 6: {
                            message.caption = reader.string();
                            break;
                        }
                    case 7: {
                            message.sequenceNumber = reader.int64();
                            break;
                        }
                    case 8: {
                            message.timeOffset = reader.uint32();
                            break;
                        }
                    case 16: {
                            message.jpegThumbnail = reader.bytes();
                            break;
                        }
                    case 17: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a LiveLocationMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.LiveLocationMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.LiveLocationMessage} LiveLocationMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LiveLocationMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a LiveLocationMessage message.
             * @function verify
             * @memberof E2E.Message.LiveLocationMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            LiveLocationMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) {
                    properties._degreesLatitude = 1;
                    if (typeof message.degreesLatitude !== "number")
                        return "degreesLatitude: number expected";
                }
                if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) {
                    properties._degreesLongitude = 1;
                    if (typeof message.degreesLongitude !== "number")
                        return "degreesLongitude: number expected";
                }
                if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) {
                    properties._accuracyInMeters = 1;
                    if (!$util.isInteger(message.accuracyInMeters))
                        return "accuracyInMeters: integer expected";
                }
                if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) {
                    properties._speedInMps = 1;
                    if (typeof message.speedInMps !== "number")
                        return "speedInMps: number expected";
                }
                if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) {
                    properties._degreesClockwiseFromMagneticNorth = 1;
                    if (!$util.isInteger(message.degreesClockwiseFromMagneticNorth))
                        return "degreesClockwiseFromMagneticNorth: integer expected";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    properties._caption = 1;
                    if (!$util.isString(message.caption))
                        return "caption: string expected";
                }
                if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber")) {
                    properties._sequenceNumber = 1;
                    if (!$util.isInteger(message.sequenceNumber) && !(message.sequenceNumber && $util.isInteger(message.sequenceNumber.low) && $util.isInteger(message.sequenceNumber.high)))
                        return "sequenceNumber: integer|Long expected";
                }
                if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) {
                    properties._timeOffset = 1;
                    if (!$util.isInteger(message.timeOffset))
                        return "timeOffset: integer expected";
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    properties._jpegThumbnail = 1;
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a LiveLocationMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.LiveLocationMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.LiveLocationMessage} LiveLocationMessage
             */
            LiveLocationMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.LiveLocationMessage)
                    return object;
                var message = new $root.E2E.Message.LiveLocationMessage();
                if (object.degreesLatitude != null)
                    message.degreesLatitude = Number(object.degreesLatitude);
                if (object.degreesLongitude != null)
                    message.degreesLongitude = Number(object.degreesLongitude);
                if (object.accuracyInMeters != null)
                    message.accuracyInMeters = object.accuracyInMeters >>> 0;
                if (object.speedInMps != null)
                    message.speedInMps = Number(object.speedInMps);
                if (object.degreesClockwiseFromMagneticNorth != null)
                    message.degreesClockwiseFromMagneticNorth = object.degreesClockwiseFromMagneticNorth >>> 0;
                if (object.caption != null)
                    message.caption = String(object.caption);
                if (object.sequenceNumber != null)
                    if ($util.Long)
                        (message.sequenceNumber = $util.Long.fromValue(object.sequenceNumber)).unsigned = false;
                    else if (typeof object.sequenceNumber === "string")
                        message.sequenceNumber = parseInt(object.sequenceNumber, 10);
                    else if (typeof object.sequenceNumber === "number")
                        message.sequenceNumber = object.sequenceNumber;
                    else if (typeof object.sequenceNumber === "object")
                        message.sequenceNumber = new $util.LongBits(object.sequenceNumber.low >>> 0, object.sequenceNumber.high >>> 0).toNumber();
                if (object.timeOffset != null)
                    message.timeOffset = object.timeOffset >>> 0;
                if (object.jpegThumbnail != null)
                    if (typeof object.jpegThumbnail === "string")
                        $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0);
                    else if (object.jpegThumbnail.length >= 0)
                        message.jpegThumbnail = object.jpegThumbnail;
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.LiveLocationMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                return message;
            };

            /**
             * Creates a plain object from a LiveLocationMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.LiveLocationMessage
             * @static
             * @param {E2E.Message.LiveLocationMessage} message LiveLocationMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            LiveLocationMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) {
                    object.degreesLatitude = options.json && !isFinite(message.degreesLatitude) ? String(message.degreesLatitude) : message.degreesLatitude;
                    if (options.oneofs)
                        object._degreesLatitude = "degreesLatitude";
                }
                if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) {
                    object.degreesLongitude = options.json && !isFinite(message.degreesLongitude) ? String(message.degreesLongitude) : message.degreesLongitude;
                    if (options.oneofs)
                        object._degreesLongitude = "degreesLongitude";
                }
                if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) {
                    object.accuracyInMeters = message.accuracyInMeters;
                    if (options.oneofs)
                        object._accuracyInMeters = "accuracyInMeters";
                }
                if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) {
                    object.speedInMps = options.json && !isFinite(message.speedInMps) ? String(message.speedInMps) : message.speedInMps;
                    if (options.oneofs)
                        object._speedInMps = "speedInMps";
                }
                if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) {
                    object.degreesClockwiseFromMagneticNorth = message.degreesClockwiseFromMagneticNorth;
                    if (options.oneofs)
                        object._degreesClockwiseFromMagneticNorth = "degreesClockwiseFromMagneticNorth";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    object.caption = message.caption;
                    if (options.oneofs)
                        object._caption = "caption";
                }
                if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber")) {
                    if (typeof message.sequenceNumber === "number")
                        object.sequenceNumber = options.longs === String ? String(message.sequenceNumber) : message.sequenceNumber;
                    else
                        object.sequenceNumber = options.longs === String ? $util.Long.prototype.toString.call(message.sequenceNumber) : options.longs === Number ? new $util.LongBits(message.sequenceNumber.low >>> 0, message.sequenceNumber.high >>> 0).toNumber() : message.sequenceNumber;
                    if (options.oneofs)
                        object._sequenceNumber = "sequenceNumber";
                }
                if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) {
                    object.timeOffset = message.timeOffset;
                    if (options.oneofs)
                        object._timeOffset = "timeOffset";
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail;
                    if (options.oneofs)
                        object._jpegThumbnail = "jpegThumbnail";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                return object;
            };

            /**
             * Converts this LiveLocationMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.LiveLocationMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            LiveLocationMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for LiveLocationMessage
             * @function getTypeUrl
             * @memberof E2E.Message.LiveLocationMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            LiveLocationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.LiveLocationMessage";
            };

            return LiveLocationMessage;
        })();

        Message.LocationMessage = (function() {

            /**
             * Properties of a LocationMessage.
             * @memberof E2E.Message
             * @interface ILocationMessage
             * @property {number|null} [degreesLatitude] LocationMessage degreesLatitude
             * @property {number|null} [degreesLongitude] LocationMessage degreesLongitude
             * @property {string|null} [name] LocationMessage name
             * @property {string|null} [address] LocationMessage address
             * @property {string|null} [url] LocationMessage url
             * @property {boolean|null} [isLive] LocationMessage isLive
             * @property {number|null} [accuracyInMeters] LocationMessage accuracyInMeters
             * @property {number|null} [speedInMps] LocationMessage speedInMps
             * @property {number|null} [degreesClockwiseFromMagneticNorth] LocationMessage degreesClockwiseFromMagneticNorth
             * @property {string|null} [comment] LocationMessage comment
             * @property {Uint8Array|null} [jpegThumbnail] LocationMessage jpegThumbnail
             * @property {E2E.IContextInfo|null} [contextInfo] LocationMessage contextInfo
             */

            /**
             * Constructs a new LocationMessage.
             * @memberof E2E.Message
             * @classdesc Represents a LocationMessage.
             * @implements ILocationMessage
             * @constructor
             * @param {E2E.Message.ILocationMessage=} [properties] Properties to set
             */
            function LocationMessage(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]];
            }

            /**
             * LocationMessage degreesLatitude.
             * @member {number|null|undefined} degreesLatitude
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.degreesLatitude = null;

            /**
             * LocationMessage degreesLongitude.
             * @member {number|null|undefined} degreesLongitude
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.degreesLongitude = null;

            /**
             * LocationMessage name.
             * @member {string|null|undefined} name
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.name = null;

            /**
             * LocationMessage address.
             * @member {string|null|undefined} address
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.address = null;

            /**
             * LocationMessage url.
             * @member {string|null|undefined} url
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.url = null;

            /**
             * LocationMessage isLive.
             * @member {boolean|null|undefined} isLive
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.isLive = null;

            /**
             * LocationMessage accuracyInMeters.
             * @member {number|null|undefined} accuracyInMeters
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.accuracyInMeters = null;

            /**
             * LocationMessage speedInMps.
             * @member {number|null|undefined} speedInMps
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.speedInMps = null;

            /**
             * LocationMessage degreesClockwiseFromMagneticNorth.
             * @member {number|null|undefined} degreesClockwiseFromMagneticNorth
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.degreesClockwiseFromMagneticNorth = null;

            /**
             * LocationMessage comment.
             * @member {string|null|undefined} comment
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.comment = null;

            /**
             * LocationMessage jpegThumbnail.
             * @member {Uint8Array|null|undefined} jpegThumbnail
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.jpegThumbnail = null;

            /**
             * LocationMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            LocationMessage.prototype.contextInfo = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * LocationMessage _degreesLatitude.
             * @member {"degreesLatitude"|undefined} _degreesLatitude
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            Object.defineProperty(LocationMessage.prototype, "_degreesLatitude", {
                get: $util.oneOfGetter($oneOfFields = ["degreesLatitude"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LocationMessage _degreesLongitude.
             * @member {"degreesLongitude"|undefined} _degreesLongitude
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            Object.defineProperty(LocationMessage.prototype, "_degreesLongitude", {
                get: $util.oneOfGetter($oneOfFields = ["degreesLongitude"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LocationMessage _name.
             * @member {"name"|undefined} _name
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            Object.defineProperty(LocationMessage.prototype, "_name", {
                get: $util.oneOfGetter($oneOfFields = ["name"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LocationMessage _address.
             * @member {"address"|undefined} _address
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            Object.defineProperty(LocationMessage.prototype, "_address", {
                get: $util.oneOfGetter($oneOfFields = ["address"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LocationMessage _url.
             * @member {"url"|undefined} _url
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            Object.defineProperty(LocationMessage.prototype, "_url", {
                get: $util.oneOfGetter($oneOfFields = ["url"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LocationMessage _isLive.
             * @member {"isLive"|undefined} _isLive
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            Object.defineProperty(LocationMessage.prototype, "_isLive", {
                get: $util.oneOfGetter($oneOfFields = ["isLive"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LocationMessage _accuracyInMeters.
             * @member {"accuracyInMeters"|undefined} _accuracyInMeters
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            Object.defineProperty(LocationMessage.prototype, "_accuracyInMeters", {
                get: $util.oneOfGetter($oneOfFields = ["accuracyInMeters"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LocationMessage _speedInMps.
             * @member {"speedInMps"|undefined} _speedInMps
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            Object.defineProperty(LocationMessage.prototype, "_speedInMps", {
                get: $util.oneOfGetter($oneOfFields = ["speedInMps"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LocationMessage _degreesClockwiseFromMagneticNorth.
             * @member {"degreesClockwiseFromMagneticNorth"|undefined} _degreesClockwiseFromMagneticNorth
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            Object.defineProperty(LocationMessage.prototype, "_degreesClockwiseFromMagneticNorth", {
                get: $util.oneOfGetter($oneOfFields = ["degreesClockwiseFromMagneticNorth"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LocationMessage _comment.
             * @member {"comment"|undefined} _comment
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            Object.defineProperty(LocationMessage.prototype, "_comment", {
                get: $util.oneOfGetter($oneOfFields = ["comment"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LocationMessage _jpegThumbnail.
             * @member {"jpegThumbnail"|undefined} _jpegThumbnail
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            Object.defineProperty(LocationMessage.prototype, "_jpegThumbnail", {
                get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * LocationMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.LocationMessage
             * @instance
             */
            Object.defineProperty(LocationMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new LocationMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.LocationMessage
             * @static
             * @param {E2E.Message.ILocationMessage=} [properties] Properties to set
             * @returns {E2E.Message.LocationMessage} LocationMessage instance
             */
            LocationMessage.create = function create(properties) {
                return new LocationMessage(properties);
            };

            /**
             * Encodes the specified LocationMessage message. Does not implicitly {@link E2E.Message.LocationMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.LocationMessage
             * @static
             * @param {E2E.Message.ILocationMessage} message LocationMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LocationMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.degreesLatitude != null && Object.hasOwnProperty.call(message, "degreesLatitude"))
                    writer.uint32(/* id 1, wireType 1 =*/9).double(message.degreesLatitude);
                if (message.degreesLongitude != null && Object.hasOwnProperty.call(message, "degreesLongitude"))
                    writer.uint32(/* id 2, wireType 1 =*/17).double(message.degreesLongitude);
                if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.name);
                if (message.address != null && Object.hasOwnProperty.call(message, "address"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.address);
                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.url);
                if (message.isLive != null && Object.hasOwnProperty.call(message, "isLive"))
                    writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isLive);
                if (message.accuracyInMeters != null && Object.hasOwnProperty.call(message, "accuracyInMeters"))
                    writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.accuracyInMeters);
                if (message.speedInMps != null && Object.hasOwnProperty.call(message, "speedInMps"))
                    writer.uint32(/* id 8, wireType 5 =*/69).float(message.speedInMps);
                if (message.degreesClockwiseFromMagneticNorth != null && Object.hasOwnProperty.call(message, "degreesClockwiseFromMagneticNorth"))
                    writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.degreesClockwiseFromMagneticNorth);
                if (message.comment != null && Object.hasOwnProperty.call(message, "comment"))
                    writer.uint32(/* id 11, wireType 2 =*/90).string(message.comment);
                if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail"))
                    writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.jpegThumbnail);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified LocationMessage message, length delimited. Does not implicitly {@link E2E.Message.LocationMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.LocationMessage
             * @static
             * @param {E2E.Message.ILocationMessage} message LocationMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LocationMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a LocationMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.LocationMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.LocationMessage} LocationMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LocationMessage.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.E2E.Message.LocationMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.degreesLatitude = reader.double();
                            break;
                        }
                    case 2: {
                            message.degreesLongitude = reader.double();
                            break;
                        }
                    case 3: {
                            message.name = reader.string();
                            break;
                        }
                    case 4: {
                            message.address = reader.string();
                            break;
                        }
                    case 5: {
                            message.url = reader.string();
                            break;
                        }
                    case 6: {
                            message.isLive = reader.bool();
                            break;
                        }
                    case 7: {
                            message.accuracyInMeters = reader.uint32();
                            break;
                        }
                    case 8: {
                            message.speedInMps = reader.float();
                            break;
                        }
                    case 9: {
                            message.degreesClockwiseFromMagneticNorth = reader.uint32();
                            break;
                        }
                    case 11: {
                            message.comment = reader.string();
                            break;
                        }
                    case 16: {
                            message.jpegThumbnail = reader.bytes();
                            break;
                        }
                    case 17: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a LocationMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.LocationMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.LocationMessage} LocationMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LocationMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a LocationMessage message.
             * @function verify
             * @memberof E2E.Message.LocationMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            LocationMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) {
                    properties._degreesLatitude = 1;
                    if (typeof message.degreesLatitude !== "number")
                        return "degreesLatitude: number expected";
                }
                if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) {
                    properties._degreesLongitude = 1;
                    if (typeof message.degreesLongitude !== "number")
                        return "degreesLongitude: number expected";
                }
                if (message.name != null && message.hasOwnProperty("name")) {
                    properties._name = 1;
                    if (!$util.isString(message.name))
                        return "name: string expected";
                }
                if (message.address != null && message.hasOwnProperty("address")) {
                    properties._address = 1;
                    if (!$util.isString(message.address))
                        return "address: string expected";
                }
                if (message.url != null && message.hasOwnProperty("url")) {
                    properties._url = 1;
                    if (!$util.isString(message.url))
                        return "url: string expected";
                }
                if (message.isLive != null && message.hasOwnProperty("isLive")) {
                    properties._isLive = 1;
                    if (typeof message.isLive !== "boolean")
                        return "isLive: boolean expected";
                }
                if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) {
                    properties._accuracyInMeters = 1;
                    if (!$util.isInteger(message.accuracyInMeters))
                        return "accuracyInMeters: integer expected";
                }
                if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) {
                    properties._speedInMps = 1;
                    if (typeof message.speedInMps !== "number")
                        return "speedInMps: number expected";
                }
                if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) {
                    properties._degreesClockwiseFromMagneticNorth = 1;
                    if (!$util.isInteger(message.degreesClockwiseFromMagneticNorth))
                        return "degreesClockwiseFromMagneticNorth: integer expected";
                }
                if (message.comment != null && message.hasOwnProperty("comment")) {
                    properties._comment = 1;
                    if (!$util.isString(message.comment))
                        return "comment: string expected";
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    properties._jpegThumbnail = 1;
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a LocationMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.LocationMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.LocationMessage} LocationMessage
             */
            LocationMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.LocationMessage)
                    return object;
                var message = new $root.E2E.Message.LocationMessage();
                if (object.degreesLatitude != null)
                    message.degreesLatitude = Number(object.degreesLatitude);
                if (object.degreesLongitude != null)
                    message.degreesLongitude = Number(object.degreesLongitude);
                if (object.name != null)
                    message.name = String(object.name);
                if (object.address != null)
                    message.address = String(object.address);
                if (object.url != null)
                    message.url = String(object.url);
                if (object.isLive != null)
                    message.isLive = Boolean(object.isLive);
                if (object.accuracyInMeters != null)
                    message.accuracyInMeters = object.accuracyInMeters >>> 0;
                if (object.speedInMps != null)
                    message.speedInMps = Number(object.speedInMps);
                if (object.degreesClockwiseFromMagneticNorth != null)
                    message.degreesClockwiseFromMagneticNorth = object.degreesClockwiseFromMagneticNorth >>> 0;
                if (object.comment != null)
                    message.comment = String(object.comment);
                if (object.jpegThumbnail != null)
                    if (typeof object.jpegThumbnail === "string")
                        $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0);
                    else if (object.jpegThumbnail.length >= 0)
                        message.jpegThumbnail = object.jpegThumbnail;
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.LocationMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                return message;
            };

            /**
             * Creates a plain object from a LocationMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.LocationMessage
             * @static
             * @param {E2E.Message.LocationMessage} message LocationMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            LocationMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) {
                    object.degreesLatitude = options.json && !isFinite(message.degreesLatitude) ? String(message.degreesLatitude) : message.degreesLatitude;
                    if (options.oneofs)
                        object._degreesLatitude = "degreesLatitude";
                }
                if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) {
                    object.degreesLongitude = options.json && !isFinite(message.degreesLongitude) ? String(message.degreesLongitude) : message.degreesLongitude;
                    if (options.oneofs)
                        object._degreesLongitude = "degreesLongitude";
                }
                if (message.name != null && message.hasOwnProperty("name")) {
                    object.name = message.name;
                    if (options.oneofs)
                        object._name = "name";
                }
                if (message.address != null && message.hasOwnProperty("address")) {
                    object.address = message.address;
                    if (options.oneofs)
                        object._address = "address";
                }
                if (message.url != null && message.hasOwnProperty("url")) {
                    object.url = message.url;
                    if (options.oneofs)
                        object._url = "url";
                }
                if (message.isLive != null && message.hasOwnProperty("isLive")) {
                    object.isLive = message.isLive;
                    if (options.oneofs)
                        object._isLive = "isLive";
                }
                if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) {
                    object.accuracyInMeters = message.accuracyInMeters;
                    if (options.oneofs)
                        object._accuracyInMeters = "accuracyInMeters";
                }
                if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) {
                    object.speedInMps = options.json && !isFinite(message.speedInMps) ? String(message.speedInMps) : message.speedInMps;
                    if (options.oneofs)
                        object._speedInMps = "speedInMps";
                }
                if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) {
                    object.degreesClockwiseFromMagneticNorth = message.degreesClockwiseFromMagneticNorth;
                    if (options.oneofs)
                        object._degreesClockwiseFromMagneticNorth = "degreesClockwiseFromMagneticNorth";
                }
                if (message.comment != null && message.hasOwnProperty("comment")) {
                    object.comment = message.comment;
                    if (options.oneofs)
                        object._comment = "comment";
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail;
                    if (options.oneofs)
                        object._jpegThumbnail = "jpegThumbnail";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                return object;
            };

            /**
             * Converts this LocationMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.LocationMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            LocationMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for LocationMessage
             * @function getTypeUrl
             * @memberof E2E.Message.LocationMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            LocationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.LocationMessage";
            };

            return LocationMessage;
        })();

        Message.MMSThumbnailMetadata = (function() {

            /**
             * Properties of a MMSThumbnailMetadata.
             * @memberof E2E.Message
             * @interface IMMSThumbnailMetadata
             * @property {string|null} [thumbnailDirectPath] MMSThumbnailMetadata thumbnailDirectPath
             * @property {Uint8Array|null} [thumbnailSha256] MMSThumbnailMetadata thumbnailSha256
             * @property {Uint8Array|null} [thumbnailEncSha256] MMSThumbnailMetadata thumbnailEncSha256
             * @property {Uint8Array|null} [mediaKey] MMSThumbnailMetadata mediaKey
             * @property {number|Long|null} [mediaKeyTimestamp] MMSThumbnailMetadata mediaKeyTimestamp
             * @property {number|null} [thumbnailHeight] MMSThumbnailMetadata thumbnailHeight
             * @property {number|null} [thumbnailWidth] MMSThumbnailMetadata thumbnailWidth
             * @property {E2E.Message.MediaKeyDomain|null} [mediaKeyDomain] MMSThumbnailMetadata mediaKeyDomain
             */

            /**
             * Constructs a new MMSThumbnailMetadata.
             * @memberof E2E.Message
             * @classdesc Represents a MMSThumbnailMetadata.
             * @implements IMMSThumbnailMetadata
             * @constructor
             * @param {E2E.Message.IMMSThumbnailMetadata=} [properties] Properties to set
             */
            function MMSThumbnailMetadata(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]];
            }

            /**
             * MMSThumbnailMetadata thumbnailDirectPath.
             * @member {string|null|undefined} thumbnailDirectPath
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            MMSThumbnailMetadata.prototype.thumbnailDirectPath = null;

            /**
             * MMSThumbnailMetadata thumbnailSha256.
             * @member {Uint8Array|null|undefined} thumbnailSha256
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            MMSThumbnailMetadata.prototype.thumbnailSha256 = null;

            /**
             * MMSThumbnailMetadata thumbnailEncSha256.
             * @member {Uint8Array|null|undefined} thumbnailEncSha256
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            MMSThumbnailMetadata.prototype.thumbnailEncSha256 = null;

            /**
             * MMSThumbnailMetadata mediaKey.
             * @member {Uint8Array|null|undefined} mediaKey
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            MMSThumbnailMetadata.prototype.mediaKey = null;

            /**
             * MMSThumbnailMetadata mediaKeyTimestamp.
             * @member {number|Long|null|undefined} mediaKeyTimestamp
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            MMSThumbnailMetadata.prototype.mediaKeyTimestamp = null;

            /**
             * MMSThumbnailMetadata thumbnailHeight.
             * @member {number|null|undefined} thumbnailHeight
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            MMSThumbnailMetadata.prototype.thumbnailHeight = null;

            /**
             * MMSThumbnailMetadata thumbnailWidth.
             * @member {number|null|undefined} thumbnailWidth
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            MMSThumbnailMetadata.prototype.thumbnailWidth = null;

            /**
             * MMSThumbnailMetadata mediaKeyDomain.
             * @member {E2E.Message.MediaKeyDomain|null|undefined} mediaKeyDomain
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            MMSThumbnailMetadata.prototype.mediaKeyDomain = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * MMSThumbnailMetadata _thumbnailDirectPath.
             * @member {"thumbnailDirectPath"|undefined} _thumbnailDirectPath
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            Object.defineProperty(MMSThumbnailMetadata.prototype, "_thumbnailDirectPath", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailDirectPath"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MMSThumbnailMetadata _thumbnailSha256.
             * @member {"thumbnailSha256"|undefined} _thumbnailSha256
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            Object.defineProperty(MMSThumbnailMetadata.prototype, "_thumbnailSha256", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MMSThumbnailMetadata _thumbnailEncSha256.
             * @member {"thumbnailEncSha256"|undefined} _thumbnailEncSha256
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            Object.defineProperty(MMSThumbnailMetadata.prototype, "_thumbnailEncSha256", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailEncSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MMSThumbnailMetadata _mediaKey.
             * @member {"mediaKey"|undefined} _mediaKey
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            Object.defineProperty(MMSThumbnailMetadata.prototype, "_mediaKey", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MMSThumbnailMetadata _mediaKeyTimestamp.
             * @member {"mediaKeyTimestamp"|undefined} _mediaKeyTimestamp
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            Object.defineProperty(MMSThumbnailMetadata.prototype, "_mediaKeyTimestamp", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MMSThumbnailMetadata _thumbnailHeight.
             * @member {"thumbnailHeight"|undefined} _thumbnailHeight
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            Object.defineProperty(MMSThumbnailMetadata.prototype, "_thumbnailHeight", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailHeight"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MMSThumbnailMetadata _thumbnailWidth.
             * @member {"thumbnailWidth"|undefined} _thumbnailWidth
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            Object.defineProperty(MMSThumbnailMetadata.prototype, "_thumbnailWidth", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailWidth"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MMSThumbnailMetadata _mediaKeyDomain.
             * @member {"mediaKeyDomain"|undefined} _mediaKeyDomain
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             */
            Object.defineProperty(MMSThumbnailMetadata.prototype, "_mediaKeyDomain", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKeyDomain"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new MMSThumbnailMetadata instance using the specified properties.
             * @function create
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @static
             * @param {E2E.Message.IMMSThumbnailMetadata=} [properties] Properties to set
             * @returns {E2E.Message.MMSThumbnailMetadata} MMSThumbnailMetadata instance
             */
            MMSThumbnailMetadata.create = function create(properties) {
                return new MMSThumbnailMetadata(properties);
            };

            /**
             * Encodes the specified MMSThumbnailMetadata message. Does not implicitly {@link E2E.Message.MMSThumbnailMetadata.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @static
             * @param {E2E.Message.IMMSThumbnailMetadata} message MMSThumbnailMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MMSThumbnailMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.thumbnailDirectPath);
                if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256"))
                    writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.thumbnailSha256);
                if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256"))
                    writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.thumbnailEncSha256);
                if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey"))
                    writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.mediaKey);
                if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp"))
                    writer.uint32(/* id 5, wireType 0 =*/40).int64(message.mediaKeyTimestamp);
                if (message.thumbnailHeight != null && Object.hasOwnProperty.call(message, "thumbnailHeight"))
                    writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.thumbnailHeight);
                if (message.thumbnailWidth != null && Object.hasOwnProperty.call(message, "thumbnailWidth"))
                    writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.thumbnailWidth);
                if (message.mediaKeyDomain != null && Object.hasOwnProperty.call(message, "mediaKeyDomain"))
                    writer.uint32(/* id 8, wireType 0 =*/64).int32(message.mediaKeyDomain);
                return writer;
            };

            /**
             * Encodes the specified MMSThumbnailMetadata message, length delimited. Does not implicitly {@link E2E.Message.MMSThumbnailMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @static
             * @param {E2E.Message.IMMSThumbnailMetadata} message MMSThumbnailMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MMSThumbnailMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MMSThumbnailMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.MMSThumbnailMetadata} MMSThumbnailMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MMSThumbnailMetadata.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.E2E.Message.MMSThumbnailMetadata();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.thumbnailDirectPath = reader.string();
                            break;
                        }
                    case 2: {
                            message.thumbnailSha256 = reader.bytes();
                            break;
                        }
                    case 3: {
                            message.thumbnailEncSha256 = reader.bytes();
                            break;
                        }
                    case 4: {
                            message.mediaKey = reader.bytes();
                            break;
                        }
                    case 5: {
                            message.mediaKeyTimestamp = reader.int64();
                            break;
                        }
                    case 6: {
                            message.thumbnailHeight = reader.uint32();
                            break;
                        }
                    case 7: {
                            message.thumbnailWidth = reader.uint32();
                            break;
                        }
                    case 8: {
                            message.mediaKeyDomain = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a MMSThumbnailMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.MMSThumbnailMetadata} MMSThumbnailMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MMSThumbnailMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MMSThumbnailMetadata message.
             * @function verify
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MMSThumbnailMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) {
                    properties._thumbnailDirectPath = 1;
                    if (!$util.isString(message.thumbnailDirectPath))
                        return "thumbnailDirectPath: string expected";
                }
                if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) {
                    properties._thumbnailSha256 = 1;
                    if (!(message.thumbnailSha256 && typeof message.thumbnailSha256.length === "number" || $util.isString(message.thumbnailSha256)))
                        return "thumbnailSha256: buffer expected";
                }
                if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) {
                    properties._thumbnailEncSha256 = 1;
                    if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256)))
                        return "thumbnailEncSha256: buffer expected";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    properties._mediaKey = 1;
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    properties._mediaKeyTimestamp = 1;
                    if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high)))
                        return "mediaKeyTimestamp: integer|Long expected";
                }
                if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) {
                    properties._thumbnailHeight = 1;
                    if (!$util.isInteger(message.thumbnailHeight))
                        return "thumbnailHeight: integer expected";
                }
                if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) {
                    properties._thumbnailWidth = 1;
                    if (!$util.isInteger(message.thumbnailWidth))
                        return "thumbnailWidth: integer expected";
                }
                if (message.mediaKeyDomain != null && message.hasOwnProperty("mediaKeyDomain")) {
                    properties._mediaKeyDomain = 1;
                    switch (message.mediaKeyDomain) {
                    default:
                        return "mediaKeyDomain: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a MMSThumbnailMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.MMSThumbnailMetadata} MMSThumbnailMetadata
             */
            MMSThumbnailMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.MMSThumbnailMetadata)
                    return object;
                var message = new $root.E2E.Message.MMSThumbnailMetadata();
                if (object.thumbnailDirectPath != null)
                    message.thumbnailDirectPath = String(object.thumbnailDirectPath);
                if (object.thumbnailSha256 != null)
                    if (typeof object.thumbnailSha256 === "string")
                        $util.base64.decode(object.thumbnailSha256, message.thumbnailSha256 = $util.newBuffer($util.base64.length(object.thumbnailSha256)), 0);
                    else if (object.thumbnailSha256.length >= 0)
                        message.thumbnailSha256 = object.thumbnailSha256;
                if (object.thumbnailEncSha256 != null)
                    if (typeof object.thumbnailEncSha256 === "string")
                        $util.base64.decode(object.thumbnailEncSha256, message.thumbnailEncSha256 = $util.newBuffer($util.base64.length(object.thumbnailEncSha256)), 0);
                    else if (object.thumbnailEncSha256.length >= 0)
                        message.thumbnailEncSha256 = object.thumbnailEncSha256;
                if (object.mediaKey != null)
                    if (typeof object.mediaKey === "string")
                        $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0);
                    else if (object.mediaKey.length >= 0)
                        message.mediaKey = object.mediaKey;
                if (object.mediaKeyTimestamp != null)
                    if ($util.Long)
                        (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false;
                    else if (typeof object.mediaKeyTimestamp === "string")
                        message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10);
                    else if (typeof object.mediaKeyTimestamp === "number")
                        message.mediaKeyTimestamp = object.mediaKeyTimestamp;
                    else if (typeof object.mediaKeyTimestamp === "object")
                        message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber();
                if (object.thumbnailHeight != null)
                    message.thumbnailHeight = object.thumbnailHeight >>> 0;
                if (object.thumbnailWidth != null)
                    message.thumbnailWidth = object.thumbnailWidth >>> 0;
                switch (object.mediaKeyDomain) {
                default:
                    if (typeof object.mediaKeyDomain === "number") {
                        message.mediaKeyDomain = object.mediaKeyDomain;
                        break;
                    }
                    break;
                case "UNSET":
                case 0:
                    message.mediaKeyDomain = 0;
                    break;
                case "E2EE_CHAT":
                case 1:
                    message.mediaKeyDomain = 1;
                    break;
                case "STATUS":
                case 2:
                    message.mediaKeyDomain = 2;
                    break;
                case "CAPI":
                case 3:
                    message.mediaKeyDomain = 3;
                    break;
                case "BOT":
                case 4:
                    message.mediaKeyDomain = 4;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a MMSThumbnailMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @static
             * @param {E2E.Message.MMSThumbnailMetadata} message MMSThumbnailMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MMSThumbnailMetadata.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) {
                    object.thumbnailDirectPath = message.thumbnailDirectPath;
                    if (options.oneofs)
                        object._thumbnailDirectPath = "thumbnailDirectPath";
                }
                if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) {
                    object.thumbnailSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailSha256, 0, message.thumbnailSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailSha256) : message.thumbnailSha256;
                    if (options.oneofs)
                        object._thumbnailSha256 = "thumbnailSha256";
                }
                if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) {
                    object.thumbnailEncSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailEncSha256, 0, message.thumbnailEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailEncSha256) : message.thumbnailEncSha256;
                    if (options.oneofs)
                        object._thumbnailEncSha256 = "thumbnailEncSha256";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey;
                    if (options.oneofs)
                        object._mediaKey = "mediaKey";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    if (typeof message.mediaKeyTimestamp === "number")
                        object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp;
                    else
                        object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp;
                    if (options.oneofs)
                        object._mediaKeyTimestamp = "mediaKeyTimestamp";
                }
                if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) {
                    object.thumbnailHeight = message.thumbnailHeight;
                    if (options.oneofs)
                        object._thumbnailHeight = "thumbnailHeight";
                }
                if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) {
                    object.thumbnailWidth = message.thumbnailWidth;
                    if (options.oneofs)
                        object._thumbnailWidth = "thumbnailWidth";
                }
                if (message.mediaKeyDomain != null && message.hasOwnProperty("mediaKeyDomain")) {
                    object.mediaKeyDomain = options.enums === String ? $root.E2E.Message.MediaKeyDomain[message.mediaKeyDomain] === undefined ? message.mediaKeyDomain : $root.E2E.Message.MediaKeyDomain[message.mediaKeyDomain] : message.mediaKeyDomain;
                    if (options.oneofs)
                        object._mediaKeyDomain = "mediaKeyDomain";
                }
                return object;
            };

            /**
             * Converts this MMSThumbnailMetadata to JSON.
             * @function toJSON
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MMSThumbnailMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for MMSThumbnailMetadata
             * @function getTypeUrl
             * @memberof E2E.Message.MMSThumbnailMetadata
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            MMSThumbnailMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.MMSThumbnailMetadata";
            };

            return MMSThumbnailMetadata;
        })();

        /**
         * MediaKeyDomain enum.
         * @name E2E.Message.MediaKeyDomain
         * @enum {number}
         * @property {number} UNSET=0 UNSET value
         * @property {number} E2EE_CHAT=1 E2EE_CHAT value
         * @property {number} STATUS=2 STATUS value
         * @property {number} CAPI=3 CAPI value
         * @property {number} BOT=4 BOT value
         */
        Message.MediaKeyDomain = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNSET"] = 0;
            values[valuesById[1] = "E2EE_CHAT"] = 1;
            values[valuesById[2] = "STATUS"] = 2;
            values[valuesById[3] = "CAPI"] = 3;
            values[valuesById[4] = "BOT"] = 4;
            return values;
        })();

        Message.MessageHistoryBundle = (function() {

            /**
             * Properties of a MessageHistoryBundle.
             * @memberof E2E.Message
             * @interface IMessageHistoryBundle
             * @property {string|null} [mimetype] MessageHistoryBundle mimetype
             * @property {Uint8Array|null} [fileSha256] MessageHistoryBundle fileSha256
             * @property {Uint8Array|null} [mediaKey] MessageHistoryBundle mediaKey
             * @property {Uint8Array|null} [fileEncSha256] MessageHistoryBundle fileEncSha256
             * @property {string|null} [directPath] MessageHistoryBundle directPath
             * @property {number|Long|null} [mediaKeyTimestamp] MessageHistoryBundle mediaKeyTimestamp
             * @property {E2E.IContextInfo|null} [contextInfo] MessageHistoryBundle contextInfo
             * @property {E2E.Message.IMessageHistoryMetadata|null} [messageHistoryMetadata] MessageHistoryBundle messageHistoryMetadata
             */

            /**
             * Constructs a new MessageHistoryBundle.
             * @memberof E2E.Message
             * @classdesc Represents a MessageHistoryBundle.
             * @implements IMessageHistoryBundle
             * @constructor
             * @param {E2E.Message.IMessageHistoryBundle=} [properties] Properties to set
             */
            function MessageHistoryBundle(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]];
            }

            /**
             * MessageHistoryBundle mimetype.
             * @member {string|null|undefined} mimetype
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            MessageHistoryBundle.prototype.mimetype = null;

            /**
             * MessageHistoryBundle fileSha256.
             * @member {Uint8Array|null|undefined} fileSha256
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            MessageHistoryBundle.prototype.fileSha256 = null;

            /**
             * MessageHistoryBundle mediaKey.
             * @member {Uint8Array|null|undefined} mediaKey
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            MessageHistoryBundle.prototype.mediaKey = null;

            /**
             * MessageHistoryBundle fileEncSha256.
             * @member {Uint8Array|null|undefined} fileEncSha256
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            MessageHistoryBundle.prototype.fileEncSha256 = null;

            /**
             * MessageHistoryBundle directPath.
             * @member {string|null|undefined} directPath
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            MessageHistoryBundle.prototype.directPath = null;

            /**
             * MessageHistoryBundle mediaKeyTimestamp.
             * @member {number|Long|null|undefined} mediaKeyTimestamp
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            MessageHistoryBundle.prototype.mediaKeyTimestamp = null;

            /**
             * MessageHistoryBundle contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            MessageHistoryBundle.prototype.contextInfo = null;

            /**
             * MessageHistoryBundle messageHistoryMetadata.
             * @member {E2E.Message.IMessageHistoryMetadata|null|undefined} messageHistoryMetadata
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            MessageHistoryBundle.prototype.messageHistoryMetadata = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * MessageHistoryBundle _mimetype.
             * @member {"mimetype"|undefined} _mimetype
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            Object.defineProperty(MessageHistoryBundle.prototype, "_mimetype", {
                get: $util.oneOfGetter($oneOfFields = ["mimetype"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MessageHistoryBundle _fileSha256.
             * @member {"fileSha256"|undefined} _fileSha256
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            Object.defineProperty(MessageHistoryBundle.prototype, "_fileSha256", {
                get: $util.oneOfGetter($oneOfFields = ["fileSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MessageHistoryBundle _mediaKey.
             * @member {"mediaKey"|undefined} _mediaKey
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            Object.defineProperty(MessageHistoryBundle.prototype, "_mediaKey", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MessageHistoryBundle _fileEncSha256.
             * @member {"fileEncSha256"|undefined} _fileEncSha256
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            Object.defineProperty(MessageHistoryBundle.prototype, "_fileEncSha256", {
                get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MessageHistoryBundle _directPath.
             * @member {"directPath"|undefined} _directPath
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            Object.defineProperty(MessageHistoryBundle.prototype, "_directPath", {
                get: $util.oneOfGetter($oneOfFields = ["directPath"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MessageHistoryBundle _mediaKeyTimestamp.
             * @member {"mediaKeyTimestamp"|undefined} _mediaKeyTimestamp
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            Object.defineProperty(MessageHistoryBundle.prototype, "_mediaKeyTimestamp", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MessageHistoryBundle _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            Object.defineProperty(MessageHistoryBundle.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MessageHistoryBundle _messageHistoryMetadata.
             * @member {"messageHistoryMetadata"|undefined} _messageHistoryMetadata
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             */
            Object.defineProperty(MessageHistoryBundle.prototype, "_messageHistoryMetadata", {
                get: $util.oneOfGetter($oneOfFields = ["messageHistoryMetadata"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new MessageHistoryBundle instance using the specified properties.
             * @function create
             * @memberof E2E.Message.MessageHistoryBundle
             * @static
             * @param {E2E.Message.IMessageHistoryBundle=} [properties] Properties to set
             * @returns {E2E.Message.MessageHistoryBundle} MessageHistoryBundle instance
             */
            MessageHistoryBundle.create = function create(properties) {
                return new MessageHistoryBundle(properties);
            };

            /**
             * Encodes the specified MessageHistoryBundle message. Does not implicitly {@link E2E.Message.MessageHistoryBundle.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.MessageHistoryBundle
             * @static
             * @param {E2E.Message.IMessageHistoryBundle} message MessageHistoryBundle message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MessageHistoryBundle.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimetype);
                if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256"))
                    writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.fileSha256);
                if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey"))
                    writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.mediaKey);
                if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256"))
                    writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.fileEncSha256);
                if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.directPath);
                if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp"))
                    writer.uint32(/* id 6, wireType 0 =*/48).int64(message.mediaKeyTimestamp);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                if (message.messageHistoryMetadata != null && Object.hasOwnProperty.call(message, "messageHistoryMetadata"))
                    $root.E2E.Message.MessageHistoryMetadata.encode(message.messageHistoryMetadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified MessageHistoryBundle message, length delimited. Does not implicitly {@link E2E.Message.MessageHistoryBundle.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.MessageHistoryBundle
             * @static
             * @param {E2E.Message.IMessageHistoryBundle} message MessageHistoryBundle message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MessageHistoryBundle.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MessageHistoryBundle message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.MessageHistoryBundle
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.MessageHistoryBundle} MessageHistoryBundle
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MessageHistoryBundle.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.E2E.Message.MessageHistoryBundle();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.mimetype = reader.string();
                            break;
                        }
                    case 2: {
                            message.fileSha256 = reader.bytes();
                            break;
                        }
                    case 3: {
                            message.mediaKey = reader.bytes();
                            break;
                        }
                    case 4: {
                            message.fileEncSha256 = reader.bytes();
                            break;
                        }
                    case 5: {
                            message.directPath = reader.string();
                            break;
                        }
                    case 6: {
                            message.mediaKeyTimestamp = reader.int64();
                            break;
                        }
                    case 7: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 8: {
                            message.messageHistoryMetadata = $root.E2E.Message.MessageHistoryMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a MessageHistoryBundle message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.MessageHistoryBundle
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.MessageHistoryBundle} MessageHistoryBundle
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MessageHistoryBundle.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MessageHistoryBundle message.
             * @function verify
             * @memberof E2E.Message.MessageHistoryBundle
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MessageHistoryBundle.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                    properties._mimetype = 1;
                    if (!$util.isString(message.mimetype))
                        return "mimetype: string expected";
                }
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                    properties._fileSha256 = 1;
                    if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                        return "fileSha256: buffer expected";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    properties._mediaKey = 1;
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                }
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                    properties._fileEncSha256 = 1;
                    if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                        return "fileEncSha256: buffer expected";
                }
                if (message.directPath != null && message.hasOwnProperty("directPath")) {
                    properties._directPath = 1;
                    if (!$util.isString(message.directPath))
                        return "directPath: string expected";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    properties._mediaKeyTimestamp = 1;
                    if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high)))
                        return "mediaKeyTimestamp: integer|Long expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.messageHistoryMetadata != null && message.hasOwnProperty("messageHistoryMetadata")) {
                    properties._messageHistoryMetadata = 1;
                    {
                        var error = $root.E2E.Message.MessageHistoryMetadata.verify(message.messageHistoryMetadata);
                        if (error)
                            return "messageHistoryMetadata." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a MessageHistoryBundle message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.MessageHistoryBundle
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.MessageHistoryBundle} MessageHistoryBundle
             */
            MessageHistoryBundle.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.MessageHistoryBundle)
                    return object;
                var message = new $root.E2E.Message.MessageHistoryBundle();
                if (object.mimetype != null)
                    message.mimetype = String(object.mimetype);
                if (object.fileSha256 != null)
                    if (typeof object.fileSha256 === "string")
                        $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0);
                    else if (object.fileSha256.length >= 0)
                        message.fileSha256 = object.fileSha256;
                if (object.mediaKey != null)
                    if (typeof object.mediaKey === "string")
                        $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0);
                    else if (object.mediaKey.length >= 0)
                        message.mediaKey = object.mediaKey;
                if (object.fileEncSha256 != null)
                    if (typeof object.fileEncSha256 === "string")
                        $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0);
                    else if (object.fileEncSha256.length >= 0)
                        message.fileEncSha256 = object.fileEncSha256;
                if (object.directPath != null)
                    message.directPath = String(object.directPath);
                if (object.mediaKeyTimestamp != null)
                    if ($util.Long)
                        (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false;
                    else if (typeof object.mediaKeyTimestamp === "string")
                        message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10);
                    else if (typeof object.mediaKeyTimestamp === "number")
                        message.mediaKeyTimestamp = object.mediaKeyTimestamp;
                    else if (typeof object.mediaKeyTimestamp === "object")
                        message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber();
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.MessageHistoryBundle.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                if (object.messageHistoryMetadata != null) {
                    if (typeof object.messageHistoryMetadata !== "object")
                        throw TypeError(".E2E.Message.MessageHistoryBundle.messageHistoryMetadata: object expected");
                    message.messageHistoryMetadata = $root.E2E.Message.MessageHistoryMetadata.fromObject(object.messageHistoryMetadata);
                }
                return message;
            };

            /**
             * Creates a plain object from a MessageHistoryBundle message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.MessageHistoryBundle
             * @static
             * @param {E2E.Message.MessageHistoryBundle} message MessageHistoryBundle
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MessageHistoryBundle.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                    object.mimetype = message.mimetype;
                    if (options.oneofs)
                        object._mimetype = "mimetype";
                }
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                    object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256;
                    if (options.oneofs)
                        object._fileSha256 = "fileSha256";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey;
                    if (options.oneofs)
                        object._mediaKey = "mediaKey";
                }
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                    object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256;
                    if (options.oneofs)
                        object._fileEncSha256 = "fileEncSha256";
                }
                if (message.directPath != null && message.hasOwnProperty("directPath")) {
                    object.directPath = message.directPath;
                    if (options.oneofs)
                        object._directPath = "directPath";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    if (typeof message.mediaKeyTimestamp === "number")
                        object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp;
                    else
                        object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp;
                    if (options.oneofs)
                        object._mediaKeyTimestamp = "mediaKeyTimestamp";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.messageHistoryMetadata != null && message.hasOwnProperty("messageHistoryMetadata")) {
                    object.messageHistoryMetadata = $root.E2E.Message.MessageHistoryMetadata.toObject(message.messageHistoryMetadata, options);
                    if (options.oneofs)
                        object._messageHistoryMetadata = "messageHistoryMetadata";
                }
                return object;
            };

            /**
             * Converts this MessageHistoryBundle to JSON.
             * @function toJSON
             * @memberof E2E.Message.MessageHistoryBundle
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MessageHistoryBundle.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for MessageHistoryBundle
             * @function getTypeUrl
             * @memberof E2E.Message.MessageHistoryBundle
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            MessageHistoryBundle.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.MessageHistoryBundle";
            };

            return MessageHistoryBundle;
        })();

        Message.MessageHistoryMetadata = (function() {

            /**
             * Properties of a MessageHistoryMetadata.
             * @memberof E2E.Message
             * @interface IMessageHistoryMetadata
             * @property {Array.<string>|null} [historyReceivers] MessageHistoryMetadata historyReceivers
             * @property {number|Long|null} [oldestMessageTimestamp] MessageHistoryMetadata oldestMessageTimestamp
             * @property {number|Long|null} [messageCount] MessageHistoryMetadata messageCount
             */

            /**
             * Constructs a new MessageHistoryMetadata.
             * @memberof E2E.Message
             * @classdesc Represents a MessageHistoryMetadata.
             * @implements IMessageHistoryMetadata
             * @constructor
             * @param {E2E.Message.IMessageHistoryMetadata=} [properties] Properties to set
             */
            function MessageHistoryMetadata(properties) {
                this.historyReceivers = [];
                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]];
            }

            /**
             * MessageHistoryMetadata historyReceivers.
             * @member {Array.<string>} historyReceivers
             * @memberof E2E.Message.MessageHistoryMetadata
             * @instance
             */
            MessageHistoryMetadata.prototype.historyReceivers = $util.emptyArray;

            /**
             * MessageHistoryMetadata oldestMessageTimestamp.
             * @member {number|Long|null|undefined} oldestMessageTimestamp
             * @memberof E2E.Message.MessageHistoryMetadata
             * @instance
             */
            MessageHistoryMetadata.prototype.oldestMessageTimestamp = null;

            /**
             * MessageHistoryMetadata messageCount.
             * @member {number|Long|null|undefined} messageCount
             * @memberof E2E.Message.MessageHistoryMetadata
             * @instance
             */
            MessageHistoryMetadata.prototype.messageCount = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * MessageHistoryMetadata _oldestMessageTimestamp.
             * @member {"oldestMessageTimestamp"|undefined} _oldestMessageTimestamp
             * @memberof E2E.Message.MessageHistoryMetadata
             * @instance
             */
            Object.defineProperty(MessageHistoryMetadata.prototype, "_oldestMessageTimestamp", {
                get: $util.oneOfGetter($oneOfFields = ["oldestMessageTimestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MessageHistoryMetadata _messageCount.
             * @member {"messageCount"|undefined} _messageCount
             * @memberof E2E.Message.MessageHistoryMetadata
             * @instance
             */
            Object.defineProperty(MessageHistoryMetadata.prototype, "_messageCount", {
                get: $util.oneOfGetter($oneOfFields = ["messageCount"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new MessageHistoryMetadata instance using the specified properties.
             * @function create
             * @memberof E2E.Message.MessageHistoryMetadata
             * @static
             * @param {E2E.Message.IMessageHistoryMetadata=} [properties] Properties to set
             * @returns {E2E.Message.MessageHistoryMetadata} MessageHistoryMetadata instance
             */
            MessageHistoryMetadata.create = function create(properties) {
                return new MessageHistoryMetadata(properties);
            };

            /**
             * Encodes the specified MessageHistoryMetadata message. Does not implicitly {@link E2E.Message.MessageHistoryMetadata.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.MessageHistoryMetadata
             * @static
             * @param {E2E.Message.IMessageHistoryMetadata} message MessageHistoryMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MessageHistoryMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.historyReceivers != null && message.historyReceivers.length)
                    for (var i = 0; i < message.historyReceivers.length; ++i)
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.historyReceivers[i]);
                if (message.oldestMessageTimestamp != null && Object.hasOwnProperty.call(message, "oldestMessageTimestamp"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int64(message.oldestMessageTimestamp);
                if (message.messageCount != null && Object.hasOwnProperty.call(message, "messageCount"))
                    writer.uint32(/* id 3, wireType 0 =*/24).int64(message.messageCount);
                return writer;
            };

            /**
             * Encodes the specified MessageHistoryMetadata message, length delimited. Does not implicitly {@link E2E.Message.MessageHistoryMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.MessageHistoryMetadata
             * @static
             * @param {E2E.Message.IMessageHistoryMetadata} message MessageHistoryMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MessageHistoryMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MessageHistoryMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.MessageHistoryMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.MessageHistoryMetadata} MessageHistoryMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MessageHistoryMetadata.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.E2E.Message.MessageHistoryMetadata();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            if (!(message.historyReceivers && message.historyReceivers.length))
                                message.historyReceivers = [];
                            message.historyReceivers.push(reader.string());
                            break;
                        }
                    case 2: {
                            message.oldestMessageTimestamp = reader.int64();
                            break;
                        }
                    case 3: {
                            message.messageCount = reader.int64();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a MessageHistoryMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.MessageHistoryMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.MessageHistoryMetadata} MessageHistoryMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MessageHistoryMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MessageHistoryMetadata message.
             * @function verify
             * @memberof E2E.Message.MessageHistoryMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MessageHistoryMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.historyReceivers != null && message.hasOwnProperty("historyReceivers")) {
                    if (!Array.isArray(message.historyReceivers))
                        return "historyReceivers: array expected";
                    for (var i = 0; i < message.historyReceivers.length; ++i)
                        if (!$util.isString(message.historyReceivers[i]))
                            return "historyReceivers: string[] expected";
                }
                if (message.oldestMessageTimestamp != null && message.hasOwnProperty("oldestMessageTimestamp")) {
                    properties._oldestMessageTimestamp = 1;
                    if (!$util.isInteger(message.oldestMessageTimestamp) && !(message.oldestMessageTimestamp && $util.isInteger(message.oldestMessageTimestamp.low) && $util.isInteger(message.oldestMessageTimestamp.high)))
                        return "oldestMessageTimestamp: integer|Long expected";
                }
                if (message.messageCount != null && message.hasOwnProperty("messageCount")) {
                    properties._messageCount = 1;
                    if (!$util.isInteger(message.messageCount) && !(message.messageCount && $util.isInteger(message.messageCount.low) && $util.isInteger(message.messageCount.high)))
                        return "messageCount: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a MessageHistoryMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.MessageHistoryMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.MessageHistoryMetadata} MessageHistoryMetadata
             */
            MessageHistoryMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.MessageHistoryMetadata)
                    return object;
                var message = new $root.E2E.Message.MessageHistoryMetadata();
                if (object.historyReceivers) {
                    if (!Array.isArray(object.historyReceivers))
                        throw TypeError(".E2E.Message.MessageHistoryMetadata.historyReceivers: array expected");
                    message.historyReceivers = [];
                    for (var i = 0; i < object.historyReceivers.length; ++i)
                        message.historyReceivers[i] = String(object.historyReceivers[i]);
                }
                if (object.oldestMessageTimestamp != null)
                    if ($util.Long)
                        (message.oldestMessageTimestamp = $util.Long.fromValue(object.oldestMessageTimestamp)).unsigned = false;
                    else if (typeof object.oldestMessageTimestamp === "string")
                        message.oldestMessageTimestamp = parseInt(object.oldestMessageTimestamp, 10);
                    else if (typeof object.oldestMessageTimestamp === "number")
                        message.oldestMessageTimestamp = object.oldestMessageTimestamp;
                    else if (typeof object.oldestMessageTimestamp === "object")
                        message.oldestMessageTimestamp = new $util.LongBits(object.oldestMessageTimestamp.low >>> 0, object.oldestMessageTimestamp.high >>> 0).toNumber();
                if (object.messageCount != null)
                    if ($util.Long)
                        (message.messageCount = $util.Long.fromValue(object.messageCount)).unsigned = false;
                    else if (typeof object.messageCount === "string")
                        message.messageCount = parseInt(object.messageCount, 10);
                    else if (typeof object.messageCount === "number")
                        message.messageCount = object.messageCount;
                    else if (typeof object.messageCount === "object")
                        message.messageCount = new $util.LongBits(object.messageCount.low >>> 0, object.messageCount.high >>> 0).toNumber();
                return message;
            };

            /**
             * Creates a plain object from a MessageHistoryMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.MessageHistoryMetadata
             * @static
             * @param {E2E.Message.MessageHistoryMetadata} message MessageHistoryMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MessageHistoryMetadata.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.historyReceivers = [];
                if (message.historyReceivers && message.historyReceivers.length) {
                    object.historyReceivers = [];
                    for (var j = 0; j < message.historyReceivers.length; ++j)
                        object.historyReceivers[j] = message.historyReceivers[j];
                }
                if (message.oldestMessageTimestamp != null && message.hasOwnProperty("oldestMessageTimestamp")) {
                    if (typeof message.oldestMessageTimestamp === "number")
                        object.oldestMessageTimestamp = options.longs === String ? String(message.oldestMessageTimestamp) : message.oldestMessageTimestamp;
                    else
                        object.oldestMessageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.oldestMessageTimestamp) : options.longs === Number ? new $util.LongBits(message.oldestMessageTimestamp.low >>> 0, message.oldestMessageTimestamp.high >>> 0).toNumber() : message.oldestMessageTimestamp;
                    if (options.oneofs)
                        object._oldestMessageTimestamp = "oldestMessageTimestamp";
                }
                if (message.messageCount != null && message.hasOwnProperty("messageCount")) {
                    if (typeof message.messageCount === "number")
                        object.messageCount = options.longs === String ? String(message.messageCount) : message.messageCount;
                    else
                        object.messageCount = options.longs === String ? $util.Long.prototype.toString.call(message.messageCount) : options.longs === Number ? new $util.LongBits(message.messageCount.low >>> 0, message.messageCount.high >>> 0).toNumber() : message.messageCount;
                    if (options.oneofs)
                        object._messageCount = "messageCount";
                }
                return object;
            };

            /**
             * Converts this MessageHistoryMetadata to JSON.
             * @function toJSON
             * @memberof E2E.Message.MessageHistoryMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MessageHistoryMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for MessageHistoryMetadata
             * @function getTypeUrl
             * @memberof E2E.Message.MessageHistoryMetadata
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            MessageHistoryMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.MessageHistoryMetadata";
            };

            return MessageHistoryMetadata;
        })();

        Message.MessageHistoryNotice = (function() {

            /**
             * Properties of a MessageHistoryNotice.
             * @memberof E2E.Message
             * @interface IMessageHistoryNotice
             * @property {E2E.IContextInfo|null} [contextInfo] MessageHistoryNotice contextInfo
             * @property {E2E.Message.IMessageHistoryMetadata|null} [messageHistoryMetadata] MessageHistoryNotice messageHistoryMetadata
             */

            /**
             * Constructs a new MessageHistoryNotice.
             * @memberof E2E.Message
             * @classdesc Represents a MessageHistoryNotice.
             * @implements IMessageHistoryNotice
             * @constructor
             * @param {E2E.Message.IMessageHistoryNotice=} [properties] Properties to set
             */
            function MessageHistoryNotice(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]];
            }

            /**
             * MessageHistoryNotice contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.MessageHistoryNotice
             * @instance
             */
            MessageHistoryNotice.prototype.contextInfo = null;

            /**
             * MessageHistoryNotice messageHistoryMetadata.
             * @member {E2E.Message.IMessageHistoryMetadata|null|undefined} messageHistoryMetadata
             * @memberof E2E.Message.MessageHistoryNotice
             * @instance
             */
            MessageHistoryNotice.prototype.messageHistoryMetadata = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * MessageHistoryNotice _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.MessageHistoryNotice
             * @instance
             */
            Object.defineProperty(MessageHistoryNotice.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MessageHistoryNotice _messageHistoryMetadata.
             * @member {"messageHistoryMetadata"|undefined} _messageHistoryMetadata
             * @memberof E2E.Message.MessageHistoryNotice
             * @instance
             */
            Object.defineProperty(MessageHistoryNotice.prototype, "_messageHistoryMetadata", {
                get: $util.oneOfGetter($oneOfFields = ["messageHistoryMetadata"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new MessageHistoryNotice instance using the specified properties.
             * @function create
             * @memberof E2E.Message.MessageHistoryNotice
             * @static
             * @param {E2E.Message.IMessageHistoryNotice=} [properties] Properties to set
             * @returns {E2E.Message.MessageHistoryNotice} MessageHistoryNotice instance
             */
            MessageHistoryNotice.create = function create(properties) {
                return new MessageHistoryNotice(properties);
            };

            /**
             * Encodes the specified MessageHistoryNotice message. Does not implicitly {@link E2E.Message.MessageHistoryNotice.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.MessageHistoryNotice
             * @static
             * @param {E2E.Message.IMessageHistoryNotice} message MessageHistoryNotice message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MessageHistoryNotice.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.messageHistoryMetadata != null && Object.hasOwnProperty.call(message, "messageHistoryMetadata"))
                    $root.E2E.Message.MessageHistoryMetadata.encode(message.messageHistoryMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified MessageHistoryNotice message, length delimited. Does not implicitly {@link E2E.Message.MessageHistoryNotice.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.MessageHistoryNotice
             * @static
             * @param {E2E.Message.IMessageHistoryNotice} message MessageHistoryNotice message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MessageHistoryNotice.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MessageHistoryNotice message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.MessageHistoryNotice
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.MessageHistoryNotice} MessageHistoryNotice
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MessageHistoryNotice.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.E2E.Message.MessageHistoryNotice();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.messageHistoryMetadata = $root.E2E.Message.MessageHistoryMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a MessageHistoryNotice message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.MessageHistoryNotice
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.MessageHistoryNotice} MessageHistoryNotice
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MessageHistoryNotice.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MessageHistoryNotice message.
             * @function verify
             * @memberof E2E.Message.MessageHistoryNotice
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MessageHistoryNotice.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.messageHistoryMetadata != null && message.hasOwnProperty("messageHistoryMetadata")) {
                    properties._messageHistoryMetadata = 1;
                    {
                        var error = $root.E2E.Message.MessageHistoryMetadata.verify(message.messageHistoryMetadata);
                        if (error)
                            return "messageHistoryMetadata." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a MessageHistoryNotice message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.MessageHistoryNotice
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.MessageHistoryNotice} MessageHistoryNotice
             */
            MessageHistoryNotice.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.MessageHistoryNotice)
                    return object;
                var message = new $root.E2E.Message.MessageHistoryNotice();
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.MessageHistoryNotice.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                if (object.messageHistoryMetadata != null) {
                    if (typeof object.messageHistoryMetadata !== "object")
                        throw TypeError(".E2E.Message.MessageHistoryNotice.messageHistoryMetadata: object expected");
                    message.messageHistoryMetadata = $root.E2E.Message.MessageHistoryMetadata.fromObject(object.messageHistoryMetadata);
                }
                return message;
            };

            /**
             * Creates a plain object from a MessageHistoryNotice message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.MessageHistoryNotice
             * @static
             * @param {E2E.Message.MessageHistoryNotice} message MessageHistoryNotice
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MessageHistoryNotice.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.messageHistoryMetadata != null && message.hasOwnProperty("messageHistoryMetadata")) {
                    object.messageHistoryMetadata = $root.E2E.Message.MessageHistoryMetadata.toObject(message.messageHistoryMetadata, options);
                    if (options.oneofs)
                        object._messageHistoryMetadata = "messageHistoryMetadata";
                }
                return object;
            };

            /**
             * Converts this MessageHistoryNotice to JSON.
             * @function toJSON
             * @memberof E2E.Message.MessageHistoryNotice
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MessageHistoryNotice.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for MessageHistoryNotice
             * @function getTypeUrl
             * @memberof E2E.Message.MessageHistoryNotice
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            MessageHistoryNotice.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.MessageHistoryNotice";
            };

            return MessageHistoryNotice;
        })();

        Message.NewsletterAdminInviteMessage = (function() {

            /**
             * Properties of a NewsletterAdminInviteMessage.
             * @memberof E2E.Message
             * @interface INewsletterAdminInviteMessage
             * @property {string|null} [newsletterJid] NewsletterAdminInviteMessage newsletterJid
             * @property {string|null} [newsletterName] NewsletterAdminInviteMessage newsletterName
             * @property {Uint8Array|null} [jpegThumbnail] NewsletterAdminInviteMessage jpegThumbnail
             * @property {string|null} [caption] NewsletterAdminInviteMessage caption
             * @property {number|Long|null} [inviteExpiration] NewsletterAdminInviteMessage inviteExpiration
             * @property {E2E.IContextInfo|null} [contextInfo] NewsletterAdminInviteMessage contextInfo
             */

            /**
             * Constructs a new NewsletterAdminInviteMessage.
             * @memberof E2E.Message
             * @classdesc Represents a NewsletterAdminInviteMessage.
             * @implements INewsletterAdminInviteMessage
             * @constructor
             * @param {E2E.Message.INewsletterAdminInviteMessage=} [properties] Properties to set
             */
            function NewsletterAdminInviteMessage(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]];
            }

            /**
             * NewsletterAdminInviteMessage newsletterJid.
             * @member {string|null|undefined} newsletterJid
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @instance
             */
            NewsletterAdminInviteMessage.prototype.newsletterJid = null;

            /**
             * NewsletterAdminInviteMessage newsletterName.
             * @member {string|null|undefined} newsletterName
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @instance
             */
            NewsletterAdminInviteMessage.prototype.newsletterName = null;

            /**
             * NewsletterAdminInviteMessage jpegThumbnail.
             * @member {Uint8Array|null|undefined} jpegThumbnail
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @instance
             */
            NewsletterAdminInviteMessage.prototype.jpegThumbnail = null;

            /**
             * NewsletterAdminInviteMessage caption.
             * @member {string|null|undefined} caption
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @instance
             */
            NewsletterAdminInviteMessage.prototype.caption = null;

            /**
             * NewsletterAdminInviteMessage inviteExpiration.
             * @member {number|Long|null|undefined} inviteExpiration
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @instance
             */
            NewsletterAdminInviteMessage.prototype.inviteExpiration = null;

            /**
             * NewsletterAdminInviteMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @instance
             */
            NewsletterAdminInviteMessage.prototype.contextInfo = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * NewsletterAdminInviteMessage _newsletterJid.
             * @member {"newsletterJid"|undefined} _newsletterJid
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @instance
             */
            Object.defineProperty(NewsletterAdminInviteMessage.prototype, "_newsletterJid", {
                get: $util.oneOfGetter($oneOfFields = ["newsletterJid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * NewsletterAdminInviteMessage _newsletterName.
             * @member {"newsletterName"|undefined} _newsletterName
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @instance
             */
            Object.defineProperty(NewsletterAdminInviteMessage.prototype, "_newsletterName", {
                get: $util.oneOfGetter($oneOfFields = ["newsletterName"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * NewsletterAdminInviteMessage _jpegThumbnail.
             * @member {"jpegThumbnail"|undefined} _jpegThumbnail
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @instance
             */
            Object.defineProperty(NewsletterAdminInviteMessage.prototype, "_jpegThumbnail", {
                get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * NewsletterAdminInviteMessage _caption.
             * @member {"caption"|undefined} _caption
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @instance
             */
            Object.defineProperty(NewsletterAdminInviteMessage.prototype, "_caption", {
                get: $util.oneOfGetter($oneOfFields = ["caption"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * NewsletterAdminInviteMessage _inviteExpiration.
             * @member {"inviteExpiration"|undefined} _inviteExpiration
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @instance
             */
            Object.defineProperty(NewsletterAdminInviteMessage.prototype, "_inviteExpiration", {
                get: $util.oneOfGetter($oneOfFields = ["inviteExpiration"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * NewsletterAdminInviteMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @instance
             */
            Object.defineProperty(NewsletterAdminInviteMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new NewsletterAdminInviteMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @static
             * @param {E2E.Message.INewsletterAdminInviteMessage=} [properties] Properties to set
             * @returns {E2E.Message.NewsletterAdminInviteMessage} NewsletterAdminInviteMessage instance
             */
            NewsletterAdminInviteMessage.create = function create(properties) {
                return new NewsletterAdminInviteMessage(properties);
            };

            /**
             * Encodes the specified NewsletterAdminInviteMessage message. Does not implicitly {@link E2E.Message.NewsletterAdminInviteMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @static
             * @param {E2E.Message.INewsletterAdminInviteMessage} message NewsletterAdminInviteMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            NewsletterAdminInviteMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.newsletterJid != null && Object.hasOwnProperty.call(message, "newsletterJid"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.newsletterJid);
                if (message.newsletterName != null && Object.hasOwnProperty.call(message, "newsletterName"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.newsletterName);
                if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail"))
                    writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.jpegThumbnail);
                if (message.caption != null && Object.hasOwnProperty.call(message, "caption"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.caption);
                if (message.inviteExpiration != null && Object.hasOwnProperty.call(message, "inviteExpiration"))
                    writer.uint32(/* id 5, wireType 0 =*/40).int64(message.inviteExpiration);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified NewsletterAdminInviteMessage message, length delimited. Does not implicitly {@link E2E.Message.NewsletterAdminInviteMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @static
             * @param {E2E.Message.INewsletterAdminInviteMessage} message NewsletterAdminInviteMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            NewsletterAdminInviteMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a NewsletterAdminInviteMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.NewsletterAdminInviteMessage} NewsletterAdminInviteMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            NewsletterAdminInviteMessage.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.E2E.Message.NewsletterAdminInviteMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.newsletterJid = reader.string();
                            break;
                        }
                    case 2: {
                            message.newsletterName = reader.string();
                            break;
                        }
                    case 3: {
                            message.jpegThumbnail = reader.bytes();
                            break;
                        }
                    case 4: {
                            message.caption = reader.string();
                            break;
                        }
                    case 5: {
                            message.inviteExpiration = reader.int64();
                            break;
                        }
                    case 6: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a NewsletterAdminInviteMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.NewsletterAdminInviteMessage} NewsletterAdminInviteMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            NewsletterAdminInviteMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a NewsletterAdminInviteMessage message.
             * @function verify
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            NewsletterAdminInviteMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) {
                    properties._newsletterJid = 1;
                    if (!$util.isString(message.newsletterJid))
                        return "newsletterJid: string expected";
                }
                if (message.newsletterName != null && message.hasOwnProperty("newsletterName")) {
                    properties._newsletterName = 1;
                    if (!$util.isString(message.newsletterName))
                        return "newsletterName: string expected";
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    properties._jpegThumbnail = 1;
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    properties._caption = 1;
                    if (!$util.isString(message.caption))
                        return "caption: string expected";
                }
                if (message.inviteExpiration != null && message.hasOwnProperty("inviteExpiration")) {
                    properties._inviteExpiration = 1;
                    if (!$util.isInteger(message.inviteExpiration) && !(message.inviteExpiration && $util.isInteger(message.inviteExpiration.low) && $util.isInteger(message.inviteExpiration.high)))
                        return "inviteExpiration: integer|Long expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a NewsletterAdminInviteMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.NewsletterAdminInviteMessage} NewsletterAdminInviteMessage
             */
            NewsletterAdminInviteMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.NewsletterAdminInviteMessage)
                    return object;
                var message = new $root.E2E.Message.NewsletterAdminInviteMessage();
                if (object.newsletterJid != null)
                    message.newsletterJid = String(object.newsletterJid);
                if (object.newsletterName != null)
                    message.newsletterName = String(object.newsletterName);
                if (object.jpegThumbnail != null)
                    if (typeof object.jpegThumbnail === "string")
                        $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0);
                    else if (object.jpegThumbnail.length >= 0)
                        message.jpegThumbnail = object.jpegThumbnail;
                if (object.caption != null)
                    message.caption = String(object.caption);
                if (object.inviteExpiration != null)
                    if ($util.Long)
                        (message.inviteExpiration = $util.Long.fromValue(object.inviteExpiration)).unsigned = false;
                    else if (typeof object.inviteExpiration === "string")
                        message.inviteExpiration = parseInt(object.inviteExpiration, 10);
                    else if (typeof object.inviteExpiration === "number")
                        message.inviteExpiration = object.inviteExpiration;
                    else if (typeof object.inviteExpiration === "object")
                        message.inviteExpiration = new $util.LongBits(object.inviteExpiration.low >>> 0, object.inviteExpiration.high >>> 0).toNumber();
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.NewsletterAdminInviteMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                return message;
            };

            /**
             * Creates a plain object from a NewsletterAdminInviteMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @static
             * @param {E2E.Message.NewsletterAdminInviteMessage} message NewsletterAdminInviteMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            NewsletterAdminInviteMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) {
                    object.newsletterJid = message.newsletterJid;
                    if (options.oneofs)
                        object._newsletterJid = "newsletterJid";
                }
                if (message.newsletterName != null && message.hasOwnProperty("newsletterName")) {
                    object.newsletterName = message.newsletterName;
                    if (options.oneofs)
                        object._newsletterName = "newsletterName";
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail;
                    if (options.oneofs)
                        object._jpegThumbnail = "jpegThumbnail";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    object.caption = message.caption;
                    if (options.oneofs)
                        object._caption = "caption";
                }
                if (message.inviteExpiration != null && message.hasOwnProperty("inviteExpiration")) {
                    if (typeof message.inviteExpiration === "number")
                        object.inviteExpiration = options.longs === String ? String(message.inviteExpiration) : message.inviteExpiration;
                    else
                        object.inviteExpiration = options.longs === String ? $util.Long.prototype.toString.call(message.inviteExpiration) : options.longs === Number ? new $util.LongBits(message.inviteExpiration.low >>> 0, message.inviteExpiration.high >>> 0).toNumber() : message.inviteExpiration;
                    if (options.oneofs)
                        object._inviteExpiration = "inviteExpiration";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                return object;
            };

            /**
             * Converts this NewsletterAdminInviteMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            NewsletterAdminInviteMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for NewsletterAdminInviteMessage
             * @function getTypeUrl
             * @memberof E2E.Message.NewsletterAdminInviteMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            NewsletterAdminInviteMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.NewsletterAdminInviteMessage";
            };

            return NewsletterAdminInviteMessage;
        })();

        Message.NewsletterFollowerInviteMessage = (function() {

            /**
             * Properties of a NewsletterFollowerInviteMessage.
             * @memberof E2E.Message
             * @interface INewsletterFollowerInviteMessage
             * @property {string|null} [newsletterJid] NewsletterFollowerInviteMessage newsletterJid
             * @property {string|null} [newsletterName] NewsletterFollowerInviteMessage newsletterName
             * @property {Uint8Array|null} [jpegThumbnail] NewsletterFollowerInviteMessage jpegThumbnail
             * @property {string|null} [caption] NewsletterFollowerInviteMessage caption
             * @property {E2E.IContextInfo|null} [contextInfo] NewsletterFollowerInviteMessage contextInfo
             */

            /**
             * Constructs a new NewsletterFollowerInviteMessage.
             * @memberof E2E.Message
             * @classdesc Represents a NewsletterFollowerInviteMessage.
             * @implements INewsletterFollowerInviteMessage
             * @constructor
             * @param {E2E.Message.INewsletterFollowerInviteMessage=} [properties] Properties to set
             */
            function NewsletterFollowerInviteMessage(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]];
            }

            /**
             * NewsletterFollowerInviteMessage newsletterJid.
             * @member {string|null|undefined} newsletterJid
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @instance
             */
            NewsletterFollowerInviteMessage.prototype.newsletterJid = null;

            /**
             * NewsletterFollowerInviteMessage newsletterName.
             * @member {string|null|undefined} newsletterName
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @instance
             */
            NewsletterFollowerInviteMessage.prototype.newsletterName = null;

            /**
             * NewsletterFollowerInviteMessage jpegThumbnail.
             * @member {Uint8Array|null|undefined} jpegThumbnail
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @instance
             */
            NewsletterFollowerInviteMessage.prototype.jpegThumbnail = null;

            /**
             * NewsletterFollowerInviteMessage caption.
             * @member {string|null|undefined} caption
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @instance
             */
            NewsletterFollowerInviteMessage.prototype.caption = null;

            /**
             * NewsletterFollowerInviteMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @instance
             */
            NewsletterFollowerInviteMessage.prototype.contextInfo = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * NewsletterFollowerInviteMessage _newsletterJid.
             * @member {"newsletterJid"|undefined} _newsletterJid
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @instance
             */
            Object.defineProperty(NewsletterFollowerInviteMessage.prototype, "_newsletterJid", {
                get: $util.oneOfGetter($oneOfFields = ["newsletterJid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * NewsletterFollowerInviteMessage _newsletterName.
             * @member {"newsletterName"|undefined} _newsletterName
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @instance
             */
            Object.defineProperty(NewsletterFollowerInviteMessage.prototype, "_newsletterName", {
                get: $util.oneOfGetter($oneOfFields = ["newsletterName"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * NewsletterFollowerInviteMessage _jpegThumbnail.
             * @member {"jpegThumbnail"|undefined} _jpegThumbnail
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @instance
             */
            Object.defineProperty(NewsletterFollowerInviteMessage.prototype, "_jpegThumbnail", {
                get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * NewsletterFollowerInviteMessage _caption.
             * @member {"caption"|undefined} _caption
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @instance
             */
            Object.defineProperty(NewsletterFollowerInviteMessage.prototype, "_caption", {
                get: $util.oneOfGetter($oneOfFields = ["caption"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * NewsletterFollowerInviteMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @instance
             */
            Object.defineProperty(NewsletterFollowerInviteMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new NewsletterFollowerInviteMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @static
             * @param {E2E.Message.INewsletterFollowerInviteMessage=} [properties] Properties to set
             * @returns {E2E.Message.NewsletterFollowerInviteMessage} NewsletterFollowerInviteMessage instance
             */
            NewsletterFollowerInviteMessage.create = function create(properties) {
                return new NewsletterFollowerInviteMessage(properties);
            };

            /**
             * Encodes the specified NewsletterFollowerInviteMessage message. Does not implicitly {@link E2E.Message.NewsletterFollowerInviteMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @static
             * @param {E2E.Message.INewsletterFollowerInviteMessage} message NewsletterFollowerInviteMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            NewsletterFollowerInviteMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.newsletterJid != null && Object.hasOwnProperty.call(message, "newsletterJid"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.newsletterJid);
                if (message.newsletterName != null && Object.hasOwnProperty.call(message, "newsletterName"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.newsletterName);
                if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail"))
                    writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.jpegThumbnail);
                if (message.caption != null && Object.hasOwnProperty.call(message, "caption"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.caption);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified NewsletterFollowerInviteMessage message, length delimited. Does not implicitly {@link E2E.Message.NewsletterFollowerInviteMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @static
             * @param {E2E.Message.INewsletterFollowerInviteMessage} message NewsletterFollowerInviteMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            NewsletterFollowerInviteMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a NewsletterFollowerInviteMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.NewsletterFollowerInviteMessage} NewsletterFollowerInviteMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            NewsletterFollowerInviteMessage.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.E2E.Message.NewsletterFollowerInviteMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.newsletterJid = reader.string();
                            break;
                        }
                    case 2: {
                            message.newsletterName = reader.string();
                            break;
                        }
                    case 3: {
                            message.jpegThumbnail = reader.bytes();
                            break;
                        }
                    case 4: {
                            message.caption = reader.string();
                            break;
                        }
                    case 5: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a NewsletterFollowerInviteMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.NewsletterFollowerInviteMessage} NewsletterFollowerInviteMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            NewsletterFollowerInviteMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a NewsletterFollowerInviteMessage message.
             * @function verify
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            NewsletterFollowerInviteMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) {
                    properties._newsletterJid = 1;
                    if (!$util.isString(message.newsletterJid))
                        return "newsletterJid: string expected";
                }
                if (message.newsletterName != null && message.hasOwnProperty("newsletterName")) {
                    properties._newsletterName = 1;
                    if (!$util.isString(message.newsletterName))
                        return "newsletterName: string expected";
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    properties._jpegThumbnail = 1;
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    properties._caption = 1;
                    if (!$util.isString(message.caption))
                        return "caption: string expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a NewsletterFollowerInviteMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.NewsletterFollowerInviteMessage} NewsletterFollowerInviteMessage
             */
            NewsletterFollowerInviteMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.NewsletterFollowerInviteMessage)
                    return object;
                var message = new $root.E2E.Message.NewsletterFollowerInviteMessage();
                if (object.newsletterJid != null)
                    message.newsletterJid = String(object.newsletterJid);
                if (object.newsletterName != null)
                    message.newsletterName = String(object.newsletterName);
                if (object.jpegThumbnail != null)
                    if (typeof object.jpegThumbnail === "string")
                        $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0);
                    else if (object.jpegThumbnail.length >= 0)
                        message.jpegThumbnail = object.jpegThumbnail;
                if (object.caption != null)
                    message.caption = String(object.caption);
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.NewsletterFollowerInviteMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                return message;
            };

            /**
             * Creates a plain object from a NewsletterFollowerInviteMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @static
             * @param {E2E.Message.NewsletterFollowerInviteMessage} message NewsletterFollowerInviteMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            NewsletterFollowerInviteMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) {
                    object.newsletterJid = message.newsletterJid;
                    if (options.oneofs)
                        object._newsletterJid = "newsletterJid";
                }
                if (message.newsletterName != null && message.hasOwnProperty("newsletterName")) {
                    object.newsletterName = message.newsletterName;
                    if (options.oneofs)
                        object._newsletterName = "newsletterName";
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail;
                    if (options.oneofs)
                        object._jpegThumbnail = "jpegThumbnail";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    object.caption = message.caption;
                    if (options.oneofs)
                        object._caption = "caption";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                return object;
            };

            /**
             * Converts this NewsletterFollowerInviteMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            NewsletterFollowerInviteMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for NewsletterFollowerInviteMessage
             * @function getTypeUrl
             * @memberof E2E.Message.NewsletterFollowerInviteMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            NewsletterFollowerInviteMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.NewsletterFollowerInviteMessage";
            };

            return NewsletterFollowerInviteMessage;
        })();

        Message.OrderMessage = (function() {

            /**
             * Properties of an OrderMessage.
             * @memberof E2E.Message
             * @interface IOrderMessage
             * @property {string|null} [orderId] OrderMessage orderId
             * @property {Uint8Array|null} [thumbnail] OrderMessage thumbnail
             * @property {number|null} [itemCount] OrderMessage itemCount
             * @property {E2E.Message.OrderMessage.OrderStatus|null} [status] OrderMessage status
             * @property {E2E.Message.OrderMessage.OrderSurface|null} [surface] OrderMessage surface
             * @property {string|null} [message] OrderMessage message
             * @property {string|null} [orderTitle] OrderMessage orderTitle
             * @property {string|null} [sellerJid] OrderMessage sellerJid
             * @property {string|null} [token] OrderMessage token
             * @property {number|Long|null} [totalAmount1000] OrderMessage totalAmount1000
             * @property {string|null} [totalCurrencyCode] OrderMessage totalCurrencyCode
             * @property {E2E.IContextInfo|null} [contextInfo] OrderMessage contextInfo
             * @property {number|null} [messageVersion] OrderMessage messageVersion
             * @property {Protocol.IMessageKey|null} [orderRequestMessageId] OrderMessage orderRequestMessageId
             * @property {string|null} [catalogType] OrderMessage catalogType
             */

            /**
             * Constructs a new OrderMessage.
             * @memberof E2E.Message
             * @classdesc Represents an OrderMessage.
             * @implements IOrderMessage
             * @constructor
             * @param {E2E.Message.IOrderMessage=} [properties] Properties to set
             */
            function OrderMessage(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]];
            }

            /**
             * OrderMessage orderId.
             * @member {string|null|undefined} orderId
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.orderId = null;

            /**
             * OrderMessage thumbnail.
             * @member {Uint8Array|null|undefined} thumbnail
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.thumbnail = null;

            /**
             * OrderMessage itemCount.
             * @member {number|null|undefined} itemCount
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.itemCount = null;

            /**
             * OrderMessage status.
             * @member {E2E.Message.OrderMessage.OrderStatus|null|undefined} status
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.status = null;

            /**
             * OrderMessage surface.
             * @member {E2E.Message.OrderMessage.OrderSurface|null|undefined} surface
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.surface = null;

            /**
             * OrderMessage message.
             * @member {string|null|undefined} message
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.message = null;

            /**
             * OrderMessage orderTitle.
             * @member {string|null|undefined} orderTitle
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.orderTitle = null;

            /**
             * OrderMessage sellerJid.
             * @member {string|null|undefined} sellerJid
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.sellerJid = null;

            /**
             * OrderMessage token.
             * @member {string|null|undefined} token
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.token = null;

            /**
             * OrderMessage totalAmount1000.
             * @member {number|Long|null|undefined} totalAmount1000
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.totalAmount1000 = null;

            /**
             * OrderMessage totalCurrencyCode.
             * @member {string|null|undefined} totalCurrencyCode
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.totalCurrencyCode = null;

            /**
             * OrderMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.contextInfo = null;

            /**
             * OrderMessage messageVersion.
             * @member {number|null|undefined} messageVersion
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.messageVersion = null;

            /**
             * OrderMessage orderRequestMessageId.
             * @member {Protocol.IMessageKey|null|undefined} orderRequestMessageId
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.orderRequestMessageId = null;

            /**
             * OrderMessage catalogType.
             * @member {string|null|undefined} catalogType
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            OrderMessage.prototype.catalogType = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * OrderMessage _orderId.
             * @member {"orderId"|undefined} _orderId
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            Object.defineProperty(OrderMessage.prototype, "_orderId", {
                get: $util.oneOfGetter($oneOfFields = ["orderId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * OrderMessage _thumbnail.
             * @member {"thumbnail"|undefined} _thumbnail
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            Object.defineProperty(OrderMessage.prototype, "_thumbnail", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnail"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * OrderMessage _itemCount.
             * @member {"itemCount"|undefined} _itemCount
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            Object.defineProperty(OrderMessage.prototype, "_itemCount", {
                get: $util.oneOfGetter($oneOfFields = ["itemCount"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * OrderMessage _status.
             * @member {"status"|undefined} _status
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            Object.defineProperty(OrderMessage.prototype, "_status", {
                get: $util.oneOfGetter($oneOfFields = ["status"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * OrderMessage _surface.
             * @member {"surface"|undefined} _surface
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            Object.defineProperty(OrderMessage.prototype, "_surface", {
                get: $util.oneOfGetter($oneOfFields = ["surface"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * OrderMessage _message.
             * @member {"message"|undefined} _message
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            Object.defineProperty(OrderMessage.prototype, "_message", {
                get: $util.oneOfGetter($oneOfFields = ["message"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * OrderMessage _orderTitle.
             * @member {"orderTitle"|undefined} _orderTitle
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            Object.defineProperty(OrderMessage.prototype, "_orderTitle", {
                get: $util.oneOfGetter($oneOfFields = ["orderTitle"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * OrderMessage _sellerJid.
             * @member {"sellerJid"|undefined} _sellerJid
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            Object.defineProperty(OrderMessage.prototype, "_sellerJid", {
                get: $util.oneOfGetter($oneOfFields = ["sellerJid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * OrderMessage _token.
             * @member {"token"|undefined} _token
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            Object.defineProperty(OrderMessage.prototype, "_token", {
                get: $util.oneOfGetter($oneOfFields = ["token"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * OrderMessage _totalAmount1000.
             * @member {"totalAmount1000"|undefined} _totalAmount1000
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            Object.defineProperty(OrderMessage.prototype, "_totalAmount1000", {
                get: $util.oneOfGetter($oneOfFields = ["totalAmount1000"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * OrderMessage _totalCurrencyCode.
             * @member {"totalCurrencyCode"|undefined} _totalCurrencyCode
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            Object.defineProperty(OrderMessage.prototype, "_totalCurrencyCode", {
                get: $util.oneOfGetter($oneOfFields = ["totalCurrencyCode"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * OrderMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            Object.defineProperty(OrderMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * OrderMessage _messageVersion.
             * @member {"messageVersion"|undefined} _messageVersion
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            Object.defineProperty(OrderMessage.prototype, "_messageVersion", {
                get: $util.oneOfGetter($oneOfFields = ["messageVersion"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * OrderMessage _orderRequestMessageId.
             * @member {"orderRequestMessageId"|undefined} _orderRequestMessageId
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            Object.defineProperty(OrderMessage.prototype, "_orderRequestMessageId", {
                get: $util.oneOfGetter($oneOfFields = ["orderRequestMessageId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * OrderMessage _catalogType.
             * @member {"catalogType"|undefined} _catalogType
             * @memberof E2E.Message.OrderMessage
             * @instance
             */
            Object.defineProperty(OrderMessage.prototype, "_catalogType", {
                get: $util.oneOfGetter($oneOfFields = ["catalogType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new OrderMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.OrderMessage
             * @static
             * @param {E2E.Message.IOrderMessage=} [properties] Properties to set
             * @returns {E2E.Message.OrderMessage} OrderMessage instance
             */
            OrderMessage.create = function create(properties) {
                return new OrderMessage(properties);
            };

            /**
             * Encodes the specified OrderMessage message. Does not implicitly {@link E2E.Message.OrderMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.OrderMessage
             * @static
             * @param {E2E.Message.IOrderMessage} message OrderMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            OrderMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.orderId != null && Object.hasOwnProperty.call(message, "orderId"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.orderId);
                if (message.thumbnail != null && Object.hasOwnProperty.call(message, "thumbnail"))
                    writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.thumbnail);
                if (message.itemCount != null && Object.hasOwnProperty.call(message, "itemCount"))
                    writer.uint32(/* id 3, wireType 0 =*/24).int32(message.itemCount);
                if (message.status != null && Object.hasOwnProperty.call(message, "status"))
                    writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status);
                if (message.surface != null && Object.hasOwnProperty.call(message, "surface"))
                    writer.uint32(/* id 5, wireType 0 =*/40).int32(message.surface);
                if (message.message != null && Object.hasOwnProperty.call(message, "message"))
                    writer.uint32(/* id 6, wireType 2 =*/50).string(message.message);
                if (message.orderTitle != null && Object.hasOwnProperty.call(message, "orderTitle"))
                    writer.uint32(/* id 7, wireType 2 =*/58).string(message.orderTitle);
                if (message.sellerJid != null && Object.hasOwnProperty.call(message, "sellerJid"))
                    writer.uint32(/* id 8, wireType 2 =*/66).string(message.sellerJid);
                if (message.token != null && Object.hasOwnProperty.call(message, "token"))
                    writer.uint32(/* id 9, wireType 2 =*/74).string(message.token);
                if (message.totalAmount1000 != null && Object.hasOwnProperty.call(message, "totalAmount1000"))
                    writer.uint32(/* id 10, wireType 0 =*/80).int64(message.totalAmount1000);
                if (message.totalCurrencyCode != null && Object.hasOwnProperty.call(message, "totalCurrencyCode"))
                    writer.uint32(/* id 11, wireType 2 =*/90).string(message.totalCurrencyCode);
                if (message.messageVersion != null && Object.hasOwnProperty.call(message, "messageVersion"))
                    writer.uint32(/* id 12, wireType 0 =*/96).int32(message.messageVersion);
                if (message.orderRequestMessageId != null && Object.hasOwnProperty.call(message, "orderRequestMessageId"))
                    $root.Protocol.MessageKey.encode(message.orderRequestMessageId, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
                if (message.catalogType != null && Object.hasOwnProperty.call(message, "catalogType"))
                    writer.uint32(/* id 15, wireType 2 =*/122).string(message.catalogType);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified OrderMessage message, length delimited. Does not implicitly {@link E2E.Message.OrderMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.OrderMessage
             * @static
             * @param {E2E.Message.IOrderMessage} message OrderMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            OrderMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an OrderMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.OrderMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.OrderMessage} OrderMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            OrderMessage.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.E2E.Message.OrderMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.orderId = reader.string();
                            break;
                        }
                    case 2: {
                            message.thumbnail = reader.bytes();
                            break;
                        }
                    case 3: {
                            message.itemCount = reader.int32();
                            break;
                        }
                    case 4: {
                            message.status = reader.int32();
                            break;
                        }
                    case 5: {
                            message.surface = reader.int32();
                            break;
                        }
                    case 6: {
                            message.message = reader.string();
                            break;
                        }
                    case 7: {
                            message.orderTitle = reader.string();
                            break;
                        }
                    case 8: {
                            message.sellerJid = reader.string();
                            break;
                        }
                    case 9: {
                            message.token = reader.string();
                            break;
                        }
                    case 10: {
                            message.totalAmount1000 = reader.int64();
                            break;
                        }
                    case 11: {
                            message.totalCurrencyCode = reader.string();
                            break;
                        }
                    case 17: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 12: {
                            message.messageVersion = reader.int32();
                            break;
                        }
                    case 13: {
                            message.orderRequestMessageId = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    case 15: {
                            message.catalogType = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an OrderMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.OrderMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.OrderMessage} OrderMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            OrderMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an OrderMessage message.
             * @function verify
             * @memberof E2E.Message.OrderMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            OrderMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.orderId != null && message.hasOwnProperty("orderId")) {
                    properties._orderId = 1;
                    if (!$util.isString(message.orderId))
                        return "orderId: string expected";
                }
                if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) {
                    properties._thumbnail = 1;
                    if (!(message.thumbnail && typeof message.thumbnail.length === "number" || $util.isString(message.thumbnail)))
                        return "thumbnail: buffer expected";
                }
                if (message.itemCount != null && message.hasOwnProperty("itemCount")) {
                    properties._itemCount = 1;
                    if (!$util.isInteger(message.itemCount))
                        return "itemCount: integer expected";
                }
                if (message.status != null && message.hasOwnProperty("status")) {
                    properties._status = 1;
                    switch (message.status) {
                    default:
                        return "status: enum value expected";
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                if (message.surface != null && message.hasOwnProperty("surface")) {
                    properties._surface = 1;
                    switch (message.surface) {
                    default:
                        return "surface: enum value expected";
                    case 1:
                        break;
                    }
                }
                if (message.message != null && message.hasOwnProperty("message")) {
                    properties._message = 1;
                    if (!$util.isString(message.message))
                        return "message: string expected";
                }
                if (message.orderTitle != null && message.hasOwnProperty("orderTitle")) {
                    properties._orderTitle = 1;
                    if (!$util.isString(message.orderTitle))
                        return "orderTitle: string expected";
                }
                if (message.sellerJid != null && message.hasOwnProperty("sellerJid")) {
                    properties._sellerJid = 1;
                    if (!$util.isString(message.sellerJid))
                        return "sellerJid: string expected";
                }
                if (message.token != null && message.hasOwnProperty("token")) {
                    properties._token = 1;
                    if (!$util.isString(message.token))
                        return "token: string expected";
                }
                if (message.totalAmount1000 != null && message.hasOwnProperty("totalAmount1000")) {
                    properties._totalAmount1000 = 1;
                    if (!$util.isInteger(message.totalAmount1000) && !(message.totalAmount1000 && $util.isInteger(message.totalAmount1000.low) && $util.isInteger(message.totalAmount1000.high)))
                        return "totalAmount1000: integer|Long expected";
                }
                if (message.totalCurrencyCode != null && message.hasOwnProperty("totalCurrencyCode")) {
                    properties._totalCurrencyCode = 1;
                    if (!$util.isString(message.totalCurrencyCode))
                        return "totalCurrencyCode: string expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) {
                    properties._messageVersion = 1;
                    if (!$util.isInteger(message.messageVersion))
                        return "messageVersion: integer expected";
                }
                if (message.orderRequestMessageId != null && message.hasOwnProperty("orderRequestMessageId")) {
                    properties._orderRequestMessageId = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.orderRequestMessageId);
                        if (error)
                            return "orderRequestMessageId." + error;
                    }
                }
                if (message.catalogType != null && message.hasOwnProperty("catalogType")) {
                    properties._catalogType = 1;
                    if (!$util.isString(message.catalogType))
                        return "catalogType: string expected";
                }
                return null;
            };

            /**
             * Creates an OrderMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.OrderMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.OrderMessage} OrderMessage
             */
            OrderMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.OrderMessage)
                    return object;
                var message = new $root.E2E.Message.OrderMessage();
                if (object.orderId != null)
                    message.orderId = String(object.orderId);
                if (object.thumbnail != null)
                    if (typeof object.thumbnail === "string")
                        $util.base64.decode(object.thumbnail, message.thumbnail = $util.newBuffer($util.base64.length(object.thumbnail)), 0);
                    else if (object.thumbnail.length >= 0)
                        message.thumbnail = object.thumbnail;
                if (object.itemCount != null)
                    message.itemCount = object.itemCount | 0;
                switch (object.status) {
                default:
                    if (typeof object.status === "number") {
                        message.status = object.status;
                        break;
                    }
                    break;
                case "INQUIRY":
                case 1:
                    message.status = 1;
                    break;
                case "ACCEPTED":
                case 2:
                    message.status = 2;
                    break;
                case "DECLINED":
                case 3:
                    message.status = 3;
                    break;
                }
                switch (object.surface) {
                default:
                    if (typeof object.surface === "number") {
                        message.surface = object.surface;
                        break;
                    }
                    break;
                case "CATALOG":
                case 1:
                    message.surface = 1;
                    break;
                }
                if (object.message != null)
                    message.message = String(object.message);
                if (object.orderTitle != null)
                    message.orderTitle = String(object.orderTitle);
                if (object.sellerJid != null)
                    message.sellerJid = String(object.sellerJid);
                if (object.token != null)
                    message.token = String(object.token);
                if (object.totalAmount1000 != null)
                    if ($util.Long)
                        (message.totalAmount1000 = $util.Long.fromValue(object.totalAmount1000)).unsigned = false;
                    else if (typeof object.totalAmount1000 === "string")
                        message.totalAmount1000 = parseInt(object.totalAmount1000, 10);
                    else if (typeof object.totalAmount1000 === "number")
                        message.totalAmount1000 = object.totalAmount1000;
                    else if (typeof object.totalAmount1000 === "object")
                        message.totalAmount1000 = new $util.LongBits(object.totalAmount1000.low >>> 0, object.totalAmount1000.high >>> 0).toNumber();
                if (object.totalCurrencyCode != null)
                    message.totalCurrencyCode = String(object.totalCurrencyCode);
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.OrderMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                if (object.messageVersion != null)
                    message.messageVersion = object.messageVersion | 0;
                if (object.orderRequestMessageId != null) {
                    if (typeof object.orderRequestMessageId !== "object")
                        throw TypeError(".E2E.Message.OrderMessage.orderRequestMessageId: object expected");
                    message.orderRequestMessageId = $root.Protocol.MessageKey.fromObject(object.orderRequestMessageId);
                }
                if (object.catalogType != null)
                    message.catalogType = String(object.catalogType);
                return message;
            };

            /**
             * Creates a plain object from an OrderMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.OrderMessage
             * @static
             * @param {E2E.Message.OrderMessage} message OrderMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            OrderMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.orderId != null && message.hasOwnProperty("orderId")) {
                    object.orderId = message.orderId;
                    if (options.oneofs)
                        object._orderId = "orderId";
                }
                if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) {
                    object.thumbnail = options.bytes === String ? $util.base64.encode(message.thumbnail, 0, message.thumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnail) : message.thumbnail;
                    if (options.oneofs)
                        object._thumbnail = "thumbnail";
                }
                if (message.itemCount != null && message.hasOwnProperty("itemCount")) {
                    object.itemCount = message.itemCount;
                    if (options.oneofs)
                        object._itemCount = "itemCount";
                }
                if (message.status != null && message.hasOwnProperty("status")) {
                    object.status = options.enums === String ? $root.E2E.Message.OrderMessage.OrderStatus[message.status] === undefined ? message.status : $root.E2E.Message.OrderMessage.OrderStatus[message.status] : message.status;
                    if (options.oneofs)
                        object._status = "status";
                }
                if (message.surface != null && message.hasOwnProperty("surface")) {
                    object.surface = options.enums === String ? $root.E2E.Message.OrderMessage.OrderSurface[message.surface] === undefined ? message.surface : $root.E2E.Message.OrderMessage.OrderSurface[message.surface] : message.surface;
                    if (options.oneofs)
                        object._surface = "surface";
                }
                if (message.message != null && message.hasOwnProperty("message")) {
                    object.message = message.message;
                    if (options.oneofs)
                        object._message = "message";
                }
                if (message.orderTitle != null && message.hasOwnProperty("orderTitle")) {
                    object.orderTitle = message.orderTitle;
                    if (options.oneofs)
                        object._orderTitle = "orderTitle";
                }
                if (message.sellerJid != null && message.hasOwnProperty("sellerJid")) {
                    object.sellerJid = message.sellerJid;
                    if (options.oneofs)
                        object._sellerJid = "sellerJid";
                }
                if (message.token != null && message.hasOwnProperty("token")) {
                    object.token = message.token;
                    if (options.oneofs)
                        object._token = "token";
                }
                if (message.totalAmount1000 != null && message.hasOwnProperty("totalAmount1000")) {
                    if (typeof message.totalAmount1000 === "number")
                        object.totalAmount1000 = options.longs === String ? String(message.totalAmount1000) : message.totalAmount1000;
                    else
                        object.totalAmount1000 = options.longs === String ? $util.Long.prototype.toString.call(message.totalAmount1000) : options.longs === Number ? new $util.LongBits(message.totalAmount1000.low >>> 0, message.totalAmount1000.high >>> 0).toNumber() : message.totalAmount1000;
                    if (options.oneofs)
                        object._totalAmount1000 = "totalAmount1000";
                }
                if (message.totalCurrencyCode != null && message.hasOwnProperty("totalCurrencyCode")) {
                    object.totalCurrencyCode = message.totalCurrencyCode;
                    if (options.oneofs)
                        object._totalCurrencyCode = "totalCurrencyCode";
                }
                if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) {
                    object.messageVersion = message.messageVersion;
                    if (options.oneofs)
                        object._messageVersion = "messageVersion";
                }
                if (message.orderRequestMessageId != null && message.hasOwnProperty("orderRequestMessageId")) {
                    object.orderRequestMessageId = $root.Protocol.MessageKey.toObject(message.orderRequestMessageId, options);
                    if (options.oneofs)
                        object._orderRequestMessageId = "orderRequestMessageId";
                }
                if (message.catalogType != null && message.hasOwnProperty("catalogType")) {
                    object.catalogType = message.catalogType;
                    if (options.oneofs)
                        object._catalogType = "catalogType";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                return object;
            };

            /**
             * Converts this OrderMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.OrderMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            OrderMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for OrderMessage
             * @function getTypeUrl
             * @memberof E2E.Message.OrderMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            OrderMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.OrderMessage";
            };

            /**
             * OrderStatus enum.
             * @name E2E.Message.OrderMessage.OrderStatus
             * @enum {number}
             * @property {number} INQUIRY=1 INQUIRY value
             * @property {number} ACCEPTED=2 ACCEPTED value
             * @property {number} DECLINED=3 DECLINED value
             */
            OrderMessage.OrderStatus = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[1] = "INQUIRY"] = 1;
                values[valuesById[2] = "ACCEPTED"] = 2;
                values[valuesById[3] = "DECLINED"] = 3;
                return values;
            })();

            /**
             * OrderSurface enum.
             * @name E2E.Message.OrderMessage.OrderSurface
             * @enum {number}
             * @property {number} CATALOG=1 CATALOG value
             */
            OrderMessage.OrderSurface = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[1] = "CATALOG"] = 1;
                return values;
            })();

            return OrderMessage;
        })();

        Message.PaymentExtendedMetadata = (function() {

            /**
             * Properties of a PaymentExtendedMetadata.
             * @memberof E2E.Message
             * @interface IPaymentExtendedMetadata
             * @property {number|null} [type] PaymentExtendedMetadata type
             * @property {string|null} [platform] PaymentExtendedMetadata platform
             */

            /**
             * Constructs a new PaymentExtendedMetadata.
             * @memberof E2E.Message
             * @classdesc Represents a PaymentExtendedMetadata.
             * @implements IPaymentExtendedMetadata
             * @constructor
             * @param {E2E.Message.IPaymentExtendedMetadata=} [properties] Properties to set
             */
            function PaymentExtendedMetadata(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]];
            }

            /**
             * PaymentExtendedMetadata type.
             * @member {number|null|undefined} type
             * @memberof E2E.Message.PaymentExtendedMetadata
             * @instance
             */
            PaymentExtendedMetadata.prototype.type = null;

            /**
             * PaymentExtendedMetadata platform.
             * @member {string|null|undefined} platform
             * @memberof E2E.Message.PaymentExtendedMetadata
             * @instance
             */
            PaymentExtendedMetadata.prototype.platform = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * PaymentExtendedMetadata _type.
             * @member {"type"|undefined} _type
             * @memberof E2E.Message.PaymentExtendedMetadata
             * @instance
             */
            Object.defineProperty(PaymentExtendedMetadata.prototype, "_type", {
                get: $util.oneOfGetter($oneOfFields = ["type"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PaymentExtendedMetadata _platform.
             * @member {"platform"|undefined} _platform
             * @memberof E2E.Message.PaymentExtendedMetadata
             * @instance
             */
            Object.defineProperty(PaymentExtendedMetadata.prototype, "_platform", {
                get: $util.oneOfGetter($oneOfFields = ["platform"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new PaymentExtendedMetadata instance using the specified properties.
             * @function create
             * @memberof E2E.Message.PaymentExtendedMetadata
             * @static
             * @param {E2E.Message.IPaymentExtendedMetadata=} [properties] Properties to set
             * @returns {E2E.Message.PaymentExtendedMetadata} PaymentExtendedMetadata instance
             */
            PaymentExtendedMetadata.create = function create(properties) {
                return new PaymentExtendedMetadata(properties);
            };

            /**
             * Encodes the specified PaymentExtendedMetadata message. Does not implicitly {@link E2E.Message.PaymentExtendedMetadata.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.PaymentExtendedMetadata
             * @static
             * @param {E2E.Message.IPaymentExtendedMetadata} message PaymentExtendedMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PaymentExtendedMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                    writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.type);
                if (message.platform != null && Object.hasOwnProperty.call(message, "platform"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.platform);
                return writer;
            };

            /**
             * Encodes the specified PaymentExtendedMetadata message, length delimited. Does not implicitly {@link E2E.Message.PaymentExtendedMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.PaymentExtendedMetadata
             * @static
             * @param {E2E.Message.IPaymentExtendedMetadata} message PaymentExtendedMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PaymentExtendedMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PaymentExtendedMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.PaymentExtendedMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.PaymentExtendedMetadata} PaymentExtendedMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PaymentExtendedMetadata.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.E2E.Message.PaymentExtendedMetadata();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.type = reader.uint32();
                            break;
                        }
                    case 2: {
                            message.platform = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a PaymentExtendedMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.PaymentExtendedMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.PaymentExtendedMetadata} PaymentExtendedMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PaymentExtendedMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PaymentExtendedMetadata message.
             * @function verify
             * @memberof E2E.Message.PaymentExtendedMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PaymentExtendedMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.type != null && message.hasOwnProperty("type")) {
                    properties._type = 1;
                    if (!$util.isInteger(message.type))
                        return "type: integer expected";
                }
                if (message.platform != null && message.hasOwnProperty("platform")) {
                    properties._platform = 1;
                    if (!$util.isString(message.platform))
                        return "platform: string expected";
                }
                return null;
            };

            /**
             * Creates a PaymentExtendedMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.PaymentExtendedMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.PaymentExtendedMetadata} PaymentExtendedMetadata
             */
            PaymentExtendedMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.PaymentExtendedMetadata)
                    return object;
                var message = new $root.E2E.Message.PaymentExtendedMetadata();
                if (object.type != null)
                    message.type = object.type >>> 0;
                if (object.platform != null)
                    message.platform = String(object.platform);
                return message;
            };

            /**
             * Creates a plain object from a PaymentExtendedMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.PaymentExtendedMetadata
             * @static
             * @param {E2E.Message.PaymentExtendedMetadata} message PaymentExtendedMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PaymentExtendedMetadata.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.type != null && message.hasOwnProperty("type")) {
                    object.type = message.type;
                    if (options.oneofs)
                        object._type = "type";
                }
                if (message.platform != null && message.hasOwnProperty("platform")) {
                    object.platform = message.platform;
                    if (options.oneofs)
                        object._platform = "platform";
                }
                return object;
            };

            /**
             * Converts this PaymentExtendedMetadata to JSON.
             * @function toJSON
             * @memberof E2E.Message.PaymentExtendedMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PaymentExtendedMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for PaymentExtendedMetadata
             * @function getTypeUrl
             * @memberof E2E.Message.PaymentExtendedMetadata
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            PaymentExtendedMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.PaymentExtendedMetadata";
            };

            return PaymentExtendedMetadata;
        })();

        Message.PaymentInviteMessage = (function() {

            /**
             * Properties of a PaymentInviteMessage.
             * @memberof E2E.Message
             * @interface IPaymentInviteMessage
             * @property {E2E.Message.PaymentInviteMessage.ServiceType|null} [serviceType] PaymentInviteMessage serviceType
             * @property {number|Long|null} [expiryTimestamp] PaymentInviteMessage expiryTimestamp
             */

            /**
             * Constructs a new PaymentInviteMessage.
             * @memberof E2E.Message
             * @classdesc Represents a PaymentInviteMessage.
             * @implements IPaymentInviteMessage
             * @constructor
             * @param {E2E.Message.IPaymentInviteMessage=} [properties] Properties to set
             */
            function PaymentInviteMessage(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]];
            }

            /**
             * PaymentInviteMessage serviceType.
             * @member {E2E.Message.PaymentInviteMessage.ServiceType|null|undefined} serviceType
             * @memberof E2E.Message.PaymentInviteMessage
             * @instance
             */
            PaymentInviteMessage.prototype.serviceType = null;

            /**
             * PaymentInviteMessage expiryTimestamp.
             * @member {number|Long|null|undefined} expiryTimestamp
             * @memberof E2E.Message.PaymentInviteMessage
             * @instance
             */
            PaymentInviteMessage.prototype.expiryTimestamp = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * PaymentInviteMessage _serviceType.
             * @member {"serviceType"|undefined} _serviceType
             * @memberof E2E.Message.PaymentInviteMessage
             * @instance
             */
            Object.defineProperty(PaymentInviteMessage.prototype, "_serviceType", {
                get: $util.oneOfGetter($oneOfFields = ["serviceType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PaymentInviteMessage _expiryTimestamp.
             * @member {"expiryTimestamp"|undefined} _expiryTimestamp
             * @memberof E2E.Message.PaymentInviteMessage
             * @instance
             */
            Object.defineProperty(PaymentInviteMessage.prototype, "_expiryTimestamp", {
                get: $util.oneOfGetter($oneOfFields = ["expiryTimestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new PaymentInviteMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.PaymentInviteMessage
             * @static
             * @param {E2E.Message.IPaymentInviteMessage=} [properties] Properties to set
             * @returns {E2E.Message.PaymentInviteMessage} PaymentInviteMessage instance
             */
            PaymentInviteMessage.create = function create(properties) {
                return new PaymentInviteMessage(properties);
            };

            /**
             * Encodes the specified PaymentInviteMessage message. Does not implicitly {@link E2E.Message.PaymentInviteMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.PaymentInviteMessage
             * @static
             * @param {E2E.Message.IPaymentInviteMessage} message PaymentInviteMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PaymentInviteMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.serviceType != null && Object.hasOwnProperty.call(message, "serviceType"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.serviceType);
                if (message.expiryTimestamp != null && Object.hasOwnProperty.call(message, "expiryTimestamp"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int64(message.expiryTimestamp);
                return writer;
            };

            /**
             * Encodes the specified PaymentInviteMessage message, length delimited. Does not implicitly {@link E2E.Message.PaymentInviteMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.PaymentInviteMessage
             * @static
             * @param {E2E.Message.IPaymentInviteMessage} message PaymentInviteMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PaymentInviteMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PaymentInviteMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.PaymentInviteMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.PaymentInviteMessage} PaymentInviteMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PaymentInviteMessage.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.E2E.Message.PaymentInviteMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.serviceType = reader.int32();
                            break;
                        }
                    case 2: {
                            message.expiryTimestamp = reader.int64();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a PaymentInviteMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.PaymentInviteMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.PaymentInviteMessage} PaymentInviteMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PaymentInviteMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PaymentInviteMessage message.
             * @function verify
             * @memberof E2E.Message.PaymentInviteMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PaymentInviteMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.serviceType != null && message.hasOwnProperty("serviceType")) {
                    properties._serviceType = 1;
                    switch (message.serviceType) {
                    default:
                        return "serviceType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) {
                    properties._expiryTimestamp = 1;
                    if (!$util.isInteger(message.expiryTimestamp) && !(message.expiryTimestamp && $util.isInteger(message.expiryTimestamp.low) && $util.isInteger(message.expiryTimestamp.high)))
                        return "expiryTimestamp: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a PaymentInviteMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.PaymentInviteMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.PaymentInviteMessage} PaymentInviteMessage
             */
            PaymentInviteMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.PaymentInviteMessage)
                    return object;
                var message = new $root.E2E.Message.PaymentInviteMessage();
                switch (object.serviceType) {
                default:
                    if (typeof object.serviceType === "number") {
                        message.serviceType = object.serviceType;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.serviceType = 0;
                    break;
                case "FBPAY":
                case 1:
                    message.serviceType = 1;
                    break;
                case "NOVI":
                case 2:
                    message.serviceType = 2;
                    break;
                case "UPI":
                case 3:
                    message.serviceType = 3;
                    break;
                }
                if (object.expiryTimestamp != null)
                    if ($util.Long)
                        (message.expiryTimestamp = $util.Long.fromValue(object.expiryTimestamp)).unsigned = false;
                    else if (typeof object.expiryTimestamp === "string")
                        message.expiryTimestamp = parseInt(object.expiryTimestamp, 10);
                    else if (typeof object.expiryTimestamp === "number")
                        message.expiryTimestamp = object.expiryTimestamp;
                    else if (typeof object.expiryTimestamp === "object")
                        message.expiryTimestamp = new $util.LongBits(object.expiryTimestamp.low >>> 0, object.expiryTimestamp.high >>> 0).toNumber();
                return message;
            };

            /**
             * Creates a plain object from a PaymentInviteMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.PaymentInviteMessage
             * @static
             * @param {E2E.Message.PaymentInviteMessage} message PaymentInviteMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PaymentInviteMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.serviceType != null && message.hasOwnProperty("serviceType")) {
                    object.serviceType = options.enums === String ? $root.E2E.Message.PaymentInviteMessage.ServiceType[message.serviceType] === undefined ? message.serviceType : $root.E2E.Message.PaymentInviteMessage.ServiceType[message.serviceType] : message.serviceType;
                    if (options.oneofs)
                        object._serviceType = "serviceType";
                }
                if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) {
                    if (typeof message.expiryTimestamp === "number")
                        object.expiryTimestamp = options.longs === String ? String(message.expiryTimestamp) : message.expiryTimestamp;
                    else
                        object.expiryTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.expiryTimestamp) : options.longs === Number ? new $util.LongBits(message.expiryTimestamp.low >>> 0, message.expiryTimestamp.high >>> 0).toNumber() : message.expiryTimestamp;
                    if (options.oneofs)
                        object._expiryTimestamp = "expiryTimestamp";
                }
                return object;
            };

            /**
             * Converts this PaymentInviteMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.PaymentInviteMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PaymentInviteMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for PaymentInviteMessage
             * @function getTypeUrl
             * @memberof E2E.Message.PaymentInviteMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            PaymentInviteMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.PaymentInviteMessage";
            };

            /**
             * ServiceType enum.
             * @name E2E.Message.PaymentInviteMessage.ServiceType
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} FBPAY=1 FBPAY value
             * @property {number} NOVI=2 NOVI value
             * @property {number} UPI=3 UPI value
             */
            PaymentInviteMessage.ServiceType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "FBPAY"] = 1;
                values[valuesById[2] = "NOVI"] = 2;
                values[valuesById[3] = "UPI"] = 3;
                return values;
            })();

            return PaymentInviteMessage;
        })();

        Message.PaymentLinkMetadata = (function() {

            /**
             * Properties of a PaymentLinkMetadata.
             * @memberof E2E.Message
             * @interface IPaymentLinkMetadata
             * @property {E2E.Message.PaymentLinkMetadata.IPaymentLinkButton|null} [button] PaymentLinkMetadata button
             * @property {E2E.Message.PaymentLinkMetadata.IPaymentLinkHeader|null} [header] PaymentLinkMetadata header
             * @property {E2E.Message.PaymentLinkMetadata.IPaymentLinkProvider|null} [provider] PaymentLinkMetadata provider
             */

            /**
             * Constructs a new PaymentLinkMetadata.
             * @memberof E2E.Message
             * @classdesc Represents a PaymentLinkMetadata.
             * @implements IPaymentLinkMetadata
             * @constructor
             * @param {E2E.Message.IPaymentLinkMetadata=} [properties] Properties to set
             */
            function PaymentLinkMetadata(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]];
            }

            /**
             * PaymentLinkMetadata button.
             * @member {E2E.Message.PaymentLinkMetadata.IPaymentLinkButton|null|undefined} button
             * @memberof E2E.Message.PaymentLinkMetadata
             * @instance
             */
            PaymentLinkMetadata.prototype.button = null;

            /**
             * PaymentLinkMetadata header.
             * @member {E2E.Message.PaymentLinkMetadata.IPaymentLinkHeader|null|undefined} header
             * @memberof E2E.Message.PaymentLinkMetadata
             * @instance
             */
            PaymentLinkMetadata.prototype.header = null;

            /**
             * PaymentLinkMetadata provider.
             * @member {E2E.Message.PaymentLinkMetadata.IPaymentLinkProvider|null|undefined} provider
             * @memberof E2E.Message.PaymentLinkMetadata
             * @instance
             */
            PaymentLinkMetadata.prototype.provider = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * PaymentLinkMetadata _button.
             * @member {"button"|undefined} _button
             * @memberof E2E.Message.PaymentLinkMetadata
             * @instance
             */
            Object.defineProperty(PaymentLinkMetadata.prototype, "_button", {
                get: $util.oneOfGetter($oneOfFields = ["button"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PaymentLinkMetadata _header.
             * @member {"header"|undefined} _header
             * @memberof E2E.Message.PaymentLinkMetadata
             * @instance
             */
            Object.defineProperty(PaymentLinkMetadata.prototype, "_header", {
                get: $util.oneOfGetter($oneOfFields = ["header"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PaymentLinkMetadata _provider.
             * @member {"provider"|undefined} _provider
             * @memberof E2E.Message.PaymentLinkMetadata
             * @instance
             */
            Object.defineProperty(PaymentLinkMetadata.prototype, "_provider", {
                get: $util.oneOfGetter($oneOfFields = ["provider"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new PaymentLinkMetadata instance using the specified properties.
             * @function create
             * @memberof E2E.Message.PaymentLinkMetadata
             * @static
             * @param {E2E.Message.IPaymentLinkMetadata=} [properties] Properties to set
             * @returns {E2E.Message.PaymentLinkMetadata} PaymentLinkMetadata instance
             */
            PaymentLinkMetadata.create = function create(properties) {
                return new PaymentLinkMetadata(properties);
            };

            /**
             * Encodes the specified PaymentLinkMetadata message. Does not implicitly {@link E2E.Message.PaymentLinkMetadata.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.PaymentLinkMetadata
             * @static
             * @param {E2E.Message.IPaymentLinkMetadata} message PaymentLinkMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PaymentLinkMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.button != null && Object.hasOwnProperty.call(message, "button"))
                    $root.E2E.Message.PaymentLinkMetadata.PaymentLinkButton.encode(message.button, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.header != null && Object.hasOwnProperty.call(message, "header"))
                    $root.E2E.Message.PaymentLinkMetadata.PaymentLinkHeader.encode(message.header, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                if (message.provider != null && Object.hasOwnProperty.call(message, "provider"))
                    $root.E2E.Message.PaymentLinkMetadata.PaymentLinkProvider.encode(message.provider, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified PaymentLinkMetadata message, length delimited. Does not implicitly {@link E2E.Message.PaymentLinkMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.PaymentLinkMetadata
             * @static
             * @param {E2E.Message.IPaymentLinkMetadata} message PaymentLinkMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PaymentLinkMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PaymentLinkMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.PaymentLinkMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.PaymentLinkMetadata} PaymentLinkMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PaymentLinkMetadata.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.E2E.Message.PaymentLinkMetadata();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.button = $root.E2E.Message.PaymentLinkMetadata.PaymentLinkButton.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.header = $root.E2E.Message.PaymentLinkMetadata.PaymentLinkHeader.decode(reader, reader.uint32());
                            break;
                        }
                    case 3: {
                            message.provider = $root.E2E.Message.PaymentLinkMetadata.PaymentLinkProvider.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a PaymentLinkMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.PaymentLinkMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.PaymentLinkMetadata} PaymentLinkMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PaymentLinkMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PaymentLinkMetadata message.
             * @function verify
             * @memberof E2E.Message.PaymentLinkMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PaymentLinkMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.button != null && message.hasOwnProperty("button")) {
                    properties._button = 1;
                    {
                        var error = $root.E2E.Message.PaymentLinkMetadata.PaymentLinkButton.verify(message.button);
                        if (error)
                            return "button." + error;
                    }
                }
                if (message.header != null && message.hasOwnProperty("header")) {
                    properties._header = 1;
                    {
                        var error = $root.E2E.Message.PaymentLinkMetadata.PaymentLinkHeader.verify(message.header);
                        if (error)
                            return "header." + error;
                    }
                }
                if (message.provider != null && message.hasOwnProperty("provider")) {
                    properties._provider = 1;
                    {
                        var error = $root.E2E.Message.PaymentLinkMetadata.PaymentLinkProvider.verify(message.provider);
                        if (error)
                            return "provider." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a PaymentLinkMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.PaymentLinkMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.PaymentLinkMetadata} PaymentLinkMetadata
             */
            PaymentLinkMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.PaymentLinkMetadata)
                    return object;
                var message = new $root.E2E.Message.PaymentLinkMetadata();
                if (object.button != null) {
                    if (typeof object.button !== "object")
                        throw TypeError(".E2E.Message.PaymentLinkMetadata.button: object expected");
                    message.button = $root.E2E.Message.PaymentLinkMetadata.PaymentLinkButton.fromObject(object.button);
                }
                if (object.header != null) {
                    if (typeof object.header !== "object")
                        throw TypeError(".E2E.Message.PaymentLinkMetadata.header: object expected");
                    message.header = $root.E2E.Message.PaymentLinkMetadata.PaymentLinkHeader.fromObject(object.header);
                }
                if (object.provider != null) {
                    if (typeof object.provider !== "object")
                        throw TypeError(".E2E.Message.PaymentLinkMetadata.provider: object expected");
                    message.provider = $root.E2E.Message.PaymentLinkMetadata.PaymentLinkProvider.fromObject(object.provider);
                }
                return message;
            };

            /**
             * Creates a plain object from a PaymentLinkMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.PaymentLinkMetadata
             * @static
             * @param {E2E.Message.PaymentLinkMetadata} message PaymentLinkMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PaymentLinkMetadata.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.button != null && message.hasOwnProperty("button")) {
                    object.button = $root.E2E.Message.PaymentLinkMetadata.PaymentLinkButton.toObject(message.button, options);
                    if (options.oneofs)
                        object._button = "button";
                }
                if (message.header != null && message.hasOwnProperty("header")) {
                    object.header = $root.E2E.Message.PaymentLinkMetadata.PaymentLinkHeader.toObject(message.header, options);
                    if (options.oneofs)
                        object._header = "header";
                }
                if (message.provider != null && message.hasOwnProperty("provider")) {
                    object.provider = $root.E2E.Message.PaymentLinkMetadata.PaymentLinkProvider.toObject(message.provider, options);
                    if (options.oneofs)
                        object._provider = "provider";
                }
                return object;
            };

            /**
             * Converts this PaymentLinkMetadata to JSON.
             * @function toJSON
             * @memberof E2E.Message.PaymentLinkMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PaymentLinkMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for PaymentLinkMetadata
             * @function getTypeUrl
             * @memberof E2E.Message.PaymentLinkMetadata
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            PaymentLinkMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.PaymentLinkMetadata";
            };

            PaymentLinkMetadata.PaymentLinkButton = (function() {

                /**
                 * Properties of a PaymentLinkButton.
                 * @memberof E2E.Message.PaymentLinkMetadata
                 * @interface IPaymentLinkButton
                 * @property {string|null} [displayText] PaymentLinkButton displayText
                 */

                /**
                 * Constructs a new PaymentLinkButton.
                 * @memberof E2E.Message.PaymentLinkMetadata
                 * @classdesc Represents a PaymentLinkButton.
                 * @implements IPaymentLinkButton
                 * @constructor
                 * @param {E2E.Message.PaymentLinkMetadata.IPaymentLinkButton=} [properties] Properties to set
                 */
                function PaymentLinkButton(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]];
                }

                /**
                 * PaymentLinkButton displayText.
                 * @member {string|null|undefined} displayText
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkButton
                 * @instance
                 */
                PaymentLinkButton.prototype.displayText = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * PaymentLinkButton _displayText.
                 * @member {"displayText"|undefined} _displayText
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkButton
                 * @instance
                 */
                Object.defineProperty(PaymentLinkButton.prototype, "_displayText", {
                    get: $util.oneOfGetter($oneOfFields = ["displayText"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new PaymentLinkButton instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkButton
                 * @static
                 * @param {E2E.Message.PaymentLinkMetadata.IPaymentLinkButton=} [properties] Properties to set
                 * @returns {E2E.Message.PaymentLinkMetadata.PaymentLinkButton} PaymentLinkButton instance
                 */
                PaymentLinkButton.create = function create(properties) {
                    return new PaymentLinkButton(properties);
                };

                /**
                 * Encodes the specified PaymentLinkButton message. Does not implicitly {@link E2E.Message.PaymentLinkMetadata.PaymentLinkButton.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkButton
                 * @static
                 * @param {E2E.Message.PaymentLinkMetadata.IPaymentLinkButton} message PaymentLinkButton message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PaymentLinkButton.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayText);
                    return writer;
                };

                /**
                 * Encodes the specified PaymentLinkButton message, length delimited. Does not implicitly {@link E2E.Message.PaymentLinkMetadata.PaymentLinkButton.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkButton
                 * @static
                 * @param {E2E.Message.PaymentLinkMetadata.IPaymentLinkButton} message PaymentLinkButton message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PaymentLinkButton.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a PaymentLinkButton message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkButton
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.PaymentLinkMetadata.PaymentLinkButton} PaymentLinkButton
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PaymentLinkButton.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.E2E.Message.PaymentLinkMetadata.PaymentLinkButton();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.displayText = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a PaymentLinkButton message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkButton
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.PaymentLinkMetadata.PaymentLinkButton} PaymentLinkButton
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PaymentLinkButton.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a PaymentLinkButton message.
                 * @function verify
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkButton
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                PaymentLinkButton.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.displayText != null && message.hasOwnProperty("displayText")) {
                        properties._displayText = 1;
                        if (!$util.isString(message.displayText))
                            return "displayText: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a PaymentLinkButton message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkButton
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.PaymentLinkMetadata.PaymentLinkButton} PaymentLinkButton
                 */
                PaymentLinkButton.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.PaymentLinkMetadata.PaymentLinkButton)
                        return object;
                    var message = new $root.E2E.Message.PaymentLinkMetadata.PaymentLinkButton();
                    if (object.displayText != null)
                        message.displayText = String(object.displayText);
                    return message;
                };

                /**
                 * Creates a plain object from a PaymentLinkButton message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkButton
                 * @static
                 * @param {E2E.Message.PaymentLinkMetadata.PaymentLinkButton} message PaymentLinkButton
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                PaymentLinkButton.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.displayText != null && message.hasOwnProperty("displayText")) {
                        object.displayText = message.displayText;
                        if (options.oneofs)
                            object._displayText = "displayText";
                    }
                    return object;
                };

                /**
                 * Converts this PaymentLinkButton to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkButton
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                PaymentLinkButton.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for PaymentLinkButton
                 * @function getTypeUrl
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkButton
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                PaymentLinkButton.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.PaymentLinkMetadata.PaymentLinkButton";
                };

                return PaymentLinkButton;
            })();

            PaymentLinkMetadata.PaymentLinkHeader = (function() {

                /**
                 * Properties of a PaymentLinkHeader.
                 * @memberof E2E.Message.PaymentLinkMetadata
                 * @interface IPaymentLinkHeader
                 * @property {E2E.Message.PaymentLinkMetadata.PaymentLinkHeader.PaymentLinkHeaderType|null} [headerType] PaymentLinkHeader headerType
                 */

                /**
                 * Constructs a new PaymentLinkHeader.
                 * @memberof E2E.Message.PaymentLinkMetadata
                 * @classdesc Represents a PaymentLinkHeader.
                 * @implements IPaymentLinkHeader
                 * @constructor
                 * @param {E2E.Message.PaymentLinkMetadata.IPaymentLinkHeader=} [properties] Properties to set
                 */
                function PaymentLinkHeader(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]];
                }

                /**
                 * PaymentLinkHeader headerType.
                 * @member {E2E.Message.PaymentLinkMetadata.PaymentLinkHeader.PaymentLinkHeaderType|null|undefined} headerType
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkHeader
                 * @instance
                 */
                PaymentLinkHeader.prototype.headerType = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * PaymentLinkHeader _headerType.
                 * @member {"headerType"|undefined} _headerType
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkHeader
                 * @instance
                 */
                Object.defineProperty(PaymentLinkHeader.prototype, "_headerType", {
                    get: $util.oneOfGetter($oneOfFields = ["headerType"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new PaymentLinkHeader instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkHeader
                 * @static
                 * @param {E2E.Message.PaymentLinkMetadata.IPaymentLinkHeader=} [properties] Properties to set
                 * @returns {E2E.Message.PaymentLinkMetadata.PaymentLinkHeader} PaymentLinkHeader instance
                 */
                PaymentLinkHeader.create = function create(properties) {
                    return new PaymentLinkHeader(properties);
                };

                /**
                 * Encodes the specified PaymentLinkHeader message. Does not implicitly {@link E2E.Message.PaymentLinkMetadata.PaymentLinkHeader.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkHeader
                 * @static
                 * @param {E2E.Message.PaymentLinkMetadata.IPaymentLinkHeader} message PaymentLinkHeader message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PaymentLinkHeader.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.headerType != null && Object.hasOwnProperty.call(message, "headerType"))
                        writer.uint32(/* id 1, wireType 0 =*/8).int32(message.headerType);
                    return writer;
                };

                /**
                 * Encodes the specified PaymentLinkHeader message, length delimited. Does not implicitly {@link E2E.Message.PaymentLinkMetadata.PaymentLinkHeader.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkHeader
                 * @static
                 * @param {E2E.Message.PaymentLinkMetadata.IPaymentLinkHeader} message PaymentLinkHeader message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PaymentLinkHeader.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a PaymentLinkHeader message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkHeader
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.PaymentLinkMetadata.PaymentLinkHeader} PaymentLinkHeader
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PaymentLinkHeader.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.E2E.Message.PaymentLinkMetadata.PaymentLinkHeader();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.headerType = reader.int32();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a PaymentLinkHeader message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkHeader
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.PaymentLinkMetadata.PaymentLinkHeader} PaymentLinkHeader
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PaymentLinkHeader.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a PaymentLinkHeader message.
                 * @function verify
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkHeader
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                PaymentLinkHeader.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.headerType != null && message.hasOwnProperty("headerType")) {
                        properties._headerType = 1;
                        switch (message.headerType) {
                        default:
                            return "headerType: enum value expected";
                        case 0:
                        case 1:
                            break;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a PaymentLinkHeader message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkHeader
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.PaymentLinkMetadata.PaymentLinkHeader} PaymentLinkHeader
                 */
                PaymentLinkHeader.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.PaymentLinkMetadata.PaymentLinkHeader)
                        return object;
                    var message = new $root.E2E.Message.PaymentLinkMetadata.PaymentLinkHeader();
                    switch (object.headerType) {
                    default:
                        if (typeof object.headerType === "number") {
                            message.headerType = object.headerType;
                            break;
                        }
                        break;
                    case "LINK_PREVIEW":
                    case 0:
                        message.headerType = 0;
                        break;
                    case "ORDER":
                    case 1:
                        message.headerType = 1;
                        break;
                    }
                    return message;
                };

                /**
                 * Creates a plain object from a PaymentLinkHeader message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkHeader
                 * @static
                 * @param {E2E.Message.PaymentLinkMetadata.PaymentLinkHeader} message PaymentLinkHeader
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                PaymentLinkHeader.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.headerType != null && message.hasOwnProperty("headerType")) {
                        object.headerType = options.enums === String ? $root.E2E.Message.PaymentLinkMetadata.PaymentLinkHeader.PaymentLinkHeaderType[message.headerType] === undefined ? message.headerType : $root.E2E.Message.PaymentLinkMetadata.PaymentLinkHeader.PaymentLinkHeaderType[message.headerType] : message.headerType;
                        if (options.oneofs)
                            object._headerType = "headerType";
                    }
                    return object;
                };

                /**
                 * Converts this PaymentLinkHeader to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkHeader
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                PaymentLinkHeader.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for PaymentLinkHeader
                 * @function getTypeUrl
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkHeader
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                PaymentLinkHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.PaymentLinkMetadata.PaymentLinkHeader";
                };

                /**
                 * PaymentLinkHeaderType enum.
                 * @name E2E.Message.PaymentLinkMetadata.PaymentLinkHeader.PaymentLinkHeaderType
                 * @enum {number}
                 * @property {number} LINK_PREVIEW=0 LINK_PREVIEW value
                 * @property {number} ORDER=1 ORDER value
                 */
                PaymentLinkHeader.PaymentLinkHeaderType = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "LINK_PREVIEW"] = 0;
                    values[valuesById[1] = "ORDER"] = 1;
                    return values;
                })();

                return PaymentLinkHeader;
            })();

            PaymentLinkMetadata.PaymentLinkProvider = (function() {

                /**
                 * Properties of a PaymentLinkProvider.
                 * @memberof E2E.Message.PaymentLinkMetadata
                 * @interface IPaymentLinkProvider
                 * @property {string|null} [paramsJson] PaymentLinkProvider paramsJson
                 */

                /**
                 * Constructs a new PaymentLinkProvider.
                 * @memberof E2E.Message.PaymentLinkMetadata
                 * @classdesc Represents a PaymentLinkProvider.
                 * @implements IPaymentLinkProvider
                 * @constructor
                 * @param {E2E.Message.PaymentLinkMetadata.IPaymentLinkProvider=} [properties] Properties to set
                 */
                function PaymentLinkProvider(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]];
                }

                /**
                 * PaymentLinkProvider paramsJson.
                 * @member {string|null|undefined} paramsJson
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkProvider
                 * @instance
                 */
                PaymentLinkProvider.prototype.paramsJson = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * PaymentLinkProvider _paramsJson.
                 * @member {"paramsJson"|undefined} _paramsJson
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkProvider
                 * @instance
                 */
                Object.defineProperty(PaymentLinkProvider.prototype, "_paramsJson", {
                    get: $util.oneOfGetter($oneOfFields = ["paramsJson"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new PaymentLinkProvider instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkProvider
                 * @static
                 * @param {E2E.Message.PaymentLinkMetadata.IPaymentLinkProvider=} [properties] Properties to set
                 * @returns {E2E.Message.PaymentLinkMetadata.PaymentLinkProvider} PaymentLinkProvider instance
                 */
                PaymentLinkProvider.create = function create(properties) {
                    return new PaymentLinkProvider(properties);
                };

                /**
                 * Encodes the specified PaymentLinkProvider message. Does not implicitly {@link E2E.Message.PaymentLinkMetadata.PaymentLinkProvider.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkProvider
                 * @static
                 * @param {E2E.Message.PaymentLinkMetadata.IPaymentLinkProvider} message PaymentLinkProvider message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PaymentLinkProvider.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.paramsJson != null && Object.hasOwnProperty.call(message, "paramsJson"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.paramsJson);
                    return writer;
                };

                /**
                 * Encodes the specified PaymentLinkProvider message, length delimited. Does not implicitly {@link E2E.Message.PaymentLinkMetadata.PaymentLinkProvider.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkProvider
                 * @static
                 * @param {E2E.Message.PaymentLinkMetadata.IPaymentLinkProvider} message PaymentLinkProvider message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PaymentLinkProvider.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a PaymentLinkProvider message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkProvider
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.PaymentLinkMetadata.PaymentLinkProvider} PaymentLinkProvider
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PaymentLinkProvider.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.E2E.Message.PaymentLinkMetadata.PaymentLinkProvider();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.paramsJson = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a PaymentLinkProvider message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkProvider
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.PaymentLinkMetadata.PaymentLinkProvider} PaymentLinkProvider
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PaymentLinkProvider.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a PaymentLinkProvider message.
                 * @function verify
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkProvider
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                PaymentLinkProvider.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) {
                        properties._paramsJson = 1;
                        if (!$util.isString(message.paramsJson))
                            return "paramsJson: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a PaymentLinkProvider message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkProvider
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.PaymentLinkMetadata.PaymentLinkProvider} PaymentLinkProvider
                 */
                PaymentLinkProvider.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.PaymentLinkMetadata.PaymentLinkProvider)
                        return object;
                    var message = new $root.E2E.Message.PaymentLinkMetadata.PaymentLinkProvider();
                    if (object.paramsJson != null)
                        message.paramsJson = String(object.paramsJson);
                    return message;
                };

                /**
                 * Creates a plain object from a PaymentLinkProvider message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkProvider
                 * @static
                 * @param {E2E.Message.PaymentLinkMetadata.PaymentLinkProvider} message PaymentLinkProvider
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                PaymentLinkProvider.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) {
                        object.paramsJson = message.paramsJson;
                        if (options.oneofs)
                            object._paramsJson = "paramsJson";
                    }
                    return object;
                };

                /**
                 * Converts this PaymentLinkProvider to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkProvider
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                PaymentLinkProvider.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for PaymentLinkProvider
                 * @function getTypeUrl
                 * @memberof E2E.Message.PaymentLinkMetadata.PaymentLinkProvider
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                PaymentLinkProvider.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.PaymentLinkMetadata.PaymentLinkProvider";
                };

                return PaymentLinkProvider;
            })();

            return PaymentLinkMetadata;
        })();

        Message.PeerDataOperationRequestMessage = (function() {

            /**
             * Properties of a PeerDataOperationRequestMessage.
             * @memberof E2E.Message
             * @interface IPeerDataOperationRequestMessage
             * @property {E2E.Message.PeerDataOperationRequestType|null} [peerDataOperationRequestType] PeerDataOperationRequestMessage peerDataOperationRequestType
             * @property {Array.<E2E.Message.PeerDataOperationRequestMessage.IRequestStickerReupload>|null} [requestStickerReupload] PeerDataOperationRequestMessage requestStickerReupload
             * @property {Array.<E2E.Message.PeerDataOperationRequestMessage.IRequestUrlPreview>|null} [requestUrlPreview] PeerDataOperationRequestMessage requestUrlPreview
             * @property {E2E.Message.PeerDataOperationRequestMessage.IHistorySyncOnDemandRequest|null} [historySyncOnDemandRequest] PeerDataOperationRequestMessage historySyncOnDemandRequest
             * @property {Array.<E2E.Message.PeerDataOperationRequestMessage.IPlaceholderMessageResendRequest>|null} [placeholderMessageResendRequest] PeerDataOperationRequestMessage placeholderMessageResendRequest
             * @property {E2E.Message.PeerDataOperationRequestMessage.IFullHistorySyncOnDemandRequest|null} [fullHistorySyncOnDemandRequest] PeerDataOperationRequestMessage fullHistorySyncOnDemandRequest
             * @property {E2E.Message.PeerDataOperationRequestMessage.ISyncDCollectionFatalRecoveryRequest|null} [syncdCollectionFatalRecoveryRequest] PeerDataOperationRequestMessage syncdCollectionFatalRecoveryRequest
             * @property {E2E.Message.PeerDataOperationRequestMessage.IHistorySyncChunkRetryRequest|null} [historySyncChunkRetryRequest] PeerDataOperationRequestMessage historySyncChunkRetryRequest
             * @property {E2E.Message.PeerDataOperationRequestMessage.IGalaxyFlowAction|null} [galaxyFlowAction] PeerDataOperationRequestMessage galaxyFlowAction
             */

            /**
             * Constructs a new PeerDataOperationRequestMessage.
             * @memberof E2E.Message
             * @classdesc Represents a PeerDataOperationRequestMessage.
             * @implements IPeerDataOperationRequestMessage
             * @constructor
             * @param {E2E.Message.IPeerDataOperationRequestMessage=} [properties] Properties to set
             */
            function PeerDataOperationRequestMessage(properties) {
                this.requestStickerReupload = [];
                this.requestUrlPreview = [];
                this.placeholderMessageResendRequest = [];
                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]];
            }

            /**
             * PeerDataOperationRequestMessage peerDataOperationRequestType.
             * @member {E2E.Message.PeerDataOperationRequestType|null|undefined} peerDataOperationRequestType
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @instance
             */
            PeerDataOperationRequestMessage.prototype.peerDataOperationRequestType = null;

            /**
             * PeerDataOperationRequestMessage requestStickerReupload.
             * @member {Array.<E2E.Message.PeerDataOperationRequestMessage.IRequestStickerReupload>} requestStickerReupload
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @instance
             */
            PeerDataOperationRequestMessage.prototype.requestStickerReupload = $util.emptyArray;

            /**
             * PeerDataOperationRequestMessage requestUrlPreview.
             * @member {Array.<E2E.Message.PeerDataOperationRequestMessage.IRequestUrlPreview>} requestUrlPreview
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @instance
             */
            PeerDataOperationRequestMessage.prototype.requestUrlPreview = $util.emptyArray;

            /**
             * PeerDataOperationRequestMessage historySyncOnDemandRequest.
             * @member {E2E.Message.PeerDataOperationRequestMessage.IHistorySyncOnDemandRequest|null|undefined} historySyncOnDemandRequest
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @instance
             */
            PeerDataOperationRequestMessage.prototype.historySyncOnDemandRequest = null;

            /**
             * PeerDataOperationRequestMessage placeholderMessageResendRequest.
             * @member {Array.<E2E.Message.PeerDataOperationRequestMessage.IPlaceholderMessageResendRequest>} placeholderMessageResendRequest
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @instance
             */
            PeerDataOperationRequestMessage.prototype.placeholderMessageResendRequest = $util.emptyArray;

            /**
             * PeerDataOperationRequestMessage fullHistorySyncOnDemandRequest.
             * @member {E2E.Message.PeerDataOperationRequestMessage.IFullHistorySyncOnDemandRequest|null|undefined} fullHistorySyncOnDemandRequest
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @instance
             */
            PeerDataOperationRequestMessage.prototype.fullHistorySyncOnDemandRequest = null;

            /**
             * PeerDataOperationRequestMessage syncdCollectionFatalRecoveryRequest.
             * @member {E2E.Message.PeerDataOperationRequestMessage.ISyncDCollectionFatalRecoveryRequest|null|undefined} syncdCollectionFatalRecoveryRequest
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @instance
             */
            PeerDataOperationRequestMessage.prototype.syncdCollectionFatalRecoveryRequest = null;

            /**
             * PeerDataOperationRequestMessage historySyncChunkRetryRequest.
             * @member {E2E.Message.PeerDataOperationRequestMessage.IHistorySyncChunkRetryRequest|null|undefined} historySyncChunkRetryRequest
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @instance
             */
            PeerDataOperationRequestMessage.prototype.historySyncChunkRetryRequest = null;

            /**
             * PeerDataOperationRequestMessage galaxyFlowAction.
             * @member {E2E.Message.PeerDataOperationRequestMessage.IGalaxyFlowAction|null|undefined} galaxyFlowAction
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @instance
             */
            PeerDataOperationRequestMessage.prototype.galaxyFlowAction = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * PeerDataOperationRequestMessage _peerDataOperationRequestType.
             * @member {"peerDataOperationRequestType"|undefined} _peerDataOperationRequestType
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @instance
             */
            Object.defineProperty(PeerDataOperationRequestMessage.prototype, "_peerDataOperationRequestType", {
                get: $util.oneOfGetter($oneOfFields = ["peerDataOperationRequestType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PeerDataOperationRequestMessage _historySyncOnDemandRequest.
             * @member {"historySyncOnDemandRequest"|undefined} _historySyncOnDemandRequest
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @instance
             */
            Object.defineProperty(PeerDataOperationRequestMessage.prototype, "_historySyncOnDemandRequest", {
                get: $util.oneOfGetter($oneOfFields = ["historySyncOnDemandRequest"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PeerDataOperationRequestMessage _fullHistorySyncOnDemandRequest.
             * @member {"fullHistorySyncOnDemandRequest"|undefined} _fullHistorySyncOnDemandRequest
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @instance
             */
            Object.defineProperty(PeerDataOperationRequestMessage.prototype, "_fullHistorySyncOnDemandRequest", {
                get: $util.oneOfGetter($oneOfFields = ["fullHistorySyncOnDemandRequest"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PeerDataOperationRequestMessage _syncdCollectionFatalRecoveryRequest.
             * @member {"syncdCollectionFatalRecoveryRequest"|undefined} _syncdCollectionFatalRecoveryRequest
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @instance
             */
            Object.defineProperty(PeerDataOperationRequestMessage.prototype, "_syncdCollectionFatalRecoveryRequest", {
                get: $util.oneOfGetter($oneOfFields = ["syncdCollectionFatalRecoveryRequest"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PeerDataOperationRequestMessage _historySyncChunkRetryRequest.
             * @member {"historySyncChunkRetryRequest"|undefined} _historySyncChunkRetryRequest
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @instance
             */
            Object.defineProperty(PeerDataOperationRequestMessage.prototype, "_historySyncChunkRetryRequest", {
                get: $util.oneOfGetter($oneOfFields = ["historySyncChunkRetryRequest"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PeerDataOperationRequestMessage _galaxyFlowAction.
             * @member {"galaxyFlowAction"|undefined} _galaxyFlowAction
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @instance
             */
            Object.defineProperty(PeerDataOperationRequestMessage.prototype, "_galaxyFlowAction", {
                get: $util.oneOfGetter($oneOfFields = ["galaxyFlowAction"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new PeerDataOperationRequestMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @static
             * @param {E2E.Message.IPeerDataOperationRequestMessage=} [properties] Properties to set
             * @returns {E2E.Message.PeerDataOperationRequestMessage} PeerDataOperationRequestMessage instance
             */
            PeerDataOperationRequestMessage.create = function create(properties) {
                return new PeerDataOperationRequestMessage(properties);
            };

            /**
             * Encodes the specified PeerDataOperationRequestMessage message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @static
             * @param {E2E.Message.IPeerDataOperationRequestMessage} message PeerDataOperationRequestMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PeerDataOperationRequestMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.peerDataOperationRequestType != null && Object.hasOwnProperty.call(message, "peerDataOperationRequestType"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.peerDataOperationRequestType);
                if (message.requestStickerReupload != null && message.requestStickerReupload.length)
                    for (var i = 0; i < message.requestStickerReupload.length; ++i)
                        $root.E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload.encode(message.requestStickerReupload[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                if (message.requestUrlPreview != null && message.requestUrlPreview.length)
                    for (var i = 0; i < message.requestUrlPreview.length; ++i)
                        $root.E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview.encode(message.requestUrlPreview[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                if (message.historySyncOnDemandRequest != null && Object.hasOwnProperty.call(message, "historySyncOnDemandRequest"))
                    $root.E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest.encode(message.historySyncOnDemandRequest, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                if (message.placeholderMessageResendRequest != null && message.placeholderMessageResendRequest.length)
                    for (var i = 0; i < message.placeholderMessageResendRequest.length; ++i)
                        $root.E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest.encode(message.placeholderMessageResendRequest[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                if (message.fullHistorySyncOnDemandRequest != null && Object.hasOwnProperty.call(message, "fullHistorySyncOnDemandRequest"))
                    $root.E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.encode(message.fullHistorySyncOnDemandRequest, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                if (message.syncdCollectionFatalRecoveryRequest != null && Object.hasOwnProperty.call(message, "syncdCollectionFatalRecoveryRequest"))
                    $root.E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest.encode(message.syncdCollectionFatalRecoveryRequest, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                if (message.historySyncChunkRetryRequest != null && Object.hasOwnProperty.call(message, "historySyncChunkRetryRequest"))
                    $root.E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest.encode(message.historySyncChunkRetryRequest, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                if (message.galaxyFlowAction != null && Object.hasOwnProperty.call(message, "galaxyFlowAction"))
                    $root.E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction.encode(message.galaxyFlowAction, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified PeerDataOperationRequestMessage message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @static
             * @param {E2E.Message.IPeerDataOperationRequestMessage} message PeerDataOperationRequestMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PeerDataOperationRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PeerDataOperationRequestMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.PeerDataOperationRequestMessage} PeerDataOperationRequestMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PeerDataOperationRequestMessage.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.E2E.Message.PeerDataOperationRequestMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.peerDataOperationRequestType = reader.int32();
                            break;
                        }
                    case 2: {
                            if (!(message.requestStickerReupload && message.requestStickerReupload.length))
                                message.requestStickerReupload = [];
                            message.requestStickerReupload.push($root.E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload.decode(reader, reader.uint32()));
                            break;
                        }
                    case 3: {
                            if (!(message.requestUrlPreview && message.requestUrlPreview.length))
                                message.requestUrlPreview = [];
                            message.requestUrlPreview.push($root.E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview.decode(reader, reader.uint32()));
                            break;
                        }
                    case 4: {
                            message.historySyncOnDemandRequest = $root.E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest.decode(reader, reader.uint32());
                            break;
                        }
                    case 5: {
                            if (!(message.placeholderMessageResendRequest && message.placeholderMessageResendRequest.length))
                                message.placeholderMessageResendRequest = [];
                            message.placeholderMessageResendRequest.push($root.E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest.decode(reader, reader.uint32()));
                            break;
                        }
                    case 6: {
                            message.fullHistorySyncOnDemandRequest = $root.E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.decode(reader, reader.uint32());
                            break;
                        }
                    case 7: {
                            message.syncdCollectionFatalRecoveryRequest = $root.E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest.decode(reader, reader.uint32());
                            break;
                        }
                    case 8: {
                            message.historySyncChunkRetryRequest = $root.E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest.decode(reader, reader.uint32());
                            break;
                        }
                    case 9: {
                            message.galaxyFlowAction = $root.E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a PeerDataOperationRequestMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.PeerDataOperationRequestMessage} PeerDataOperationRequestMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PeerDataOperationRequestMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PeerDataOperationRequestMessage message.
             * @function verify
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PeerDataOperationRequestMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.peerDataOperationRequestType != null && message.hasOwnProperty("peerDataOperationRequestType")) {
                    properties._peerDataOperationRequestType = 1;
                    switch (message.peerDataOperationRequestType) {
                    default:
                        return "peerDataOperationRequestType: 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:
                    case 11:
                        break;
                    }
                }
                if (message.requestStickerReupload != null && message.hasOwnProperty("requestStickerReupload")) {
                    if (!Array.isArray(message.requestStickerReupload))
                        return "requestStickerReupload: array expected";
                    for (var i = 0; i < message.requestStickerReupload.length; ++i) {
                        var error = $root.E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload.verify(message.requestStickerReupload[i]);
                        if (error)
                            return "requestStickerReupload." + error;
                    }
                }
                if (message.requestUrlPreview != null && message.hasOwnProperty("requestUrlPreview")) {
                    if (!Array.isArray(message.requestUrlPreview))
                        return "requestUrlPreview: array expected";
                    for (var i = 0; i < message.requestUrlPreview.length; ++i) {
                        var error = $root.E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview.verify(message.requestUrlPreview[i]);
                        if (error)
                            return "requestUrlPreview." + error;
                    }
                }
                if (message.historySyncOnDemandRequest != null && message.hasOwnProperty("historySyncOnDemandRequest")) {
                    properties._historySyncOnDemandRequest = 1;
                    {
                        var error = $root.E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest.verify(message.historySyncOnDemandRequest);
                        if (error)
                            return "historySyncOnDemandRequest." + error;
                    }
                }
                if (message.placeholderMessageResendRequest != null && message.hasOwnProperty("placeholderMessageResendRequest")) {
                    if (!Array.isArray(message.placeholderMessageResendRequest))
                        return "placeholderMessageResendRequest: array expected";
                    for (var i = 0; i < message.placeholderMessageResendRequest.length; ++i) {
                        var error = $root.E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest.verify(message.placeholderMessageResendRequest[i]);
                        if (error)
                            return "placeholderMessageResendRequest." + error;
                    }
                }
                if (message.fullHistorySyncOnDemandRequest != null && message.hasOwnProperty("fullHistorySyncOnDemandRequest")) {
                    properties._fullHistorySyncOnDemandRequest = 1;
                    {
                        var error = $root.E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.verify(message.fullHistorySyncOnDemandRequest);
                        if (error)
                            return "fullHistorySyncOnDemandRequest." + error;
                    }
                }
                if (message.syncdCollectionFatalRecoveryRequest != null && message.hasOwnProperty("syncdCollectionFatalRecoveryRequest")) {
                    properties._syncdCollectionFatalRecoveryRequest = 1;
                    {
                        var error = $root.E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest.verify(message.syncdCollectionFatalRecoveryRequest);
                        if (error)
                            return "syncdCollectionFatalRecoveryRequest." + error;
                    }
                }
                if (message.historySyncChunkRetryRequest != null && message.hasOwnProperty("historySyncChunkRetryRequest")) {
                    properties._historySyncChunkRetryRequest = 1;
                    {
                        var error = $root.E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest.verify(message.historySyncChunkRetryRequest);
                        if (error)
                            return "historySyncChunkRetryRequest." + error;
                    }
                }
                if (message.galaxyFlowAction != null && message.hasOwnProperty("galaxyFlowAction")) {
                    properties._galaxyFlowAction = 1;
                    {
                        var error = $root.E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction.verify(message.galaxyFlowAction);
                        if (error)
                            return "galaxyFlowAction." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a PeerDataOperationRequestMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.PeerDataOperationRequestMessage} PeerDataOperationRequestMessage
             */
            PeerDataOperationRequestMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.PeerDataOperationRequestMessage)
                    return object;
                var message = new $root.E2E.Message.PeerDataOperationRequestMessage();
                switch (object.peerDataOperationRequestType) {
                default:
                    if (typeof object.peerDataOperationRequestType === "number") {
                        message.peerDataOperationRequestType = object.peerDataOperationRequestType;
                        break;
                    }
                    break;
                case "UPLOAD_STICKER":
                case 0:
                    message.peerDataOperationRequestType = 0;
                    break;
                case "SEND_RECENT_STICKER_BOOTSTRAP":
                case 1:
                    message.peerDataOperationRequestType = 1;
                    break;
                case "GENERATE_LINK_PREVIEW":
                case 2:
                    message.peerDataOperationRequestType = 2;
                    break;
                case "HISTORY_SYNC_ON_DEMAND":
                case 3:
                    message.peerDataOperationRequestType = 3;
                    break;
                case "PLACEHOLDER_MESSAGE_RESEND":
                case 4:
                    message.peerDataOperationRequestType = 4;
                    break;
                case "WAFFLE_LINKING_NONCE_FETCH":
                case 5:
                    message.peerDataOperationRequestType = 5;
                    break;
                case "FULL_HISTORY_SYNC_ON_DEMAND":
                case 6:
                    message.peerDataOperationRequestType = 6;
                    break;
                case "COMPANION_META_NONCE_FETCH":
                case 7:
                    message.peerDataOperationRequestType = 7;
                    break;
                case "COMPANION_SYNCD_SNAPSHOT_FATAL_RECOVERY":
                case 8:
                    message.peerDataOperationRequestType = 8;
                    break;
                case "COMPANION_CANONICAL_USER_NONCE_FETCH":
                case 9:
                    message.peerDataOperationRequestType = 9;
                    break;
                case "HISTORY_SYNC_CHUNK_RETRY":
                case 10:
                    message.peerDataOperationRequestType = 10;
                    break;
                case "GALAXY_FLOW_ACTION":
                case 11:
                    message.peerDataOperationRequestType = 11;
                    break;
                }
                if (object.requestStickerReupload) {
                    if (!Array.isArray(object.requestStickerReupload))
                        throw TypeError(".E2E.Message.PeerDataOperationRequestMessage.requestStickerReupload: array expected");
                    message.requestStickerReupload = [];
                    for (var i = 0; i < object.requestStickerReupload.length; ++i) {
                        if (typeof object.requestStickerReupload[i] !== "object")
                            throw TypeError(".E2E.Message.PeerDataOperationRequestMessage.requestStickerReupload: object expected");
                        message.requestStickerReupload[i] = $root.E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload.fromObject(object.requestStickerReupload[i]);
                    }
                }
                if (object.requestUrlPreview) {
                    if (!Array.isArray(object.requestUrlPreview))
                        throw TypeError(".E2E.Message.PeerDataOperationRequestMessage.requestUrlPreview: array expected");
                    message.requestUrlPreview = [];
                    for (var i = 0; i < object.requestUrlPreview.length; ++i) {
                        if (typeof object.requestUrlPreview[i] !== "object")
                            throw TypeError(".E2E.Message.PeerDataOperationRequestMessage.requestUrlPreview: object expected");
                        message.requestUrlPreview[i] = $root.E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview.fromObject(object.requestUrlPreview[i]);
                    }
                }
                if (object.historySyncOnDemandRequest != null) {
                    if (typeof object.historySyncOnDemandRequest !== "object")
                        throw TypeError(".E2E.Message.PeerDataOperationRequestMessage.historySyncOnDemandRequest: object expected");
                    message.historySyncOnDemandRequest = $root.E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest.fromObject(object.historySyncOnDemandRequest);
                }
                if (object.placeholderMessageResendRequest) {
                    if (!Array.isArray(object.placeholderMessageResendRequest))
                        throw TypeError(".E2E.Message.PeerDataOperationRequestMessage.placeholderMessageResendRequest: array expected");
                    message.placeholderMessageResendRequest = [];
                    for (var i = 0; i < object.placeholderMessageResendRequest.length; ++i) {
                        if (typeof object.placeholderMessageResendRequest[i] !== "object")
                            throw TypeError(".E2E.Message.PeerDataOperationRequestMessage.placeholderMessageResendRequest: object expected");
                        message.placeholderMessageResendRequest[i] = $root.E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest.fromObject(object.placeholderMessageResendRequest[i]);
                    }
                }
                if (object.fullHistorySyncOnDemandRequest != null) {
                    if (typeof object.fullHistorySyncOnDemandRequest !== "object")
                        throw TypeError(".E2E.Message.PeerDataOperationRequestMessage.fullHistorySyncOnDemandRequest: object expected");
                    message.fullHistorySyncOnDemandRequest = $root.E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.fromObject(object.fullHistorySyncOnDemandRequest);
                }
                if (object.syncdCollectionFatalRecoveryRequest != null) {
                    if (typeof object.syncdCollectionFatalRecoveryRequest !== "object")
                        throw TypeError(".E2E.Message.PeerDataOperationRequestMessage.syncdCollectionFatalRecoveryRequest: object expected");
                    message.syncdCollectionFatalRecoveryRequest = $root.E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest.fromObject(object.syncdCollectionFatalRecoveryRequest);
                }
                if (object.historySyncChunkRetryRequest != null) {
                    if (typeof object.historySyncChunkRetryRequest !== "object")
                        throw TypeError(".E2E.Message.PeerDataOperationRequestMessage.historySyncChunkRetryRequest: object expected");
                    message.historySyncChunkRetryRequest = $root.E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest.fromObject(object.historySyncChunkRetryRequest);
                }
                if (object.galaxyFlowAction != null) {
                    if (typeof object.galaxyFlowAction !== "object")
                        throw TypeError(".E2E.Message.PeerDataOperationRequestMessage.galaxyFlowAction: object expected");
                    message.galaxyFlowAction = $root.E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction.fromObject(object.galaxyFlowAction);
                }
                return message;
            };

            /**
             * Creates a plain object from a PeerDataOperationRequestMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @static
             * @param {E2E.Message.PeerDataOperationRequestMessage} message PeerDataOperationRequestMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PeerDataOperationRequestMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults) {
                    object.requestStickerReupload = [];
                    object.requestUrlPreview = [];
                    object.placeholderMessageResendRequest = [];
                }
                if (message.peerDataOperationRequestType != null && message.hasOwnProperty("peerDataOperationRequestType")) {
                    object.peerDataOperationRequestType = options.enums === String ? $root.E2E.Message.PeerDataOperationRequestType[message.peerDataOperationRequestType] === undefined ? message.peerDataOperationRequestType : $root.E2E.Message.PeerDataOperationRequestType[message.peerDataOperationRequestType] : message.peerDataOperationRequestType;
                    if (options.oneofs)
                        object._peerDataOperationRequestType = "peerDataOperationRequestType";
                }
                if (message.requestStickerReupload && message.requestStickerReupload.length) {
                    object.requestStickerReupload = [];
                    for (var j = 0; j < message.requestStickerReupload.length; ++j)
                        object.requestStickerReupload[j] = $root.E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload.toObject(message.requestStickerReupload[j], options);
                }
                if (message.requestUrlPreview && message.requestUrlPreview.length) {
                    object.requestUrlPreview = [];
                    for (var j = 0; j < message.requestUrlPreview.length; ++j)
                        object.requestUrlPreview[j] = $root.E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview.toObject(message.requestUrlPreview[j], options);
                }
                if (message.historySyncOnDemandRequest != null && message.hasOwnProperty("historySyncOnDemandRequest")) {
                    object.historySyncOnDemandRequest = $root.E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest.toObject(message.historySyncOnDemandRequest, options);
                    if (options.oneofs)
                        object._historySyncOnDemandRequest = "historySyncOnDemandRequest";
                }
                if (message.placeholderMessageResendRequest && message.placeholderMessageResendRequest.length) {
                    object.placeholderMessageResendRequest = [];
                    for (var j = 0; j < message.placeholderMessageResendRequest.length; ++j)
                        object.placeholderMessageResendRequest[j] = $root.E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest.toObject(message.placeholderMessageResendRequest[j], options);
                }
                if (message.fullHistorySyncOnDemandRequest != null && message.hasOwnProperty("fullHistorySyncOnDemandRequest")) {
                    object.fullHistorySyncOnDemandRequest = $root.E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.toObject(message.fullHistorySyncOnDemandRequest, options);
                    if (options.oneofs)
                        object._fullHistorySyncOnDemandRequest = "fullHistorySyncOnDemandRequest";
                }
                if (message.syncdCollectionFatalRecoveryRequest != null && message.hasOwnProperty("syncdCollectionFatalRecoveryRequest")) {
                    object.syncdCollectionFatalRecoveryRequest = $root.E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest.toObject(message.syncdCollectionFatalRecoveryRequest, options);
                    if (options.oneofs)
                        object._syncdCollectionFatalRecoveryRequest = "syncdCollectionFatalRecoveryRequest";
                }
                if (message.historySyncChunkRetryRequest != null && message.hasOwnProperty("historySyncChunkRetryRequest")) {
                    object.historySyncChunkRetryRequest = $root.E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest.toObject(message.historySyncChunkRetryRequest, options);
                    if (options.oneofs)
                        object._historySyncChunkRetryRequest = "historySyncChunkRetryRequest";
                }
                if (message.galaxyFlowAction != null && message.hasOwnProperty("galaxyFlowAction")) {
                    object.galaxyFlowAction = $root.E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction.toObject(message.galaxyFlowAction, options);
                    if (options.oneofs)
                        object._galaxyFlowAction = "galaxyFlowAction";
                }
                return object;
            };

            /**
             * Converts this PeerDataOperationRequestMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PeerDataOperationRequestMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for PeerDataOperationRequestMessage
             * @function getTypeUrl
             * @memberof E2E.Message.PeerDataOperationRequestMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            PeerDataOperationRequestMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestMessage";
            };

            PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest = (function() {

                /**
                 * Properties of a FullHistorySyncOnDemandRequest.
                 * @memberof E2E.Message.PeerDataOperationRequestMessage
                 * @interface IFullHistorySyncOnDemandRequest
                 * @property {E2E.Message.IFullHistorySyncOnDemandRequestMetadata|null} [requestMetadata] FullHistorySyncOnDemandRequest requestMetadata
                 * @property {CompanionReg.DeviceProps.IHistorySyncConfig|null} [historySyncConfig] FullHistorySyncOnDemandRequest historySyncConfig
                 */

                /**
                 * Constructs a new FullHistorySyncOnDemandRequest.
                 * @memberof E2E.Message.PeerDataOperationRequestMessage
                 * @classdesc Represents a FullHistorySyncOnDemandRequest.
                 * @implements IFullHistorySyncOnDemandRequest
                 * @constructor
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IFullHistorySyncOnDemandRequest=} [properties] Properties to set
                 */
                function FullHistorySyncOnDemandRequest(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]];
                }

                /**
                 * FullHistorySyncOnDemandRequest requestMetadata.
                 * @member {E2E.Message.IFullHistorySyncOnDemandRequestMetadata|null|undefined} requestMetadata
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest
                 * @instance
                 */
                FullHistorySyncOnDemandRequest.prototype.requestMetadata = null;

                /**
                 * FullHistorySyncOnDemandRequest historySyncConfig.
                 * @member {CompanionReg.DeviceProps.IHistorySyncConfig|null|undefined} historySyncConfig
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest
                 * @instance
                 */
                FullHistorySyncOnDemandRequest.prototype.historySyncConfig = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * FullHistorySyncOnDemandRequest _requestMetadata.
                 * @member {"requestMetadata"|undefined} _requestMetadata
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest
                 * @instance
                 */
                Object.defineProperty(FullHistorySyncOnDemandRequest.prototype, "_requestMetadata", {
                    get: $util.oneOfGetter($oneOfFields = ["requestMetadata"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * FullHistorySyncOnDemandRequest _historySyncConfig.
                 * @member {"historySyncConfig"|undefined} _historySyncConfig
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest
                 * @instance
                 */
                Object.defineProperty(FullHistorySyncOnDemandRequest.prototype, "_historySyncConfig", {
                    get: $util.oneOfGetter($oneOfFields = ["historySyncConfig"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new FullHistorySyncOnDemandRequest instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IFullHistorySyncOnDemandRequest=} [properties] Properties to set
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest} FullHistorySyncOnDemandRequest instance
                 */
                FullHistorySyncOnDemandRequest.create = function create(properties) {
                    return new FullHistorySyncOnDemandRequest(properties);
                };

                /**
                 * Encodes the specified FullHistorySyncOnDemandRequest message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IFullHistorySyncOnDemandRequest} message FullHistorySyncOnDemandRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FullHistorySyncOnDemandRequest.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.requestMetadata != null && Object.hasOwnProperty.call(message, "requestMetadata"))
                        $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.encode(message.requestMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    if (message.historySyncConfig != null && Object.hasOwnProperty.call(message, "historySyncConfig"))
                        $root.CompanionReg.DeviceProps.HistorySyncConfig.encode(message.historySyncConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    return writer;
                };

                /**
                 * Encodes the specified FullHistorySyncOnDemandRequest message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IFullHistorySyncOnDemandRequest} message FullHistorySyncOnDemandRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FullHistorySyncOnDemandRequest.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a FullHistorySyncOnDemandRequest message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest} FullHistorySyncOnDemandRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FullHistorySyncOnDemandRequest.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.E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.requestMetadata = $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.decode(reader, reader.uint32());
                                break;
                            }
                        case 2: {
                                message.historySyncConfig = $root.CompanionReg.DeviceProps.HistorySyncConfig.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a FullHistorySyncOnDemandRequest message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest} FullHistorySyncOnDemandRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FullHistorySyncOnDemandRequest.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a FullHistorySyncOnDemandRequest message.
                 * @function verify
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                FullHistorySyncOnDemandRequest.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.requestMetadata != null && message.hasOwnProperty("requestMetadata")) {
                        properties._requestMetadata = 1;
                        {
                            var error = $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.verify(message.requestMetadata);
                            if (error)
                                return "requestMetadata." + error;
                        }
                    }
                    if (message.historySyncConfig != null && message.hasOwnProperty("historySyncConfig")) {
                        properties._historySyncConfig = 1;
                        {
                            var error = $root.CompanionReg.DeviceProps.HistorySyncConfig.verify(message.historySyncConfig);
                            if (error)
                                return "historySyncConfig." + error;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a FullHistorySyncOnDemandRequest message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest} FullHistorySyncOnDemandRequest
                 */
                FullHistorySyncOnDemandRequest.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest)
                        return object;
                    var message = new $root.E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest();
                    if (object.requestMetadata != null) {
                        if (typeof object.requestMetadata !== "object")
                            throw TypeError(".E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.requestMetadata: object expected");
                        message.requestMetadata = $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.fromObject(object.requestMetadata);
                    }
                    if (object.historySyncConfig != null) {
                        if (typeof object.historySyncConfig !== "object")
                            throw TypeError(".E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.historySyncConfig: object expected");
                        message.historySyncConfig = $root.CompanionReg.DeviceProps.HistorySyncConfig.fromObject(object.historySyncConfig);
                    }
                    return message;
                };

                /**
                 * Creates a plain object from a FullHistorySyncOnDemandRequest message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest} message FullHistorySyncOnDemandRequest
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                FullHistorySyncOnDemandRequest.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.requestMetadata != null && message.hasOwnProperty("requestMetadata")) {
                        object.requestMetadata = $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.toObject(message.requestMetadata, options);
                        if (options.oneofs)
                            object._requestMetadata = "requestMetadata";
                    }
                    if (message.historySyncConfig != null && message.hasOwnProperty("historySyncConfig")) {
                        object.historySyncConfig = $root.CompanionReg.DeviceProps.HistorySyncConfig.toObject(message.historySyncConfig, options);
                        if (options.oneofs)
                            object._historySyncConfig = "historySyncConfig";
                    }
                    return object;
                };

                /**
                 * Converts this FullHistorySyncOnDemandRequest to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                FullHistorySyncOnDemandRequest.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for FullHistorySyncOnDemandRequest
                 * @function getTypeUrl
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                FullHistorySyncOnDemandRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest";
                };

                return FullHistorySyncOnDemandRequest;
            })();

            PeerDataOperationRequestMessage.GalaxyFlowAction = (function() {

                /**
                 * Properties of a GalaxyFlowAction.
                 * @memberof E2E.Message.PeerDataOperationRequestMessage
                 * @interface IGalaxyFlowAction
                 * @property {E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction.GalaxyFlowActionType|null} [type] GalaxyFlowAction type
                 * @property {string|null} [flowId] GalaxyFlowAction flowId
                 * @property {string|null} [stanzaId] GalaxyFlowAction stanzaId
                 */

                /**
                 * Constructs a new GalaxyFlowAction.
                 * @memberof E2E.Message.PeerDataOperationRequestMessage
                 * @classdesc Represents a GalaxyFlowAction.
                 * @implements IGalaxyFlowAction
                 * @constructor
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IGalaxyFlowAction=} [properties] Properties to set
                 */
                function GalaxyFlowAction(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]];
                }

                /**
                 * GalaxyFlowAction type.
                 * @member {E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction.GalaxyFlowActionType|null|undefined} type
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction
                 * @instance
                 */
                GalaxyFlowAction.prototype.type = null;

                /**
                 * GalaxyFlowAction flowId.
                 * @member {string|null|undefined} flowId
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction
                 * @instance
                 */
                GalaxyFlowAction.prototype.flowId = null;

                /**
                 * GalaxyFlowAction stanzaId.
                 * @member {string|null|undefined} stanzaId
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction
                 * @instance
                 */
                GalaxyFlowAction.prototype.stanzaId = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * GalaxyFlowAction _type.
                 * @member {"type"|undefined} _type
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction
                 * @instance
                 */
                Object.defineProperty(GalaxyFlowAction.prototype, "_type", {
                    get: $util.oneOfGetter($oneOfFields = ["type"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * GalaxyFlowAction _flowId.
                 * @member {"flowId"|undefined} _flowId
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction
                 * @instance
                 */
                Object.defineProperty(GalaxyFlowAction.prototype, "_flowId", {
                    get: $util.oneOfGetter($oneOfFields = ["flowId"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * GalaxyFlowAction _stanzaId.
                 * @member {"stanzaId"|undefined} _stanzaId
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction
                 * @instance
                 */
                Object.defineProperty(GalaxyFlowAction.prototype, "_stanzaId", {
                    get: $util.oneOfGetter($oneOfFields = ["stanzaId"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new GalaxyFlowAction instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IGalaxyFlowAction=} [properties] Properties to set
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction} GalaxyFlowAction instance
                 */
                GalaxyFlowAction.create = function create(properties) {
                    return new GalaxyFlowAction(properties);
                };

                /**
                 * Encodes the specified GalaxyFlowAction message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IGalaxyFlowAction} message GalaxyFlowAction message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GalaxyFlowAction.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                        writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
                    if (message.flowId != null && Object.hasOwnProperty.call(message, "flowId"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.flowId);
                    if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId"))
                        writer.uint32(/* id 3, wireType 2 =*/26).string(message.stanzaId);
                    return writer;
                };

                /**
                 * Encodes the specified GalaxyFlowAction message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IGalaxyFlowAction} message GalaxyFlowAction message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GalaxyFlowAction.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a GalaxyFlowAction message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction} GalaxyFlowAction
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GalaxyFlowAction.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.E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.type = reader.int32();
                                break;
                            }
                        case 2: {
                                message.flowId = reader.string();
                                break;
                            }
                        case 3: {
                                message.stanzaId = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a GalaxyFlowAction message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction} GalaxyFlowAction
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GalaxyFlowAction.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a GalaxyFlowAction message.
                 * @function verify
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                GalaxyFlowAction.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.type != null && message.hasOwnProperty("type")) {
                        properties._type = 1;
                        switch (message.type) {
                        default:
                            return "type: enum value expected";
                        case 1:
                            break;
                        }
                    }
                    if (message.flowId != null && message.hasOwnProperty("flowId")) {
                        properties._flowId = 1;
                        if (!$util.isString(message.flowId))
                            return "flowId: string expected";
                    }
                    if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) {
                        properties._stanzaId = 1;
                        if (!$util.isString(message.stanzaId))
                            return "stanzaId: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a GalaxyFlowAction message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction} GalaxyFlowAction
                 */
                GalaxyFlowAction.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction)
                        return object;
                    var message = new $root.E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction();
                    switch (object.type) {
                    default:
                        if (typeof object.type === "number") {
                            message.type = object.type;
                            break;
                        }
                        break;
                    case "NOTIFY_LAUNCH":
                    case 1:
                        message.type = 1;
                        break;
                    }
                    if (object.flowId != null)
                        message.flowId = String(object.flowId);
                    if (object.stanzaId != null)
                        message.stanzaId = String(object.stanzaId);
                    return message;
                };

                /**
                 * Creates a plain object from a GalaxyFlowAction message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction} message GalaxyFlowAction
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                GalaxyFlowAction.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.type != null && message.hasOwnProperty("type")) {
                        object.type = options.enums === String ? $root.E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction.GalaxyFlowActionType[message.type] === undefined ? message.type : $root.E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction.GalaxyFlowActionType[message.type] : message.type;
                        if (options.oneofs)
                            object._type = "type";
                    }
                    if (message.flowId != null && message.hasOwnProperty("flowId")) {
                        object.flowId = message.flowId;
                        if (options.oneofs)
                            object._flowId = "flowId";
                    }
                    if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) {
                        object.stanzaId = message.stanzaId;
                        if (options.oneofs)
                            object._stanzaId = "stanzaId";
                    }
                    return object;
                };

                /**
                 * Converts this GalaxyFlowAction to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                GalaxyFlowAction.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for GalaxyFlowAction
                 * @function getTypeUrl
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                GalaxyFlowAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction";
                };

                /**
                 * GalaxyFlowActionType enum.
                 * @name E2E.Message.PeerDataOperationRequestMessage.GalaxyFlowAction.GalaxyFlowActionType
                 * @enum {number}
                 * @property {number} NOTIFY_LAUNCH=1 NOTIFY_LAUNCH value
                 */
                GalaxyFlowAction.GalaxyFlowActionType = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[1] = "NOTIFY_LAUNCH"] = 1;
                    return values;
                })();

                return GalaxyFlowAction;
            })();

            PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest = (function() {

                /**
                 * Properties of a HistorySyncChunkRetryRequest.
                 * @memberof E2E.Message.PeerDataOperationRequestMessage
                 * @interface IHistorySyncChunkRetryRequest
                 * @property {E2E.Message.HistorySyncType|null} [syncType] HistorySyncChunkRetryRequest syncType
                 * @property {number|null} [chunkOrder] HistorySyncChunkRetryRequest chunkOrder
                 * @property {string|null} [chunkNotificationId] HistorySyncChunkRetryRequest chunkNotificationId
                 * @property {boolean|null} [regenerateChunk] HistorySyncChunkRetryRequest regenerateChunk
                 */

                /**
                 * Constructs a new HistorySyncChunkRetryRequest.
                 * @memberof E2E.Message.PeerDataOperationRequestMessage
                 * @classdesc Represents a HistorySyncChunkRetryRequest.
                 * @implements IHistorySyncChunkRetryRequest
                 * @constructor
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IHistorySyncChunkRetryRequest=} [properties] Properties to set
                 */
                function HistorySyncChunkRetryRequest(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]];
                }

                /**
                 * HistorySyncChunkRetryRequest syncType.
                 * @member {E2E.Message.HistorySyncType|null|undefined} syncType
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @instance
                 */
                HistorySyncChunkRetryRequest.prototype.syncType = null;

                /**
                 * HistorySyncChunkRetryRequest chunkOrder.
                 * @member {number|null|undefined} chunkOrder
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @instance
                 */
                HistorySyncChunkRetryRequest.prototype.chunkOrder = null;

                /**
                 * HistorySyncChunkRetryRequest chunkNotificationId.
                 * @member {string|null|undefined} chunkNotificationId
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @instance
                 */
                HistorySyncChunkRetryRequest.prototype.chunkNotificationId = null;

                /**
                 * HistorySyncChunkRetryRequest regenerateChunk.
                 * @member {boolean|null|undefined} regenerateChunk
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @instance
                 */
                HistorySyncChunkRetryRequest.prototype.regenerateChunk = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * HistorySyncChunkRetryRequest _syncType.
                 * @member {"syncType"|undefined} _syncType
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @instance
                 */
                Object.defineProperty(HistorySyncChunkRetryRequest.prototype, "_syncType", {
                    get: $util.oneOfGetter($oneOfFields = ["syncType"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * HistorySyncChunkRetryRequest _chunkOrder.
                 * @member {"chunkOrder"|undefined} _chunkOrder
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @instance
                 */
                Object.defineProperty(HistorySyncChunkRetryRequest.prototype, "_chunkOrder", {
                    get: $util.oneOfGetter($oneOfFields = ["chunkOrder"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * HistorySyncChunkRetryRequest _chunkNotificationId.
                 * @member {"chunkNotificationId"|undefined} _chunkNotificationId
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @instance
                 */
                Object.defineProperty(HistorySyncChunkRetryRequest.prototype, "_chunkNotificationId", {
                    get: $util.oneOfGetter($oneOfFields = ["chunkNotificationId"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * HistorySyncChunkRetryRequest _regenerateChunk.
                 * @member {"regenerateChunk"|undefined} _regenerateChunk
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @instance
                 */
                Object.defineProperty(HistorySyncChunkRetryRequest.prototype, "_regenerateChunk", {
                    get: $util.oneOfGetter($oneOfFields = ["regenerateChunk"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new HistorySyncChunkRetryRequest instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IHistorySyncChunkRetryRequest=} [properties] Properties to set
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest} HistorySyncChunkRetryRequest instance
                 */
                HistorySyncChunkRetryRequest.create = function create(properties) {
                    return new HistorySyncChunkRetryRequest(properties);
                };

                /**
                 * Encodes the specified HistorySyncChunkRetryRequest message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IHistorySyncChunkRetryRequest} message HistorySyncChunkRetryRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                HistorySyncChunkRetryRequest.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.syncType != null && Object.hasOwnProperty.call(message, "syncType"))
                        writer.uint32(/* id 1, wireType 0 =*/8).int32(message.syncType);
                    if (message.chunkOrder != null && Object.hasOwnProperty.call(message, "chunkOrder"))
                        writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.chunkOrder);
                    if (message.chunkNotificationId != null && Object.hasOwnProperty.call(message, "chunkNotificationId"))
                        writer.uint32(/* id 3, wireType 2 =*/26).string(message.chunkNotificationId);
                    if (message.regenerateChunk != null && Object.hasOwnProperty.call(message, "regenerateChunk"))
                        writer.uint32(/* id 4, wireType 0 =*/32).bool(message.regenerateChunk);
                    return writer;
                };

                /**
                 * Encodes the specified HistorySyncChunkRetryRequest message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IHistorySyncChunkRetryRequest} message HistorySyncChunkRetryRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                HistorySyncChunkRetryRequest.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a HistorySyncChunkRetryRequest message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest} HistorySyncChunkRetryRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                HistorySyncChunkRetryRequest.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.E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.syncType = reader.int32();
                                break;
                            }
                        case 2: {
                                message.chunkOrder = reader.uint32();
                                break;
                            }
                        case 3: {
                                message.chunkNotificationId = reader.string();
                                break;
                            }
                        case 4: {
                                message.regenerateChunk = reader.bool();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a HistorySyncChunkRetryRequest message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest} HistorySyncChunkRetryRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                HistorySyncChunkRetryRequest.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a HistorySyncChunkRetryRequest message.
                 * @function verify
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                HistorySyncChunkRetryRequest.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.syncType != null && message.hasOwnProperty("syncType")) {
                        properties._syncType = 1;
                        switch (message.syncType) {
                        default:
                            return "syncType: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                            break;
                        }
                    }
                    if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) {
                        properties._chunkOrder = 1;
                        if (!$util.isInteger(message.chunkOrder))
                            return "chunkOrder: integer expected";
                    }
                    if (message.chunkNotificationId != null && message.hasOwnProperty("chunkNotificationId")) {
                        properties._chunkNotificationId = 1;
                        if (!$util.isString(message.chunkNotificationId))
                            return "chunkNotificationId: string expected";
                    }
                    if (message.regenerateChunk != null && message.hasOwnProperty("regenerateChunk")) {
                        properties._regenerateChunk = 1;
                        if (typeof message.regenerateChunk !== "boolean")
                            return "regenerateChunk: boolean expected";
                    }
                    return null;
                };

                /**
                 * Creates a HistorySyncChunkRetryRequest message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest} HistorySyncChunkRetryRequest
                 */
                HistorySyncChunkRetryRequest.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest)
                        return object;
                    var message = new $root.E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest();
                    switch (object.syncType) {
                    default:
                        if (typeof object.syncType === "number") {
                            message.syncType = object.syncType;
                            break;
                        }
                        break;
                    case "INITIAL_BOOTSTRAP":
                    case 0:
                        message.syncType = 0;
                        break;
                    case "INITIAL_STATUS_V3":
                    case 1:
                        message.syncType = 1;
                        break;
                    case "FULL":
                    case 2:
                        message.syncType = 2;
                        break;
                    case "RECENT":
                    case 3:
                        message.syncType = 3;
                        break;
                    case "PUSH_NAME":
                    case 4:
                        message.syncType = 4;
                        break;
                    case "NON_BLOCKING_DATA":
                    case 5:
                        message.syncType = 5;
                        break;
                    case "ON_DEMAND":
                    case 6:
                        message.syncType = 6;
                        break;
                    case "NO_HISTORY":
                    case 7:
                        message.syncType = 7;
                        break;
                    case "MESSAGE_ACCESS_STATUS":
                    case 8:
                        message.syncType = 8;
                        break;
                    }
                    if (object.chunkOrder != null)
                        message.chunkOrder = object.chunkOrder >>> 0;
                    if (object.chunkNotificationId != null)
                        message.chunkNotificationId = String(object.chunkNotificationId);
                    if (object.regenerateChunk != null)
                        message.regenerateChunk = Boolean(object.regenerateChunk);
                    return message;
                };

                /**
                 * Creates a plain object from a HistorySyncChunkRetryRequest message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest} message HistorySyncChunkRetryRequest
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                HistorySyncChunkRetryRequest.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.syncType != null && message.hasOwnProperty("syncType")) {
                        object.syncType = options.enums === String ? $root.E2E.Message.HistorySyncType[message.syncType] === undefined ? message.syncType : $root.E2E.Message.HistorySyncType[message.syncType] : message.syncType;
                        if (options.oneofs)
                            object._syncType = "syncType";
                    }
                    if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) {
                        object.chunkOrder = message.chunkOrder;
                        if (options.oneofs)
                            object._chunkOrder = "chunkOrder";
                    }
                    if (message.chunkNotificationId != null && message.hasOwnProperty("chunkNotificationId")) {
                        object.chunkNotificationId = message.chunkNotificationId;
                        if (options.oneofs)
                            object._chunkNotificationId = "chunkNotificationId";
                    }
                    if (message.regenerateChunk != null && message.hasOwnProperty("regenerateChunk")) {
                        object.regenerateChunk = message.regenerateChunk;
                        if (options.oneofs)
                            object._regenerateChunk = "regenerateChunk";
                    }
                    return object;
                };

                /**
                 * Converts this HistorySyncChunkRetryRequest to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                HistorySyncChunkRetryRequest.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for HistorySyncChunkRetryRequest
                 * @function getTypeUrl
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                HistorySyncChunkRetryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest";
                };

                return HistorySyncChunkRetryRequest;
            })();

            PeerDataOperationRequestMessage.HistorySyncOnDemandRequest = (function() {

                /**
                 * Properties of a HistorySyncOnDemandRequest.
                 * @memberof E2E.Message.PeerDataOperationRequestMessage
                 * @interface IHistorySyncOnDemandRequest
                 * @property {string|null} [chatJid] HistorySyncOnDemandRequest chatJid
                 * @property {string|null} [oldestMsgId] HistorySyncOnDemandRequest oldestMsgId
                 * @property {boolean|null} [oldestMsgFromMe] HistorySyncOnDemandRequest oldestMsgFromMe
                 * @property {number|null} [onDemandMsgCount] HistorySyncOnDemandRequest onDemandMsgCount
                 * @property {number|Long|null} [oldestMsgTimestampMs] HistorySyncOnDemandRequest oldestMsgTimestampMs
                 * @property {string|null} [accountLid] HistorySyncOnDemandRequest accountLid
                 */

                /**
                 * Constructs a new HistorySyncOnDemandRequest.
                 * @memberof E2E.Message.PeerDataOperationRequestMessage
                 * @classdesc Represents a HistorySyncOnDemandRequest.
                 * @implements IHistorySyncOnDemandRequest
                 * @constructor
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IHistorySyncOnDemandRequest=} [properties] Properties to set
                 */
                function HistorySyncOnDemandRequest(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]];
                }

                /**
                 * HistorySyncOnDemandRequest chatJid.
                 * @member {string|null|undefined} chatJid
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @instance
                 */
                HistorySyncOnDemandRequest.prototype.chatJid = null;

                /**
                 * HistorySyncOnDemandRequest oldestMsgId.
                 * @member {string|null|undefined} oldestMsgId
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @instance
                 */
                HistorySyncOnDemandRequest.prototype.oldestMsgId = null;

                /**
                 * HistorySyncOnDemandRequest oldestMsgFromMe.
                 * @member {boolean|null|undefined} oldestMsgFromMe
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @instance
                 */
                HistorySyncOnDemandRequest.prototype.oldestMsgFromMe = null;

                /**
                 * HistorySyncOnDemandRequest onDemandMsgCount.
                 * @member {number|null|undefined} onDemandMsgCount
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @instance
                 */
                HistorySyncOnDemandRequest.prototype.onDemandMsgCount = null;

                /**
                 * HistorySyncOnDemandRequest oldestMsgTimestampMs.
                 * @member {number|Long|null|undefined} oldestMsgTimestampMs
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @instance
                 */
                HistorySyncOnDemandRequest.prototype.oldestMsgTimestampMs = null;

                /**
                 * HistorySyncOnDemandRequest accountLid.
                 * @member {string|null|undefined} accountLid
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @instance
                 */
                HistorySyncOnDemandRequest.prototype.accountLid = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * HistorySyncOnDemandRequest _chatJid.
                 * @member {"chatJid"|undefined} _chatJid
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @instance
                 */
                Object.defineProperty(HistorySyncOnDemandRequest.prototype, "_chatJid", {
                    get: $util.oneOfGetter($oneOfFields = ["chatJid"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * HistorySyncOnDemandRequest _oldestMsgId.
                 * @member {"oldestMsgId"|undefined} _oldestMsgId
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @instance
                 */
                Object.defineProperty(HistorySyncOnDemandRequest.prototype, "_oldestMsgId", {
                    get: $util.oneOfGetter($oneOfFields = ["oldestMsgId"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * HistorySyncOnDemandRequest _oldestMsgFromMe.
                 * @member {"oldestMsgFromMe"|undefined} _oldestMsgFromMe
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @instance
                 */
                Object.defineProperty(HistorySyncOnDemandRequest.prototype, "_oldestMsgFromMe", {
                    get: $util.oneOfGetter($oneOfFields = ["oldestMsgFromMe"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * HistorySyncOnDemandRequest _onDemandMsgCount.
                 * @member {"onDemandMsgCount"|undefined} _onDemandMsgCount
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @instance
                 */
                Object.defineProperty(HistorySyncOnDemandRequest.prototype, "_onDemandMsgCount", {
                    get: $util.oneOfGetter($oneOfFields = ["onDemandMsgCount"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * HistorySyncOnDemandRequest _oldestMsgTimestampMs.
                 * @member {"oldestMsgTimestampMs"|undefined} _oldestMsgTimestampMs
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @instance
                 */
                Object.defineProperty(HistorySyncOnDemandRequest.prototype, "_oldestMsgTimestampMs", {
                    get: $util.oneOfGetter($oneOfFields = ["oldestMsgTimestampMs"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * HistorySyncOnDemandRequest _accountLid.
                 * @member {"accountLid"|undefined} _accountLid
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @instance
                 */
                Object.defineProperty(HistorySyncOnDemandRequest.prototype, "_accountLid", {
                    get: $util.oneOfGetter($oneOfFields = ["accountLid"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new HistorySyncOnDemandRequest instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IHistorySyncOnDemandRequest=} [properties] Properties to set
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest} HistorySyncOnDemandRequest instance
                 */
                HistorySyncOnDemandRequest.create = function create(properties) {
                    return new HistorySyncOnDemandRequest(properties);
                };

                /**
                 * Encodes the specified HistorySyncOnDemandRequest message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IHistorySyncOnDemandRequest} message HistorySyncOnDemandRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                HistorySyncOnDemandRequest.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.chatJid != null && Object.hasOwnProperty.call(message, "chatJid"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.chatJid);
                    if (message.oldestMsgId != null && Object.hasOwnProperty.call(message, "oldestMsgId"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.oldestMsgId);
                    if (message.oldestMsgFromMe != null && Object.hasOwnProperty.call(message, "oldestMsgFromMe"))
                        writer.uint32(/* id 3, wireType 0 =*/24).bool(message.oldestMsgFromMe);
                    if (message.onDemandMsgCount != null && Object.hasOwnProperty.call(message, "onDemandMsgCount"))
                        writer.uint32(/* id 4, wireType 0 =*/32).int32(message.onDemandMsgCount);
                    if (message.oldestMsgTimestampMs != null && Object.hasOwnProperty.call(message, "oldestMsgTimestampMs"))
                        writer.uint32(/* id 5, wireType 0 =*/40).int64(message.oldestMsgTimestampMs);
                    if (message.accountLid != null && Object.hasOwnProperty.call(message, "accountLid"))
                        writer.uint32(/* id 6, wireType 2 =*/50).string(message.accountLid);
                    return writer;
                };

                /**
                 * Encodes the specified HistorySyncOnDemandRequest message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IHistorySyncOnDemandRequest} message HistorySyncOnDemandRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                HistorySyncOnDemandRequest.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a HistorySyncOnDemandRequest message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest} HistorySyncOnDemandRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                HistorySyncOnDemandRequest.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.E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.chatJid = reader.string();
                                break;
                            }
                        case 2: {
                                message.oldestMsgId = reader.string();
                                break;
                            }
                        case 3: {
                                message.oldestMsgFromMe = reader.bool();
                                break;
                            }
                        case 4: {
                                message.onDemandMsgCount = reader.int32();
                                break;
                            }
                        case 5: {
                                message.oldestMsgTimestampMs = reader.int64();
                                break;
                            }
                        case 6: {
                                message.accountLid = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a HistorySyncOnDemandRequest message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest} HistorySyncOnDemandRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                HistorySyncOnDemandRequest.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a HistorySyncOnDemandRequest message.
                 * @function verify
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                HistorySyncOnDemandRequest.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.chatJid != null && message.hasOwnProperty("chatJid")) {
                        properties._chatJid = 1;
                        if (!$util.isString(message.chatJid))
                            return "chatJid: string expected";
                    }
                    if (message.oldestMsgId != null && message.hasOwnProperty("oldestMsgId")) {
                        properties._oldestMsgId = 1;
                        if (!$util.isString(message.oldestMsgId))
                            return "oldestMsgId: string expected";
                    }
                    if (message.oldestMsgFromMe != null && message.hasOwnProperty("oldestMsgFromMe")) {
                        properties._oldestMsgFromMe = 1;
                        if (typeof message.oldestMsgFromMe !== "boolean")
                            return "oldestMsgFromMe: boolean expected";
                    }
                    if (message.onDemandMsgCount != null && message.hasOwnProperty("onDemandMsgCount")) {
                        properties._onDemandMsgCount = 1;
                        if (!$util.isInteger(message.onDemandMsgCount))
                            return "onDemandMsgCount: integer expected";
                    }
                    if (message.oldestMsgTimestampMs != null && message.hasOwnProperty("oldestMsgTimestampMs")) {
                        properties._oldestMsgTimestampMs = 1;
                        if (!$util.isInteger(message.oldestMsgTimestampMs) && !(message.oldestMsgTimestampMs && $util.isInteger(message.oldestMsgTimestampMs.low) && $util.isInteger(message.oldestMsgTimestampMs.high)))
                            return "oldestMsgTimestampMs: integer|Long expected";
                    }
                    if (message.accountLid != null && message.hasOwnProperty("accountLid")) {
                        properties._accountLid = 1;
                        if (!$util.isString(message.accountLid))
                            return "accountLid: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a HistorySyncOnDemandRequest message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest} HistorySyncOnDemandRequest
                 */
                HistorySyncOnDemandRequest.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest)
                        return object;
                    var message = new $root.E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest();
                    if (object.chatJid != null)
                        message.chatJid = String(object.chatJid);
                    if (object.oldestMsgId != null)
                        message.oldestMsgId = String(object.oldestMsgId);
                    if (object.oldestMsgFromMe != null)
                        message.oldestMsgFromMe = Boolean(object.oldestMsgFromMe);
                    if (object.onDemandMsgCount != null)
                        message.onDemandMsgCount = object.onDemandMsgCount | 0;
                    if (object.oldestMsgTimestampMs != null)
                        if ($util.Long)
                            (message.oldestMsgTimestampMs = $util.Long.fromValue(object.oldestMsgTimestampMs)).unsigned = false;
                        else if (typeof object.oldestMsgTimestampMs === "string")
                            message.oldestMsgTimestampMs = parseInt(object.oldestMsgTimestampMs, 10);
                        else if (typeof object.oldestMsgTimestampMs === "number")
                            message.oldestMsgTimestampMs = object.oldestMsgTimestampMs;
                        else if (typeof object.oldestMsgTimestampMs === "object")
                            message.oldestMsgTimestampMs = new $util.LongBits(object.oldestMsgTimestampMs.low >>> 0, object.oldestMsgTimestampMs.high >>> 0).toNumber();
                    if (object.accountLid != null)
                        message.accountLid = String(object.accountLid);
                    return message;
                };

                /**
                 * Creates a plain object from a HistorySyncOnDemandRequest message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest} message HistorySyncOnDemandRequest
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                HistorySyncOnDemandRequest.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.chatJid != null && message.hasOwnProperty("chatJid")) {
                        object.chatJid = message.chatJid;
                        if (options.oneofs)
                            object._chatJid = "chatJid";
                    }
                    if (message.oldestMsgId != null && message.hasOwnProperty("oldestMsgId")) {
                        object.oldestMsgId = message.oldestMsgId;
                        if (options.oneofs)
                            object._oldestMsgId = "oldestMsgId";
                    }
                    if (message.oldestMsgFromMe != null && message.hasOwnProperty("oldestMsgFromMe")) {
                        object.oldestMsgFromMe = message.oldestMsgFromMe;
                        if (options.oneofs)
                            object._oldestMsgFromMe = "oldestMsgFromMe";
                    }
                    if (message.onDemandMsgCount != null && message.hasOwnProperty("onDemandMsgCount")) {
                        object.onDemandMsgCount = message.onDemandMsgCount;
                        if (options.oneofs)
                            object._onDemandMsgCount = "onDemandMsgCount";
                    }
                    if (message.oldestMsgTimestampMs != null && message.hasOwnProperty("oldestMsgTimestampMs")) {
                        if (typeof message.oldestMsgTimestampMs === "number")
                            object.oldestMsgTimestampMs = options.longs === String ? String(message.oldestMsgTimestampMs) : message.oldestMsgTimestampMs;
                        else
                            object.oldestMsgTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.oldestMsgTimestampMs) : options.longs === Number ? new $util.LongBits(message.oldestMsgTimestampMs.low >>> 0, message.oldestMsgTimestampMs.high >>> 0).toNumber() : message.oldestMsgTimestampMs;
                        if (options.oneofs)
                            object._oldestMsgTimestampMs = "oldestMsgTimestampMs";
                    }
                    if (message.accountLid != null && message.hasOwnProperty("accountLid")) {
                        object.accountLid = message.accountLid;
                        if (options.oneofs)
                            object._accountLid = "accountLid";
                    }
                    return object;
                };

                /**
                 * Converts this HistorySyncOnDemandRequest to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                HistorySyncOnDemandRequest.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for HistorySyncOnDemandRequest
                 * @function getTypeUrl
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                HistorySyncOnDemandRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest";
                };

                return HistorySyncOnDemandRequest;
            })();

            PeerDataOperationRequestMessage.PlaceholderMessageResendRequest = (function() {

                /**
                 * Properties of a PlaceholderMessageResendRequest.
                 * @memberof E2E.Message.PeerDataOperationRequestMessage
                 * @interface IPlaceholderMessageResendRequest
                 * @property {Protocol.IMessageKey|null} [messageKey] PlaceholderMessageResendRequest messageKey
                 */

                /**
                 * Constructs a new PlaceholderMessageResendRequest.
                 * @memberof E2E.Message.PeerDataOperationRequestMessage
                 * @classdesc Represents a PlaceholderMessageResendRequest.
                 * @implements IPlaceholderMessageResendRequest
                 * @constructor
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IPlaceholderMessageResendRequest=} [properties] Properties to set
                 */
                function PlaceholderMessageResendRequest(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]];
                }

                /**
                 * PlaceholderMessageResendRequest messageKey.
                 * @member {Protocol.IMessageKey|null|undefined} messageKey
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest
                 * @instance
                 */
                PlaceholderMessageResendRequest.prototype.messageKey = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * PlaceholderMessageResendRequest _messageKey.
                 * @member {"messageKey"|undefined} _messageKey
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest
                 * @instance
                 */
                Object.defineProperty(PlaceholderMessageResendRequest.prototype, "_messageKey", {
                    get: $util.oneOfGetter($oneOfFields = ["messageKey"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new PlaceholderMessageResendRequest instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IPlaceholderMessageResendRequest=} [properties] Properties to set
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest} PlaceholderMessageResendRequest instance
                 */
                PlaceholderMessageResendRequest.create = function create(properties) {
                    return new PlaceholderMessageResendRequest(properties);
                };

                /**
                 * Encodes the specified PlaceholderMessageResendRequest message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IPlaceholderMessageResendRequest} message PlaceholderMessageResendRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PlaceholderMessageResendRequest.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.messageKey != null && Object.hasOwnProperty.call(message, "messageKey"))
                        $root.Protocol.MessageKey.encode(message.messageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    return writer;
                };

                /**
                 * Encodes the specified PlaceholderMessageResendRequest message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IPlaceholderMessageResendRequest} message PlaceholderMessageResendRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PlaceholderMessageResendRequest.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a PlaceholderMessageResendRequest message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest} PlaceholderMessageResendRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PlaceholderMessageResendRequest.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.E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.messageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a PlaceholderMessageResendRequest message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest} PlaceholderMessageResendRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PlaceholderMessageResendRequest.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a PlaceholderMessageResendRequest message.
                 * @function verify
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                PlaceholderMessageResendRequest.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.messageKey != null && message.hasOwnProperty("messageKey")) {
                        properties._messageKey = 1;
                        {
                            var error = $root.Protocol.MessageKey.verify(message.messageKey);
                            if (error)
                                return "messageKey." + error;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a PlaceholderMessageResendRequest message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest} PlaceholderMessageResendRequest
                 */
                PlaceholderMessageResendRequest.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest)
                        return object;
                    var message = new $root.E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest();
                    if (object.messageKey != null) {
                        if (typeof object.messageKey !== "object")
                            throw TypeError(".E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest.messageKey: object expected");
                        message.messageKey = $root.Protocol.MessageKey.fromObject(object.messageKey);
                    }
                    return message;
                };

                /**
                 * Creates a plain object from a PlaceholderMessageResendRequest message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest} message PlaceholderMessageResendRequest
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                PlaceholderMessageResendRequest.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.messageKey != null && message.hasOwnProperty("messageKey")) {
                        object.messageKey = $root.Protocol.MessageKey.toObject(message.messageKey, options);
                        if (options.oneofs)
                            object._messageKey = "messageKey";
                    }
                    return object;
                };

                /**
                 * Converts this PlaceholderMessageResendRequest to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                PlaceholderMessageResendRequest.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for PlaceholderMessageResendRequest
                 * @function getTypeUrl
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                PlaceholderMessageResendRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest";
                };

                return PlaceholderMessageResendRequest;
            })();

            PeerDataOperationRequestMessage.RequestStickerReupload = (function() {

                /**
                 * Properties of a RequestStickerReupload.
                 * @memberof E2E.Message.PeerDataOperationRequestMessage
                 * @interface IRequestStickerReupload
                 * @property {string|null} [fileSha256] RequestStickerReupload fileSha256
                 */

                /**
                 * Constructs a new RequestStickerReupload.
                 * @memberof E2E.Message.PeerDataOperationRequestMessage
                 * @classdesc Represents a RequestStickerReupload.
                 * @implements IRequestStickerReupload
                 * @constructor
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IRequestStickerReupload=} [properties] Properties to set
                 */
                function RequestStickerReupload(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]];
                }

                /**
                 * RequestStickerReupload fileSha256.
                 * @member {string|null|undefined} fileSha256
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload
                 * @instance
                 */
                RequestStickerReupload.prototype.fileSha256 = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * RequestStickerReupload _fileSha256.
                 * @member {"fileSha256"|undefined} _fileSha256
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload
                 * @instance
                 */
                Object.defineProperty(RequestStickerReupload.prototype, "_fileSha256", {
                    get: $util.oneOfGetter($oneOfFields = ["fileSha256"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new RequestStickerReupload instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IRequestStickerReupload=} [properties] Properties to set
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload} RequestStickerReupload instance
                 */
                RequestStickerReupload.create = function create(properties) {
                    return new RequestStickerReupload(properties);
                };

                /**
                 * Encodes the specified RequestStickerReupload message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IRequestStickerReupload} message RequestStickerReupload message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                RequestStickerReupload.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.fileSha256);
                    return writer;
                };

                /**
                 * Encodes the specified RequestStickerReupload message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IRequestStickerReupload} message RequestStickerReupload message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                RequestStickerReupload.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a RequestStickerReupload message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload} RequestStickerReupload
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                RequestStickerReupload.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.E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.fileSha256 = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a RequestStickerReupload message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload} RequestStickerReupload
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                RequestStickerReupload.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a RequestStickerReupload message.
                 * @function verify
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                RequestStickerReupload.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                        properties._fileSha256 = 1;
                        if (!$util.isString(message.fileSha256))
                            return "fileSha256: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a RequestStickerReupload message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload} RequestStickerReupload
                 */
                RequestStickerReupload.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload)
                        return object;
                    var message = new $root.E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload();
                    if (object.fileSha256 != null)
                        message.fileSha256 = String(object.fileSha256);
                    return message;
                };

                /**
                 * Creates a plain object from a RequestStickerReupload message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload} message RequestStickerReupload
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                RequestStickerReupload.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                        object.fileSha256 = message.fileSha256;
                        if (options.oneofs)
                            object._fileSha256 = "fileSha256";
                    }
                    return object;
                };

                /**
                 * Converts this RequestStickerReupload to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                RequestStickerReupload.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for RequestStickerReupload
                 * @function getTypeUrl
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                RequestStickerReupload.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestMessage.RequestStickerReupload";
                };

                return RequestStickerReupload;
            })();

            PeerDataOperationRequestMessage.RequestUrlPreview = (function() {

                /**
                 * Properties of a RequestUrlPreview.
                 * @memberof E2E.Message.PeerDataOperationRequestMessage
                 * @interface IRequestUrlPreview
                 * @property {string|null} [url] RequestUrlPreview url
                 * @property {boolean|null} [includeHqThumbnail] RequestUrlPreview includeHqThumbnail
                 */

                /**
                 * Constructs a new RequestUrlPreview.
                 * @memberof E2E.Message.PeerDataOperationRequestMessage
                 * @classdesc Represents a RequestUrlPreview.
                 * @implements IRequestUrlPreview
                 * @constructor
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IRequestUrlPreview=} [properties] Properties to set
                 */
                function RequestUrlPreview(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]];
                }

                /**
                 * RequestUrlPreview url.
                 * @member {string|null|undefined} url
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview
                 * @instance
                 */
                RequestUrlPreview.prototype.url = null;

                /**
                 * RequestUrlPreview includeHqThumbnail.
                 * @member {boolean|null|undefined} includeHqThumbnail
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview
                 * @instance
                 */
                RequestUrlPreview.prototype.includeHqThumbnail = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * RequestUrlPreview _url.
                 * @member {"url"|undefined} _url
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview
                 * @instance
                 */
                Object.defineProperty(RequestUrlPreview.prototype, "_url", {
                    get: $util.oneOfGetter($oneOfFields = ["url"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * RequestUrlPreview _includeHqThumbnail.
                 * @member {"includeHqThumbnail"|undefined} _includeHqThumbnail
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview
                 * @instance
                 */
                Object.defineProperty(RequestUrlPreview.prototype, "_includeHqThumbnail", {
                    get: $util.oneOfGetter($oneOfFields = ["includeHqThumbnail"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new RequestUrlPreview instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IRequestUrlPreview=} [properties] Properties to set
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview} RequestUrlPreview instance
                 */
                RequestUrlPreview.create = function create(properties) {
                    return new RequestUrlPreview(properties);
                };

                /**
                 * Encodes the specified RequestUrlPreview message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IRequestUrlPreview} message RequestUrlPreview message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                RequestUrlPreview.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.url);
                    if (message.includeHqThumbnail != null && Object.hasOwnProperty.call(message, "includeHqThumbnail"))
                        writer.uint32(/* id 2, wireType 0 =*/16).bool(message.includeHqThumbnail);
                    return writer;
                };

                /**
                 * Encodes the specified RequestUrlPreview message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.IRequestUrlPreview} message RequestUrlPreview message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                RequestUrlPreview.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a RequestUrlPreview message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview} RequestUrlPreview
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                RequestUrlPreview.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.E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.url = reader.string();
                                break;
                            }
                        case 2: {
                                message.includeHqThumbnail = reader.bool();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a RequestUrlPreview message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview} RequestUrlPreview
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                RequestUrlPreview.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a RequestUrlPreview message.
                 * @function verify
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                RequestUrlPreview.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.url != null && message.hasOwnProperty("url")) {
                        properties._url = 1;
                        if (!$util.isString(message.url))
                            return "url: string expected";
                    }
                    if (message.includeHqThumbnail != null && message.hasOwnProperty("includeHqThumbnail")) {
                        properties._includeHqThumbnail = 1;
                        if (typeof message.includeHqThumbnail !== "boolean")
                            return "includeHqThumbnail: boolean expected";
                    }
                    return null;
                };

                /**
                 * Creates a RequestUrlPreview message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview} RequestUrlPreview
                 */
                RequestUrlPreview.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview)
                        return object;
                    var message = new $root.E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview();
                    if (object.url != null)
                        message.url = String(object.url);
                    if (object.includeHqThumbnail != null)
                        message.includeHqThumbnail = Boolean(object.includeHqThumbnail);
                    return message;
                };

                /**
                 * Creates a plain object from a RequestUrlPreview message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview} message RequestUrlPreview
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                RequestUrlPreview.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.url != null && message.hasOwnProperty("url")) {
                        object.url = message.url;
                        if (options.oneofs)
                            object._url = "url";
                    }
                    if (message.includeHqThumbnail != null && message.hasOwnProperty("includeHqThumbnail")) {
                        object.includeHqThumbnail = message.includeHqThumbnail;
                        if (options.oneofs)
                            object._includeHqThumbnail = "includeHqThumbnail";
                    }
                    return object;
                };

                /**
                 * Converts this RequestUrlPreview to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                RequestUrlPreview.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for RequestUrlPreview
                 * @function getTypeUrl
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                RequestUrlPreview.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestMessage.RequestUrlPreview";
                };

                return RequestUrlPreview;
            })();

            PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest = (function() {

                /**
                 * Properties of a SyncDCollectionFatalRecoveryRequest.
                 * @memberof E2E.Message.PeerDataOperationRequestMessage
                 * @interface ISyncDCollectionFatalRecoveryRequest
                 * @property {string|null} [collectionName] SyncDCollectionFatalRecoveryRequest collectionName
                 * @property {number|Long|null} [timestamp] SyncDCollectionFatalRecoveryRequest timestamp
                 */

                /**
                 * Constructs a new SyncDCollectionFatalRecoveryRequest.
                 * @memberof E2E.Message.PeerDataOperationRequestMessage
                 * @classdesc Represents a SyncDCollectionFatalRecoveryRequest.
                 * @implements ISyncDCollectionFatalRecoveryRequest
                 * @constructor
                 * @param {E2E.Message.PeerDataOperationRequestMessage.ISyncDCollectionFatalRecoveryRequest=} [properties] Properties to set
                 */
                function SyncDCollectionFatalRecoveryRequest(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]];
                }

                /**
                 * SyncDCollectionFatalRecoveryRequest collectionName.
                 * @member {string|null|undefined} collectionName
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest
                 * @instance
                 */
                SyncDCollectionFatalRecoveryRequest.prototype.collectionName = null;

                /**
                 * SyncDCollectionFatalRecoveryRequest timestamp.
                 * @member {number|Long|null|undefined} timestamp
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest
                 * @instance
                 */
                SyncDCollectionFatalRecoveryRequest.prototype.timestamp = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * SyncDCollectionFatalRecoveryRequest _collectionName.
                 * @member {"collectionName"|undefined} _collectionName
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest
                 * @instance
                 */
                Object.defineProperty(SyncDCollectionFatalRecoveryRequest.prototype, "_collectionName", {
                    get: $util.oneOfGetter($oneOfFields = ["collectionName"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * SyncDCollectionFatalRecoveryRequest _timestamp.
                 * @member {"timestamp"|undefined} _timestamp
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest
                 * @instance
                 */
                Object.defineProperty(SyncDCollectionFatalRecoveryRequest.prototype, "_timestamp", {
                    get: $util.oneOfGetter($oneOfFields = ["timestamp"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new SyncDCollectionFatalRecoveryRequest instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.ISyncDCollectionFatalRecoveryRequest=} [properties] Properties to set
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest} SyncDCollectionFatalRecoveryRequest instance
                 */
                SyncDCollectionFatalRecoveryRequest.create = function create(properties) {
                    return new SyncDCollectionFatalRecoveryRequest(properties);
                };

                /**
                 * Encodes the specified SyncDCollectionFatalRecoveryRequest message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.ISyncDCollectionFatalRecoveryRequest} message SyncDCollectionFatalRecoveryRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                SyncDCollectionFatalRecoveryRequest.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.collectionName != null && Object.hasOwnProperty.call(message, "collectionName"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.collectionName);
                    if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
                        writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestamp);
                    return writer;
                };

                /**
                 * Encodes the specified SyncDCollectionFatalRecoveryRequest message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.ISyncDCollectionFatalRecoveryRequest} message SyncDCollectionFatalRecoveryRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                SyncDCollectionFatalRecoveryRequest.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a SyncDCollectionFatalRecoveryRequest message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest} SyncDCollectionFatalRecoveryRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                SyncDCollectionFatalRecoveryRequest.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.E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.collectionName = reader.string();
                                break;
                            }
                        case 2: {
                                message.timestamp = reader.int64();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a SyncDCollectionFatalRecoveryRequest message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest} SyncDCollectionFatalRecoveryRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                SyncDCollectionFatalRecoveryRequest.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a SyncDCollectionFatalRecoveryRequest message.
                 * @function verify
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                SyncDCollectionFatalRecoveryRequest.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.collectionName != null && message.hasOwnProperty("collectionName")) {
                        properties._collectionName = 1;
                        if (!$util.isString(message.collectionName))
                            return "collectionName: string expected";
                    }
                    if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
                        properties._timestamp = 1;
                        if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
                            return "timestamp: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a SyncDCollectionFatalRecoveryRequest message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest} SyncDCollectionFatalRecoveryRequest
                 */
                SyncDCollectionFatalRecoveryRequest.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest)
                        return object;
                    var message = new $root.E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest();
                    if (object.collectionName != null)
                        message.collectionName = String(object.collectionName);
                    if (object.timestamp != null)
                        if ($util.Long)
                            (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false;
                        else if (typeof object.timestamp === "string")
                            message.timestamp = parseInt(object.timestamp, 10);
                        else if (typeof object.timestamp === "number")
                            message.timestamp = object.timestamp;
                        else if (typeof object.timestamp === "object")
                            message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber();
                    return message;
                };

                /**
                 * Creates a plain object from a SyncDCollectionFatalRecoveryRequest message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest} message SyncDCollectionFatalRecoveryRequest
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                SyncDCollectionFatalRecoveryRequest.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.collectionName != null && message.hasOwnProperty("collectionName")) {
                        object.collectionName = message.collectionName;
                        if (options.oneofs)
                            object._collectionName = "collectionName";
                    }
                    if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
                        if (typeof message.timestamp === "number")
                            object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
                        else
                            object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp;
                        if (options.oneofs)
                            object._timestamp = "timestamp";
                    }
                    return object;
                };

                /**
                 * Converts this SyncDCollectionFatalRecoveryRequest to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                SyncDCollectionFatalRecoveryRequest.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for SyncDCollectionFatalRecoveryRequest
                 * @function getTypeUrl
                 * @memberof E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                SyncDCollectionFatalRecoveryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest";
                };

                return SyncDCollectionFatalRecoveryRequest;
            })();

            return PeerDataOperationRequestMessage;
        })();

        Message.PeerDataOperationRequestResponseMessage = (function() {

            /**
             * Properties of a PeerDataOperationRequestResponseMessage.
             * @memberof E2E.Message
             * @interface IPeerDataOperationRequestResponseMessage
             * @property {E2E.Message.PeerDataOperationRequestType|null} [peerDataOperationRequestType] PeerDataOperationRequestResponseMessage peerDataOperationRequestType
             * @property {string|null} [stanzaId] PeerDataOperationRequestResponseMessage stanzaId
             * @property {Array.<E2E.Message.PeerDataOperationRequestResponseMessage.IPeerDataOperationResult>|null} [peerDataOperationResult] PeerDataOperationRequestResponseMessage peerDataOperationResult
             */

            /**
             * Constructs a new PeerDataOperationRequestResponseMessage.
             * @memberof E2E.Message
             * @classdesc Represents a PeerDataOperationRequestResponseMessage.
             * @implements IPeerDataOperationRequestResponseMessage
             * @constructor
             * @param {E2E.Message.IPeerDataOperationRequestResponseMessage=} [properties] Properties to set
             */
            function PeerDataOperationRequestResponseMessage(properties) {
                this.peerDataOperationResult = [];
                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]];
            }

            /**
             * PeerDataOperationRequestResponseMessage peerDataOperationRequestType.
             * @member {E2E.Message.PeerDataOperationRequestType|null|undefined} peerDataOperationRequestType
             * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
             * @instance
             */
            PeerDataOperationRequestResponseMessage.prototype.peerDataOperationRequestType = null;

            /**
             * PeerDataOperationRequestResponseMessage stanzaId.
             * @member {string|null|undefined} stanzaId
             * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
             * @instance
             */
            PeerDataOperationRequestResponseMessage.prototype.stanzaId = null;

            /**
             * PeerDataOperationRequestResponseMessage peerDataOperationResult.
             * @member {Array.<E2E.Message.PeerDataOperationRequestResponseMessage.IPeerDataOperationResult>} peerDataOperationResult
             * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
             * @instance
             */
            PeerDataOperationRequestResponseMessage.prototype.peerDataOperationResult = $util.emptyArray;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * PeerDataOperationRequestResponseMessage _peerDataOperationRequestType.
             * @member {"peerDataOperationRequestType"|undefined} _peerDataOperationRequestType
             * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
             * @instance
             */
            Object.defineProperty(PeerDataOperationRequestResponseMessage.prototype, "_peerDataOperationRequestType", {
                get: $util.oneOfGetter($oneOfFields = ["peerDataOperationRequestType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PeerDataOperationRequestResponseMessage _stanzaId.
             * @member {"stanzaId"|undefined} _stanzaId
             * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
             * @instance
             */
            Object.defineProperty(PeerDataOperationRequestResponseMessage.prototype, "_stanzaId", {
                get: $util.oneOfGetter($oneOfFields = ["stanzaId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new PeerDataOperationRequestResponseMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
             * @static
             * @param {E2E.Message.IPeerDataOperationRequestResponseMessage=} [properties] Properties to set
             * @returns {E2E.Message.PeerDataOperationRequestResponseMessage} PeerDataOperationRequestResponseMessage instance
             */
            PeerDataOperationRequestResponseMessage.create = function create(properties) {
                return new PeerDataOperationRequestResponseMessage(properties);
            };

            /**
             * Encodes the specified PeerDataOperationRequestResponseMessage message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
             * @static
             * @param {E2E.Message.IPeerDataOperationRequestResponseMessage} message PeerDataOperationRequestResponseMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PeerDataOperationRequestResponseMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.peerDataOperationRequestType != null && Object.hasOwnProperty.call(message, "peerDataOperationRequestType"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.peerDataOperationRequestType);
                if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.stanzaId);
                if (message.peerDataOperationResult != null && message.peerDataOperationResult.length)
                    for (var i = 0; i < message.peerDataOperationResult.length; ++i)
                        $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.encode(message.peerDataOperationResult[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified PeerDataOperationRequestResponseMessage message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
             * @static
             * @param {E2E.Message.IPeerDataOperationRequestResponseMessage} message PeerDataOperationRequestResponseMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PeerDataOperationRequestResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PeerDataOperationRequestResponseMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.PeerDataOperationRequestResponseMessage} PeerDataOperationRequestResponseMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PeerDataOperationRequestResponseMessage.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.E2E.Message.PeerDataOperationRequestResponseMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.peerDataOperationRequestType = reader.int32();
                            break;
                        }
                    case 2: {
                            message.stanzaId = reader.string();
                            break;
                        }
                    case 3: {
                            if (!(message.peerDataOperationResult && message.peerDataOperationResult.length))
                                message.peerDataOperationResult = [];
                            message.peerDataOperationResult.push($root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.decode(reader, reader.uint32()));
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a PeerDataOperationRequestResponseMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.PeerDataOperationRequestResponseMessage} PeerDataOperationRequestResponseMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PeerDataOperationRequestResponseMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PeerDataOperationRequestResponseMessage message.
             * @function verify
             * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PeerDataOperationRequestResponseMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.peerDataOperationRequestType != null && message.hasOwnProperty("peerDataOperationRequestType")) {
                    properties._peerDataOperationRequestType = 1;
                    switch (message.peerDataOperationRequestType) {
                    default:
                        return "peerDataOperationRequestType: 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:
                    case 11:
                        break;
                    }
                }
                if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) {
                    properties._stanzaId = 1;
                    if (!$util.isString(message.stanzaId))
                        return "stanzaId: string expected";
                }
                if (message.peerDataOperationResult != null && message.hasOwnProperty("peerDataOperationResult")) {
                    if (!Array.isArray(message.peerDataOperationResult))
                        return "peerDataOperationResult: array expected";
                    for (var i = 0; i < message.peerDataOperationResult.length; ++i) {
                        var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.verify(message.peerDataOperationResult[i]);
                        if (error)
                            return "peerDataOperationResult." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a PeerDataOperationRequestResponseMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.PeerDataOperationRequestResponseMessage} PeerDataOperationRequestResponseMessage
             */
            PeerDataOperationRequestResponseMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.PeerDataOperationRequestResponseMessage)
                    return object;
                var message = new $root.E2E.Message.PeerDataOperationRequestResponseMessage();
                switch (object.peerDataOperationRequestType) {
                default:
                    if (typeof object.peerDataOperationRequestType === "number") {
                        message.peerDataOperationRequestType = object.peerDataOperationRequestType;
                        break;
                    }
                    break;
                case "UPLOAD_STICKER":
                case 0:
                    message.peerDataOperationRequestType = 0;
                    break;
                case "SEND_RECENT_STICKER_BOOTSTRAP":
                case 1:
                    message.peerDataOperationRequestType = 1;
                    break;
                case "GENERATE_LINK_PREVIEW":
                case 2:
                    message.peerDataOperationRequestType = 2;
                    break;
                case "HISTORY_SYNC_ON_DEMAND":
                case 3:
                    message.peerDataOperationRequestType = 3;
                    break;
                case "PLACEHOLDER_MESSAGE_RESEND":
                case 4:
                    message.peerDataOperationRequestType = 4;
                    break;
                case "WAFFLE_LINKING_NONCE_FETCH":
                case 5:
                    message.peerDataOperationRequestType = 5;
                    break;
                case "FULL_HISTORY_SYNC_ON_DEMAND":
                case 6:
                    message.peerDataOperationRequestType = 6;
                    break;
                case "COMPANION_META_NONCE_FETCH":
                case 7:
                    message.peerDataOperationRequestType = 7;
                    break;
                case "COMPANION_SYNCD_SNAPSHOT_FATAL_RECOVERY":
                case 8:
                    message.peerDataOperationRequestType = 8;
                    break;
                case "COMPANION_CANONICAL_USER_NONCE_FETCH":
                case 9:
                    message.peerDataOperationRequestType = 9;
                    break;
                case "HISTORY_SYNC_CHUNK_RETRY":
                case 10:
                    message.peerDataOperationRequestType = 10;
                    break;
                case "GALAXY_FLOW_ACTION":
                case 11:
                    message.peerDataOperationRequestType = 11;
                    break;
                }
                if (object.stanzaId != null)
                    message.stanzaId = String(object.stanzaId);
                if (object.peerDataOperationResult) {
                    if (!Array.isArray(object.peerDataOperationResult))
                        throw TypeError(".E2E.Message.PeerDataOperationRequestResponseMessage.peerDataOperationResult: array expected");
                    message.peerDataOperationResult = [];
                    for (var i = 0; i < object.peerDataOperationResult.length; ++i) {
                        if (typeof object.peerDataOperationResult[i] !== "object")
                            throw TypeError(".E2E.Message.PeerDataOperationRequestResponseMessage.peerDataOperationResult: object expected");
                        message.peerDataOperationResult[i] = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.fromObject(object.peerDataOperationResult[i]);
                    }
                }
                return message;
            };

            /**
             * Creates a plain object from a PeerDataOperationRequestResponseMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
             * @static
             * @param {E2E.Message.PeerDataOperationRequestResponseMessage} message PeerDataOperationRequestResponseMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PeerDataOperationRequestResponseMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.peerDataOperationResult = [];
                if (message.peerDataOperationRequestType != null && message.hasOwnProperty("peerDataOperationRequestType")) {
                    object.peerDataOperationRequestType = options.enums === String ? $root.E2E.Message.PeerDataOperationRequestType[message.peerDataOperationRequestType] === undefined ? message.peerDataOperationRequestType : $root.E2E.Message.PeerDataOperationRequestType[message.peerDataOperationRequestType] : message.peerDataOperationRequestType;
                    if (options.oneofs)
                        object._peerDataOperationRequestType = "peerDataOperationRequestType";
                }
                if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) {
                    object.stanzaId = message.stanzaId;
                    if (options.oneofs)
                        object._stanzaId = "stanzaId";
                }
                if (message.peerDataOperationResult && message.peerDataOperationResult.length) {
                    object.peerDataOperationResult = [];
                    for (var j = 0; j < message.peerDataOperationResult.length; ++j)
                        object.peerDataOperationResult[j] = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.toObject(message.peerDataOperationResult[j], options);
                }
                return object;
            };

            /**
             * Converts this PeerDataOperationRequestResponseMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PeerDataOperationRequestResponseMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for PeerDataOperationRequestResponseMessage
             * @function getTypeUrl
             * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            PeerDataOperationRequestResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestResponseMessage";
            };

            PeerDataOperationRequestResponseMessage.PeerDataOperationResult = (function() {

                /**
                 * Properties of a PeerDataOperationResult.
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
                 * @interface IPeerDataOperationResult
                 * @property {MmsRetry.MediaRetryNotification.ResultType|null} [mediaUploadResult] PeerDataOperationResult mediaUploadResult
                 * @property {E2E.Message.IStickerMessage|null} [stickerMessage] PeerDataOperationResult stickerMessage
                 * @property {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ILinkPreviewResponse|null} [linkPreviewResponse] PeerDataOperationResult linkPreviewResponse
                 * @property {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IPlaceholderMessageResendResponse|null} [placeholderMessageResendResponse] PeerDataOperationResult placeholderMessageResendResponse
                 * @property {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse|null} [waffleNonceFetchRequestResponse] PeerDataOperationResult waffleNonceFetchRequestResponse
                 * @property {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse|null} [fullHistorySyncOnDemandRequestResponse] PeerDataOperationResult fullHistorySyncOnDemandRequestResponse
                 * @property {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse|null} [companionMetaNonceFetchRequestResponse] PeerDataOperationResult companionMetaNonceFetchRequestResponse
                 * @property {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ISyncDSnapshotFatalRecoveryResponse|null} [syncdSnapshotFatalRecoveryResponse] PeerDataOperationResult syncdSnapshotFatalRecoveryResponse
                 * @property {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionCanonicalUserNonceFetchResponse|null} [companionCanonicalUserNonceFetchRequestResponse] PeerDataOperationResult companionCanonicalUserNonceFetchRequestResponse
                 * @property {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IHistorySyncChunkRetryResponse|null} [historySyncChunkRetryResponse] PeerDataOperationResult historySyncChunkRetryResponse
                 */

                /**
                 * Constructs a new PeerDataOperationResult.
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage
                 * @classdesc Represents a PeerDataOperationResult.
                 * @implements IPeerDataOperationResult
                 * @constructor
                 * @param {E2E.Message.PeerDataOperationRequestResponseMessage.IPeerDataOperationResult=} [properties] Properties to set
                 */
                function PeerDataOperationResult(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]];
                }

                /**
                 * PeerDataOperationResult mediaUploadResult.
                 * @member {MmsRetry.MediaRetryNotification.ResultType|null|undefined} mediaUploadResult
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                PeerDataOperationResult.prototype.mediaUploadResult = null;

                /**
                 * PeerDataOperationResult stickerMessage.
                 * @member {E2E.Message.IStickerMessage|null|undefined} stickerMessage
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                PeerDataOperationResult.prototype.stickerMessage = null;

                /**
                 * PeerDataOperationResult linkPreviewResponse.
                 * @member {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ILinkPreviewResponse|null|undefined} linkPreviewResponse
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                PeerDataOperationResult.prototype.linkPreviewResponse = null;

                /**
                 * PeerDataOperationResult placeholderMessageResendResponse.
                 * @member {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IPlaceholderMessageResendResponse|null|undefined} placeholderMessageResendResponse
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                PeerDataOperationResult.prototype.placeholderMessageResendResponse = null;

                /**
                 * PeerDataOperationResult waffleNonceFetchRequestResponse.
                 * @member {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse|null|undefined} waffleNonceFetchRequestResponse
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                PeerDataOperationResult.prototype.waffleNonceFetchRequestResponse = null;

                /**
                 * PeerDataOperationResult fullHistorySyncOnDemandRequestResponse.
                 * @member {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse|null|undefined} fullHistorySyncOnDemandRequestResponse
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                PeerDataOperationResult.prototype.fullHistorySyncOnDemandRequestResponse = null;

                /**
                 * PeerDataOperationResult companionMetaNonceFetchRequestResponse.
                 * @member {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse|null|undefined} companionMetaNonceFetchRequestResponse
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                PeerDataOperationResult.prototype.companionMetaNonceFetchRequestResponse = null;

                /**
                 * PeerDataOperationResult syncdSnapshotFatalRecoveryResponse.
                 * @member {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ISyncDSnapshotFatalRecoveryResponse|null|undefined} syncdSnapshotFatalRecoveryResponse
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                PeerDataOperationResult.prototype.syncdSnapshotFatalRecoveryResponse = null;

                /**
                 * PeerDataOperationResult companionCanonicalUserNonceFetchRequestResponse.
                 * @member {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionCanonicalUserNonceFetchResponse|null|undefined} companionCanonicalUserNonceFetchRequestResponse
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                PeerDataOperationResult.prototype.companionCanonicalUserNonceFetchRequestResponse = null;

                /**
                 * PeerDataOperationResult historySyncChunkRetryResponse.
                 * @member {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IHistorySyncChunkRetryResponse|null|undefined} historySyncChunkRetryResponse
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                PeerDataOperationResult.prototype.historySyncChunkRetryResponse = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * PeerDataOperationResult _mediaUploadResult.
                 * @member {"mediaUploadResult"|undefined} _mediaUploadResult
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                Object.defineProperty(PeerDataOperationResult.prototype, "_mediaUploadResult", {
                    get: $util.oneOfGetter($oneOfFields = ["mediaUploadResult"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * PeerDataOperationResult _stickerMessage.
                 * @member {"stickerMessage"|undefined} _stickerMessage
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                Object.defineProperty(PeerDataOperationResult.prototype, "_stickerMessage", {
                    get: $util.oneOfGetter($oneOfFields = ["stickerMessage"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * PeerDataOperationResult _linkPreviewResponse.
                 * @member {"linkPreviewResponse"|undefined} _linkPreviewResponse
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                Object.defineProperty(PeerDataOperationResult.prototype, "_linkPreviewResponse", {
                    get: $util.oneOfGetter($oneOfFields = ["linkPreviewResponse"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * PeerDataOperationResult _placeholderMessageResendResponse.
                 * @member {"placeholderMessageResendResponse"|undefined} _placeholderMessageResendResponse
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                Object.defineProperty(PeerDataOperationResult.prototype, "_placeholderMessageResendResponse", {
                    get: $util.oneOfGetter($oneOfFields = ["placeholderMessageResendResponse"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * PeerDataOperationResult _waffleNonceFetchRequestResponse.
                 * @member {"waffleNonceFetchRequestResponse"|undefined} _waffleNonceFetchRequestResponse
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                Object.defineProperty(PeerDataOperationResult.prototype, "_waffleNonceFetchRequestResponse", {
                    get: $util.oneOfGetter($oneOfFields = ["waffleNonceFetchRequestResponse"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * PeerDataOperationResult _fullHistorySyncOnDemandRequestResponse.
                 * @member {"fullHistorySyncOnDemandRequestResponse"|undefined} _fullHistorySyncOnDemandRequestResponse
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                Object.defineProperty(PeerDataOperationResult.prototype, "_fullHistorySyncOnDemandRequestResponse", {
                    get: $util.oneOfGetter($oneOfFields = ["fullHistorySyncOnDemandRequestResponse"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * PeerDataOperationResult _companionMetaNonceFetchRequestResponse.
                 * @member {"companionMetaNonceFetchRequestResponse"|undefined} _companionMetaNonceFetchRequestResponse
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                Object.defineProperty(PeerDataOperationResult.prototype, "_companionMetaNonceFetchRequestResponse", {
                    get: $util.oneOfGetter($oneOfFields = ["companionMetaNonceFetchRequestResponse"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * PeerDataOperationResult _syncdSnapshotFatalRecoveryResponse.
                 * @member {"syncdSnapshotFatalRecoveryResponse"|undefined} _syncdSnapshotFatalRecoveryResponse
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                Object.defineProperty(PeerDataOperationResult.prototype, "_syncdSnapshotFatalRecoveryResponse", {
                    get: $util.oneOfGetter($oneOfFields = ["syncdSnapshotFatalRecoveryResponse"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * PeerDataOperationResult _companionCanonicalUserNonceFetchRequestResponse.
                 * @member {"companionCanonicalUserNonceFetchRequestResponse"|undefined} _companionCanonicalUserNonceFetchRequestResponse
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                Object.defineProperty(PeerDataOperationResult.prototype, "_companionCanonicalUserNonceFetchRequestResponse", {
                    get: $util.oneOfGetter($oneOfFields = ["companionCanonicalUserNonceFetchRequestResponse"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * PeerDataOperationResult _historySyncChunkRetryResponse.
                 * @member {"historySyncChunkRetryResponse"|undefined} _historySyncChunkRetryResponse
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 */
                Object.defineProperty(PeerDataOperationResult.prototype, "_historySyncChunkRetryResponse", {
                    get: $util.oneOfGetter($oneOfFields = ["historySyncChunkRetryResponse"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new PeerDataOperationResult instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestResponseMessage.IPeerDataOperationResult=} [properties] Properties to set
                 * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult} PeerDataOperationResult instance
                 */
                PeerDataOperationResult.create = function create(properties) {
                    return new PeerDataOperationResult(properties);
                };

                /**
                 * Encodes the specified PeerDataOperationResult message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestResponseMessage.IPeerDataOperationResult} message PeerDataOperationResult message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PeerDataOperationResult.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.mediaUploadResult != null && Object.hasOwnProperty.call(message, "mediaUploadResult"))
                        writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mediaUploadResult);
                    if (message.stickerMessage != null && Object.hasOwnProperty.call(message, "stickerMessage"))
                        $root.E2E.Message.StickerMessage.encode(message.stickerMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    if (message.linkPreviewResponse != null && Object.hasOwnProperty.call(message, "linkPreviewResponse"))
                        $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.encode(message.linkPreviewResponse, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                    if (message.placeholderMessageResendResponse != null && Object.hasOwnProperty.call(message, "placeholderMessageResendResponse"))
                        $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse.encode(message.placeholderMessageResendResponse, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                    if (message.waffleNonceFetchRequestResponse != null && Object.hasOwnProperty.call(message, "waffleNonceFetchRequestResponse"))
                        $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse.encode(message.waffleNonceFetchRequestResponse, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                    if (message.fullHistorySyncOnDemandRequestResponse != null && Object.hasOwnProperty.call(message, "fullHistorySyncOnDemandRequestResponse"))
                        $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.encode(message.fullHistorySyncOnDemandRequestResponse, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                    if (message.companionMetaNonceFetchRequestResponse != null && Object.hasOwnProperty.call(message, "companionMetaNonceFetchRequestResponse"))
                        $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse.encode(message.companionMetaNonceFetchRequestResponse, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                    if (message.syncdSnapshotFatalRecoveryResponse != null && Object.hasOwnProperty.call(message, "syncdSnapshotFatalRecoveryResponse"))
                        $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse.encode(message.syncdSnapshotFatalRecoveryResponse, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                    if (message.companionCanonicalUserNonceFetchRequestResponse != null && Object.hasOwnProperty.call(message, "companionCanonicalUserNonceFetchRequestResponse"))
                        $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse.encode(message.companionCanonicalUserNonceFetchRequestResponse, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                    if (message.historySyncChunkRetryResponse != null && Object.hasOwnProperty.call(message, "historySyncChunkRetryResponse"))
                        $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse.encode(message.historySyncChunkRetryResponse, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
                    return writer;
                };

                /**
                 * Encodes the specified PeerDataOperationResult message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestResponseMessage.IPeerDataOperationResult} message PeerDataOperationResult message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PeerDataOperationResult.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a PeerDataOperationResult message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult} PeerDataOperationResult
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PeerDataOperationResult.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.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.mediaUploadResult = reader.int32();
                                break;
                            }
                        case 2: {
                                message.stickerMessage = $root.E2E.Message.StickerMessage.decode(reader, reader.uint32());
                                break;
                            }
                        case 3: {
                                message.linkPreviewResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.decode(reader, reader.uint32());
                                break;
                            }
                        case 4: {
                                message.placeholderMessageResendResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse.decode(reader, reader.uint32());
                                break;
                            }
                        case 5: {
                                message.waffleNonceFetchRequestResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse.decode(reader, reader.uint32());
                                break;
                            }
                        case 6: {
                                message.fullHistorySyncOnDemandRequestResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.decode(reader, reader.uint32());
                                break;
                            }
                        case 7: {
                                message.companionMetaNonceFetchRequestResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse.decode(reader, reader.uint32());
                                break;
                            }
                        case 8: {
                                message.syncdSnapshotFatalRecoveryResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse.decode(reader, reader.uint32());
                                break;
                            }
                        case 9: {
                                message.companionCanonicalUserNonceFetchRequestResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse.decode(reader, reader.uint32());
                                break;
                            }
                        case 10: {
                                message.historySyncChunkRetryResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a PeerDataOperationResult message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult} PeerDataOperationResult
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PeerDataOperationResult.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a PeerDataOperationResult message.
                 * @function verify
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                PeerDataOperationResult.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.mediaUploadResult != null && message.hasOwnProperty("mediaUploadResult")) {
                        properties._mediaUploadResult = 1;
                        switch (message.mediaUploadResult) {
                        default:
                            return "mediaUploadResult: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                            break;
                        }
                    }
                    if (message.stickerMessage != null && message.hasOwnProperty("stickerMessage")) {
                        properties._stickerMessage = 1;
                        {
                            var error = $root.E2E.Message.StickerMessage.verify(message.stickerMessage);
                            if (error)
                                return "stickerMessage." + error;
                        }
                    }
                    if (message.linkPreviewResponse != null && message.hasOwnProperty("linkPreviewResponse")) {
                        properties._linkPreviewResponse = 1;
                        {
                            var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.verify(message.linkPreviewResponse);
                            if (error)
                                return "linkPreviewResponse." + error;
                        }
                    }
                    if (message.placeholderMessageResendResponse != null && message.hasOwnProperty("placeholderMessageResendResponse")) {
                        properties._placeholderMessageResendResponse = 1;
                        {
                            var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse.verify(message.placeholderMessageResendResponse);
                            if (error)
                                return "placeholderMessageResendResponse." + error;
                        }
                    }
                    if (message.waffleNonceFetchRequestResponse != null && message.hasOwnProperty("waffleNonceFetchRequestResponse")) {
                        properties._waffleNonceFetchRequestResponse = 1;
                        {
                            var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse.verify(message.waffleNonceFetchRequestResponse);
                            if (error)
                                return "waffleNonceFetchRequestResponse." + error;
                        }
                    }
                    if (message.fullHistorySyncOnDemandRequestResponse != null && message.hasOwnProperty("fullHistorySyncOnDemandRequestResponse")) {
                        properties._fullHistorySyncOnDemandRequestResponse = 1;
                        {
                            var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.verify(message.fullHistorySyncOnDemandRequestResponse);
                            if (error)
                                return "fullHistorySyncOnDemandRequestResponse." + error;
                        }
                    }
                    if (message.companionMetaNonceFetchRequestResponse != null && message.hasOwnProperty("companionMetaNonceFetchRequestResponse")) {
                        properties._companionMetaNonceFetchRequestResponse = 1;
                        {
                            var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse.verify(message.companionMetaNonceFetchRequestResponse);
                            if (error)
                                return "companionMetaNonceFetchRequestResponse." + error;
                        }
                    }
                    if (message.syncdSnapshotFatalRecoveryResponse != null && message.hasOwnProperty("syncdSnapshotFatalRecoveryResponse")) {
                        properties._syncdSnapshotFatalRecoveryResponse = 1;
                        {
                            var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse.verify(message.syncdSnapshotFatalRecoveryResponse);
                            if (error)
                                return "syncdSnapshotFatalRecoveryResponse." + error;
                        }
                    }
                    if (message.companionCanonicalUserNonceFetchRequestResponse != null && message.hasOwnProperty("companionCanonicalUserNonceFetchRequestResponse")) {
                        properties._companionCanonicalUserNonceFetchRequestResponse = 1;
                        {
                            var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse.verify(message.companionCanonicalUserNonceFetchRequestResponse);
                            if (error)
                                return "companionCanonicalUserNonceFetchRequestResponse." + error;
                        }
                    }
                    if (message.historySyncChunkRetryResponse != null && message.hasOwnProperty("historySyncChunkRetryResponse")) {
                        properties._historySyncChunkRetryResponse = 1;
                        {
                            var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse.verify(message.historySyncChunkRetryResponse);
                            if (error)
                                return "historySyncChunkRetryResponse." + error;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a PeerDataOperationResult message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult} PeerDataOperationResult
                 */
                PeerDataOperationResult.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult)
                        return object;
                    var message = new $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult();
                    switch (object.mediaUploadResult) {
                    default:
                        if (typeof object.mediaUploadResult === "number") {
                            message.mediaUploadResult = object.mediaUploadResult;
                            break;
                        }
                        break;
                    case "GENERAL_ERROR":
                    case 0:
                        message.mediaUploadResult = 0;
                        break;
                    case "SUCCESS":
                    case 1:
                        message.mediaUploadResult = 1;
                        break;
                    case "NOT_FOUND":
                    case 2:
                        message.mediaUploadResult = 2;
                        break;
                    case "DECRYPTION_ERROR":
                    case 3:
                        message.mediaUploadResult = 3;
                        break;
                    }
                    if (object.stickerMessage != null) {
                        if (typeof object.stickerMessage !== "object")
                            throw TypeError(".E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.stickerMessage: object expected");
                        message.stickerMessage = $root.E2E.Message.StickerMessage.fromObject(object.stickerMessage);
                    }
                    if (object.linkPreviewResponse != null) {
                        if (typeof object.linkPreviewResponse !== "object")
                            throw TypeError(".E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.linkPreviewResponse: object expected");
                        message.linkPreviewResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.fromObject(object.linkPreviewResponse);
                    }
                    if (object.placeholderMessageResendResponse != null) {
                        if (typeof object.placeholderMessageResendResponse !== "object")
                            throw TypeError(".E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.placeholderMessageResendResponse: object expected");
                        message.placeholderMessageResendResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse.fromObject(object.placeholderMessageResendResponse);
                    }
                    if (object.waffleNonceFetchRequestResponse != null) {
                        if (typeof object.waffleNonceFetchRequestResponse !== "object")
                            throw TypeError(".E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.waffleNonceFetchRequestResponse: object expected");
                        message.waffleNonceFetchRequestResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse.fromObject(object.waffleNonceFetchRequestResponse);
                    }
                    if (object.fullHistorySyncOnDemandRequestResponse != null) {
                        if (typeof object.fullHistorySyncOnDemandRequestResponse !== "object")
                            throw TypeError(".E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.fullHistorySyncOnDemandRequestResponse: object expected");
                        message.fullHistorySyncOnDemandRequestResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.fromObject(object.fullHistorySyncOnDemandRequestResponse);
                    }
                    if (object.companionMetaNonceFetchRequestResponse != null) {
                        if (typeof object.companionMetaNonceFetchRequestResponse !== "object")
                            throw TypeError(".E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.companionMetaNonceFetchRequestResponse: object expected");
                        message.companionMetaNonceFetchRequestResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse.fromObject(object.companionMetaNonceFetchRequestResponse);
                    }
                    if (object.syncdSnapshotFatalRecoveryResponse != null) {
                        if (typeof object.syncdSnapshotFatalRecoveryResponse !== "object")
                            throw TypeError(".E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.syncdSnapshotFatalRecoveryResponse: object expected");
                        message.syncdSnapshotFatalRecoveryResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse.fromObject(object.syncdSnapshotFatalRecoveryResponse);
                    }
                    if (object.companionCanonicalUserNonceFetchRequestResponse != null) {
                        if (typeof object.companionCanonicalUserNonceFetchRequestResponse !== "object")
                            throw TypeError(".E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.companionCanonicalUserNonceFetchRequestResponse: object expected");
                        message.companionCanonicalUserNonceFetchRequestResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse.fromObject(object.companionCanonicalUserNonceFetchRequestResponse);
                    }
                    if (object.historySyncChunkRetryResponse != null) {
                        if (typeof object.historySyncChunkRetryResponse !== "object")
                            throw TypeError(".E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.historySyncChunkRetryResponse: object expected");
                        message.historySyncChunkRetryResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse.fromObject(object.historySyncChunkRetryResponse);
                    }
                    return message;
                };

                /**
                 * Creates a plain object from a PeerDataOperationResult message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @static
                 * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult} message PeerDataOperationResult
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                PeerDataOperationResult.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.mediaUploadResult != null && message.hasOwnProperty("mediaUploadResult")) {
                        object.mediaUploadResult = options.enums === String ? $root.MmsRetry.MediaRetryNotification.ResultType[message.mediaUploadResult] === undefined ? message.mediaUploadResult : $root.MmsRetry.MediaRetryNotification.ResultType[message.mediaUploadResult] : message.mediaUploadResult;
                        if (options.oneofs)
                            object._mediaUploadResult = "mediaUploadResult";
                    }
                    if (message.stickerMessage != null && message.hasOwnProperty("stickerMessage")) {
                        object.stickerMessage = $root.E2E.Message.StickerMessage.toObject(message.stickerMessage, options);
                        if (options.oneofs)
                            object._stickerMessage = "stickerMessage";
                    }
                    if (message.linkPreviewResponse != null && message.hasOwnProperty("linkPreviewResponse")) {
                        object.linkPreviewResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.toObject(message.linkPreviewResponse, options);
                        if (options.oneofs)
                            object._linkPreviewResponse = "linkPreviewResponse";
                    }
                    if (message.placeholderMessageResendResponse != null && message.hasOwnProperty("placeholderMessageResendResponse")) {
                        object.placeholderMessageResendResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse.toObject(message.placeholderMessageResendResponse, options);
                        if (options.oneofs)
                            object._placeholderMessageResendResponse = "placeholderMessageResendResponse";
                    }
                    if (message.waffleNonceFetchRequestResponse != null && message.hasOwnProperty("waffleNonceFetchRequestResponse")) {
                        object.waffleNonceFetchRequestResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse.toObject(message.waffleNonceFetchRequestResponse, options);
                        if (options.oneofs)
                            object._waffleNonceFetchRequestResponse = "waffleNonceFetchRequestResponse";
                    }
                    if (message.fullHistorySyncOnDemandRequestResponse != null && message.hasOwnProperty("fullHistorySyncOnDemandRequestResponse")) {
                        object.fullHistorySyncOnDemandRequestResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.toObject(message.fullHistorySyncOnDemandRequestResponse, options);
                        if (options.oneofs)
                            object._fullHistorySyncOnDemandRequestResponse = "fullHistorySyncOnDemandRequestResponse";
                    }
                    if (message.companionMetaNonceFetchRequestResponse != null && message.hasOwnProperty("companionMetaNonceFetchRequestResponse")) {
                        object.companionMetaNonceFetchRequestResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse.toObject(message.companionMetaNonceFetchRequestResponse, options);
                        if (options.oneofs)
                            object._companionMetaNonceFetchRequestResponse = "companionMetaNonceFetchRequestResponse";
                    }
                    if (message.syncdSnapshotFatalRecoveryResponse != null && message.hasOwnProperty("syncdSnapshotFatalRecoveryResponse")) {
                        object.syncdSnapshotFatalRecoveryResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse.toObject(message.syncdSnapshotFatalRecoveryResponse, options);
                        if (options.oneofs)
                            object._syncdSnapshotFatalRecoveryResponse = "syncdSnapshotFatalRecoveryResponse";
                    }
                    if (message.companionCanonicalUserNonceFetchRequestResponse != null && message.hasOwnProperty("companionCanonicalUserNonceFetchRequestResponse")) {
                        object.companionCanonicalUserNonceFetchRequestResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse.toObject(message.companionCanonicalUserNonceFetchRequestResponse, options);
                        if (options.oneofs)
                            object._companionCanonicalUserNonceFetchRequestResponse = "companionCanonicalUserNonceFetchRequestResponse";
                    }
                    if (message.historySyncChunkRetryResponse != null && message.hasOwnProperty("historySyncChunkRetryResponse")) {
                        object.historySyncChunkRetryResponse = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse.toObject(message.historySyncChunkRetryResponse, options);
                        if (options.oneofs)
                            object._historySyncChunkRetryResponse = "historySyncChunkRetryResponse";
                    }
                    return object;
                };

                /**
                 * Converts this PeerDataOperationResult to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                PeerDataOperationResult.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for PeerDataOperationResult
                 * @function getTypeUrl
                 * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                PeerDataOperationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult";
                };

                PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse = (function() {

                    /**
                     * Properties of a CompanionCanonicalUserNonceFetchResponse.
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                     * @interface ICompanionCanonicalUserNonceFetchResponse
                     * @property {string|null} [nonce] CompanionCanonicalUserNonceFetchResponse nonce
                     * @property {string|null} [waFbid] CompanionCanonicalUserNonceFetchResponse waFbid
                     * @property {boolean|null} [forceRefresh] CompanionCanonicalUserNonceFetchResponse forceRefresh
                     */

                    /**
                     * Constructs a new CompanionCanonicalUserNonceFetchResponse.
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                     * @classdesc Represents a CompanionCanonicalUserNonceFetchResponse.
                     * @implements ICompanionCanonicalUserNonceFetchResponse
                     * @constructor
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionCanonicalUserNonceFetchResponse=} [properties] Properties to set
                     */
                    function CompanionCanonicalUserNonceFetchResponse(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]];
                    }

                    /**
                     * CompanionCanonicalUserNonceFetchResponse nonce.
                     * @member {string|null|undefined} nonce
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse
                     * @instance
                     */
                    CompanionCanonicalUserNonceFetchResponse.prototype.nonce = null;

                    /**
                     * CompanionCanonicalUserNonceFetchResponse waFbid.
                     * @member {string|null|undefined} waFbid
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse
                     * @instance
                     */
                    CompanionCanonicalUserNonceFetchResponse.prototype.waFbid = null;

                    /**
                     * CompanionCanonicalUserNonceFetchResponse forceRefresh.
                     * @member {boolean|null|undefined} forceRefresh
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse
                     * @instance
                     */
                    CompanionCanonicalUserNonceFetchResponse.prototype.forceRefresh = null;

                    // OneOf field names bound to virtual getters and setters
                    var $oneOfFields;

                    /**
                     * CompanionCanonicalUserNonceFetchResponse _nonce.
                     * @member {"nonce"|undefined} _nonce
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse
                     * @instance
                     */
                    Object.defineProperty(CompanionCanonicalUserNonceFetchResponse.prototype, "_nonce", {
                        get: $util.oneOfGetter($oneOfFields = ["nonce"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * CompanionCanonicalUserNonceFetchResponse _waFbid.
                     * @member {"waFbid"|undefined} _waFbid
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse
                     * @instance
                     */
                    Object.defineProperty(CompanionCanonicalUserNonceFetchResponse.prototype, "_waFbid", {
                        get: $util.oneOfGetter($oneOfFields = ["waFbid"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * CompanionCanonicalUserNonceFetchResponse _forceRefresh.
                     * @member {"forceRefresh"|undefined} _forceRefresh
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse
                     * @instance
                     */
                    Object.defineProperty(CompanionCanonicalUserNonceFetchResponse.prototype, "_forceRefresh", {
                        get: $util.oneOfGetter($oneOfFields = ["forceRefresh"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * Creates a new CompanionCanonicalUserNonceFetchResponse instance using the specified properties.
                     * @function create
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionCanonicalUserNonceFetchResponse=} [properties] Properties to set
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse} CompanionCanonicalUserNonceFetchResponse instance
                     */
                    CompanionCanonicalUserNonceFetchResponse.create = function create(properties) {
                        return new CompanionCanonicalUserNonceFetchResponse(properties);
                    };

                    /**
                     * Encodes the specified CompanionCanonicalUserNonceFetchResponse message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse.verify|verify} messages.
                     * @function encode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionCanonicalUserNonceFetchResponse} message CompanionCanonicalUserNonceFetchResponse message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    CompanionCanonicalUserNonceFetchResponse.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.nonce != null && Object.hasOwnProperty.call(message, "nonce"))
                            writer.uint32(/* id 1, wireType 2 =*/10).string(message.nonce);
                        if (message.waFbid != null && Object.hasOwnProperty.call(message, "waFbid"))
                            writer.uint32(/* id 2, wireType 2 =*/18).string(message.waFbid);
                        if (message.forceRefresh != null && Object.hasOwnProperty.call(message, "forceRefresh"))
                            writer.uint32(/* id 3, wireType 0 =*/24).bool(message.forceRefresh);
                        return writer;
                    };

                    /**
                     * Encodes the specified CompanionCanonicalUserNonceFetchResponse message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionCanonicalUserNonceFetchResponse} message CompanionCanonicalUserNonceFetchResponse message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    CompanionCanonicalUserNonceFetchResponse.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a CompanionCanonicalUserNonceFetchResponse message from the specified reader or buffer.
                     * @function decode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse} CompanionCanonicalUserNonceFetchResponse
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    CompanionCanonicalUserNonceFetchResponse.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.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            if (tag === error)
                                break;
                            switch (tag >>> 3) {
                            case 1: {
                                    message.nonce = reader.string();
                                    break;
                                }
                            case 2: {
                                    message.waFbid = reader.string();
                                    break;
                                }
                            case 3: {
                                    message.forceRefresh = reader.bool();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a CompanionCanonicalUserNonceFetchResponse message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse} CompanionCanonicalUserNonceFetchResponse
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    CompanionCanonicalUserNonceFetchResponse.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a CompanionCanonicalUserNonceFetchResponse message.
                     * @function verify
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    CompanionCanonicalUserNonceFetchResponse.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        var properties = {};
                        if (message.nonce != null && message.hasOwnProperty("nonce")) {
                            properties._nonce = 1;
                            if (!$util.isString(message.nonce))
                                return "nonce: string expected";
                        }
                        if (message.waFbid != null && message.hasOwnProperty("waFbid")) {
                            properties._waFbid = 1;
                            if (!$util.isString(message.waFbid))
                                return "waFbid: string expected";
                        }
                        if (message.forceRefresh != null && message.hasOwnProperty("forceRefresh")) {
                            properties._forceRefresh = 1;
                            if (typeof message.forceRefresh !== "boolean")
                                return "forceRefresh: boolean expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a CompanionCanonicalUserNonceFetchResponse message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse} CompanionCanonicalUserNonceFetchResponse
                     */
                    CompanionCanonicalUserNonceFetchResponse.fromObject = function fromObject(object) {
                        if (object instanceof $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse)
                            return object;
                        var message = new $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse();
                        if (object.nonce != null)
                            message.nonce = String(object.nonce);
                        if (object.waFbid != null)
                            message.waFbid = String(object.waFbid);
                        if (object.forceRefresh != null)
                            message.forceRefresh = Boolean(object.forceRefresh);
                        return message;
                    };

                    /**
                     * Creates a plain object from a CompanionCanonicalUserNonceFetchResponse message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse} message CompanionCanonicalUserNonceFetchResponse
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    CompanionCanonicalUserNonceFetchResponse.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (message.nonce != null && message.hasOwnProperty("nonce")) {
                            object.nonce = message.nonce;
                            if (options.oneofs)
                                object._nonce = "nonce";
                        }
                        if (message.waFbid != null && message.hasOwnProperty("waFbid")) {
                            object.waFbid = message.waFbid;
                            if (options.oneofs)
                                object._waFbid = "waFbid";
                        }
                        if (message.forceRefresh != null && message.hasOwnProperty("forceRefresh")) {
                            object.forceRefresh = message.forceRefresh;
                            if (options.oneofs)
                                object._forceRefresh = "forceRefresh";
                        }
                        return object;
                    };

                    /**
                     * Converts this CompanionCanonicalUserNonceFetchResponse to JSON.
                     * @function toJSON
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    CompanionCanonicalUserNonceFetchResponse.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for CompanionCanonicalUserNonceFetchResponse
                     * @function getTypeUrl
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    CompanionCanonicalUserNonceFetchResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse";
                    };

                    return CompanionCanonicalUserNonceFetchResponse;
                })();

                PeerDataOperationResult.CompanionMetaNonceFetchResponse = (function() {

                    /**
                     * Properties of a CompanionMetaNonceFetchResponse.
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                     * @interface ICompanionMetaNonceFetchResponse
                     * @property {string|null} [nonce] CompanionMetaNonceFetchResponse nonce
                     */

                    /**
                     * Constructs a new CompanionMetaNonceFetchResponse.
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                     * @classdesc Represents a CompanionMetaNonceFetchResponse.
                     * @implements ICompanionMetaNonceFetchResponse
                     * @constructor
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse=} [properties] Properties to set
                     */
                    function CompanionMetaNonceFetchResponse(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]];
                    }

                    /**
                     * CompanionMetaNonceFetchResponse nonce.
                     * @member {string|null|undefined} nonce
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse
                     * @instance
                     */
                    CompanionMetaNonceFetchResponse.prototype.nonce = null;

                    // OneOf field names bound to virtual getters and setters
                    var $oneOfFields;

                    /**
                     * CompanionMetaNonceFetchResponse _nonce.
                     * @member {"nonce"|undefined} _nonce
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse
                     * @instance
                     */
                    Object.defineProperty(CompanionMetaNonceFetchResponse.prototype, "_nonce", {
                        get: $util.oneOfGetter($oneOfFields = ["nonce"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * Creates a new CompanionMetaNonceFetchResponse instance using the specified properties.
                     * @function create
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse=} [properties] Properties to set
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse} CompanionMetaNonceFetchResponse instance
                     */
                    CompanionMetaNonceFetchResponse.create = function create(properties) {
                        return new CompanionMetaNonceFetchResponse(properties);
                    };

                    /**
                     * Encodes the specified CompanionMetaNonceFetchResponse message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse.verify|verify} messages.
                     * @function encode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse} message CompanionMetaNonceFetchResponse message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    CompanionMetaNonceFetchResponse.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.nonce != null && Object.hasOwnProperty.call(message, "nonce"))
                            writer.uint32(/* id 1, wireType 2 =*/10).string(message.nonce);
                        return writer;
                    };

                    /**
                     * Encodes the specified CompanionMetaNonceFetchResponse message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse} message CompanionMetaNonceFetchResponse message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    CompanionMetaNonceFetchResponse.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a CompanionMetaNonceFetchResponse message from the specified reader or buffer.
                     * @function decode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse} CompanionMetaNonceFetchResponse
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    CompanionMetaNonceFetchResponse.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.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            if (tag === error)
                                break;
                            switch (tag >>> 3) {
                            case 1: {
                                    message.nonce = reader.string();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a CompanionMetaNonceFetchResponse message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse} CompanionMetaNonceFetchResponse
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    CompanionMetaNonceFetchResponse.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a CompanionMetaNonceFetchResponse message.
                     * @function verify
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    CompanionMetaNonceFetchResponse.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        var properties = {};
                        if (message.nonce != null && message.hasOwnProperty("nonce")) {
                            properties._nonce = 1;
                            if (!$util.isString(message.nonce))
                                return "nonce: string expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a CompanionMetaNonceFetchResponse message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse} CompanionMetaNonceFetchResponse
                     */
                    CompanionMetaNonceFetchResponse.fromObject = function fromObject(object) {
                        if (object instanceof $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse)
                            return object;
                        var message = new $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse();
                        if (object.nonce != null)
                            message.nonce = String(object.nonce);
                        return message;
                    };

                    /**
                     * Creates a plain object from a CompanionMetaNonceFetchResponse message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse} message CompanionMetaNonceFetchResponse
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    CompanionMetaNonceFetchResponse.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (message.nonce != null && message.hasOwnProperty("nonce")) {
                            object.nonce = message.nonce;
                            if (options.oneofs)
                                object._nonce = "nonce";
                        }
                        return object;
                    };

                    /**
                     * Converts this CompanionMetaNonceFetchResponse to JSON.
                     * @function toJSON
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    CompanionMetaNonceFetchResponse.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for CompanionMetaNonceFetchResponse
                     * @function getTypeUrl
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    CompanionMetaNonceFetchResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse";
                    };

                    return CompanionMetaNonceFetchResponse;
                })();

                PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse = (function() {

                    /**
                     * Properties of a FullHistorySyncOnDemandRequestResponse.
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                     * @interface IFullHistorySyncOnDemandRequestResponse
                     * @property {E2E.Message.IFullHistorySyncOnDemandRequestMetadata|null} [requestMetadata] FullHistorySyncOnDemandRequestResponse requestMetadata
                     * @property {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandResponseCode|null} [responseCode] FullHistorySyncOnDemandRequestResponse responseCode
                     */

                    /**
                     * Constructs a new FullHistorySyncOnDemandRequestResponse.
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                     * @classdesc Represents a FullHistorySyncOnDemandRequestResponse.
                     * @implements IFullHistorySyncOnDemandRequestResponse
                     * @constructor
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse=} [properties] Properties to set
                     */
                    function FullHistorySyncOnDemandRequestResponse(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]];
                    }

                    /**
                     * FullHistorySyncOnDemandRequestResponse requestMetadata.
                     * @member {E2E.Message.IFullHistorySyncOnDemandRequestMetadata|null|undefined} requestMetadata
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse
                     * @instance
                     */
                    FullHistorySyncOnDemandRequestResponse.prototype.requestMetadata = null;

                    /**
                     * FullHistorySyncOnDemandRequestResponse responseCode.
                     * @member {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandResponseCode|null|undefined} responseCode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse
                     * @instance
                     */
                    FullHistorySyncOnDemandRequestResponse.prototype.responseCode = null;

                    // OneOf field names bound to virtual getters and setters
                    var $oneOfFields;

                    /**
                     * FullHistorySyncOnDemandRequestResponse _requestMetadata.
                     * @member {"requestMetadata"|undefined} _requestMetadata
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse
                     * @instance
                     */
                    Object.defineProperty(FullHistorySyncOnDemandRequestResponse.prototype, "_requestMetadata", {
                        get: $util.oneOfGetter($oneOfFields = ["requestMetadata"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * FullHistorySyncOnDemandRequestResponse _responseCode.
                     * @member {"responseCode"|undefined} _responseCode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse
                     * @instance
                     */
                    Object.defineProperty(FullHistorySyncOnDemandRequestResponse.prototype, "_responseCode", {
                        get: $util.oneOfGetter($oneOfFields = ["responseCode"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * Creates a new FullHistorySyncOnDemandRequestResponse instance using the specified properties.
                     * @function create
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse=} [properties] Properties to set
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse} FullHistorySyncOnDemandRequestResponse instance
                     */
                    FullHistorySyncOnDemandRequestResponse.create = function create(properties) {
                        return new FullHistorySyncOnDemandRequestResponse(properties);
                    };

                    /**
                     * Encodes the specified FullHistorySyncOnDemandRequestResponse message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.verify|verify} messages.
                     * @function encode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse} message FullHistorySyncOnDemandRequestResponse message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    FullHistorySyncOnDemandRequestResponse.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.requestMetadata != null && Object.hasOwnProperty.call(message, "requestMetadata"))
                            $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.encode(message.requestMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                        if (message.responseCode != null && Object.hasOwnProperty.call(message, "responseCode"))
                            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.responseCode);
                        return writer;
                    };

                    /**
                     * Encodes the specified FullHistorySyncOnDemandRequestResponse message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse} message FullHistorySyncOnDemandRequestResponse message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    FullHistorySyncOnDemandRequestResponse.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a FullHistorySyncOnDemandRequestResponse message from the specified reader or buffer.
                     * @function decode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse} FullHistorySyncOnDemandRequestResponse
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    FullHistorySyncOnDemandRequestResponse.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.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            if (tag === error)
                                break;
                            switch (tag >>> 3) {
                            case 1: {
                                    message.requestMetadata = $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.decode(reader, reader.uint32());
                                    break;
                                }
                            case 2: {
                                    message.responseCode = reader.int32();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a FullHistorySyncOnDemandRequestResponse message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse} FullHistorySyncOnDemandRequestResponse
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    FullHistorySyncOnDemandRequestResponse.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a FullHistorySyncOnDemandRequestResponse message.
                     * @function verify
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    FullHistorySyncOnDemandRequestResponse.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        var properties = {};
                        if (message.requestMetadata != null && message.hasOwnProperty("requestMetadata")) {
                            properties._requestMetadata = 1;
                            {
                                var error = $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.verify(message.requestMetadata);
                                if (error)
                                    return "requestMetadata." + error;
                            }
                        }
                        if (message.responseCode != null && message.hasOwnProperty("responseCode")) {
                            properties._responseCode = 1;
                            switch (message.responseCode) {
                            default:
                                return "responseCode: enum value expected";
                            case 0:
                            case 1:
                            case 2:
                            case 3:
                            case 4:
                            case 5:
                            case 6:
                                break;
                            }
                        }
                        return null;
                    };

                    /**
                     * Creates a FullHistorySyncOnDemandRequestResponse message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse} FullHistorySyncOnDemandRequestResponse
                     */
                    FullHistorySyncOnDemandRequestResponse.fromObject = function fromObject(object) {
                        if (object instanceof $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse)
                            return object;
                        var message = new $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse();
                        if (object.requestMetadata != null) {
                            if (typeof object.requestMetadata !== "object")
                                throw TypeError(".E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.requestMetadata: object expected");
                            message.requestMetadata = $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.fromObject(object.requestMetadata);
                        }
                        switch (object.responseCode) {
                        default:
                            if (typeof object.responseCode === "number") {
                                message.responseCode = object.responseCode;
                                break;
                            }
                            break;
                        case "REQUEST_SUCCESS":
                        case 0:
                            message.responseCode = 0;
                            break;
                        case "REQUEST_TIME_EXPIRED":
                        case 1:
                            message.responseCode = 1;
                            break;
                        case "DECLINED_SHARING_HISTORY":
                        case 2:
                            message.responseCode = 2;
                            break;
                        case "GENERIC_ERROR":
                        case 3:
                            message.responseCode = 3;
                            break;
                        case "ERROR_REQUEST_ON_NON_SMB_PRIMARY":
                        case 4:
                            message.responseCode = 4;
                            break;
                        case "ERROR_HOSTED_DEVICE_NOT_CONNECTED":
                        case 5:
                            message.responseCode = 5;
                            break;
                        case "ERROR_HOSTED_DEVICE_LOGIN_TIME_NOT_SET":
                        case 6:
                            message.responseCode = 6;
                            break;
                        }
                        return message;
                    };

                    /**
                     * Creates a plain object from a FullHistorySyncOnDemandRequestResponse message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse} message FullHistorySyncOnDemandRequestResponse
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    FullHistorySyncOnDemandRequestResponse.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (message.requestMetadata != null && message.hasOwnProperty("requestMetadata")) {
                            object.requestMetadata = $root.E2E.Message.FullHistorySyncOnDemandRequestMetadata.toObject(message.requestMetadata, options);
                            if (options.oneofs)
                                object._requestMetadata = "requestMetadata";
                        }
                        if (message.responseCode != null && message.hasOwnProperty("responseCode")) {
                            object.responseCode = options.enums === String ? $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandResponseCode[message.responseCode] === undefined ? message.responseCode : $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandResponseCode[message.responseCode] : message.responseCode;
                            if (options.oneofs)
                                object._responseCode = "responseCode";
                        }
                        return object;
                    };

                    /**
                     * Converts this FullHistorySyncOnDemandRequestResponse to JSON.
                     * @function toJSON
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    FullHistorySyncOnDemandRequestResponse.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for FullHistorySyncOnDemandRequestResponse
                     * @function getTypeUrl
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    FullHistorySyncOnDemandRequestResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse";
                    };

                    return FullHistorySyncOnDemandRequestResponse;
                })();

                /**
                 * FullHistorySyncOnDemandResponseCode enum.
                 * @name E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandResponseCode
                 * @enum {number}
                 * @property {number} REQUEST_SUCCESS=0 REQUEST_SUCCESS value
                 * @property {number} REQUEST_TIME_EXPIRED=1 REQUEST_TIME_EXPIRED value
                 * @property {number} DECLINED_SHARING_HISTORY=2 DECLINED_SHARING_HISTORY value
                 * @property {number} GENERIC_ERROR=3 GENERIC_ERROR value
                 * @property {number} ERROR_REQUEST_ON_NON_SMB_PRIMARY=4 ERROR_REQUEST_ON_NON_SMB_PRIMARY value
                 * @property {number} ERROR_HOSTED_DEVICE_NOT_CONNECTED=5 ERROR_HOSTED_DEVICE_NOT_CONNECTED value
                 * @property {number} ERROR_HOSTED_DEVICE_LOGIN_TIME_NOT_SET=6 ERROR_HOSTED_DEVICE_LOGIN_TIME_NOT_SET value
                 */
                PeerDataOperationResult.FullHistorySyncOnDemandResponseCode = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "REQUEST_SUCCESS"] = 0;
                    values[valuesById[1] = "REQUEST_TIME_EXPIRED"] = 1;
                    values[valuesById[2] = "DECLINED_SHARING_HISTORY"] = 2;
                    values[valuesById[3] = "GENERIC_ERROR"] = 3;
                    values[valuesById[4] = "ERROR_REQUEST_ON_NON_SMB_PRIMARY"] = 4;
                    values[valuesById[5] = "ERROR_HOSTED_DEVICE_NOT_CONNECTED"] = 5;
                    values[valuesById[6] = "ERROR_HOSTED_DEVICE_LOGIN_TIME_NOT_SET"] = 6;
                    return values;
                })();

                PeerDataOperationResult.HistorySyncChunkRetryResponse = (function() {

                    /**
                     * Properties of a HistorySyncChunkRetryResponse.
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                     * @interface IHistorySyncChunkRetryResponse
                     * @property {E2E.Message.HistorySyncType|null} [syncType] HistorySyncChunkRetryResponse syncType
                     * @property {number|null} [chunkOrder] HistorySyncChunkRetryResponse chunkOrder
                     * @property {string|null} [requestId] HistorySyncChunkRetryResponse requestId
                     * @property {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponseCode|null} [responseCode] HistorySyncChunkRetryResponse responseCode
                     * @property {boolean|null} [canRecover] HistorySyncChunkRetryResponse canRecover
                     */

                    /**
                     * Constructs a new HistorySyncChunkRetryResponse.
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                     * @classdesc Represents a HistorySyncChunkRetryResponse.
                     * @implements IHistorySyncChunkRetryResponse
                     * @constructor
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IHistorySyncChunkRetryResponse=} [properties] Properties to set
                     */
                    function HistorySyncChunkRetryResponse(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]];
                    }

                    /**
                     * HistorySyncChunkRetryResponse syncType.
                     * @member {E2E.Message.HistorySyncType|null|undefined} syncType
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @instance
                     */
                    HistorySyncChunkRetryResponse.prototype.syncType = null;

                    /**
                     * HistorySyncChunkRetryResponse chunkOrder.
                     * @member {number|null|undefined} chunkOrder
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @instance
                     */
                    HistorySyncChunkRetryResponse.prototype.chunkOrder = null;

                    /**
                     * HistorySyncChunkRetryResponse requestId.
                     * @member {string|null|undefined} requestId
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @instance
                     */
                    HistorySyncChunkRetryResponse.prototype.requestId = null;

                    /**
                     * HistorySyncChunkRetryResponse responseCode.
                     * @member {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponseCode|null|undefined} responseCode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @instance
                     */
                    HistorySyncChunkRetryResponse.prototype.responseCode = null;

                    /**
                     * HistorySyncChunkRetryResponse canRecover.
                     * @member {boolean|null|undefined} canRecover
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @instance
                     */
                    HistorySyncChunkRetryResponse.prototype.canRecover = null;

                    // OneOf field names bound to virtual getters and setters
                    var $oneOfFields;

                    /**
                     * HistorySyncChunkRetryResponse _syncType.
                     * @member {"syncType"|undefined} _syncType
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @instance
                     */
                    Object.defineProperty(HistorySyncChunkRetryResponse.prototype, "_syncType", {
                        get: $util.oneOfGetter($oneOfFields = ["syncType"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * HistorySyncChunkRetryResponse _chunkOrder.
                     * @member {"chunkOrder"|undefined} _chunkOrder
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @instance
                     */
                    Object.defineProperty(HistorySyncChunkRetryResponse.prototype, "_chunkOrder", {
                        get: $util.oneOfGetter($oneOfFields = ["chunkOrder"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * HistorySyncChunkRetryResponse _requestId.
                     * @member {"requestId"|undefined} _requestId
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @instance
                     */
                    Object.defineProperty(HistorySyncChunkRetryResponse.prototype, "_requestId", {
                        get: $util.oneOfGetter($oneOfFields = ["requestId"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * HistorySyncChunkRetryResponse _responseCode.
                     * @member {"responseCode"|undefined} _responseCode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @instance
                     */
                    Object.defineProperty(HistorySyncChunkRetryResponse.prototype, "_responseCode", {
                        get: $util.oneOfGetter($oneOfFields = ["responseCode"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * HistorySyncChunkRetryResponse _canRecover.
                     * @member {"canRecover"|undefined} _canRecover
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @instance
                     */
                    Object.defineProperty(HistorySyncChunkRetryResponse.prototype, "_canRecover", {
                        get: $util.oneOfGetter($oneOfFields = ["canRecover"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * Creates a new HistorySyncChunkRetryResponse instance using the specified properties.
                     * @function create
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IHistorySyncChunkRetryResponse=} [properties] Properties to set
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse} HistorySyncChunkRetryResponse instance
                     */
                    HistorySyncChunkRetryResponse.create = function create(properties) {
                        return new HistorySyncChunkRetryResponse(properties);
                    };

                    /**
                     * Encodes the specified HistorySyncChunkRetryResponse message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse.verify|verify} messages.
                     * @function encode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IHistorySyncChunkRetryResponse} message HistorySyncChunkRetryResponse message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    HistorySyncChunkRetryResponse.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.syncType != null && Object.hasOwnProperty.call(message, "syncType"))
                            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.syncType);
                        if (message.chunkOrder != null && Object.hasOwnProperty.call(message, "chunkOrder"))
                            writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.chunkOrder);
                        if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId"))
                            writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId);
                        if (message.responseCode != null && Object.hasOwnProperty.call(message, "responseCode"))
                            writer.uint32(/* id 4, wireType 0 =*/32).int32(message.responseCode);
                        if (message.canRecover != null && Object.hasOwnProperty.call(message, "canRecover"))
                            writer.uint32(/* id 5, wireType 0 =*/40).bool(message.canRecover);
                        return writer;
                    };

                    /**
                     * Encodes the specified HistorySyncChunkRetryResponse message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IHistorySyncChunkRetryResponse} message HistorySyncChunkRetryResponse message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    HistorySyncChunkRetryResponse.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a HistorySyncChunkRetryResponse message from the specified reader or buffer.
                     * @function decode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse} HistorySyncChunkRetryResponse
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    HistorySyncChunkRetryResponse.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.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            if (tag === error)
                                break;
                            switch (tag >>> 3) {
                            case 1: {
                                    message.syncType = reader.int32();
                                    break;
                                }
                            case 2: {
                                    message.chunkOrder = reader.uint32();
                                    break;
                                }
                            case 3: {
                                    message.requestId = reader.string();
                                    break;
                                }
                            case 4: {
                                    message.responseCode = reader.int32();
                                    break;
                                }
                            case 5: {
                                    message.canRecover = reader.bool();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a HistorySyncChunkRetryResponse message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse} HistorySyncChunkRetryResponse
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    HistorySyncChunkRetryResponse.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a HistorySyncChunkRetryResponse message.
                     * @function verify
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    HistorySyncChunkRetryResponse.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        var properties = {};
                        if (message.syncType != null && message.hasOwnProperty("syncType")) {
                            properties._syncType = 1;
                            switch (message.syncType) {
                            default:
                                return "syncType: enum value expected";
                            case 0:
                            case 1:
                            case 2:
                            case 3:
                            case 4:
                            case 5:
                            case 6:
                            case 7:
                            case 8:
                                break;
                            }
                        }
                        if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) {
                            properties._chunkOrder = 1;
                            if (!$util.isInteger(message.chunkOrder))
                                return "chunkOrder: integer expected";
                        }
                        if (message.requestId != null && message.hasOwnProperty("requestId")) {
                            properties._requestId = 1;
                            if (!$util.isString(message.requestId))
                                return "requestId: string expected";
                        }
                        if (message.responseCode != null && message.hasOwnProperty("responseCode")) {
                            properties._responseCode = 1;
                            switch (message.responseCode) {
                            default:
                                return "responseCode: enum value expected";
                            case 1:
                            case 2:
                            case 3:
                            case 4:
                            case 5:
                            case 6:
                                break;
                            }
                        }
                        if (message.canRecover != null && message.hasOwnProperty("canRecover")) {
                            properties._canRecover = 1;
                            if (typeof message.canRecover !== "boolean")
                                return "canRecover: boolean expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a HistorySyncChunkRetryResponse message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse} HistorySyncChunkRetryResponse
                     */
                    HistorySyncChunkRetryResponse.fromObject = function fromObject(object) {
                        if (object instanceof $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse)
                            return object;
                        var message = new $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse();
                        switch (object.syncType) {
                        default:
                            if (typeof object.syncType === "number") {
                                message.syncType = object.syncType;
                                break;
                            }
                            break;
                        case "INITIAL_BOOTSTRAP":
                        case 0:
                            message.syncType = 0;
                            break;
                        case "INITIAL_STATUS_V3":
                        case 1:
                            message.syncType = 1;
                            break;
                        case "FULL":
                        case 2:
                            message.syncType = 2;
                            break;
                        case "RECENT":
                        case 3:
                            message.syncType = 3;
                            break;
                        case "PUSH_NAME":
                        case 4:
                            message.syncType = 4;
                            break;
                        case "NON_BLOCKING_DATA":
                        case 5:
                            message.syncType = 5;
                            break;
                        case "ON_DEMAND":
                        case 6:
                            message.syncType = 6;
                            break;
                        case "NO_HISTORY":
                        case 7:
                            message.syncType = 7;
                            break;
                        case "MESSAGE_ACCESS_STATUS":
                        case 8:
                            message.syncType = 8;
                            break;
                        }
                        if (object.chunkOrder != null)
                            message.chunkOrder = object.chunkOrder >>> 0;
                        if (object.requestId != null)
                            message.requestId = String(object.requestId);
                        switch (object.responseCode) {
                        default:
                            if (typeof object.responseCode === "number") {
                                message.responseCode = object.responseCode;
                                break;
                            }
                            break;
                        case "GENERATION_ERROR":
                        case 1:
                            message.responseCode = 1;
                            break;
                        case "CHUNK_CONSUMED":
                        case 2:
                            message.responseCode = 2;
                            break;
                        case "TIMEOUT":
                        case 3:
                            message.responseCode = 3;
                            break;
                        case "SESSION_EXHAUSTED":
                        case 4:
                            message.responseCode = 4;
                            break;
                        case "CHUNK_EXHAUSTED":
                        case 5:
                            message.responseCode = 5;
                            break;
                        case "DUPLICATED_REQUEST":
                        case 6:
                            message.responseCode = 6;
                            break;
                        }
                        if (object.canRecover != null)
                            message.canRecover = Boolean(object.canRecover);
                        return message;
                    };

                    /**
                     * Creates a plain object from a HistorySyncChunkRetryResponse message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse} message HistorySyncChunkRetryResponse
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    HistorySyncChunkRetryResponse.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (message.syncType != null && message.hasOwnProperty("syncType")) {
                            object.syncType = options.enums === String ? $root.E2E.Message.HistorySyncType[message.syncType] === undefined ? message.syncType : $root.E2E.Message.HistorySyncType[message.syncType] : message.syncType;
                            if (options.oneofs)
                                object._syncType = "syncType";
                        }
                        if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) {
                            object.chunkOrder = message.chunkOrder;
                            if (options.oneofs)
                                object._chunkOrder = "chunkOrder";
                        }
                        if (message.requestId != null && message.hasOwnProperty("requestId")) {
                            object.requestId = message.requestId;
                            if (options.oneofs)
                                object._requestId = "requestId";
                        }
                        if (message.responseCode != null && message.hasOwnProperty("responseCode")) {
                            object.responseCode = options.enums === String ? $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponseCode[message.responseCode] === undefined ? message.responseCode : $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponseCode[message.responseCode] : message.responseCode;
                            if (options.oneofs)
                                object._responseCode = "responseCode";
                        }
                        if (message.canRecover != null && message.hasOwnProperty("canRecover")) {
                            object.canRecover = message.canRecover;
                            if (options.oneofs)
                                object._canRecover = "canRecover";
                        }
                        return object;
                    };

                    /**
                     * Converts this HistorySyncChunkRetryResponse to JSON.
                     * @function toJSON
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    HistorySyncChunkRetryResponse.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for HistorySyncChunkRetryResponse
                     * @function getTypeUrl
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    HistorySyncChunkRetryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse";
                    };

                    return HistorySyncChunkRetryResponse;
                })();

                /**
                 * HistorySyncChunkRetryResponseCode enum.
                 * @name E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponseCode
                 * @enum {number}
                 * @property {number} GENERATION_ERROR=1 GENERATION_ERROR value
                 * @property {number} CHUNK_CONSUMED=2 CHUNK_CONSUMED value
                 * @property {number} TIMEOUT=3 TIMEOUT value
                 * @property {number} SESSION_EXHAUSTED=4 SESSION_EXHAUSTED value
                 * @property {number} CHUNK_EXHAUSTED=5 CHUNK_EXHAUSTED value
                 * @property {number} DUPLICATED_REQUEST=6 DUPLICATED_REQUEST value
                 */
                PeerDataOperationResult.HistorySyncChunkRetryResponseCode = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[1] = "GENERATION_ERROR"] = 1;
                    values[valuesById[2] = "CHUNK_CONSUMED"] = 2;
                    values[valuesById[3] = "TIMEOUT"] = 3;
                    values[valuesById[4] = "SESSION_EXHAUSTED"] = 4;
                    values[valuesById[5] = "CHUNK_EXHAUSTED"] = 5;
                    values[valuesById[6] = "DUPLICATED_REQUEST"] = 6;
                    return values;
                })();

                PeerDataOperationResult.LinkPreviewResponse = (function() {

                    /**
                     * Properties of a LinkPreviewResponse.
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                     * @interface ILinkPreviewResponse
                     * @property {string|null} [url] LinkPreviewResponse url
                     * @property {string|null} [title] LinkPreviewResponse title
                     * @property {string|null} [description] LinkPreviewResponse description
                     * @property {Uint8Array|null} [thumbData] LinkPreviewResponse thumbData
                     * @property {string|null} [matchText] LinkPreviewResponse matchText
                     * @property {string|null} [previewType] LinkPreviewResponse previewType
                     * @property {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.ILinkPreviewHighQualityThumbnail|null} [hqThumbnail] LinkPreviewResponse hqThumbnail
                     * @property {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.IPaymentLinkPreviewMetadata|null} [previewMetadata] LinkPreviewResponse previewMetadata
                     */

                    /**
                     * Constructs a new LinkPreviewResponse.
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                     * @classdesc Represents a LinkPreviewResponse.
                     * @implements ILinkPreviewResponse
                     * @constructor
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ILinkPreviewResponse=} [properties] Properties to set
                     */
                    function LinkPreviewResponse(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]];
                    }

                    /**
                     * LinkPreviewResponse url.
                     * @member {string|null|undefined} url
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    LinkPreviewResponse.prototype.url = null;

                    /**
                     * LinkPreviewResponse title.
                     * @member {string|null|undefined} title
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    LinkPreviewResponse.prototype.title = null;

                    /**
                     * LinkPreviewResponse description.
                     * @member {string|null|undefined} description
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    LinkPreviewResponse.prototype.description = null;

                    /**
                     * LinkPreviewResponse thumbData.
                     * @member {Uint8Array|null|undefined} thumbData
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    LinkPreviewResponse.prototype.thumbData = null;

                    /**
                     * LinkPreviewResponse matchText.
                     * @member {string|null|undefined} matchText
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    LinkPreviewResponse.prototype.matchText = null;

                    /**
                     * LinkPreviewResponse previewType.
                     * @member {string|null|undefined} previewType
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    LinkPreviewResponse.prototype.previewType = null;

                    /**
                     * LinkPreviewResponse hqThumbnail.
                     * @member {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.ILinkPreviewHighQualityThumbnail|null|undefined} hqThumbnail
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    LinkPreviewResponse.prototype.hqThumbnail = null;

                    /**
                     * LinkPreviewResponse previewMetadata.
                     * @member {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.IPaymentLinkPreviewMetadata|null|undefined} previewMetadata
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    LinkPreviewResponse.prototype.previewMetadata = null;

                    // OneOf field names bound to virtual getters and setters
                    var $oneOfFields;

                    /**
                     * LinkPreviewResponse _url.
                     * @member {"url"|undefined} _url
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    Object.defineProperty(LinkPreviewResponse.prototype, "_url", {
                        get: $util.oneOfGetter($oneOfFields = ["url"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * LinkPreviewResponse _title.
                     * @member {"title"|undefined} _title
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    Object.defineProperty(LinkPreviewResponse.prototype, "_title", {
                        get: $util.oneOfGetter($oneOfFields = ["title"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * LinkPreviewResponse _description.
                     * @member {"description"|undefined} _description
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    Object.defineProperty(LinkPreviewResponse.prototype, "_description", {
                        get: $util.oneOfGetter($oneOfFields = ["description"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * LinkPreviewResponse _thumbData.
                     * @member {"thumbData"|undefined} _thumbData
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    Object.defineProperty(LinkPreviewResponse.prototype, "_thumbData", {
                        get: $util.oneOfGetter($oneOfFields = ["thumbData"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * LinkPreviewResponse _matchText.
                     * @member {"matchText"|undefined} _matchText
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    Object.defineProperty(LinkPreviewResponse.prototype, "_matchText", {
                        get: $util.oneOfGetter($oneOfFields = ["matchText"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * LinkPreviewResponse _previewType.
                     * @member {"previewType"|undefined} _previewType
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    Object.defineProperty(LinkPreviewResponse.prototype, "_previewType", {
                        get: $util.oneOfGetter($oneOfFields = ["previewType"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * LinkPreviewResponse _hqThumbnail.
                     * @member {"hqThumbnail"|undefined} _hqThumbnail
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    Object.defineProperty(LinkPreviewResponse.prototype, "_hqThumbnail", {
                        get: $util.oneOfGetter($oneOfFields = ["hqThumbnail"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * LinkPreviewResponse _previewMetadata.
                     * @member {"previewMetadata"|undefined} _previewMetadata
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     */
                    Object.defineProperty(LinkPreviewResponse.prototype, "_previewMetadata", {
                        get: $util.oneOfGetter($oneOfFields = ["previewMetadata"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * Creates a new LinkPreviewResponse instance using the specified properties.
                     * @function create
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ILinkPreviewResponse=} [properties] Properties to set
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse} LinkPreviewResponse instance
                     */
                    LinkPreviewResponse.create = function create(properties) {
                        return new LinkPreviewResponse(properties);
                    };

                    /**
                     * Encodes the specified LinkPreviewResponse message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.verify|verify} messages.
                     * @function encode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ILinkPreviewResponse} message LinkPreviewResponse message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    LinkPreviewResponse.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                            writer.uint32(/* id 1, wireType 2 =*/10).string(message.url);
                        if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                            writer.uint32(/* id 2, wireType 2 =*/18).string(message.title);
                        if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                            writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
                        if (message.thumbData != null && Object.hasOwnProperty.call(message, "thumbData"))
                            writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.thumbData);
                        if (message.matchText != null && Object.hasOwnProperty.call(message, "matchText"))
                            writer.uint32(/* id 6, wireType 2 =*/50).string(message.matchText);
                        if (message.previewType != null && Object.hasOwnProperty.call(message, "previewType"))
                            writer.uint32(/* id 7, wireType 2 =*/58).string(message.previewType);
                        if (message.hqThumbnail != null && Object.hasOwnProperty.call(message, "hqThumbnail"))
                            $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail.encode(message.hqThumbnail, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                        if (message.previewMetadata != null && Object.hasOwnProperty.call(message, "previewMetadata"))
                            $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata.encode(message.previewMetadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                        return writer;
                    };

                    /**
                     * Encodes the specified LinkPreviewResponse message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ILinkPreviewResponse} message LinkPreviewResponse message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    LinkPreviewResponse.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a LinkPreviewResponse message from the specified reader or buffer.
                     * @function decode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse} LinkPreviewResponse
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    LinkPreviewResponse.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.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            if (tag === error)
                                break;
                            switch (tag >>> 3) {
                            case 1: {
                                    message.url = reader.string();
                                    break;
                                }
                            case 2: {
                                    message.title = reader.string();
                                    break;
                                }
                            case 3: {
                                    message.description = reader.string();
                                    break;
                                }
                            case 4: {
                                    message.thumbData = reader.bytes();
                                    break;
                                }
                            case 6: {
                                    message.matchText = reader.string();
                                    break;
                                }
                            case 7: {
                                    message.previewType = reader.string();
                                    break;
                                }
                            case 8: {
                                    message.hqThumbnail = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail.decode(reader, reader.uint32());
                                    break;
                                }
                            case 9: {
                                    message.previewMetadata = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata.decode(reader, reader.uint32());
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a LinkPreviewResponse message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse} LinkPreviewResponse
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    LinkPreviewResponse.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a LinkPreviewResponse message.
                     * @function verify
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    LinkPreviewResponse.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        var properties = {};
                        if (message.url != null && message.hasOwnProperty("url")) {
                            properties._url = 1;
                            if (!$util.isString(message.url))
                                return "url: 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.thumbData != null && message.hasOwnProperty("thumbData")) {
                            properties._thumbData = 1;
                            if (!(message.thumbData && typeof message.thumbData.length === "number" || $util.isString(message.thumbData)))
                                return "thumbData: buffer expected";
                        }
                        if (message.matchText != null && message.hasOwnProperty("matchText")) {
                            properties._matchText = 1;
                            if (!$util.isString(message.matchText))
                                return "matchText: string expected";
                        }
                        if (message.previewType != null && message.hasOwnProperty("previewType")) {
                            properties._previewType = 1;
                            if (!$util.isString(message.previewType))
                                return "previewType: string expected";
                        }
                        if (message.hqThumbnail != null && message.hasOwnProperty("hqThumbnail")) {
                            properties._hqThumbnail = 1;
                            {
                                var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail.verify(message.hqThumbnail);
                                if (error)
                                    return "hqThumbnail." + error;
                            }
                        }
                        if (message.previewMetadata != null && message.hasOwnProperty("previewMetadata")) {
                            properties._previewMetadata = 1;
                            {
                                var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata.verify(message.previewMetadata);
                                if (error)
                                    return "previewMetadata." + error;
                            }
                        }
                        return null;
                    };

                    /**
                     * Creates a LinkPreviewResponse message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse} LinkPreviewResponse
                     */
                    LinkPreviewResponse.fromObject = function fromObject(object) {
                        if (object instanceof $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse)
                            return object;
                        var message = new $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse();
                        if (object.url != null)
                            message.url = String(object.url);
                        if (object.title != null)
                            message.title = String(object.title);
                        if (object.description != null)
                            message.description = String(object.description);
                        if (object.thumbData != null)
                            if (typeof object.thumbData === "string")
                                $util.base64.decode(object.thumbData, message.thumbData = $util.newBuffer($util.base64.length(object.thumbData)), 0);
                            else if (object.thumbData.length >= 0)
                                message.thumbData = object.thumbData;
                        if (object.matchText != null)
                            message.matchText = String(object.matchText);
                        if (object.previewType != null)
                            message.previewType = String(object.previewType);
                        if (object.hqThumbnail != null) {
                            if (typeof object.hqThumbnail !== "object")
                                throw TypeError(".E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.hqThumbnail: object expected");
                            message.hqThumbnail = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail.fromObject(object.hqThumbnail);
                        }
                        if (object.previewMetadata != null) {
                            if (typeof object.previewMetadata !== "object")
                                throw TypeError(".E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.previewMetadata: object expected");
                            message.previewMetadata = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata.fromObject(object.previewMetadata);
                        }
                        return message;
                    };

                    /**
                     * Creates a plain object from a LinkPreviewResponse message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse} message LinkPreviewResponse
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    LinkPreviewResponse.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (message.url != null && message.hasOwnProperty("url")) {
                            object.url = message.url;
                            if (options.oneofs)
                                object._url = "url";
                        }
                        if (message.title != null && message.hasOwnProperty("title")) {
                            object.title = message.title;
                            if (options.oneofs)
                                object._title = "title";
                        }
                        if (message.description != null && message.hasOwnProperty("description")) {
                            object.description = message.description;
                            if (options.oneofs)
                                object._description = "description";
                        }
                        if (message.thumbData != null && message.hasOwnProperty("thumbData")) {
                            object.thumbData = options.bytes === String ? $util.base64.encode(message.thumbData, 0, message.thumbData.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbData) : message.thumbData;
                            if (options.oneofs)
                                object._thumbData = "thumbData";
                        }
                        if (message.matchText != null && message.hasOwnProperty("matchText")) {
                            object.matchText = message.matchText;
                            if (options.oneofs)
                                object._matchText = "matchText";
                        }
                        if (message.previewType != null && message.hasOwnProperty("previewType")) {
                            object.previewType = message.previewType;
                            if (options.oneofs)
                                object._previewType = "previewType";
                        }
                        if (message.hqThumbnail != null && message.hasOwnProperty("hqThumbnail")) {
                            object.hqThumbnail = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail.toObject(message.hqThumbnail, options);
                            if (options.oneofs)
                                object._hqThumbnail = "hqThumbnail";
                        }
                        if (message.previewMetadata != null && message.hasOwnProperty("previewMetadata")) {
                            object.previewMetadata = $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata.toObject(message.previewMetadata, options);
                            if (options.oneofs)
                                object._previewMetadata = "previewMetadata";
                        }
                        return object;
                    };

                    /**
                     * Converts this LinkPreviewResponse to JSON.
                     * @function toJSON
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    LinkPreviewResponse.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for LinkPreviewResponse
                     * @function getTypeUrl
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    LinkPreviewResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse";
                    };

                    LinkPreviewResponse.LinkPreviewHighQualityThumbnail = (function() {

                        /**
                         * Properties of a LinkPreviewHighQualityThumbnail.
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                         * @interface ILinkPreviewHighQualityThumbnail
                         * @property {string|null} [directPath] LinkPreviewHighQualityThumbnail directPath
                         * @property {string|null} [thumbHash] LinkPreviewHighQualityThumbnail thumbHash
                         * @property {string|null} [encThumbHash] LinkPreviewHighQualityThumbnail encThumbHash
                         * @property {Uint8Array|null} [mediaKey] LinkPreviewHighQualityThumbnail mediaKey
                         * @property {number|Long|null} [mediaKeyTimestampMs] LinkPreviewHighQualityThumbnail mediaKeyTimestampMs
                         * @property {number|null} [thumbWidth] LinkPreviewHighQualityThumbnail thumbWidth
                         * @property {number|null} [thumbHeight] LinkPreviewHighQualityThumbnail thumbHeight
                         */

                        /**
                         * Constructs a new LinkPreviewHighQualityThumbnail.
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                         * @classdesc Represents a LinkPreviewHighQualityThumbnail.
                         * @implements ILinkPreviewHighQualityThumbnail
                         * @constructor
                         * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.ILinkPreviewHighQualityThumbnail=} [properties] Properties to set
                         */
                        function LinkPreviewHighQualityThumbnail(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]];
                        }

                        /**
                         * LinkPreviewHighQualityThumbnail directPath.
                         * @member {string|null|undefined} directPath
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        LinkPreviewHighQualityThumbnail.prototype.directPath = null;

                        /**
                         * LinkPreviewHighQualityThumbnail thumbHash.
                         * @member {string|null|undefined} thumbHash
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        LinkPreviewHighQualityThumbnail.prototype.thumbHash = null;

                        /**
                         * LinkPreviewHighQualityThumbnail encThumbHash.
                         * @member {string|null|undefined} encThumbHash
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        LinkPreviewHighQualityThumbnail.prototype.encThumbHash = null;

                        /**
                         * LinkPreviewHighQualityThumbnail mediaKey.
                         * @member {Uint8Array|null|undefined} mediaKey
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        LinkPreviewHighQualityThumbnail.prototype.mediaKey = null;

                        /**
                         * LinkPreviewHighQualityThumbnail mediaKeyTimestampMs.
                         * @member {number|Long|null|undefined} mediaKeyTimestampMs
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        LinkPreviewHighQualityThumbnail.prototype.mediaKeyTimestampMs = null;

                        /**
                         * LinkPreviewHighQualityThumbnail thumbWidth.
                         * @member {number|null|undefined} thumbWidth
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        LinkPreviewHighQualityThumbnail.prototype.thumbWidth = null;

                        /**
                         * LinkPreviewHighQualityThumbnail thumbHeight.
                         * @member {number|null|undefined} thumbHeight
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        LinkPreviewHighQualityThumbnail.prototype.thumbHeight = null;

                        // OneOf field names bound to virtual getters and setters
                        var $oneOfFields;

                        /**
                         * LinkPreviewHighQualityThumbnail _directPath.
                         * @member {"directPath"|undefined} _directPath
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        Object.defineProperty(LinkPreviewHighQualityThumbnail.prototype, "_directPath", {
                            get: $util.oneOfGetter($oneOfFields = ["directPath"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });

                        /**
                         * LinkPreviewHighQualityThumbnail _thumbHash.
                         * @member {"thumbHash"|undefined} _thumbHash
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        Object.defineProperty(LinkPreviewHighQualityThumbnail.prototype, "_thumbHash", {
                            get: $util.oneOfGetter($oneOfFields = ["thumbHash"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });

                        /**
                         * LinkPreviewHighQualityThumbnail _encThumbHash.
                         * @member {"encThumbHash"|undefined} _encThumbHash
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        Object.defineProperty(LinkPreviewHighQualityThumbnail.prototype, "_encThumbHash", {
                            get: $util.oneOfGetter($oneOfFields = ["encThumbHash"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });

                        /**
                         * LinkPreviewHighQualityThumbnail _mediaKey.
                         * @member {"mediaKey"|undefined} _mediaKey
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        Object.defineProperty(LinkPreviewHighQualityThumbnail.prototype, "_mediaKey", {
                            get: $util.oneOfGetter($oneOfFields = ["mediaKey"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });

                        /**
                         * LinkPreviewHighQualityThumbnail _mediaKeyTimestampMs.
                         * @member {"mediaKeyTimestampMs"|undefined} _mediaKeyTimestampMs
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        Object.defineProperty(LinkPreviewHighQualityThumbnail.prototype, "_mediaKeyTimestampMs", {
                            get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestampMs"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });

                        /**
                         * LinkPreviewHighQualityThumbnail _thumbWidth.
                         * @member {"thumbWidth"|undefined} _thumbWidth
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        Object.defineProperty(LinkPreviewHighQualityThumbnail.prototype, "_thumbWidth", {
                            get: $util.oneOfGetter($oneOfFields = ["thumbWidth"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });

                        /**
                         * LinkPreviewHighQualityThumbnail _thumbHeight.
                         * @member {"thumbHeight"|undefined} _thumbHeight
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         */
                        Object.defineProperty(LinkPreviewHighQualityThumbnail.prototype, "_thumbHeight", {
                            get: $util.oneOfGetter($oneOfFields = ["thumbHeight"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });

                        /**
                         * Creates a new LinkPreviewHighQualityThumbnail instance using the specified properties.
                         * @function create
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @static
                         * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.ILinkPreviewHighQualityThumbnail=} [properties] Properties to set
                         * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail} LinkPreviewHighQualityThumbnail instance
                         */
                        LinkPreviewHighQualityThumbnail.create = function create(properties) {
                            return new LinkPreviewHighQualityThumbnail(properties);
                        };

                        /**
                         * Encodes the specified LinkPreviewHighQualityThumbnail message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail.verify|verify} messages.
                         * @function encode
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @static
                         * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.ILinkPreviewHighQualityThumbnail} message LinkPreviewHighQualityThumbnail message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LinkPreviewHighQualityThumbnail.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.directPath);
                            if (message.thumbHash != null && Object.hasOwnProperty.call(message, "thumbHash"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.thumbHash);
                            if (message.encThumbHash != null && Object.hasOwnProperty.call(message, "encThumbHash"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.encThumbHash);
                            if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey"))
                                writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.mediaKey);
                            if (message.mediaKeyTimestampMs != null && Object.hasOwnProperty.call(message, "mediaKeyTimestampMs"))
                                writer.uint32(/* id 5, wireType 0 =*/40).int64(message.mediaKeyTimestampMs);
                            if (message.thumbWidth != null && Object.hasOwnProperty.call(message, "thumbWidth"))
                                writer.uint32(/* id 6, wireType 0 =*/48).int32(message.thumbWidth);
                            if (message.thumbHeight != null && Object.hasOwnProperty.call(message, "thumbHeight"))
                                writer.uint32(/* id 7, wireType 0 =*/56).int32(message.thumbHeight);
                            return writer;
                        };

                        /**
                         * Encodes the specified LinkPreviewHighQualityThumbnail message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @static
                         * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.ILinkPreviewHighQualityThumbnail} message LinkPreviewHighQualityThumbnail message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LinkPreviewHighQualityThumbnail.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };

                        /**
                         * Decodes a LinkPreviewHighQualityThumbnail message from the specified reader or buffer.
                         * @function decode
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail} LinkPreviewHighQualityThumbnail
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LinkPreviewHighQualityThumbnail.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.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                if (tag === error)
                                    break;
                                switch (tag >>> 3) {
                                case 1: {
                                        message.directPath = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.thumbHash = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.encThumbHash = reader.string();
                                        break;
                                    }
                                case 4: {
                                        message.mediaKey = reader.bytes();
                                        break;
                                    }
                                case 5: {
                                        message.mediaKeyTimestampMs = reader.int64();
                                        break;
                                    }
                                case 6: {
                                        message.thumbWidth = reader.int32();
                                        break;
                                    }
                                case 7: {
                                        message.thumbHeight = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };

                        /**
                         * Decodes a LinkPreviewHighQualityThumbnail message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail} LinkPreviewHighQualityThumbnail
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LinkPreviewHighQualityThumbnail.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };

                        /**
                         * Verifies a LinkPreviewHighQualityThumbnail message.
                         * @function verify
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        LinkPreviewHighQualityThumbnail.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            var properties = {};
                            if (message.directPath != null && message.hasOwnProperty("directPath")) {
                                properties._directPath = 1;
                                if (!$util.isString(message.directPath))
                                    return "directPath: string expected";
                            }
                            if (message.thumbHash != null && message.hasOwnProperty("thumbHash")) {
                                properties._thumbHash = 1;
                                if (!$util.isString(message.thumbHash))
                                    return "thumbHash: string expected";
                            }
                            if (message.encThumbHash != null && message.hasOwnProperty("encThumbHash")) {
                                properties._encThumbHash = 1;
                                if (!$util.isString(message.encThumbHash))
                                    return "encThumbHash: string expected";
                            }
                            if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                                properties._mediaKey = 1;
                                if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                                    return "mediaKey: buffer expected";
                            }
                            if (message.mediaKeyTimestampMs != null && message.hasOwnProperty("mediaKeyTimestampMs")) {
                                properties._mediaKeyTimestampMs = 1;
                                if (!$util.isInteger(message.mediaKeyTimestampMs) && !(message.mediaKeyTimestampMs && $util.isInteger(message.mediaKeyTimestampMs.low) && $util.isInteger(message.mediaKeyTimestampMs.high)))
                                    return "mediaKeyTimestampMs: integer|Long expected";
                            }
                            if (message.thumbWidth != null && message.hasOwnProperty("thumbWidth")) {
                                properties._thumbWidth = 1;
                                if (!$util.isInteger(message.thumbWidth))
                                    return "thumbWidth: integer expected";
                            }
                            if (message.thumbHeight != null && message.hasOwnProperty("thumbHeight")) {
                                properties._thumbHeight = 1;
                                if (!$util.isInteger(message.thumbHeight))
                                    return "thumbHeight: integer expected";
                            }
                            return null;
                        };

                        /**
                         * Creates a LinkPreviewHighQualityThumbnail message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail} LinkPreviewHighQualityThumbnail
                         */
                        LinkPreviewHighQualityThumbnail.fromObject = function fromObject(object) {
                            if (object instanceof $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail)
                                return object;
                            var message = new $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail();
                            if (object.directPath != null)
                                message.directPath = String(object.directPath);
                            if (object.thumbHash != null)
                                message.thumbHash = String(object.thumbHash);
                            if (object.encThumbHash != null)
                                message.encThumbHash = String(object.encThumbHash);
                            if (object.mediaKey != null)
                                if (typeof object.mediaKey === "string")
                                    $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0);
                                else if (object.mediaKey.length >= 0)
                                    message.mediaKey = object.mediaKey;
                            if (object.mediaKeyTimestampMs != null)
                                if ($util.Long)
                                    (message.mediaKeyTimestampMs = $util.Long.fromValue(object.mediaKeyTimestampMs)).unsigned = false;
                                else if (typeof object.mediaKeyTimestampMs === "string")
                                    message.mediaKeyTimestampMs = parseInt(object.mediaKeyTimestampMs, 10);
                                else if (typeof object.mediaKeyTimestampMs === "number")
                                    message.mediaKeyTimestampMs = object.mediaKeyTimestampMs;
                                else if (typeof object.mediaKeyTimestampMs === "object")
                                    message.mediaKeyTimestampMs = new $util.LongBits(object.mediaKeyTimestampMs.low >>> 0, object.mediaKeyTimestampMs.high >>> 0).toNumber();
                            if (object.thumbWidth != null)
                                message.thumbWidth = object.thumbWidth | 0;
                            if (object.thumbHeight != null)
                                message.thumbHeight = object.thumbHeight | 0;
                            return message;
                        };

                        /**
                         * Creates a plain object from a LinkPreviewHighQualityThumbnail message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @static
                         * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail} message LinkPreviewHighQualityThumbnail
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        LinkPreviewHighQualityThumbnail.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (message.directPath != null && message.hasOwnProperty("directPath")) {
                                object.directPath = message.directPath;
                                if (options.oneofs)
                                    object._directPath = "directPath";
                            }
                            if (message.thumbHash != null && message.hasOwnProperty("thumbHash")) {
                                object.thumbHash = message.thumbHash;
                                if (options.oneofs)
                                    object._thumbHash = "thumbHash";
                            }
                            if (message.encThumbHash != null && message.hasOwnProperty("encThumbHash")) {
                                object.encThumbHash = message.encThumbHash;
                                if (options.oneofs)
                                    object._encThumbHash = "encThumbHash";
                            }
                            if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                                object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey;
                                if (options.oneofs)
                                    object._mediaKey = "mediaKey";
                            }
                            if (message.mediaKeyTimestampMs != null && message.hasOwnProperty("mediaKeyTimestampMs")) {
                                if (typeof message.mediaKeyTimestampMs === "number")
                                    object.mediaKeyTimestampMs = options.longs === String ? String(message.mediaKeyTimestampMs) : message.mediaKeyTimestampMs;
                                else
                                    object.mediaKeyTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestampMs) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestampMs.low >>> 0, message.mediaKeyTimestampMs.high >>> 0).toNumber() : message.mediaKeyTimestampMs;
                                if (options.oneofs)
                                    object._mediaKeyTimestampMs = "mediaKeyTimestampMs";
                            }
                            if (message.thumbWidth != null && message.hasOwnProperty("thumbWidth")) {
                                object.thumbWidth = message.thumbWidth;
                                if (options.oneofs)
                                    object._thumbWidth = "thumbWidth";
                            }
                            if (message.thumbHeight != null && message.hasOwnProperty("thumbHeight")) {
                                object.thumbHeight = message.thumbHeight;
                                if (options.oneofs)
                                    object._thumbHeight = "thumbHeight";
                            }
                            return object;
                        };

                        /**
                         * Converts this LinkPreviewHighQualityThumbnail to JSON.
                         * @function toJSON
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        LinkPreviewHighQualityThumbnail.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };

                        /**
                         * Gets the default type url for LinkPreviewHighQualityThumbnail
                         * @function getTypeUrl
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        LinkPreviewHighQualityThumbnail.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail";
                        };

                        return LinkPreviewHighQualityThumbnail;
                    })();

                    LinkPreviewResponse.PaymentLinkPreviewMetadata = (function() {

                        /**
                         * Properties of a PaymentLinkPreviewMetadata.
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                         * @interface IPaymentLinkPreviewMetadata
                         * @property {boolean|null} [isBusinessVerified] PaymentLinkPreviewMetadata isBusinessVerified
                         * @property {string|null} [providerName] PaymentLinkPreviewMetadata providerName
                         */

                        /**
                         * Constructs a new PaymentLinkPreviewMetadata.
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse
                         * @classdesc Represents a PaymentLinkPreviewMetadata.
                         * @implements IPaymentLinkPreviewMetadata
                         * @constructor
                         * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.IPaymentLinkPreviewMetadata=} [properties] Properties to set
                         */
                        function PaymentLinkPreviewMetadata(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]];
                        }

                        /**
                         * PaymentLinkPreviewMetadata isBusinessVerified.
                         * @member {boolean|null|undefined} isBusinessVerified
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata
                         * @instance
                         */
                        PaymentLinkPreviewMetadata.prototype.isBusinessVerified = null;

                        /**
                         * PaymentLinkPreviewMetadata providerName.
                         * @member {string|null|undefined} providerName
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata
                         * @instance
                         */
                        PaymentLinkPreviewMetadata.prototype.providerName = null;

                        // OneOf field names bound to virtual getters and setters
                        var $oneOfFields;

                        /**
                         * PaymentLinkPreviewMetadata _isBusinessVerified.
                         * @member {"isBusinessVerified"|undefined} _isBusinessVerified
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata
                         * @instance
                         */
                        Object.defineProperty(PaymentLinkPreviewMetadata.prototype, "_isBusinessVerified", {
                            get: $util.oneOfGetter($oneOfFields = ["isBusinessVerified"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });

                        /**
                         * PaymentLinkPreviewMetadata _providerName.
                         * @member {"providerName"|undefined} _providerName
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata
                         * @instance
                         */
                        Object.defineProperty(PaymentLinkPreviewMetadata.prototype, "_providerName", {
                            get: $util.oneOfGetter($oneOfFields = ["providerName"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });

                        /**
                         * Creates a new PaymentLinkPreviewMetadata instance using the specified properties.
                         * @function create
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata
                         * @static
                         * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.IPaymentLinkPreviewMetadata=} [properties] Properties to set
                         * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata} PaymentLinkPreviewMetadata instance
                         */
                        PaymentLinkPreviewMetadata.create = function create(properties) {
                            return new PaymentLinkPreviewMetadata(properties);
                        };

                        /**
                         * Encodes the specified PaymentLinkPreviewMetadata message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata.verify|verify} messages.
                         * @function encode
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata
                         * @static
                         * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.IPaymentLinkPreviewMetadata} message PaymentLinkPreviewMetadata message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        PaymentLinkPreviewMetadata.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.isBusinessVerified != null && Object.hasOwnProperty.call(message, "isBusinessVerified"))
                                writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isBusinessVerified);
                            if (message.providerName != null && Object.hasOwnProperty.call(message, "providerName"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.providerName);
                            return writer;
                        };

                        /**
                         * Encodes the specified PaymentLinkPreviewMetadata message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata
                         * @static
                         * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.IPaymentLinkPreviewMetadata} message PaymentLinkPreviewMetadata message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        PaymentLinkPreviewMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };

                        /**
                         * Decodes a PaymentLinkPreviewMetadata message from the specified reader or buffer.
                         * @function decode
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata} PaymentLinkPreviewMetadata
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        PaymentLinkPreviewMetadata.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.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                if (tag === error)
                                    break;
                                switch (tag >>> 3) {
                                case 1: {
                                        message.isBusinessVerified = reader.bool();
                                        break;
                                    }
                                case 2: {
                                        message.providerName = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };

                        /**
                         * Decodes a PaymentLinkPreviewMetadata message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata} PaymentLinkPreviewMetadata
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        PaymentLinkPreviewMetadata.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };

                        /**
                         * Verifies a PaymentLinkPreviewMetadata message.
                         * @function verify
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        PaymentLinkPreviewMetadata.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            var properties = {};
                            if (message.isBusinessVerified != null && message.hasOwnProperty("isBusinessVerified")) {
                                properties._isBusinessVerified = 1;
                                if (typeof message.isBusinessVerified !== "boolean")
                                    return "isBusinessVerified: boolean expected";
                            }
                            if (message.providerName != null && message.hasOwnProperty("providerName")) {
                                properties._providerName = 1;
                                if (!$util.isString(message.providerName))
                                    return "providerName: string expected";
                            }
                            return null;
                        };

                        /**
                         * Creates a PaymentLinkPreviewMetadata message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata} PaymentLinkPreviewMetadata
                         */
                        PaymentLinkPreviewMetadata.fromObject = function fromObject(object) {
                            if (object instanceof $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata)
                                return object;
                            var message = new $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata();
                            if (object.isBusinessVerified != null)
                                message.isBusinessVerified = Boolean(object.isBusinessVerified);
                            if (object.providerName != null)
                                message.providerName = String(object.providerName);
                            return message;
                        };

                        /**
                         * Creates a plain object from a PaymentLinkPreviewMetadata message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata
                         * @static
                         * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata} message PaymentLinkPreviewMetadata
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        PaymentLinkPreviewMetadata.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (message.isBusinessVerified != null && message.hasOwnProperty("isBusinessVerified")) {
                                object.isBusinessVerified = message.isBusinessVerified;
                                if (options.oneofs)
                                    object._isBusinessVerified = "isBusinessVerified";
                            }
                            if (message.providerName != null && message.hasOwnProperty("providerName")) {
                                object.providerName = message.providerName;
                                if (options.oneofs)
                                    object._providerName = "providerName";
                            }
                            return object;
                        };

                        /**
                         * Converts this PaymentLinkPreviewMetadata to JSON.
                         * @function toJSON
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        PaymentLinkPreviewMetadata.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };

                        /**
                         * Gets the default type url for PaymentLinkPreviewMetadata
                         * @function getTypeUrl
                         * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        PaymentLinkPreviewMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata";
                        };

                        return PaymentLinkPreviewMetadata;
                    })();

                    return LinkPreviewResponse;
                })();

                PeerDataOperationResult.PlaceholderMessageResendResponse = (function() {

                    /**
                     * Properties of a PlaceholderMessageResendResponse.
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                     * @interface IPlaceholderMessageResendResponse
                     * @property {Uint8Array|null} [webMessageInfoBytes] PlaceholderMessageResendResponse webMessageInfoBytes
                     */

                    /**
                     * Constructs a new PlaceholderMessageResendResponse.
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                     * @classdesc Represents a PlaceholderMessageResendResponse.
                     * @implements IPlaceholderMessageResendResponse
                     * @constructor
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IPlaceholderMessageResendResponse=} [properties] Properties to set
                     */
                    function PlaceholderMessageResendResponse(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]];
                    }

                    /**
                     * PlaceholderMessageResendResponse webMessageInfoBytes.
                     * @member {Uint8Array|null|undefined} webMessageInfoBytes
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse
                     * @instance
                     */
                    PlaceholderMessageResendResponse.prototype.webMessageInfoBytes = null;

                    // OneOf field names bound to virtual getters and setters
                    var $oneOfFields;

                    /**
                     * PlaceholderMessageResendResponse _webMessageInfoBytes.
                     * @member {"webMessageInfoBytes"|undefined} _webMessageInfoBytes
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse
                     * @instance
                     */
                    Object.defineProperty(PlaceholderMessageResendResponse.prototype, "_webMessageInfoBytes", {
                        get: $util.oneOfGetter($oneOfFields = ["webMessageInfoBytes"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * Creates a new PlaceholderMessageResendResponse instance using the specified properties.
                     * @function create
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IPlaceholderMessageResendResponse=} [properties] Properties to set
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse} PlaceholderMessageResendResponse instance
                     */
                    PlaceholderMessageResendResponse.create = function create(properties) {
                        return new PlaceholderMessageResendResponse(properties);
                    };

                    /**
                     * Encodes the specified PlaceholderMessageResendResponse message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse.verify|verify} messages.
                     * @function encode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IPlaceholderMessageResendResponse} message PlaceholderMessageResendResponse message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    PlaceholderMessageResendResponse.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.webMessageInfoBytes != null && Object.hasOwnProperty.call(message, "webMessageInfoBytes"))
                            writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.webMessageInfoBytes);
                        return writer;
                    };

                    /**
                     * Encodes the specified PlaceholderMessageResendResponse message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IPlaceholderMessageResendResponse} message PlaceholderMessageResendResponse message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    PlaceholderMessageResendResponse.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a PlaceholderMessageResendResponse message from the specified reader or buffer.
                     * @function decode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse} PlaceholderMessageResendResponse
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    PlaceholderMessageResendResponse.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.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            if (tag === error)
                                break;
                            switch (tag >>> 3) {
                            case 1: {
                                    message.webMessageInfoBytes = reader.bytes();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a PlaceholderMessageResendResponse message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse} PlaceholderMessageResendResponse
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    PlaceholderMessageResendResponse.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a PlaceholderMessageResendResponse message.
                     * @function verify
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    PlaceholderMessageResendResponse.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        var properties = {};
                        if (message.webMessageInfoBytes != null && message.hasOwnProperty("webMessageInfoBytes")) {
                            properties._webMessageInfoBytes = 1;
                            if (!(message.webMessageInfoBytes && typeof message.webMessageInfoBytes.length === "number" || $util.isString(message.webMessageInfoBytes)))
                                return "webMessageInfoBytes: buffer expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a PlaceholderMessageResendResponse message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse} PlaceholderMessageResendResponse
                     */
                    PlaceholderMessageResendResponse.fromObject = function fromObject(object) {
                        if (object instanceof $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse)
                            return object;
                        var message = new $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse();
                        if (object.webMessageInfoBytes != null)
                            if (typeof object.webMessageInfoBytes === "string")
                                $util.base64.decode(object.webMessageInfoBytes, message.webMessageInfoBytes = $util.newBuffer($util.base64.length(object.webMessageInfoBytes)), 0);
                            else if (object.webMessageInfoBytes.length >= 0)
                                message.webMessageInfoBytes = object.webMessageInfoBytes;
                        return message;
                    };

                    /**
                     * Creates a plain object from a PlaceholderMessageResendResponse message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse} message PlaceholderMessageResendResponse
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    PlaceholderMessageResendResponse.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (message.webMessageInfoBytes != null && message.hasOwnProperty("webMessageInfoBytes")) {
                            object.webMessageInfoBytes = options.bytes === String ? $util.base64.encode(message.webMessageInfoBytes, 0, message.webMessageInfoBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.webMessageInfoBytes) : message.webMessageInfoBytes;
                            if (options.oneofs)
                                object._webMessageInfoBytes = "webMessageInfoBytes";
                        }
                        return object;
                    };

                    /**
                     * Converts this PlaceholderMessageResendResponse to JSON.
                     * @function toJSON
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    PlaceholderMessageResendResponse.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for PlaceholderMessageResendResponse
                     * @function getTypeUrl
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    PlaceholderMessageResendResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse";
                    };

                    return PlaceholderMessageResendResponse;
                })();

                PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse = (function() {

                    /**
                     * Properties of a SyncDSnapshotFatalRecoveryResponse.
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                     * @interface ISyncDSnapshotFatalRecoveryResponse
                     * @property {Uint8Array|null} [collectionSnapshot] SyncDSnapshotFatalRecoveryResponse collectionSnapshot
                     * @property {boolean|null} [isCompressed] SyncDSnapshotFatalRecoveryResponse isCompressed
                     */

                    /**
                     * Constructs a new SyncDSnapshotFatalRecoveryResponse.
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                     * @classdesc Represents a SyncDSnapshotFatalRecoveryResponse.
                     * @implements ISyncDSnapshotFatalRecoveryResponse
                     * @constructor
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ISyncDSnapshotFatalRecoveryResponse=} [properties] Properties to set
                     */
                    function SyncDSnapshotFatalRecoveryResponse(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]];
                    }

                    /**
                     * SyncDSnapshotFatalRecoveryResponse collectionSnapshot.
                     * @member {Uint8Array|null|undefined} collectionSnapshot
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse
                     * @instance
                     */
                    SyncDSnapshotFatalRecoveryResponse.prototype.collectionSnapshot = null;

                    /**
                     * SyncDSnapshotFatalRecoveryResponse isCompressed.
                     * @member {boolean|null|undefined} isCompressed
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse
                     * @instance
                     */
                    SyncDSnapshotFatalRecoveryResponse.prototype.isCompressed = null;

                    // OneOf field names bound to virtual getters and setters
                    var $oneOfFields;

                    /**
                     * SyncDSnapshotFatalRecoveryResponse _collectionSnapshot.
                     * @member {"collectionSnapshot"|undefined} _collectionSnapshot
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse
                     * @instance
                     */
                    Object.defineProperty(SyncDSnapshotFatalRecoveryResponse.prototype, "_collectionSnapshot", {
                        get: $util.oneOfGetter($oneOfFields = ["collectionSnapshot"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * SyncDSnapshotFatalRecoveryResponse _isCompressed.
                     * @member {"isCompressed"|undefined} _isCompressed
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse
                     * @instance
                     */
                    Object.defineProperty(SyncDSnapshotFatalRecoveryResponse.prototype, "_isCompressed", {
                        get: $util.oneOfGetter($oneOfFields = ["isCompressed"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * Creates a new SyncDSnapshotFatalRecoveryResponse instance using the specified properties.
                     * @function create
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ISyncDSnapshotFatalRecoveryResponse=} [properties] Properties to set
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse} SyncDSnapshotFatalRecoveryResponse instance
                     */
                    SyncDSnapshotFatalRecoveryResponse.create = function create(properties) {
                        return new SyncDSnapshotFatalRecoveryResponse(properties);
                    };

                    /**
                     * Encodes the specified SyncDSnapshotFatalRecoveryResponse message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse.verify|verify} messages.
                     * @function encode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ISyncDSnapshotFatalRecoveryResponse} message SyncDSnapshotFatalRecoveryResponse message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    SyncDSnapshotFatalRecoveryResponse.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.collectionSnapshot != null && Object.hasOwnProperty.call(message, "collectionSnapshot"))
                            writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.collectionSnapshot);
                        if (message.isCompressed != null && Object.hasOwnProperty.call(message, "isCompressed"))
                            writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isCompressed);
                        return writer;
                    };

                    /**
                     * Encodes the specified SyncDSnapshotFatalRecoveryResponse message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ISyncDSnapshotFatalRecoveryResponse} message SyncDSnapshotFatalRecoveryResponse message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    SyncDSnapshotFatalRecoveryResponse.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a SyncDSnapshotFatalRecoveryResponse message from the specified reader or buffer.
                     * @function decode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse} SyncDSnapshotFatalRecoveryResponse
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    SyncDSnapshotFatalRecoveryResponse.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.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            if (tag === error)
                                break;
                            switch (tag >>> 3) {
                            case 1: {
                                    message.collectionSnapshot = reader.bytes();
                                    break;
                                }
                            case 2: {
                                    message.isCompressed = reader.bool();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a SyncDSnapshotFatalRecoveryResponse message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse} SyncDSnapshotFatalRecoveryResponse
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    SyncDSnapshotFatalRecoveryResponse.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a SyncDSnapshotFatalRecoveryResponse message.
                     * @function verify
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    SyncDSnapshotFatalRecoveryResponse.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        var properties = {};
                        if (message.collectionSnapshot != null && message.hasOwnProperty("collectionSnapshot")) {
                            properties._collectionSnapshot = 1;
                            if (!(message.collectionSnapshot && typeof message.collectionSnapshot.length === "number" || $util.isString(message.collectionSnapshot)))
                                return "collectionSnapshot: buffer expected";
                        }
                        if (message.isCompressed != null && message.hasOwnProperty("isCompressed")) {
                            properties._isCompressed = 1;
                            if (typeof message.isCompressed !== "boolean")
                                return "isCompressed: boolean expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a SyncDSnapshotFatalRecoveryResponse message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse} SyncDSnapshotFatalRecoveryResponse
                     */
                    SyncDSnapshotFatalRecoveryResponse.fromObject = function fromObject(object) {
                        if (object instanceof $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse)
                            return object;
                        var message = new $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse();
                        if (object.collectionSnapshot != null)
                            if (typeof object.collectionSnapshot === "string")
                                $util.base64.decode(object.collectionSnapshot, message.collectionSnapshot = $util.newBuffer($util.base64.length(object.collectionSnapshot)), 0);
                            else if (object.collectionSnapshot.length >= 0)
                                message.collectionSnapshot = object.collectionSnapshot;
                        if (object.isCompressed != null)
                            message.isCompressed = Boolean(object.isCompressed);
                        return message;
                    };

                    /**
                     * Creates a plain object from a SyncDSnapshotFatalRecoveryResponse message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse} message SyncDSnapshotFatalRecoveryResponse
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    SyncDSnapshotFatalRecoveryResponse.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (message.collectionSnapshot != null && message.hasOwnProperty("collectionSnapshot")) {
                            object.collectionSnapshot = options.bytes === String ? $util.base64.encode(message.collectionSnapshot, 0, message.collectionSnapshot.length) : options.bytes === Array ? Array.prototype.slice.call(message.collectionSnapshot) : message.collectionSnapshot;
                            if (options.oneofs)
                                object._collectionSnapshot = "collectionSnapshot";
                        }
                        if (message.isCompressed != null && message.hasOwnProperty("isCompressed")) {
                            object.isCompressed = message.isCompressed;
                            if (options.oneofs)
                                object._isCompressed = "isCompressed";
                        }
                        return object;
                    };

                    /**
                     * Converts this SyncDSnapshotFatalRecoveryResponse to JSON.
                     * @function toJSON
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    SyncDSnapshotFatalRecoveryResponse.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for SyncDSnapshotFatalRecoveryResponse
                     * @function getTypeUrl
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    SyncDSnapshotFatalRecoveryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse";
                    };

                    return SyncDSnapshotFatalRecoveryResponse;
                })();

                PeerDataOperationResult.WaffleNonceFetchResponse = (function() {

                    /**
                     * Properties of a WaffleNonceFetchResponse.
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                     * @interface IWaffleNonceFetchResponse
                     * @property {string|null} [nonce] WaffleNonceFetchResponse nonce
                     * @property {string|null} [waEntFbid] WaffleNonceFetchResponse waEntFbid
                     */

                    /**
                     * Constructs a new WaffleNonceFetchResponse.
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult
                     * @classdesc Represents a WaffleNonceFetchResponse.
                     * @implements IWaffleNonceFetchResponse
                     * @constructor
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse=} [properties] Properties to set
                     */
                    function WaffleNonceFetchResponse(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]];
                    }

                    /**
                     * WaffleNonceFetchResponse nonce.
                     * @member {string|null|undefined} nonce
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse
                     * @instance
                     */
                    WaffleNonceFetchResponse.prototype.nonce = null;

                    /**
                     * WaffleNonceFetchResponse waEntFbid.
                     * @member {string|null|undefined} waEntFbid
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse
                     * @instance
                     */
                    WaffleNonceFetchResponse.prototype.waEntFbid = null;

                    // OneOf field names bound to virtual getters and setters
                    var $oneOfFields;

                    /**
                     * WaffleNonceFetchResponse _nonce.
                     * @member {"nonce"|undefined} _nonce
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse
                     * @instance
                     */
                    Object.defineProperty(WaffleNonceFetchResponse.prototype, "_nonce", {
                        get: $util.oneOfGetter($oneOfFields = ["nonce"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * WaffleNonceFetchResponse _waEntFbid.
                     * @member {"waEntFbid"|undefined} _waEntFbid
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse
                     * @instance
                     */
                    Object.defineProperty(WaffleNonceFetchResponse.prototype, "_waEntFbid", {
                        get: $util.oneOfGetter($oneOfFields = ["waEntFbid"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * Creates a new WaffleNonceFetchResponse instance using the specified properties.
                     * @function create
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse=} [properties] Properties to set
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse} WaffleNonceFetchResponse instance
                     */
                    WaffleNonceFetchResponse.create = function create(properties) {
                        return new WaffleNonceFetchResponse(properties);
                    };

                    /**
                     * Encodes the specified WaffleNonceFetchResponse message. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse.verify|verify} messages.
                     * @function encode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse} message WaffleNonceFetchResponse message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    WaffleNonceFetchResponse.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.nonce != null && Object.hasOwnProperty.call(message, "nonce"))
                            writer.uint32(/* id 1, wireType 2 =*/10).string(message.nonce);
                        if (message.waEntFbid != null && Object.hasOwnProperty.call(message, "waEntFbid"))
                            writer.uint32(/* id 2, wireType 2 =*/18).string(message.waEntFbid);
                        return writer;
                    };

                    /**
                     * Encodes the specified WaffleNonceFetchResponse message, length delimited. Does not implicitly {@link E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse} message WaffleNonceFetchResponse message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    WaffleNonceFetchResponse.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a WaffleNonceFetchResponse message from the specified reader or buffer.
                     * @function decode
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse} WaffleNonceFetchResponse
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    WaffleNonceFetchResponse.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.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            if (tag === error)
                                break;
                            switch (tag >>> 3) {
                            case 1: {
                                    message.nonce = reader.string();
                                    break;
                                }
                            case 2: {
                                    message.waEntFbid = reader.string();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a WaffleNonceFetchResponse message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse} WaffleNonceFetchResponse
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    WaffleNonceFetchResponse.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a WaffleNonceFetchResponse message.
                     * @function verify
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    WaffleNonceFetchResponse.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        var properties = {};
                        if (message.nonce != null && message.hasOwnProperty("nonce")) {
                            properties._nonce = 1;
                            if (!$util.isString(message.nonce))
                                return "nonce: string expected";
                        }
                        if (message.waEntFbid != null && message.hasOwnProperty("waEntFbid")) {
                            properties._waEntFbid = 1;
                            if (!$util.isString(message.waEntFbid))
                                return "waEntFbid: string expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a WaffleNonceFetchResponse message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse} WaffleNonceFetchResponse
                     */
                    WaffleNonceFetchResponse.fromObject = function fromObject(object) {
                        if (object instanceof $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse)
                            return object;
                        var message = new $root.E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse();
                        if (object.nonce != null)
                            message.nonce = String(object.nonce);
                        if (object.waEntFbid != null)
                            message.waEntFbid = String(object.waEntFbid);
                        return message;
                    };

                    /**
                     * Creates a plain object from a WaffleNonceFetchResponse message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse
                     * @static
                     * @param {E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse} message WaffleNonceFetchResponse
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    WaffleNonceFetchResponse.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (message.nonce != null && message.hasOwnProperty("nonce")) {
                            object.nonce = message.nonce;
                            if (options.oneofs)
                                object._nonce = "nonce";
                        }
                        if (message.waEntFbid != null && message.hasOwnProperty("waEntFbid")) {
                            object.waEntFbid = message.waEntFbid;
                            if (options.oneofs)
                                object._waEntFbid = "waEntFbid";
                        }
                        return object;
                    };

                    /**
                     * Converts this WaffleNonceFetchResponse to JSON.
                     * @function toJSON
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    WaffleNonceFetchResponse.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for WaffleNonceFetchResponse
                     * @function getTypeUrl
                     * @memberof E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    WaffleNonceFetchResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/E2E.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse";
                    };

                    return WaffleNonceFetchResponse;
                })();

                return PeerDataOperationResult;
            })();

            return PeerDataOperationRequestResponseMessage;
        })();

        /**
         * PeerDataOperationRequestType enum.
         * @name E2E.Message.PeerDataOperationRequestType
         * @enum {number}
         * @property {number} UPLOAD_STICKER=0 UPLOAD_STICKER value
         * @property {number} SEND_RECENT_STICKER_BOOTSTRAP=1 SEND_RECENT_STICKER_BOOTSTRAP value
         * @property {number} GENERATE_LINK_PREVIEW=2 GENERATE_LINK_PREVIEW value
         * @property {number} HISTORY_SYNC_ON_DEMAND=3 HISTORY_SYNC_ON_DEMAND value
         * @property {number} PLACEHOLDER_MESSAGE_RESEND=4 PLACEHOLDER_MESSAGE_RESEND value
         * @property {number} WAFFLE_LINKING_NONCE_FETCH=5 WAFFLE_LINKING_NONCE_FETCH value
         * @property {number} FULL_HISTORY_SYNC_ON_DEMAND=6 FULL_HISTORY_SYNC_ON_DEMAND value
         * @property {number} COMPANION_META_NONCE_FETCH=7 COMPANION_META_NONCE_FETCH value
         * @property {number} COMPANION_SYNCD_SNAPSHOT_FATAL_RECOVERY=8 COMPANION_SYNCD_SNAPSHOT_FATAL_RECOVERY value
         * @property {number} COMPANION_CANONICAL_USER_NONCE_FETCH=9 COMPANION_CANONICAL_USER_NONCE_FETCH value
         * @property {number} HISTORY_SYNC_CHUNK_RETRY=10 HISTORY_SYNC_CHUNK_RETRY value
         * @property {number} GALAXY_FLOW_ACTION=11 GALAXY_FLOW_ACTION value
         */
        Message.PeerDataOperationRequestType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UPLOAD_STICKER"] = 0;
            values[valuesById[1] = "SEND_RECENT_STICKER_BOOTSTRAP"] = 1;
            values[valuesById[2] = "GENERATE_LINK_PREVIEW"] = 2;
            values[valuesById[3] = "HISTORY_SYNC_ON_DEMAND"] = 3;
            values[valuesById[4] = "PLACEHOLDER_MESSAGE_RESEND"] = 4;
            values[valuesById[5] = "WAFFLE_LINKING_NONCE_FETCH"] = 5;
            values[valuesById[6] = "FULL_HISTORY_SYNC_ON_DEMAND"] = 6;
            values[valuesById[7] = "COMPANION_META_NONCE_FETCH"] = 7;
            values[valuesById[8] = "COMPANION_SYNCD_SNAPSHOT_FATAL_RECOVERY"] = 8;
            values[valuesById[9] = "COMPANION_CANONICAL_USER_NONCE_FETCH"] = 9;
            values[valuesById[10] = "HISTORY_SYNC_CHUNK_RETRY"] = 10;
            values[valuesById[11] = "GALAXY_FLOW_ACTION"] = 11;
            return values;
        })();

        Message.PinInChatMessage = (function() {

            /**
             * Properties of a PinInChatMessage.
             * @memberof E2E.Message
             * @interface IPinInChatMessage
             * @property {Protocol.IMessageKey|null} [key] PinInChatMessage key
             * @property {E2E.Message.PinInChatMessage.Type|null} [type] PinInChatMessage type
             * @property {number|Long|null} [senderTimestampMs] PinInChatMessage senderTimestampMs
             */

            /**
             * Constructs a new PinInChatMessage.
             * @memberof E2E.Message
             * @classdesc Represents a PinInChatMessage.
             * @implements IPinInChatMessage
             * @constructor
             * @param {E2E.Message.IPinInChatMessage=} [properties] Properties to set
             */
            function PinInChatMessage(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]];
            }

            /**
             * PinInChatMessage key.
             * @member {Protocol.IMessageKey|null|undefined} key
             * @memberof E2E.Message.PinInChatMessage
             * @instance
             */
            PinInChatMessage.prototype.key = null;

            /**
             * PinInChatMessage type.
             * @member {E2E.Message.PinInChatMessage.Type|null|undefined} type
             * @memberof E2E.Message.PinInChatMessage
             * @instance
             */
            PinInChatMessage.prototype.type = null;

            /**
             * PinInChatMessage senderTimestampMs.
             * @member {number|Long|null|undefined} senderTimestampMs
             * @memberof E2E.Message.PinInChatMessage
             * @instance
             */
            PinInChatMessage.prototype.senderTimestampMs = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * PinInChatMessage _key.
             * @member {"key"|undefined} _key
             * @memberof E2E.Message.PinInChatMessage
             * @instance
             */
            Object.defineProperty(PinInChatMessage.prototype, "_key", {
                get: $util.oneOfGetter($oneOfFields = ["key"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PinInChatMessage _type.
             * @member {"type"|undefined} _type
             * @memberof E2E.Message.PinInChatMessage
             * @instance
             */
            Object.defineProperty(PinInChatMessage.prototype, "_type", {
                get: $util.oneOfGetter($oneOfFields = ["type"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PinInChatMessage _senderTimestampMs.
             * @member {"senderTimestampMs"|undefined} _senderTimestampMs
             * @memberof E2E.Message.PinInChatMessage
             * @instance
             */
            Object.defineProperty(PinInChatMessage.prototype, "_senderTimestampMs", {
                get: $util.oneOfGetter($oneOfFields = ["senderTimestampMs"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new PinInChatMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.PinInChatMessage
             * @static
             * @param {E2E.Message.IPinInChatMessage=} [properties] Properties to set
             * @returns {E2E.Message.PinInChatMessage} PinInChatMessage instance
             */
            PinInChatMessage.create = function create(properties) {
                return new PinInChatMessage(properties);
            };

            /**
             * Encodes the specified PinInChatMessage message. Does not implicitly {@link E2E.Message.PinInChatMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.PinInChatMessage
             * @static
             * @param {E2E.Message.IPinInChatMessage} message PinInChatMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PinInChatMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.key != null && Object.hasOwnProperty.call(message, "key"))
                    $root.Protocol.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type);
                if (message.senderTimestampMs != null && Object.hasOwnProperty.call(message, "senderTimestampMs"))
                    writer.uint32(/* id 3, wireType 0 =*/24).int64(message.senderTimestampMs);
                return writer;
            };

            /**
             * Encodes the specified PinInChatMessage message, length delimited. Does not implicitly {@link E2E.Message.PinInChatMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.PinInChatMessage
             * @static
             * @param {E2E.Message.IPinInChatMessage} message PinInChatMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PinInChatMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PinInChatMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.PinInChatMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.PinInChatMessage} PinInChatMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PinInChatMessage.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.E2E.Message.PinInChatMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.key = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.type = reader.int32();
                            break;
                        }
                    case 3: {
                            message.senderTimestampMs = reader.int64();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a PinInChatMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.PinInChatMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.PinInChatMessage} PinInChatMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PinInChatMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PinInChatMessage message.
             * @function verify
             * @memberof E2E.Message.PinInChatMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PinInChatMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    properties._key = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.key);
                        if (error)
                            return "key." + error;
                    }
                }
                if (message.type != null && message.hasOwnProperty("type")) {
                    properties._type = 1;
                    switch (message.type) {
                    default:
                        return "type: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                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";
                }
                return null;
            };

            /**
             * Creates a PinInChatMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.PinInChatMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.PinInChatMessage} PinInChatMessage
             */
            PinInChatMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.PinInChatMessage)
                    return object;
                var message = new $root.E2E.Message.PinInChatMessage();
                if (object.key != null) {
                    if (typeof object.key !== "object")
                        throw TypeError(".E2E.Message.PinInChatMessage.key: object expected");
                    message.key = $root.Protocol.MessageKey.fromObject(object.key);
                }
                switch (object.type) {
                default:
                    if (typeof object.type === "number") {
                        message.type = object.type;
                        break;
                    }
                    break;
                case "UNKNOWN_TYPE":
                case 0:
                    message.type = 0;
                    break;
                case "PIN_FOR_ALL":
                case 1:
                    message.type = 1;
                    break;
                case "UNPIN_FOR_ALL":
                case 2:
                    message.type = 2;
                    break;
                }
                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(object.senderTimestampMs.low >>> 0, object.senderTimestampMs.high >>> 0).toNumber();
                return message;
            };

            /**
             * Creates a plain object from a PinInChatMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.PinInChatMessage
             * @static
             * @param {E2E.Message.PinInChatMessage} message PinInChatMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PinInChatMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                    if (options.oneofs)
                        object._key = "key";
                }
                if (message.type != null && message.hasOwnProperty("type")) {
                    object.type = options.enums === String ? $root.E2E.Message.PinInChatMessage.Type[message.type] === undefined ? message.type : $root.E2E.Message.PinInChatMessage.Type[message.type] : message.type;
                    if (options.oneofs)
                        object._type = "type";
                }
                if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) {
                    if (typeof message.senderTimestampMs === "number")
                        object.senderTimestampMs = options.longs === String ? String(message.senderTimestampMs) : message.senderTimestampMs;
                    else
                        object.senderTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.senderTimestampMs) : options.longs === Number ? new $util.LongBits(message.senderTimestampMs.low >>> 0, message.senderTimestampMs.high >>> 0).toNumber() : message.senderTimestampMs;
                    if (options.oneofs)
                        object._senderTimestampMs = "senderTimestampMs";
                }
                return object;
            };

            /**
             * Converts this PinInChatMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.PinInChatMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PinInChatMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for PinInChatMessage
             * @function getTypeUrl
             * @memberof E2E.Message.PinInChatMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            PinInChatMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.PinInChatMessage";
            };

            /**
             * Type enum.
             * @name E2E.Message.PinInChatMessage.Type
             * @enum {number}
             * @property {number} UNKNOWN_TYPE=0 UNKNOWN_TYPE value
             * @property {number} PIN_FOR_ALL=1 PIN_FOR_ALL value
             * @property {number} UNPIN_FOR_ALL=2 UNPIN_FOR_ALL value
             */
            PinInChatMessage.Type = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN_TYPE"] = 0;
                values[valuesById[1] = "PIN_FOR_ALL"] = 1;
                values[valuesById[2] = "UNPIN_FOR_ALL"] = 2;
                return values;
            })();

            return PinInChatMessage;
        })();

        Message.PlaceholderMessage = (function() {

            /**
             * Properties of a PlaceholderMessage.
             * @memberof E2E.Message
             * @interface IPlaceholderMessage
             * @property {E2E.Message.PlaceholderMessage.PlaceholderType|null} [type] PlaceholderMessage type
             */

            /**
             * Constructs a new PlaceholderMessage.
             * @memberof E2E.Message
             * @classdesc Represents a PlaceholderMessage.
             * @implements IPlaceholderMessage
             * @constructor
             * @param {E2E.Message.IPlaceholderMessage=} [properties] Properties to set
             */
            function PlaceholderMessage(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]];
            }

            /**
             * PlaceholderMessage type.
             * @member {E2E.Message.PlaceholderMessage.PlaceholderType|null|undefined} type
             * @memberof E2E.Message.PlaceholderMessage
             * @instance
             */
            PlaceholderMessage.prototype.type = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * PlaceholderMessage _type.
             * @member {"type"|undefined} _type
             * @memberof E2E.Message.PlaceholderMessage
             * @instance
             */
            Object.defineProperty(PlaceholderMessage.prototype, "_type", {
                get: $util.oneOfGetter($oneOfFields = ["type"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new PlaceholderMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.PlaceholderMessage
             * @static
             * @param {E2E.Message.IPlaceholderMessage=} [properties] Properties to set
             * @returns {E2E.Message.PlaceholderMessage} PlaceholderMessage instance
             */
            PlaceholderMessage.create = function create(properties) {
                return new PlaceholderMessage(properties);
            };

            /**
             * Encodes the specified PlaceholderMessage message. Does not implicitly {@link E2E.Message.PlaceholderMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.PlaceholderMessage
             * @static
             * @param {E2E.Message.IPlaceholderMessage} message PlaceholderMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PlaceholderMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
                return writer;
            };

            /**
             * Encodes the specified PlaceholderMessage message, length delimited. Does not implicitly {@link E2E.Message.PlaceholderMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.PlaceholderMessage
             * @static
             * @param {E2E.Message.IPlaceholderMessage} message PlaceholderMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PlaceholderMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PlaceholderMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.PlaceholderMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.PlaceholderMessage} PlaceholderMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PlaceholderMessage.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.E2E.Message.PlaceholderMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.type = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a PlaceholderMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.PlaceholderMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.PlaceholderMessage} PlaceholderMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PlaceholderMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PlaceholderMessage message.
             * @function verify
             * @memberof E2E.Message.PlaceholderMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PlaceholderMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.type != null && message.hasOwnProperty("type")) {
                    properties._type = 1;
                    switch (message.type) {
                    default:
                        return "type: enum value expected";
                    case 0:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a PlaceholderMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.PlaceholderMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.PlaceholderMessage} PlaceholderMessage
             */
            PlaceholderMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.PlaceholderMessage)
                    return object;
                var message = new $root.E2E.Message.PlaceholderMessage();
                switch (object.type) {
                default:
                    if (typeof object.type === "number") {
                        message.type = object.type;
                        break;
                    }
                    break;
                case "MASK_LINKED_DEVICES":
                case 0:
                    message.type = 0;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a PlaceholderMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.PlaceholderMessage
             * @static
             * @param {E2E.Message.PlaceholderMessage} message PlaceholderMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PlaceholderMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.type != null && message.hasOwnProperty("type")) {
                    object.type = options.enums === String ? $root.E2E.Message.PlaceholderMessage.PlaceholderType[message.type] === undefined ? message.type : $root.E2E.Message.PlaceholderMessage.PlaceholderType[message.type] : message.type;
                    if (options.oneofs)
                        object._type = "type";
                }
                return object;
            };

            /**
             * Converts this PlaceholderMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.PlaceholderMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PlaceholderMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for PlaceholderMessage
             * @function getTypeUrl
             * @memberof E2E.Message.PlaceholderMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            PlaceholderMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.PlaceholderMessage";
            };

            /**
             * PlaceholderType enum.
             * @name E2E.Message.PlaceholderMessage.PlaceholderType
             * @enum {number}
             * @property {number} MASK_LINKED_DEVICES=0 MASK_LINKED_DEVICES value
             */
            PlaceholderMessage.PlaceholderType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "MASK_LINKED_DEVICES"] = 0;
                return values;
            })();

            return PlaceholderMessage;
        })();

        /**
         * PollContentType enum.
         * @name E2E.Message.PollContentType
         * @enum {number}
         * @property {number} UNKNOWN=0 UNKNOWN value
         * @property {number} TEXT=1 TEXT value
         * @property {number} IMAGE=2 IMAGE value
         */
        Message.PollContentType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "TEXT"] = 1;
            values[valuesById[2] = "IMAGE"] = 2;
            return values;
        })();

        Message.PollCreationMessage = (function() {

            /**
             * Properties of a PollCreationMessage.
             * @memberof E2E.Message
             * @interface IPollCreationMessage
             * @property {Uint8Array|null} [encKey] PollCreationMessage encKey
             * @property {string|null} [name] PollCreationMessage name
             * @property {Array.<E2E.Message.PollCreationMessage.IOption>|null} [options] PollCreationMessage options
             * @property {number|null} [selectableOptionsCount] PollCreationMessage selectableOptionsCount
             * @property {E2E.IContextInfo|null} [contextInfo] PollCreationMessage contextInfo
             * @property {E2E.Message.PollContentType|null} [pollContentType] PollCreationMessage pollContentType
             * @property {E2E.Message.PollType|null} [pollType] PollCreationMessage pollType
             * @property {E2E.Message.PollCreationMessage.IOption|null} [correctAnswer] PollCreationMessage correctAnswer
             */

            /**
             * Constructs a new PollCreationMessage.
             * @memberof E2E.Message
             * @classdesc Represents a PollCreationMessage.
             * @implements IPollCreationMessage
             * @constructor
             * @param {E2E.Message.IPollCreationMessage=} [properties] Properties to set
             */
            function PollCreationMessage(properties) {
                this.options = [];
                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]];
            }

            /**
             * PollCreationMessage encKey.
             * @member {Uint8Array|null|undefined} encKey
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            PollCreationMessage.prototype.encKey = null;

            /**
             * PollCreationMessage name.
             * @member {string|null|undefined} name
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            PollCreationMessage.prototype.name = null;

            /**
             * PollCreationMessage options.
             * @member {Array.<E2E.Message.PollCreationMessage.IOption>} options
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            PollCreationMessage.prototype.options = $util.emptyArray;

            /**
             * PollCreationMessage selectableOptionsCount.
             * @member {number|null|undefined} selectableOptionsCount
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            PollCreationMessage.prototype.selectableOptionsCount = null;

            /**
             * PollCreationMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            PollCreationMessage.prototype.contextInfo = null;

            /**
             * PollCreationMessage pollContentType.
             * @member {E2E.Message.PollContentType|null|undefined} pollContentType
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            PollCreationMessage.prototype.pollContentType = null;

            /**
             * PollCreationMessage pollType.
             * @member {E2E.Message.PollType|null|undefined} pollType
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            PollCreationMessage.prototype.pollType = null;

            /**
             * PollCreationMessage correctAnswer.
             * @member {E2E.Message.PollCreationMessage.IOption|null|undefined} correctAnswer
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            PollCreationMessage.prototype.correctAnswer = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * PollCreationMessage _encKey.
             * @member {"encKey"|undefined} _encKey
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            Object.defineProperty(PollCreationMessage.prototype, "_encKey", {
                get: $util.oneOfGetter($oneOfFields = ["encKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PollCreationMessage _name.
             * @member {"name"|undefined} _name
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            Object.defineProperty(PollCreationMessage.prototype, "_name", {
                get: $util.oneOfGetter($oneOfFields = ["name"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PollCreationMessage _selectableOptionsCount.
             * @member {"selectableOptionsCount"|undefined} _selectableOptionsCount
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            Object.defineProperty(PollCreationMessage.prototype, "_selectableOptionsCount", {
                get: $util.oneOfGetter($oneOfFields = ["selectableOptionsCount"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PollCreationMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            Object.defineProperty(PollCreationMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PollCreationMessage _pollContentType.
             * @member {"pollContentType"|undefined} _pollContentType
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            Object.defineProperty(PollCreationMessage.prototype, "_pollContentType", {
                get: $util.oneOfGetter($oneOfFields = ["pollContentType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PollCreationMessage _pollType.
             * @member {"pollType"|undefined} _pollType
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            Object.defineProperty(PollCreationMessage.prototype, "_pollType", {
                get: $util.oneOfGetter($oneOfFields = ["pollType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PollCreationMessage _correctAnswer.
             * @member {"correctAnswer"|undefined} _correctAnswer
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             */
            Object.defineProperty(PollCreationMessage.prototype, "_correctAnswer", {
                get: $util.oneOfGetter($oneOfFields = ["correctAnswer"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new PollCreationMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.PollCreationMessage
             * @static
             * @param {E2E.Message.IPollCreationMessage=} [properties] Properties to set
             * @returns {E2E.Message.PollCreationMessage} PollCreationMessage instance
             */
            PollCreationMessage.create = function create(properties) {
                return new PollCreationMessage(properties);
            };

            /**
             * Encodes the specified PollCreationMessage message. Does not implicitly {@link E2E.Message.PollCreationMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.PollCreationMessage
             * @static
             * @param {E2E.Message.IPollCreationMessage} message PollCreationMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PollCreationMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.encKey != null && Object.hasOwnProperty.call(message, "encKey"))
                    writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encKey);
                if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.name);
                if (message.options != null && message.options.length)
                    for (var i = 0; i < message.options.length; ++i)
                        $root.E2E.Message.PollCreationMessage.Option.encode(message.options[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                if (message.selectableOptionsCount != null && Object.hasOwnProperty.call(message, "selectableOptionsCount"))
                    writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.selectableOptionsCount);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                if (message.pollContentType != null && Object.hasOwnProperty.call(message, "pollContentType"))
                    writer.uint32(/* id 6, wireType 0 =*/48).int32(message.pollContentType);
                if (message.pollType != null && Object.hasOwnProperty.call(message, "pollType"))
                    writer.uint32(/* id 7, wireType 0 =*/56).int32(message.pollType);
                if (message.correctAnswer != null && Object.hasOwnProperty.call(message, "correctAnswer"))
                    $root.E2E.Message.PollCreationMessage.Option.encode(message.correctAnswer, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified PollCreationMessage message, length delimited. Does not implicitly {@link E2E.Message.PollCreationMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.PollCreationMessage
             * @static
             * @param {E2E.Message.IPollCreationMessage} message PollCreationMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PollCreationMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PollCreationMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.PollCreationMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.PollCreationMessage} PollCreationMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PollCreationMessage.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.E2E.Message.PollCreationMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.encKey = reader.bytes();
                            break;
                        }
                    case 2: {
                            message.name = reader.string();
                            break;
                        }
                    case 3: {
                            if (!(message.options && message.options.length))
                                message.options = [];
                            message.options.push($root.E2E.Message.PollCreationMessage.Option.decode(reader, reader.uint32()));
                            break;
                        }
                    case 4: {
                            message.selectableOptionsCount = reader.uint32();
                            break;
                        }
                    case 5: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 6: {
                            message.pollContentType = reader.int32();
                            break;
                        }
                    case 7: {
                            message.pollType = reader.int32();
                            break;
                        }
                    case 8: {
                            message.correctAnswer = $root.E2E.Message.PollCreationMessage.Option.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a PollCreationMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.PollCreationMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.PollCreationMessage} PollCreationMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PollCreationMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PollCreationMessage message.
             * @function verify
             * @memberof E2E.Message.PollCreationMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PollCreationMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.encKey != null && message.hasOwnProperty("encKey")) {
                    properties._encKey = 1;
                    if (!(message.encKey && typeof message.encKey.length === "number" || $util.isString(message.encKey)))
                        return "encKey: buffer expected";
                }
                if (message.name != null && message.hasOwnProperty("name")) {
                    properties._name = 1;
                    if (!$util.isString(message.name))
                        return "name: string expected";
                }
                if (message.options != null && message.hasOwnProperty("options")) {
                    if (!Array.isArray(message.options))
                        return "options: array expected";
                    for (var i = 0; i < message.options.length; ++i) {
                        var error = $root.E2E.Message.PollCreationMessage.Option.verify(message.options[i]);
                        if (error)
                            return "options." + error;
                    }
                }
                if (message.selectableOptionsCount != null && message.hasOwnProperty("selectableOptionsCount")) {
                    properties._selectableOptionsCount = 1;
                    if (!$util.isInteger(message.selectableOptionsCount))
                        return "selectableOptionsCount: integer expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                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.pollType != null && message.hasOwnProperty("pollType")) {
                    properties._pollType = 1;
                    switch (message.pollType) {
                    default:
                        return "pollType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                if (message.correctAnswer != null && message.hasOwnProperty("correctAnswer")) {
                    properties._correctAnswer = 1;
                    {
                        var error = $root.E2E.Message.PollCreationMessage.Option.verify(message.correctAnswer);
                        if (error)
                            return "correctAnswer." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a PollCreationMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.PollCreationMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.PollCreationMessage} PollCreationMessage
             */
            PollCreationMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.PollCreationMessage)
                    return object;
                var message = new $root.E2E.Message.PollCreationMessage();
                if (object.encKey != null)
                    if (typeof object.encKey === "string")
                        $util.base64.decode(object.encKey, message.encKey = $util.newBuffer($util.base64.length(object.encKey)), 0);
                    else if (object.encKey.length >= 0)
                        message.encKey = object.encKey;
                if (object.name != null)
                    message.name = String(object.name);
                if (object.options) {
                    if (!Array.isArray(object.options))
                        throw TypeError(".E2E.Message.PollCreationMessage.options: array expected");
                    message.options = [];
                    for (var i = 0; i < object.options.length; ++i) {
                        if (typeof object.options[i] !== "object")
                            throw TypeError(".E2E.Message.PollCreationMessage.options: object expected");
                        message.options[i] = $root.E2E.Message.PollCreationMessage.Option.fromObject(object.options[i]);
                    }
                }
                if (object.selectableOptionsCount != null)
                    message.selectableOptionsCount = object.selectableOptionsCount >>> 0;
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.PollCreationMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                switch (object.pollContentType) {
                default:
                    if (typeof object.pollContentType === "number") {
                        message.pollContentType = object.pollContentType;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.pollContentType = 0;
                    break;
                case "TEXT":
                case 1:
                    message.pollContentType = 1;
                    break;
                case "IMAGE":
                case 2:
                    message.pollContentType = 2;
                    break;
                }
                switch (object.pollType) {
                default:
                    if (typeof object.pollType === "number") {
                        message.pollType = object.pollType;
                        break;
                    }
                    break;
                case "POLL":
                case 0:
                    message.pollType = 0;
                    break;
                case "QUIZ":
                case 1:
                    message.pollType = 1;
                    break;
                }
                if (object.correctAnswer != null) {
                    if (typeof object.correctAnswer !== "object")
                        throw TypeError(".E2E.Message.PollCreationMessage.correctAnswer: object expected");
                    message.correctAnswer = $root.E2E.Message.PollCreationMessage.Option.fromObject(object.correctAnswer);
                }
                return message;
            };

            /**
             * Creates a plain object from a PollCreationMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.PollCreationMessage
             * @static
             * @param {E2E.Message.PollCreationMessage} message PollCreationMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PollCreationMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.options = [];
                if (message.encKey != null && message.hasOwnProperty("encKey")) {
                    object.encKey = options.bytes === String ? $util.base64.encode(message.encKey, 0, message.encKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encKey) : message.encKey;
                    if (options.oneofs)
                        object._encKey = "encKey";
                }
                if (message.name != null && message.hasOwnProperty("name")) {
                    object.name = message.name;
                    if (options.oneofs)
                        object._name = "name";
                }
                if (message.options && message.options.length) {
                    object.options = [];
                    for (var j = 0; j < message.options.length; ++j)
                        object.options[j] = $root.E2E.Message.PollCreationMessage.Option.toObject(message.options[j], options);
                }
                if (message.selectableOptionsCount != null && message.hasOwnProperty("selectableOptionsCount")) {
                    object.selectableOptionsCount = message.selectableOptionsCount;
                    if (options.oneofs)
                        object._selectableOptionsCount = "selectableOptionsCount";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.pollContentType != null && message.hasOwnProperty("pollContentType")) {
                    object.pollContentType = options.enums === String ? $root.E2E.Message.PollContentType[message.pollContentType] === undefined ? message.pollContentType : $root.E2E.Message.PollContentType[message.pollContentType] : message.pollContentType;
                    if (options.oneofs)
                        object._pollContentType = "pollContentType";
                }
                if (message.pollType != null && message.hasOwnProperty("pollType")) {
                    object.pollType = options.enums === String ? $root.E2E.Message.PollType[message.pollType] === undefined ? message.pollType : $root.E2E.Message.PollType[message.pollType] : message.pollType;
                    if (options.oneofs)
                        object._pollType = "pollType";
                }
                if (message.correctAnswer != null && message.hasOwnProperty("correctAnswer")) {
                    object.correctAnswer = $root.E2E.Message.PollCreationMessage.Option.toObject(message.correctAnswer, options);
                    if (options.oneofs)
                        object._correctAnswer = "correctAnswer";
                }
                return object;
            };

            /**
             * Converts this PollCreationMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.PollCreationMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PollCreationMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for PollCreationMessage
             * @function getTypeUrl
             * @memberof E2E.Message.PollCreationMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            PollCreationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.PollCreationMessage";
            };

            PollCreationMessage.Option = (function() {

                /**
                 * Properties of an Option.
                 * @memberof E2E.Message.PollCreationMessage
                 * @interface IOption
                 * @property {string|null} [optionName] Option optionName
                 * @property {string|null} [optionHash] Option optionHash
                 */

                /**
                 * Constructs a new Option.
                 * @memberof E2E.Message.PollCreationMessage
                 * @classdesc Represents an Option.
                 * @implements IOption
                 * @constructor
                 * @param {E2E.Message.PollCreationMessage.IOption=} [properties] Properties to set
                 */
                function Option(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]];
                }

                /**
                 * Option optionName.
                 * @member {string|null|undefined} optionName
                 * @memberof E2E.Message.PollCreationMessage.Option
                 * @instance
                 */
                Option.prototype.optionName = null;

                /**
                 * Option optionHash.
                 * @member {string|null|undefined} optionHash
                 * @memberof E2E.Message.PollCreationMessage.Option
                 * @instance
                 */
                Option.prototype.optionHash = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * Option _optionName.
                 * @member {"optionName"|undefined} _optionName
                 * @memberof E2E.Message.PollCreationMessage.Option
                 * @instance
                 */
                Object.defineProperty(Option.prototype, "_optionName", {
                    get: $util.oneOfGetter($oneOfFields = ["optionName"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Option _optionHash.
                 * @member {"optionHash"|undefined} _optionHash
                 * @memberof E2E.Message.PollCreationMessage.Option
                 * @instance
                 */
                Object.defineProperty(Option.prototype, "_optionHash", {
                    get: $util.oneOfGetter($oneOfFields = ["optionHash"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new Option instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.PollCreationMessage.Option
                 * @static
                 * @param {E2E.Message.PollCreationMessage.IOption=} [properties] Properties to set
                 * @returns {E2E.Message.PollCreationMessage.Option} Option instance
                 */
                Option.create = function create(properties) {
                    return new Option(properties);
                };

                /**
                 * Encodes the specified Option message. Does not implicitly {@link E2E.Message.PollCreationMessage.Option.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.PollCreationMessage.Option
                 * @static
                 * @param {E2E.Message.PollCreationMessage.IOption} message Option message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Option.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.optionName != null && Object.hasOwnProperty.call(message, "optionName"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.optionName);
                    if (message.optionHash != null && Object.hasOwnProperty.call(message, "optionHash"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.optionHash);
                    return writer;
                };

                /**
                 * Encodes the specified Option message, length delimited. Does not implicitly {@link E2E.Message.PollCreationMessage.Option.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.PollCreationMessage.Option
                 * @static
                 * @param {E2E.Message.PollCreationMessage.IOption} message Option message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Option.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an Option message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.PollCreationMessage.Option
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.PollCreationMessage.Option} Option
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Option.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.E2E.Message.PollCreationMessage.Option();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.optionName = reader.string();
                                break;
                            }
                        case 2: {
                                message.optionHash = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes an Option message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.PollCreationMessage.Option
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.PollCreationMessage.Option} Option
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Option.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an Option message.
                 * @function verify
                 * @memberof E2E.Message.PollCreationMessage.Option
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Option.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.optionName != null && message.hasOwnProperty("optionName")) {
                        properties._optionName = 1;
                        if (!$util.isString(message.optionName))
                            return "optionName: string expected";
                    }
                    if (message.optionHash != null && message.hasOwnProperty("optionHash")) {
                        properties._optionHash = 1;
                        if (!$util.isString(message.optionHash))
                            return "optionHash: string expected";
                    }
                    return null;
                };

                /**
                 * Creates an Option message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.PollCreationMessage.Option
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.PollCreationMessage.Option} Option
                 */
                Option.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.PollCreationMessage.Option)
                        return object;
                    var message = new $root.E2E.Message.PollCreationMessage.Option();
                    if (object.optionName != null)
                        message.optionName = String(object.optionName);
                    if (object.optionHash != null)
                        message.optionHash = String(object.optionHash);
                    return message;
                };

                /**
                 * Creates a plain object from an Option message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.PollCreationMessage.Option
                 * @static
                 * @param {E2E.Message.PollCreationMessage.Option} message Option
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Option.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.optionName != null && message.hasOwnProperty("optionName")) {
                        object.optionName = message.optionName;
                        if (options.oneofs)
                            object._optionName = "optionName";
                    }
                    if (message.optionHash != null && message.hasOwnProperty("optionHash")) {
                        object.optionHash = message.optionHash;
                        if (options.oneofs)
                            object._optionHash = "optionHash";
                    }
                    return object;
                };

                /**
                 * Converts this Option to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.PollCreationMessage.Option
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Option.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for Option
                 * @function getTypeUrl
                 * @memberof E2E.Message.PollCreationMessage.Option
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Option.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.PollCreationMessage.Option";
                };

                return Option;
            })();

            return PollCreationMessage;
        })();

        Message.PollEncValue = (function() {

            /**
             * Properties of a PollEncValue.
             * @memberof E2E.Message
             * @interface IPollEncValue
             * @property {Uint8Array|null} [encPayload] PollEncValue encPayload
             * @property {Uint8Array|null} [encIv] PollEncValue encIv
             */

            /**
             * Constructs a new PollEncValue.
             * @memberof E2E.Message
             * @classdesc Represents a PollEncValue.
             * @implements IPollEncValue
             * @constructor
             * @param {E2E.Message.IPollEncValue=} [properties] Properties to set
             */
            function PollEncValue(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]];
            }

            /**
             * PollEncValue encPayload.
             * @member {Uint8Array|null|undefined} encPayload
             * @memberof E2E.Message.PollEncValue
             * @instance
             */
            PollEncValue.prototype.encPayload = null;

            /**
             * PollEncValue encIv.
             * @member {Uint8Array|null|undefined} encIv
             * @memberof E2E.Message.PollEncValue
             * @instance
             */
            PollEncValue.prototype.encIv = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * PollEncValue _encPayload.
             * @member {"encPayload"|undefined} _encPayload
             * @memberof E2E.Message.PollEncValue
             * @instance
             */
            Object.defineProperty(PollEncValue.prototype, "_encPayload", {
                get: $util.oneOfGetter($oneOfFields = ["encPayload"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PollEncValue _encIv.
             * @member {"encIv"|undefined} _encIv
             * @memberof E2E.Message.PollEncValue
             * @instance
             */
            Object.defineProperty(PollEncValue.prototype, "_encIv", {
                get: $util.oneOfGetter($oneOfFields = ["encIv"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new PollEncValue instance using the specified properties.
             * @function create
             * @memberof E2E.Message.PollEncValue
             * @static
             * @param {E2E.Message.IPollEncValue=} [properties] Properties to set
             * @returns {E2E.Message.PollEncValue} PollEncValue instance
             */
            PollEncValue.create = function create(properties) {
                return new PollEncValue(properties);
            };

            /**
             * Encodes the specified PollEncValue message. Does not implicitly {@link E2E.Message.PollEncValue.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.PollEncValue
             * @static
             * @param {E2E.Message.IPollEncValue} message PollEncValue message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PollEncValue.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.encPayload != null && Object.hasOwnProperty.call(message, "encPayload"))
                    writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encPayload);
                if (message.encIv != null && Object.hasOwnProperty.call(message, "encIv"))
                    writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encIv);
                return writer;
            };

            /**
             * Encodes the specified PollEncValue message, length delimited. Does not implicitly {@link E2E.Message.PollEncValue.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.PollEncValue
             * @static
             * @param {E2E.Message.IPollEncValue} message PollEncValue message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PollEncValue.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PollEncValue message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.PollEncValue
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.PollEncValue} PollEncValue
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PollEncValue.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.E2E.Message.PollEncValue();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.encPayload = reader.bytes();
                            break;
                        }
                    case 2: {
                            message.encIv = reader.bytes();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a PollEncValue message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.PollEncValue
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.PollEncValue} PollEncValue
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PollEncValue.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PollEncValue message.
             * @function verify
             * @memberof E2E.Message.PollEncValue
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PollEncValue.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                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";
                }
                return null;
            };

            /**
             * Creates a PollEncValue message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.PollEncValue
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.PollEncValue} PollEncValue
             */
            PollEncValue.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.PollEncValue)
                    return object;
                var message = new $root.E2E.Message.PollEncValue();
                if (object.encPayload != null)
                    if (typeof object.encPayload === "string")
                        $util.base64.decode(object.encPayload, message.encPayload = $util.newBuffer($util.base64.length(object.encPayload)), 0);
                    else if (object.encPayload.length >= 0)
                        message.encPayload = object.encPayload;
                if (object.encIv != null)
                    if (typeof object.encIv === "string")
                        $util.base64.decode(object.encIv, message.encIv = $util.newBuffer($util.base64.length(object.encIv)), 0);
                    else if (object.encIv.length >= 0)
                        message.encIv = object.encIv;
                return message;
            };

            /**
             * Creates a plain object from a PollEncValue message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.PollEncValue
             * @static
             * @param {E2E.Message.PollEncValue} message PollEncValue
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PollEncValue.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.encPayload != null && message.hasOwnProperty("encPayload")) {
                    object.encPayload = options.bytes === String ? $util.base64.encode(message.encPayload, 0, message.encPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encPayload) : message.encPayload;
                    if (options.oneofs)
                        object._encPayload = "encPayload";
                }
                if (message.encIv != null && message.hasOwnProperty("encIv")) {
                    object.encIv = options.bytes === String ? $util.base64.encode(message.encIv, 0, message.encIv.length) : options.bytes === Array ? Array.prototype.slice.call(message.encIv) : message.encIv;
                    if (options.oneofs)
                        object._encIv = "encIv";
                }
                return object;
            };

            /**
             * Converts this PollEncValue to JSON.
             * @function toJSON
             * @memberof E2E.Message.PollEncValue
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PollEncValue.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for PollEncValue
             * @function getTypeUrl
             * @memberof E2E.Message.PollEncValue
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            PollEncValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.PollEncValue";
            };

            return PollEncValue;
        })();

        Message.PollResultSnapshotMessage = (function() {

            /**
             * Properties of a PollResultSnapshotMessage.
             * @memberof E2E.Message
             * @interface IPollResultSnapshotMessage
             * @property {string|null} [name] PollResultSnapshotMessage name
             * @property {Array.<E2E.Message.PollResultSnapshotMessage.IPollVote>|null} [pollVotes] PollResultSnapshotMessage pollVotes
             * @property {E2E.IContextInfo|null} [contextInfo] PollResultSnapshotMessage contextInfo
             * @property {E2E.Message.PollType|null} [pollType] PollResultSnapshotMessage pollType
             */

            /**
             * Constructs a new PollResultSnapshotMessage.
             * @memberof E2E.Message
             * @classdesc Represents a PollResultSnapshotMessage.
             * @implements IPollResultSnapshotMessage
             * @constructor
             * @param {E2E.Message.IPollResultSnapshotMessage=} [properties] Properties to set
             */
            function PollResultSnapshotMessage(properties) {
                this.pollVotes = [];
                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]];
            }

            /**
             * PollResultSnapshotMessage name.
             * @member {string|null|undefined} name
             * @memberof E2E.Message.PollResultSnapshotMessage
             * @instance
             */
            PollResultSnapshotMessage.prototype.name = null;

            /**
             * PollResultSnapshotMessage pollVotes.
             * @member {Array.<E2E.Message.PollResultSnapshotMessage.IPollVote>} pollVotes
             * @memberof E2E.Message.PollResultSnapshotMessage
             * @instance
             */
            PollResultSnapshotMessage.prototype.pollVotes = $util.emptyArray;

            /**
             * PollResultSnapshotMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.PollResultSnapshotMessage
             * @instance
             */
            PollResultSnapshotMessage.prototype.contextInfo = null;

            /**
             * PollResultSnapshotMessage pollType.
             * @member {E2E.Message.PollType|null|undefined} pollType
             * @memberof E2E.Message.PollResultSnapshotMessage
             * @instance
             */
            PollResultSnapshotMessage.prototype.pollType = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * PollResultSnapshotMessage _name.
             * @member {"name"|undefined} _name
             * @memberof E2E.Message.PollResultSnapshotMessage
             * @instance
             */
            Object.defineProperty(PollResultSnapshotMessage.prototype, "_name", {
                get: $util.oneOfGetter($oneOfFields = ["name"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PollResultSnapshotMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.PollResultSnapshotMessage
             * @instance
             */
            Object.defineProperty(PollResultSnapshotMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PollResultSnapshotMessage _pollType.
             * @member {"pollType"|undefined} _pollType
             * @memberof E2E.Message.PollResultSnapshotMessage
             * @instance
             */
            Object.defineProperty(PollResultSnapshotMessage.prototype, "_pollType", {
                get: $util.oneOfGetter($oneOfFields = ["pollType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new PollResultSnapshotMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.PollResultSnapshotMessage
             * @static
             * @param {E2E.Message.IPollResultSnapshotMessage=} [properties] Properties to set
             * @returns {E2E.Message.PollResultSnapshotMessage} PollResultSnapshotMessage instance
             */
            PollResultSnapshotMessage.create = function create(properties) {
                return new PollResultSnapshotMessage(properties);
            };

            /**
             * Encodes the specified PollResultSnapshotMessage message. Does not implicitly {@link E2E.Message.PollResultSnapshotMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.PollResultSnapshotMessage
             * @static
             * @param {E2E.Message.IPollResultSnapshotMessage} message PollResultSnapshotMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PollResultSnapshotMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                if (message.pollVotes != null && message.pollVotes.length)
                    for (var i = 0; i < message.pollVotes.length; ++i)
                        $root.E2E.Message.PollResultSnapshotMessage.PollVote.encode(message.pollVotes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                if (message.pollType != null && Object.hasOwnProperty.call(message, "pollType"))
                    writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pollType);
                return writer;
            };

            /**
             * Encodes the specified PollResultSnapshotMessage message, length delimited. Does not implicitly {@link E2E.Message.PollResultSnapshotMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.PollResultSnapshotMessage
             * @static
             * @param {E2E.Message.IPollResultSnapshotMessage} message PollResultSnapshotMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PollResultSnapshotMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PollResultSnapshotMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.PollResultSnapshotMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.PollResultSnapshotMessage} PollResultSnapshotMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PollResultSnapshotMessage.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.E2E.Message.PollResultSnapshotMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.name = reader.string();
                            break;
                        }
                    case 2: {
                            if (!(message.pollVotes && message.pollVotes.length))
                                message.pollVotes = [];
                            message.pollVotes.push($root.E2E.Message.PollResultSnapshotMessage.PollVote.decode(reader, reader.uint32()));
                            break;
                        }
                    case 3: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 4: {
                            message.pollType = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a PollResultSnapshotMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.PollResultSnapshotMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.PollResultSnapshotMessage} PollResultSnapshotMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PollResultSnapshotMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PollResultSnapshotMessage message.
             * @function verify
             * @memberof E2E.Message.PollResultSnapshotMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PollResultSnapshotMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.name != null && message.hasOwnProperty("name")) {
                    properties._name = 1;
                    if (!$util.isString(message.name))
                        return "name: string expected";
                }
                if (message.pollVotes != null && message.hasOwnProperty("pollVotes")) {
                    if (!Array.isArray(message.pollVotes))
                        return "pollVotes: array expected";
                    for (var i = 0; i < message.pollVotes.length; ++i) {
                        var error = $root.E2E.Message.PollResultSnapshotMessage.PollVote.verify(message.pollVotes[i]);
                        if (error)
                            return "pollVotes." + error;
                    }
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.pollType != null && message.hasOwnProperty("pollType")) {
                    properties._pollType = 1;
                    switch (message.pollType) {
                    default:
                        return "pollType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a PollResultSnapshotMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.PollResultSnapshotMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.PollResultSnapshotMessage} PollResultSnapshotMessage
             */
            PollResultSnapshotMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.PollResultSnapshotMessage)
                    return object;
                var message = new $root.E2E.Message.PollResultSnapshotMessage();
                if (object.name != null)
                    message.name = String(object.name);
                if (object.pollVotes) {
                    if (!Array.isArray(object.pollVotes))
                        throw TypeError(".E2E.Message.PollResultSnapshotMessage.pollVotes: array expected");
                    message.pollVotes = [];
                    for (var i = 0; i < object.pollVotes.length; ++i) {
                        if (typeof object.pollVotes[i] !== "object")
                            throw TypeError(".E2E.Message.PollResultSnapshotMessage.pollVotes: object expected");
                        message.pollVotes[i] = $root.E2E.Message.PollResultSnapshotMessage.PollVote.fromObject(object.pollVotes[i]);
                    }
                }
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.PollResultSnapshotMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                switch (object.pollType) {
                default:
                    if (typeof object.pollType === "number") {
                        message.pollType = object.pollType;
                        break;
                    }
                    break;
                case "POLL":
                case 0:
                    message.pollType = 0;
                    break;
                case "QUIZ":
                case 1:
                    message.pollType = 1;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a PollResultSnapshotMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.PollResultSnapshotMessage
             * @static
             * @param {E2E.Message.PollResultSnapshotMessage} message PollResultSnapshotMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PollResultSnapshotMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.pollVotes = [];
                if (message.name != null && message.hasOwnProperty("name")) {
                    object.name = message.name;
                    if (options.oneofs)
                        object._name = "name";
                }
                if (message.pollVotes && message.pollVotes.length) {
                    object.pollVotes = [];
                    for (var j = 0; j < message.pollVotes.length; ++j)
                        object.pollVotes[j] = $root.E2E.Message.PollResultSnapshotMessage.PollVote.toObject(message.pollVotes[j], options);
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.pollType != null && message.hasOwnProperty("pollType")) {
                    object.pollType = options.enums === String ? $root.E2E.Message.PollType[message.pollType] === undefined ? message.pollType : $root.E2E.Message.PollType[message.pollType] : message.pollType;
                    if (options.oneofs)
                        object._pollType = "pollType";
                }
                return object;
            };

            /**
             * Converts this PollResultSnapshotMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.PollResultSnapshotMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PollResultSnapshotMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for PollResultSnapshotMessage
             * @function getTypeUrl
             * @memberof E2E.Message.PollResultSnapshotMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            PollResultSnapshotMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.PollResultSnapshotMessage";
            };

            PollResultSnapshotMessage.PollVote = (function() {

                /**
                 * Properties of a PollVote.
                 * @memberof E2E.Message.PollResultSnapshotMessage
                 * @interface IPollVote
                 * @property {string|null} [optionName] PollVote optionName
                 * @property {number|Long|null} [optionVoteCount] PollVote optionVoteCount
                 */

                /**
                 * Constructs a new PollVote.
                 * @memberof E2E.Message.PollResultSnapshotMessage
                 * @classdesc Represents a PollVote.
                 * @implements IPollVote
                 * @constructor
                 * @param {E2E.Message.PollResultSnapshotMessage.IPollVote=} [properties] Properties to set
                 */
                function PollVote(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]];
                }

                /**
                 * PollVote optionName.
                 * @member {string|null|undefined} optionName
                 * @memberof E2E.Message.PollResultSnapshotMessage.PollVote
                 * @instance
                 */
                PollVote.prototype.optionName = null;

                /**
                 * PollVote optionVoteCount.
                 * @member {number|Long|null|undefined} optionVoteCount
                 * @memberof E2E.Message.PollResultSnapshotMessage.PollVote
                 * @instance
                 */
                PollVote.prototype.optionVoteCount = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * PollVote _optionName.
                 * @member {"optionName"|undefined} _optionName
                 * @memberof E2E.Message.PollResultSnapshotMessage.PollVote
                 * @instance
                 */
                Object.defineProperty(PollVote.prototype, "_optionName", {
                    get: $util.oneOfGetter($oneOfFields = ["optionName"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * PollVote _optionVoteCount.
                 * @member {"optionVoteCount"|undefined} _optionVoteCount
                 * @memberof E2E.Message.PollResultSnapshotMessage.PollVote
                 * @instance
                 */
                Object.defineProperty(PollVote.prototype, "_optionVoteCount", {
                    get: $util.oneOfGetter($oneOfFields = ["optionVoteCount"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new PollVote instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.PollResultSnapshotMessage.PollVote
                 * @static
                 * @param {E2E.Message.PollResultSnapshotMessage.IPollVote=} [properties] Properties to set
                 * @returns {E2E.Message.PollResultSnapshotMessage.PollVote} PollVote instance
                 */
                PollVote.create = function create(properties) {
                    return new PollVote(properties);
                };

                /**
                 * Encodes the specified PollVote message. Does not implicitly {@link E2E.Message.PollResultSnapshotMessage.PollVote.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.PollResultSnapshotMessage.PollVote
                 * @static
                 * @param {E2E.Message.PollResultSnapshotMessage.IPollVote} message PollVote message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PollVote.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.optionName != null && Object.hasOwnProperty.call(message, "optionName"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.optionName);
                    if (message.optionVoteCount != null && Object.hasOwnProperty.call(message, "optionVoteCount"))
                        writer.uint32(/* id 2, wireType 0 =*/16).int64(message.optionVoteCount);
                    return writer;
                };

                /**
                 * Encodes the specified PollVote message, length delimited. Does not implicitly {@link E2E.Message.PollResultSnapshotMessage.PollVote.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.PollResultSnapshotMessage.PollVote
                 * @static
                 * @param {E2E.Message.PollResultSnapshotMessage.IPollVote} message PollVote message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PollVote.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a PollVote message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.PollResultSnapshotMessage.PollVote
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.PollResultSnapshotMessage.PollVote} PollVote
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PollVote.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.E2E.Message.PollResultSnapshotMessage.PollVote();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.optionName = reader.string();
                                break;
                            }
                        case 2: {
                                message.optionVoteCount = reader.int64();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a PollVote message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.PollResultSnapshotMessage.PollVote
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.PollResultSnapshotMessage.PollVote} PollVote
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PollVote.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a PollVote message.
                 * @function verify
                 * @memberof E2E.Message.PollResultSnapshotMessage.PollVote
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                PollVote.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.optionName != null && message.hasOwnProperty("optionName")) {
                        properties._optionName = 1;
                        if (!$util.isString(message.optionName))
                            return "optionName: string expected";
                    }
                    if (message.optionVoteCount != null && message.hasOwnProperty("optionVoteCount")) {
                        properties._optionVoteCount = 1;
                        if (!$util.isInteger(message.optionVoteCount) && !(message.optionVoteCount && $util.isInteger(message.optionVoteCount.low) && $util.isInteger(message.optionVoteCount.high)))
                            return "optionVoteCount: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a PollVote message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.PollResultSnapshotMessage.PollVote
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.PollResultSnapshotMessage.PollVote} PollVote
                 */
                PollVote.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.PollResultSnapshotMessage.PollVote)
                        return object;
                    var message = new $root.E2E.Message.PollResultSnapshotMessage.PollVote();
                    if (object.optionName != null)
                        message.optionName = String(object.optionName);
                    if (object.optionVoteCount != null)
                        if ($util.Long)
                            (message.optionVoteCount = $util.Long.fromValue(object.optionVoteCount)).unsigned = false;
                        else if (typeof object.optionVoteCount === "string")
                            message.optionVoteCount = parseInt(object.optionVoteCount, 10);
                        else if (typeof object.optionVoteCount === "number")
                            message.optionVoteCount = object.optionVoteCount;
                        else if (typeof object.optionVoteCount === "object")
                            message.optionVoteCount = new $util.LongBits(object.optionVoteCount.low >>> 0, object.optionVoteCount.high >>> 0).toNumber();
                    return message;
                };

                /**
                 * Creates a plain object from a PollVote message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.PollResultSnapshotMessage.PollVote
                 * @static
                 * @param {E2E.Message.PollResultSnapshotMessage.PollVote} message PollVote
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                PollVote.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.optionName != null && message.hasOwnProperty("optionName")) {
                        object.optionName = message.optionName;
                        if (options.oneofs)
                            object._optionName = "optionName";
                    }
                    if (message.optionVoteCount != null && message.hasOwnProperty("optionVoteCount")) {
                        if (typeof message.optionVoteCount === "number")
                            object.optionVoteCount = options.longs === String ? String(message.optionVoteCount) : message.optionVoteCount;
                        else
                            object.optionVoteCount = options.longs === String ? $util.Long.prototype.toString.call(message.optionVoteCount) : options.longs === Number ? new $util.LongBits(message.optionVoteCount.low >>> 0, message.optionVoteCount.high >>> 0).toNumber() : message.optionVoteCount;
                        if (options.oneofs)
                            object._optionVoteCount = "optionVoteCount";
                    }
                    return object;
                };

                /**
                 * Converts this PollVote to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.PollResultSnapshotMessage.PollVote
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                PollVote.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for PollVote
                 * @function getTypeUrl
                 * @memberof E2E.Message.PollResultSnapshotMessage.PollVote
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                PollVote.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.PollResultSnapshotMessage.PollVote";
                };

                return PollVote;
            })();

            return PollResultSnapshotMessage;
        })();

        /**
         * PollType enum.
         * @name E2E.Message.PollType
         * @enum {number}
         * @property {number} POLL=0 POLL value
         * @property {number} QUIZ=1 QUIZ value
         */
        Message.PollType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "POLL"] = 0;
            values[valuesById[1] = "QUIZ"] = 1;
            return values;
        })();

        Message.PollUpdateMessage = (function() {

            /**
             * Properties of a PollUpdateMessage.
             * @memberof E2E.Message
             * @interface IPollUpdateMessage
             * @property {Protocol.IMessageKey|null} [pollCreationMessageKey] PollUpdateMessage pollCreationMessageKey
             * @property {E2E.Message.IPollEncValue|null} [vote] PollUpdateMessage vote
             * @property {E2E.Message.IPollUpdateMessageMetadata|null} [metadata] PollUpdateMessage metadata
             * @property {number|Long|null} [senderTimestampMs] PollUpdateMessage senderTimestampMs
             */

            /**
             * Constructs a new PollUpdateMessage.
             * @memberof E2E.Message
             * @classdesc Represents a PollUpdateMessage.
             * @implements IPollUpdateMessage
             * @constructor
             * @param {E2E.Message.IPollUpdateMessage=} [properties] Properties to set
             */
            function PollUpdateMessage(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]];
            }

            /**
             * PollUpdateMessage pollCreationMessageKey.
             * @member {Protocol.IMessageKey|null|undefined} pollCreationMessageKey
             * @memberof E2E.Message.PollUpdateMessage
             * @instance
             */
            PollUpdateMessage.prototype.pollCreationMessageKey = null;

            /**
             * PollUpdateMessage vote.
             * @member {E2E.Message.IPollEncValue|null|undefined} vote
             * @memberof E2E.Message.PollUpdateMessage
             * @instance
             */
            PollUpdateMessage.prototype.vote = null;

            /**
             * PollUpdateMessage metadata.
             * @member {E2E.Message.IPollUpdateMessageMetadata|null|undefined} metadata
             * @memberof E2E.Message.PollUpdateMessage
             * @instance
             */
            PollUpdateMessage.prototype.metadata = null;

            /**
             * PollUpdateMessage senderTimestampMs.
             * @member {number|Long|null|undefined} senderTimestampMs
             * @memberof E2E.Message.PollUpdateMessage
             * @instance
             */
            PollUpdateMessage.prototype.senderTimestampMs = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * PollUpdateMessage _pollCreationMessageKey.
             * @member {"pollCreationMessageKey"|undefined} _pollCreationMessageKey
             * @memberof E2E.Message.PollUpdateMessage
             * @instance
             */
            Object.defineProperty(PollUpdateMessage.prototype, "_pollCreationMessageKey", {
                get: $util.oneOfGetter($oneOfFields = ["pollCreationMessageKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PollUpdateMessage _vote.
             * @member {"vote"|undefined} _vote
             * @memberof E2E.Message.PollUpdateMessage
             * @instance
             */
            Object.defineProperty(PollUpdateMessage.prototype, "_vote", {
                get: $util.oneOfGetter($oneOfFields = ["vote"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PollUpdateMessage _metadata.
             * @member {"metadata"|undefined} _metadata
             * @memberof E2E.Message.PollUpdateMessage
             * @instance
             */
            Object.defineProperty(PollUpdateMessage.prototype, "_metadata", {
                get: $util.oneOfGetter($oneOfFields = ["metadata"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PollUpdateMessage _senderTimestampMs.
             * @member {"senderTimestampMs"|undefined} _senderTimestampMs
             * @memberof E2E.Message.PollUpdateMessage
             * @instance
             */
            Object.defineProperty(PollUpdateMessage.prototype, "_senderTimestampMs", {
                get: $util.oneOfGetter($oneOfFields = ["senderTimestampMs"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new PollUpdateMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.PollUpdateMessage
             * @static
             * @param {E2E.Message.IPollUpdateMessage=} [properties] Properties to set
             * @returns {E2E.Message.PollUpdateMessage} PollUpdateMessage instance
             */
            PollUpdateMessage.create = function create(properties) {
                return new PollUpdateMessage(properties);
            };

            /**
             * Encodes the specified PollUpdateMessage message. Does not implicitly {@link E2E.Message.PollUpdateMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.PollUpdateMessage
             * @static
             * @param {E2E.Message.IPollUpdateMessage} message PollUpdateMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PollUpdateMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.pollCreationMessageKey != null && Object.hasOwnProperty.call(message, "pollCreationMessageKey"))
                    $root.Protocol.MessageKey.encode(message.pollCreationMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.vote != null && Object.hasOwnProperty.call(message, "vote"))
                    $root.E2E.Message.PollEncValue.encode(message.vote, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
                    $root.E2E.Message.PollUpdateMessageMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                if (message.senderTimestampMs != null && Object.hasOwnProperty.call(message, "senderTimestampMs"))
                    writer.uint32(/* id 4, wireType 0 =*/32).int64(message.senderTimestampMs);
                return writer;
            };

            /**
             * Encodes the specified PollUpdateMessage message, length delimited. Does not implicitly {@link E2E.Message.PollUpdateMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.PollUpdateMessage
             * @static
             * @param {E2E.Message.IPollUpdateMessage} message PollUpdateMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PollUpdateMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PollUpdateMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.PollUpdateMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.PollUpdateMessage} PollUpdateMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PollUpdateMessage.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.E2E.Message.PollUpdateMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.pollCreationMessageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.vote = $root.E2E.Message.PollEncValue.decode(reader, reader.uint32());
                            break;
                        }
                    case 3: {
                            message.metadata = $root.E2E.Message.PollUpdateMessageMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    case 4: {
                            message.senderTimestampMs = reader.int64();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a PollUpdateMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.PollUpdateMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.PollUpdateMessage} PollUpdateMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PollUpdateMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PollUpdateMessage message.
             * @function verify
             * @memberof E2E.Message.PollUpdateMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PollUpdateMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.pollCreationMessageKey != null && message.hasOwnProperty("pollCreationMessageKey")) {
                    properties._pollCreationMessageKey = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.pollCreationMessageKey);
                        if (error)
                            return "pollCreationMessageKey." + error;
                    }
                }
                if (message.vote != null && message.hasOwnProperty("vote")) {
                    properties._vote = 1;
                    {
                        var error = $root.E2E.Message.PollEncValue.verify(message.vote);
                        if (error)
                            return "vote." + error;
                    }
                }
                if (message.metadata != null && message.hasOwnProperty("metadata")) {
                    properties._metadata = 1;
                    {
                        var error = $root.E2E.Message.PollUpdateMessageMetadata.verify(message.metadata);
                        if (error)
                            return "metadata." + error;
                    }
                }
                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";
                }
                return null;
            };

            /**
             * Creates a PollUpdateMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.PollUpdateMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.PollUpdateMessage} PollUpdateMessage
             */
            PollUpdateMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.PollUpdateMessage)
                    return object;
                var message = new $root.E2E.Message.PollUpdateMessage();
                if (object.pollCreationMessageKey != null) {
                    if (typeof object.pollCreationMessageKey !== "object")
                        throw TypeError(".E2E.Message.PollUpdateMessage.pollCreationMessageKey: object expected");
                    message.pollCreationMessageKey = $root.Protocol.MessageKey.fromObject(object.pollCreationMessageKey);
                }
                if (object.vote != null) {
                    if (typeof object.vote !== "object")
                        throw TypeError(".E2E.Message.PollUpdateMessage.vote: object expected");
                    message.vote = $root.E2E.Message.PollEncValue.fromObject(object.vote);
                }
                if (object.metadata != null) {
                    if (typeof object.metadata !== "object")
                        throw TypeError(".E2E.Message.PollUpdateMessage.metadata: object expected");
                    message.metadata = $root.E2E.Message.PollUpdateMessageMetadata.fromObject(object.metadata);
                }
                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(object.senderTimestampMs.low >>> 0, object.senderTimestampMs.high >>> 0).toNumber();
                return message;
            };

            /**
             * Creates a plain object from a PollUpdateMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.PollUpdateMessage
             * @static
             * @param {E2E.Message.PollUpdateMessage} message PollUpdateMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PollUpdateMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.pollCreationMessageKey != null && message.hasOwnProperty("pollCreationMessageKey")) {
                    object.pollCreationMessageKey = $root.Protocol.MessageKey.toObject(message.pollCreationMessageKey, options);
                    if (options.oneofs)
                        object._pollCreationMessageKey = "pollCreationMessageKey";
                }
                if (message.vote != null && message.hasOwnProperty("vote")) {
                    object.vote = $root.E2E.Message.PollEncValue.toObject(message.vote, options);
                    if (options.oneofs)
                        object._vote = "vote";
                }
                if (message.metadata != null && message.hasOwnProperty("metadata")) {
                    object.metadata = $root.E2E.Message.PollUpdateMessageMetadata.toObject(message.metadata, options);
                    if (options.oneofs)
                        object._metadata = "metadata";
                }
                if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) {
                    if (typeof message.senderTimestampMs === "number")
                        object.senderTimestampMs = options.longs === String ? String(message.senderTimestampMs) : message.senderTimestampMs;
                    else
                        object.senderTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.senderTimestampMs) : options.longs === Number ? new $util.LongBits(message.senderTimestampMs.low >>> 0, message.senderTimestampMs.high >>> 0).toNumber() : message.senderTimestampMs;
                    if (options.oneofs)
                        object._senderTimestampMs = "senderTimestampMs";
                }
                return object;
            };

            /**
             * Converts this PollUpdateMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.PollUpdateMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PollUpdateMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for PollUpdateMessage
             * @function getTypeUrl
             * @memberof E2E.Message.PollUpdateMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            PollUpdateMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.PollUpdateMessage";
            };

            return PollUpdateMessage;
        })();

        Message.PollUpdateMessageMetadata = (function() {

            /**
             * Properties of a PollUpdateMessageMetadata.
             * @memberof E2E.Message
             * @interface IPollUpdateMessageMetadata
             */

            /**
             * Constructs a new PollUpdateMessageMetadata.
             * @memberof E2E.Message
             * @classdesc Represents a PollUpdateMessageMetadata.
             * @implements IPollUpdateMessageMetadata
             * @constructor
             * @param {E2E.Message.IPollUpdateMessageMetadata=} [properties] Properties to set
             */
            function PollUpdateMessageMetadata(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]];
            }

            /**
             * Creates a new PollUpdateMessageMetadata instance using the specified properties.
             * @function create
             * @memberof E2E.Message.PollUpdateMessageMetadata
             * @static
             * @param {E2E.Message.IPollUpdateMessageMetadata=} [properties] Properties to set
             * @returns {E2E.Message.PollUpdateMessageMetadata} PollUpdateMessageMetadata instance
             */
            PollUpdateMessageMetadata.create = function create(properties) {
                return new PollUpdateMessageMetadata(properties);
            };

            /**
             * Encodes the specified PollUpdateMessageMetadata message. Does not implicitly {@link E2E.Message.PollUpdateMessageMetadata.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.PollUpdateMessageMetadata
             * @static
             * @param {E2E.Message.IPollUpdateMessageMetadata} message PollUpdateMessageMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PollUpdateMessageMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                return writer;
            };

            /**
             * Encodes the specified PollUpdateMessageMetadata message, length delimited. Does not implicitly {@link E2E.Message.PollUpdateMessageMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.PollUpdateMessageMetadata
             * @static
             * @param {E2E.Message.IPollUpdateMessageMetadata} message PollUpdateMessageMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PollUpdateMessageMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PollUpdateMessageMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.PollUpdateMessageMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.PollUpdateMessageMetadata} PollUpdateMessageMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PollUpdateMessageMetadata.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.E2E.Message.PollUpdateMessageMetadata();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a PollUpdateMessageMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.PollUpdateMessageMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.PollUpdateMessageMetadata} PollUpdateMessageMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PollUpdateMessageMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PollUpdateMessageMetadata message.
             * @function verify
             * @memberof E2E.Message.PollUpdateMessageMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PollUpdateMessageMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a PollUpdateMessageMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.PollUpdateMessageMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.PollUpdateMessageMetadata} PollUpdateMessageMetadata
             */
            PollUpdateMessageMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.PollUpdateMessageMetadata)
                    return object;
                return new $root.E2E.Message.PollUpdateMessageMetadata();
            };

            /**
             * Creates a plain object from a PollUpdateMessageMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.PollUpdateMessageMetadata
             * @static
             * @param {E2E.Message.PollUpdateMessageMetadata} message PollUpdateMessageMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PollUpdateMessageMetadata.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this PollUpdateMessageMetadata to JSON.
             * @function toJSON
             * @memberof E2E.Message.PollUpdateMessageMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PollUpdateMessageMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for PollUpdateMessageMetadata
             * @function getTypeUrl
             * @memberof E2E.Message.PollUpdateMessageMetadata
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            PollUpdateMessageMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.PollUpdateMessageMetadata";
            };

            return PollUpdateMessageMetadata;
        })();

        Message.PollVoteMessage = (function() {

            /**
             * Properties of a PollVoteMessage.
             * @memberof E2E.Message
             * @interface IPollVoteMessage
             * @property {Array.<Uint8Array>|null} [selectedOptions] PollVoteMessage selectedOptions
             */

            /**
             * Constructs a new PollVoteMessage.
             * @memberof E2E.Message
             * @classdesc Represents a PollVoteMessage.
             * @implements IPollVoteMessage
             * @constructor
             * @param {E2E.Message.IPollVoteMessage=} [properties] Properties to set
             */
            function PollVoteMessage(properties) {
                this.selectedOptions = [];
                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]];
            }

            /**
             * PollVoteMessage selectedOptions.
             * @member {Array.<Uint8Array>} selectedOptions
             * @memberof E2E.Message.PollVoteMessage
             * @instance
             */
            PollVoteMessage.prototype.selectedOptions = $util.emptyArray;

            /**
             * Creates a new PollVoteMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.PollVoteMessage
             * @static
             * @param {E2E.Message.IPollVoteMessage=} [properties] Properties to set
             * @returns {E2E.Message.PollVoteMessage} PollVoteMessage instance
             */
            PollVoteMessage.create = function create(properties) {
                return new PollVoteMessage(properties);
            };

            /**
             * Encodes the specified PollVoteMessage message. Does not implicitly {@link E2E.Message.PollVoteMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.PollVoteMessage
             * @static
             * @param {E2E.Message.IPollVoteMessage} message PollVoteMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PollVoteMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.selectedOptions != null && message.selectedOptions.length)
                    for (var i = 0; i < message.selectedOptions.length; ++i)
                        writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.selectedOptions[i]);
                return writer;
            };

            /**
             * Encodes the specified PollVoteMessage message, length delimited. Does not implicitly {@link E2E.Message.PollVoteMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.PollVoteMessage
             * @static
             * @param {E2E.Message.IPollVoteMessage} message PollVoteMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PollVoteMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PollVoteMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.PollVoteMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.PollVoteMessage} PollVoteMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PollVoteMessage.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.E2E.Message.PollVoteMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            if (!(message.selectedOptions && message.selectedOptions.length))
                                message.selectedOptions = [];
                            message.selectedOptions.push(reader.bytes());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a PollVoteMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.PollVoteMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.PollVoteMessage} PollVoteMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PollVoteMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PollVoteMessage message.
             * @function verify
             * @memberof E2E.Message.PollVoteMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PollVoteMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.selectedOptions != null && message.hasOwnProperty("selectedOptions")) {
                    if (!Array.isArray(message.selectedOptions))
                        return "selectedOptions: array expected";
                    for (var i = 0; i < message.selectedOptions.length; ++i)
                        if (!(message.selectedOptions[i] && typeof message.selectedOptions[i].length === "number" || $util.isString(message.selectedOptions[i])))
                            return "selectedOptions: buffer[] expected";
                }
                return null;
            };

            /**
             * Creates a PollVoteMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.PollVoteMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.PollVoteMessage} PollVoteMessage
             */
            PollVoteMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.PollVoteMessage)
                    return object;
                var message = new $root.E2E.Message.PollVoteMessage();
                if (object.selectedOptions) {
                    if (!Array.isArray(object.selectedOptions))
                        throw TypeError(".E2E.Message.PollVoteMessage.selectedOptions: array expected");
                    message.selectedOptions = [];
                    for (var i = 0; i < object.selectedOptions.length; ++i)
                        if (typeof object.selectedOptions[i] === "string")
                            $util.base64.decode(object.selectedOptions[i], message.selectedOptions[i] = $util.newBuffer($util.base64.length(object.selectedOptions[i])), 0);
                        else if (object.selectedOptions[i].length >= 0)
                            message.selectedOptions[i] = object.selectedOptions[i];
                }
                return message;
            };

            /**
             * Creates a plain object from a PollVoteMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.PollVoteMessage
             * @static
             * @param {E2E.Message.PollVoteMessage} message PollVoteMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PollVoteMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.selectedOptions = [];
                if (message.selectedOptions && message.selectedOptions.length) {
                    object.selectedOptions = [];
                    for (var j = 0; j < message.selectedOptions.length; ++j)
                        object.selectedOptions[j] = options.bytes === String ? $util.base64.encode(message.selectedOptions[j], 0, message.selectedOptions[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.selectedOptions[j]) : message.selectedOptions[j];
                }
                return object;
            };

            /**
             * Converts this PollVoteMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.PollVoteMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PollVoteMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for PollVoteMessage
             * @function getTypeUrl
             * @memberof E2E.Message.PollVoteMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            PollVoteMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.PollVoteMessage";
            };

            return PollVoteMessage;
        })();

        Message.ProductMessage = (function() {

            /**
             * Properties of a ProductMessage.
             * @memberof E2E.Message
             * @interface IProductMessage
             * @property {E2E.Message.ProductMessage.IProductSnapshot|null} [product] ProductMessage product
             * @property {string|null} [businessOwnerJid] ProductMessage businessOwnerJid
             * @property {E2E.Message.ProductMessage.ICatalogSnapshot|null} [catalog] ProductMessage catalog
             * @property {string|null} [body] ProductMessage body
             * @property {string|null} [footer] ProductMessage footer
             * @property {E2E.IContextInfo|null} [contextInfo] ProductMessage contextInfo
             */

            /**
             * Constructs a new ProductMessage.
             * @memberof E2E.Message
             * @classdesc Represents a ProductMessage.
             * @implements IProductMessage
             * @constructor
             * @param {E2E.Message.IProductMessage=} [properties] Properties to set
             */
            function ProductMessage(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]];
            }

            /**
             * ProductMessage product.
             * @member {E2E.Message.ProductMessage.IProductSnapshot|null|undefined} product
             * @memberof E2E.Message.ProductMessage
             * @instance
             */
            ProductMessage.prototype.product = null;

            /**
             * ProductMessage businessOwnerJid.
             * @member {string|null|undefined} businessOwnerJid
             * @memberof E2E.Message.ProductMessage
             * @instance
             */
            ProductMessage.prototype.businessOwnerJid = null;

            /**
             * ProductMessage catalog.
             * @member {E2E.Message.ProductMessage.ICatalogSnapshot|null|undefined} catalog
             * @memberof E2E.Message.ProductMessage
             * @instance
             */
            ProductMessage.prototype.catalog = null;

            /**
             * ProductMessage body.
             * @member {string|null|undefined} body
             * @memberof E2E.Message.ProductMessage
             * @instance
             */
            ProductMessage.prototype.body = null;

            /**
             * ProductMessage footer.
             * @member {string|null|undefined} footer
             * @memberof E2E.Message.ProductMessage
             * @instance
             */
            ProductMessage.prototype.footer = null;

            /**
             * ProductMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.ProductMessage
             * @instance
             */
            ProductMessage.prototype.contextInfo = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * ProductMessage _product.
             * @member {"product"|undefined} _product
             * @memberof E2E.Message.ProductMessage
             * @instance
             */
            Object.defineProperty(ProductMessage.prototype, "_product", {
                get: $util.oneOfGetter($oneOfFields = ["product"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProductMessage _businessOwnerJid.
             * @member {"businessOwnerJid"|undefined} _businessOwnerJid
             * @memberof E2E.Message.ProductMessage
             * @instance
             */
            Object.defineProperty(ProductMessage.prototype, "_businessOwnerJid", {
                get: $util.oneOfGetter($oneOfFields = ["businessOwnerJid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProductMessage _catalog.
             * @member {"catalog"|undefined} _catalog
             * @memberof E2E.Message.ProductMessage
             * @instance
             */
            Object.defineProperty(ProductMessage.prototype, "_catalog", {
                get: $util.oneOfGetter($oneOfFields = ["catalog"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProductMessage _body.
             * @member {"body"|undefined} _body
             * @memberof E2E.Message.ProductMessage
             * @instance
             */
            Object.defineProperty(ProductMessage.prototype, "_body", {
                get: $util.oneOfGetter($oneOfFields = ["body"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProductMessage _footer.
             * @member {"footer"|undefined} _footer
             * @memberof E2E.Message.ProductMessage
             * @instance
             */
            Object.defineProperty(ProductMessage.prototype, "_footer", {
                get: $util.oneOfGetter($oneOfFields = ["footer"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProductMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.ProductMessage
             * @instance
             */
            Object.defineProperty(ProductMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new ProductMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.ProductMessage
             * @static
             * @param {E2E.Message.IProductMessage=} [properties] Properties to set
             * @returns {E2E.Message.ProductMessage} ProductMessage instance
             */
            ProductMessage.create = function create(properties) {
                return new ProductMessage(properties);
            };

            /**
             * Encodes the specified ProductMessage message. Does not implicitly {@link E2E.Message.ProductMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.ProductMessage
             * @static
             * @param {E2E.Message.IProductMessage} message ProductMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProductMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.product != null && Object.hasOwnProperty.call(message, "product"))
                    $root.E2E.Message.ProductMessage.ProductSnapshot.encode(message.product, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.businessOwnerJid != null && Object.hasOwnProperty.call(message, "businessOwnerJid"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.businessOwnerJid);
                if (message.catalog != null && Object.hasOwnProperty.call(message, "catalog"))
                    $root.E2E.Message.ProductMessage.CatalogSnapshot.encode(message.catalog, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                if (message.body != null && Object.hasOwnProperty.call(message, "body"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.body);
                if (message.footer != null && Object.hasOwnProperty.call(message, "footer"))
                    writer.uint32(/* id 6, wireType 2 =*/50).string(message.footer);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified ProductMessage message, length delimited. Does not implicitly {@link E2E.Message.ProductMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.ProductMessage
             * @static
             * @param {E2E.Message.IProductMessage} message ProductMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProductMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ProductMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.ProductMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.ProductMessage} ProductMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProductMessage.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.E2E.Message.ProductMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.product = $root.E2E.Message.ProductMessage.ProductSnapshot.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.businessOwnerJid = reader.string();
                            break;
                        }
                    case 4: {
                            message.catalog = $root.E2E.Message.ProductMessage.CatalogSnapshot.decode(reader, reader.uint32());
                            break;
                        }
                    case 5: {
                            message.body = reader.string();
                            break;
                        }
                    case 6: {
                            message.footer = reader.string();
                            break;
                        }
                    case 17: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a ProductMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.ProductMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.ProductMessage} ProductMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProductMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ProductMessage message.
             * @function verify
             * @memberof E2E.Message.ProductMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ProductMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.product != null && message.hasOwnProperty("product")) {
                    properties._product = 1;
                    {
                        var error = $root.E2E.Message.ProductMessage.ProductSnapshot.verify(message.product);
                        if (error)
                            return "product." + error;
                    }
                }
                if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) {
                    properties._businessOwnerJid = 1;
                    if (!$util.isString(message.businessOwnerJid))
                        return "businessOwnerJid: string expected";
                }
                if (message.catalog != null && message.hasOwnProperty("catalog")) {
                    properties._catalog = 1;
                    {
                        var error = $root.E2E.Message.ProductMessage.CatalogSnapshot.verify(message.catalog);
                        if (error)
                            return "catalog." + error;
                    }
                }
                if (message.body != null && message.hasOwnProperty("body")) {
                    properties._body = 1;
                    if (!$util.isString(message.body))
                        return "body: string expected";
                }
                if (message.footer != null && message.hasOwnProperty("footer")) {
                    properties._footer = 1;
                    if (!$util.isString(message.footer))
                        return "footer: string expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a ProductMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.ProductMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.ProductMessage} ProductMessage
             */
            ProductMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.ProductMessage)
                    return object;
                var message = new $root.E2E.Message.ProductMessage();
                if (object.product != null) {
                    if (typeof object.product !== "object")
                        throw TypeError(".E2E.Message.ProductMessage.product: object expected");
                    message.product = $root.E2E.Message.ProductMessage.ProductSnapshot.fromObject(object.product);
                }
                if (object.businessOwnerJid != null)
                    message.businessOwnerJid = String(object.businessOwnerJid);
                if (object.catalog != null) {
                    if (typeof object.catalog !== "object")
                        throw TypeError(".E2E.Message.ProductMessage.catalog: object expected");
                    message.catalog = $root.E2E.Message.ProductMessage.CatalogSnapshot.fromObject(object.catalog);
                }
                if (object.body != null)
                    message.body = String(object.body);
                if (object.footer != null)
                    message.footer = String(object.footer);
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.ProductMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                return message;
            };

            /**
             * Creates a plain object from a ProductMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.ProductMessage
             * @static
             * @param {E2E.Message.ProductMessage} message ProductMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ProductMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.product != null && message.hasOwnProperty("product")) {
                    object.product = $root.E2E.Message.ProductMessage.ProductSnapshot.toObject(message.product, options);
                    if (options.oneofs)
                        object._product = "product";
                }
                if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) {
                    object.businessOwnerJid = message.businessOwnerJid;
                    if (options.oneofs)
                        object._businessOwnerJid = "businessOwnerJid";
                }
                if (message.catalog != null && message.hasOwnProperty("catalog")) {
                    object.catalog = $root.E2E.Message.ProductMessage.CatalogSnapshot.toObject(message.catalog, options);
                    if (options.oneofs)
                        object._catalog = "catalog";
                }
                if (message.body != null && message.hasOwnProperty("body")) {
                    object.body = message.body;
                    if (options.oneofs)
                        object._body = "body";
                }
                if (message.footer != null && message.hasOwnProperty("footer")) {
                    object.footer = message.footer;
                    if (options.oneofs)
                        object._footer = "footer";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                return object;
            };

            /**
             * Converts this ProductMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.ProductMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ProductMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for ProductMessage
             * @function getTypeUrl
             * @memberof E2E.Message.ProductMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            ProductMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.ProductMessage";
            };

            ProductMessage.CatalogSnapshot = (function() {

                /**
                 * Properties of a CatalogSnapshot.
                 * @memberof E2E.Message.ProductMessage
                 * @interface ICatalogSnapshot
                 * @property {E2E.Message.IImageMessage|null} [catalogImage] CatalogSnapshot catalogImage
                 * @property {string|null} [title] CatalogSnapshot title
                 * @property {string|null} [description] CatalogSnapshot description
                 */

                /**
                 * Constructs a new CatalogSnapshot.
                 * @memberof E2E.Message.ProductMessage
                 * @classdesc Represents a CatalogSnapshot.
                 * @implements ICatalogSnapshot
                 * @constructor
                 * @param {E2E.Message.ProductMessage.ICatalogSnapshot=} [properties] Properties to set
                 */
                function CatalogSnapshot(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]];
                }

                /**
                 * CatalogSnapshot catalogImage.
                 * @member {E2E.Message.IImageMessage|null|undefined} catalogImage
                 * @memberof E2E.Message.ProductMessage.CatalogSnapshot
                 * @instance
                 */
                CatalogSnapshot.prototype.catalogImage = null;

                /**
                 * CatalogSnapshot title.
                 * @member {string|null|undefined} title
                 * @memberof E2E.Message.ProductMessage.CatalogSnapshot
                 * @instance
                 */
                CatalogSnapshot.prototype.title = null;

                /**
                 * CatalogSnapshot description.
                 * @member {string|null|undefined} description
                 * @memberof E2E.Message.ProductMessage.CatalogSnapshot
                 * @instance
                 */
                CatalogSnapshot.prototype.description = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * CatalogSnapshot _catalogImage.
                 * @member {"catalogImage"|undefined} _catalogImage
                 * @memberof E2E.Message.ProductMessage.CatalogSnapshot
                 * @instance
                 */
                Object.defineProperty(CatalogSnapshot.prototype, "_catalogImage", {
                    get: $util.oneOfGetter($oneOfFields = ["catalogImage"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * CatalogSnapshot _title.
                 * @member {"title"|undefined} _title
                 * @memberof E2E.Message.ProductMessage.CatalogSnapshot
                 * @instance
                 */
                Object.defineProperty(CatalogSnapshot.prototype, "_title", {
                    get: $util.oneOfGetter($oneOfFields = ["title"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * CatalogSnapshot _description.
                 * @member {"description"|undefined} _description
                 * @memberof E2E.Message.ProductMessage.CatalogSnapshot
                 * @instance
                 */
                Object.defineProperty(CatalogSnapshot.prototype, "_description", {
                    get: $util.oneOfGetter($oneOfFields = ["description"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new CatalogSnapshot instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.ProductMessage.CatalogSnapshot
                 * @static
                 * @param {E2E.Message.ProductMessage.ICatalogSnapshot=} [properties] Properties to set
                 * @returns {E2E.Message.ProductMessage.CatalogSnapshot} CatalogSnapshot instance
                 */
                CatalogSnapshot.create = function create(properties) {
                    return new CatalogSnapshot(properties);
                };

                /**
                 * Encodes the specified CatalogSnapshot message. Does not implicitly {@link E2E.Message.ProductMessage.CatalogSnapshot.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.ProductMessage.CatalogSnapshot
                 * @static
                 * @param {E2E.Message.ProductMessage.ICatalogSnapshot} message CatalogSnapshot message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CatalogSnapshot.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.catalogImage != null && Object.hasOwnProperty.call(message, "catalogImage"))
                        $root.E2E.Message.ImageMessage.encode(message.catalogImage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.title);
                    if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                        writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
                    return writer;
                };

                /**
                 * Encodes the specified CatalogSnapshot message, length delimited. Does not implicitly {@link E2E.Message.ProductMessage.CatalogSnapshot.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.ProductMessage.CatalogSnapshot
                 * @static
                 * @param {E2E.Message.ProductMessage.ICatalogSnapshot} message CatalogSnapshot message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CatalogSnapshot.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a CatalogSnapshot message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.ProductMessage.CatalogSnapshot
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.ProductMessage.CatalogSnapshot} CatalogSnapshot
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CatalogSnapshot.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.E2E.Message.ProductMessage.CatalogSnapshot();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.catalogImage = $root.E2E.Message.ImageMessage.decode(reader, reader.uint32());
                                break;
                            }
                        case 2: {
                                message.title = reader.string();
                                break;
                            }
                        case 3: {
                                message.description = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a CatalogSnapshot message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.ProductMessage.CatalogSnapshot
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.ProductMessage.CatalogSnapshot} CatalogSnapshot
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CatalogSnapshot.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a CatalogSnapshot message.
                 * @function verify
                 * @memberof E2E.Message.ProductMessage.CatalogSnapshot
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CatalogSnapshot.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.catalogImage != null && message.hasOwnProperty("catalogImage")) {
                        properties._catalogImage = 1;
                        {
                            var error = $root.E2E.Message.ImageMessage.verify(message.catalogImage);
                            if (error)
                                return "catalogImage." + error;
                        }
                    }
                    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";
                    }
                    return null;
                };

                /**
                 * Creates a CatalogSnapshot message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.ProductMessage.CatalogSnapshot
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.ProductMessage.CatalogSnapshot} CatalogSnapshot
                 */
                CatalogSnapshot.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.ProductMessage.CatalogSnapshot)
                        return object;
                    var message = new $root.E2E.Message.ProductMessage.CatalogSnapshot();
                    if (object.catalogImage != null) {
                        if (typeof object.catalogImage !== "object")
                            throw TypeError(".E2E.Message.ProductMessage.CatalogSnapshot.catalogImage: object expected");
                        message.catalogImage = $root.E2E.Message.ImageMessage.fromObject(object.catalogImage);
                    }
                    if (object.title != null)
                        message.title = String(object.title);
                    if (object.description != null)
                        message.description = String(object.description);
                    return message;
                };

                /**
                 * Creates a plain object from a CatalogSnapshot message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.ProductMessage.CatalogSnapshot
                 * @static
                 * @param {E2E.Message.ProductMessage.CatalogSnapshot} message CatalogSnapshot
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CatalogSnapshot.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.catalogImage != null && message.hasOwnProperty("catalogImage")) {
                        object.catalogImage = $root.E2E.Message.ImageMessage.toObject(message.catalogImage, options);
                        if (options.oneofs)
                            object._catalogImage = "catalogImage";
                    }
                    if (message.title != null && message.hasOwnProperty("title")) {
                        object.title = message.title;
                        if (options.oneofs)
                            object._title = "title";
                    }
                    if (message.description != null && message.hasOwnProperty("description")) {
                        object.description = message.description;
                        if (options.oneofs)
                            object._description = "description";
                    }
                    return object;
                };

                /**
                 * Converts this CatalogSnapshot to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.ProductMessage.CatalogSnapshot
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CatalogSnapshot.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for CatalogSnapshot
                 * @function getTypeUrl
                 * @memberof E2E.Message.ProductMessage.CatalogSnapshot
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                CatalogSnapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.ProductMessage.CatalogSnapshot";
                };

                return CatalogSnapshot;
            })();

            ProductMessage.ProductSnapshot = (function() {

                /**
                 * Properties of a ProductSnapshot.
                 * @memberof E2E.Message.ProductMessage
                 * @interface IProductSnapshot
                 * @property {E2E.Message.IImageMessage|null} [productImage] ProductSnapshot productImage
                 * @property {string|null} [productId] ProductSnapshot productId
                 * @property {string|null} [title] ProductSnapshot title
                 * @property {string|null} [description] ProductSnapshot description
                 * @property {string|null} [currencyCode] ProductSnapshot currencyCode
                 * @property {number|Long|null} [priceAmount1000] ProductSnapshot priceAmount1000
                 * @property {string|null} [retailerId] ProductSnapshot retailerId
                 * @property {string|null} [url] ProductSnapshot url
                 * @property {number|null} [productImageCount] ProductSnapshot productImageCount
                 * @property {string|null} [firstImageId] ProductSnapshot firstImageId
                 * @property {number|Long|null} [salePriceAmount1000] ProductSnapshot salePriceAmount1000
                 * @property {string|null} [signedUrl] ProductSnapshot signedUrl
                 */

                /**
                 * Constructs a new ProductSnapshot.
                 * @memberof E2E.Message.ProductMessage
                 * @classdesc Represents a ProductSnapshot.
                 * @implements IProductSnapshot
                 * @constructor
                 * @param {E2E.Message.ProductMessage.IProductSnapshot=} [properties] Properties to set
                 */
                function ProductSnapshot(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]];
                }

                /**
                 * ProductSnapshot productImage.
                 * @member {E2E.Message.IImageMessage|null|undefined} productImage
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.productImage = null;

                /**
                 * ProductSnapshot productId.
                 * @member {string|null|undefined} productId
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.productId = null;

                /**
                 * ProductSnapshot title.
                 * @member {string|null|undefined} title
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.title = null;

                /**
                 * ProductSnapshot description.
                 * @member {string|null|undefined} description
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.description = null;

                /**
                 * ProductSnapshot currencyCode.
                 * @member {string|null|undefined} currencyCode
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.currencyCode = null;

                /**
                 * ProductSnapshot priceAmount1000.
                 * @member {number|Long|null|undefined} priceAmount1000
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.priceAmount1000 = null;

                /**
                 * ProductSnapshot retailerId.
                 * @member {string|null|undefined} retailerId
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.retailerId = null;

                /**
                 * ProductSnapshot url.
                 * @member {string|null|undefined} url
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.url = null;

                /**
                 * ProductSnapshot productImageCount.
                 * @member {number|null|undefined} productImageCount
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.productImageCount = null;

                /**
                 * ProductSnapshot firstImageId.
                 * @member {string|null|undefined} firstImageId
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.firstImageId = null;

                /**
                 * ProductSnapshot salePriceAmount1000.
                 * @member {number|Long|null|undefined} salePriceAmount1000
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.salePriceAmount1000 = null;

                /**
                 * ProductSnapshot signedUrl.
                 * @member {string|null|undefined} signedUrl
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                ProductSnapshot.prototype.signedUrl = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * ProductSnapshot _productImage.
                 * @member {"productImage"|undefined} _productImage
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                Object.defineProperty(ProductSnapshot.prototype, "_productImage", {
                    get: $util.oneOfGetter($oneOfFields = ["productImage"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * ProductSnapshot _productId.
                 * @member {"productId"|undefined} _productId
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                Object.defineProperty(ProductSnapshot.prototype, "_productId", {
                    get: $util.oneOfGetter($oneOfFields = ["productId"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * ProductSnapshot _title.
                 * @member {"title"|undefined} _title
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                Object.defineProperty(ProductSnapshot.prototype, "_title", {
                    get: $util.oneOfGetter($oneOfFields = ["title"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * ProductSnapshot _description.
                 * @member {"description"|undefined} _description
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                Object.defineProperty(ProductSnapshot.prototype, "_description", {
                    get: $util.oneOfGetter($oneOfFields = ["description"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * ProductSnapshot _currencyCode.
                 * @member {"currencyCode"|undefined} _currencyCode
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                Object.defineProperty(ProductSnapshot.prototype, "_currencyCode", {
                    get: $util.oneOfGetter($oneOfFields = ["currencyCode"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * ProductSnapshot _priceAmount1000.
                 * @member {"priceAmount1000"|undefined} _priceAmount1000
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                Object.defineProperty(ProductSnapshot.prototype, "_priceAmount1000", {
                    get: $util.oneOfGetter($oneOfFields = ["priceAmount1000"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * ProductSnapshot _retailerId.
                 * @member {"retailerId"|undefined} _retailerId
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                Object.defineProperty(ProductSnapshot.prototype, "_retailerId", {
                    get: $util.oneOfGetter($oneOfFields = ["retailerId"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * ProductSnapshot _url.
                 * @member {"url"|undefined} _url
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                Object.defineProperty(ProductSnapshot.prototype, "_url", {
                    get: $util.oneOfGetter($oneOfFields = ["url"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * ProductSnapshot _productImageCount.
                 * @member {"productImageCount"|undefined} _productImageCount
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                Object.defineProperty(ProductSnapshot.prototype, "_productImageCount", {
                    get: $util.oneOfGetter($oneOfFields = ["productImageCount"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * ProductSnapshot _firstImageId.
                 * @member {"firstImageId"|undefined} _firstImageId
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                Object.defineProperty(ProductSnapshot.prototype, "_firstImageId", {
                    get: $util.oneOfGetter($oneOfFields = ["firstImageId"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * ProductSnapshot _salePriceAmount1000.
                 * @member {"salePriceAmount1000"|undefined} _salePriceAmount1000
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                Object.defineProperty(ProductSnapshot.prototype, "_salePriceAmount1000", {
                    get: $util.oneOfGetter($oneOfFields = ["salePriceAmount1000"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * ProductSnapshot _signedUrl.
                 * @member {"signedUrl"|undefined} _signedUrl
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 */
                Object.defineProperty(ProductSnapshot.prototype, "_signedUrl", {
                    get: $util.oneOfGetter($oneOfFields = ["signedUrl"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new ProductSnapshot instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @static
                 * @param {E2E.Message.ProductMessage.IProductSnapshot=} [properties] Properties to set
                 * @returns {E2E.Message.ProductMessage.ProductSnapshot} ProductSnapshot instance
                 */
                ProductSnapshot.create = function create(properties) {
                    return new ProductSnapshot(properties);
                };

                /**
                 * Encodes the specified ProductSnapshot message. Does not implicitly {@link E2E.Message.ProductMessage.ProductSnapshot.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @static
                 * @param {E2E.Message.ProductMessage.IProductSnapshot} message ProductSnapshot message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProductSnapshot.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.productImage != null && Object.hasOwnProperty.call(message, "productImage"))
                        $root.E2E.Message.ImageMessage.encode(message.productImage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    if (message.productId != null && Object.hasOwnProperty.call(message, "productId"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.productId);
                    if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                        writer.uint32(/* id 3, wireType 2 =*/26).string(message.title);
                    if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                        writer.uint32(/* id 4, wireType 2 =*/34).string(message.description);
                    if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode"))
                        writer.uint32(/* id 5, wireType 2 =*/42).string(message.currencyCode);
                    if (message.priceAmount1000 != null && Object.hasOwnProperty.call(message, "priceAmount1000"))
                        writer.uint32(/* id 6, wireType 0 =*/48).int64(message.priceAmount1000);
                    if (message.retailerId != null && Object.hasOwnProperty.call(message, "retailerId"))
                        writer.uint32(/* id 7, wireType 2 =*/58).string(message.retailerId);
                    if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                        writer.uint32(/* id 8, wireType 2 =*/66).string(message.url);
                    if (message.productImageCount != null && Object.hasOwnProperty.call(message, "productImageCount"))
                        writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.productImageCount);
                    if (message.firstImageId != null && Object.hasOwnProperty.call(message, "firstImageId"))
                        writer.uint32(/* id 11, wireType 2 =*/90).string(message.firstImageId);
                    if (message.salePriceAmount1000 != null && Object.hasOwnProperty.call(message, "salePriceAmount1000"))
                        writer.uint32(/* id 12, wireType 0 =*/96).int64(message.salePriceAmount1000);
                    if (message.signedUrl != null && Object.hasOwnProperty.call(message, "signedUrl"))
                        writer.uint32(/* id 13, wireType 2 =*/106).string(message.signedUrl);
                    return writer;
                };

                /**
                 * Encodes the specified ProductSnapshot message, length delimited. Does not implicitly {@link E2E.Message.ProductMessage.ProductSnapshot.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @static
                 * @param {E2E.Message.ProductMessage.IProductSnapshot} message ProductSnapshot message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProductSnapshot.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ProductSnapshot message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.ProductMessage.ProductSnapshot} ProductSnapshot
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProductSnapshot.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.E2E.Message.ProductMessage.ProductSnapshot();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.productImage = $root.E2E.Message.ImageMessage.decode(reader, reader.uint32());
                                break;
                            }
                        case 2: {
                                message.productId = reader.string();
                                break;
                            }
                        case 3: {
                                message.title = reader.string();
                                break;
                            }
                        case 4: {
                                message.description = reader.string();
                                break;
                            }
                        case 5: {
                                message.currencyCode = reader.string();
                                break;
                            }
                        case 6: {
                                message.priceAmount1000 = reader.int64();
                                break;
                            }
                        case 7: {
                                message.retailerId = reader.string();
                                break;
                            }
                        case 8: {
                                message.url = reader.string();
                                break;
                            }
                        case 9: {
                                message.productImageCount = reader.uint32();
                                break;
                            }
                        case 11: {
                                message.firstImageId = reader.string();
                                break;
                            }
                        case 12: {
                                message.salePriceAmount1000 = reader.int64();
                                break;
                            }
                        case 13: {
                                message.signedUrl = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a ProductSnapshot message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.ProductMessage.ProductSnapshot} ProductSnapshot
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProductSnapshot.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ProductSnapshot message.
                 * @function verify
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ProductSnapshot.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.productImage != null && message.hasOwnProperty("productImage")) {
                        properties._productImage = 1;
                        {
                            var error = $root.E2E.Message.ImageMessage.verify(message.productImage);
                            if (error)
                                return "productImage." + error;
                        }
                    }
                    if (message.productId != null && message.hasOwnProperty("productId")) {
                        properties._productId = 1;
                        if (!$util.isString(message.productId))
                            return "productId: 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.currencyCode != null && message.hasOwnProperty("currencyCode")) {
                        properties._currencyCode = 1;
                        if (!$util.isString(message.currencyCode))
                            return "currencyCode: string expected";
                    }
                    if (message.priceAmount1000 != null && message.hasOwnProperty("priceAmount1000")) {
                        properties._priceAmount1000 = 1;
                        if (!$util.isInteger(message.priceAmount1000) && !(message.priceAmount1000 && $util.isInteger(message.priceAmount1000.low) && $util.isInteger(message.priceAmount1000.high)))
                            return "priceAmount1000: integer|Long expected";
                    }
                    if (message.retailerId != null && message.hasOwnProperty("retailerId")) {
                        properties._retailerId = 1;
                        if (!$util.isString(message.retailerId))
                            return "retailerId: string expected";
                    }
                    if (message.url != null && message.hasOwnProperty("url")) {
                        properties._url = 1;
                        if (!$util.isString(message.url))
                            return "url: string expected";
                    }
                    if (message.productImageCount != null && message.hasOwnProperty("productImageCount")) {
                        properties._productImageCount = 1;
                        if (!$util.isInteger(message.productImageCount))
                            return "productImageCount: integer expected";
                    }
                    if (message.firstImageId != null && message.hasOwnProperty("firstImageId")) {
                        properties._firstImageId = 1;
                        if (!$util.isString(message.firstImageId))
                            return "firstImageId: string expected";
                    }
                    if (message.salePriceAmount1000 != null && message.hasOwnProperty("salePriceAmount1000")) {
                        properties._salePriceAmount1000 = 1;
                        if (!$util.isInteger(message.salePriceAmount1000) && !(message.salePriceAmount1000 && $util.isInteger(message.salePriceAmount1000.low) && $util.isInteger(message.salePriceAmount1000.high)))
                            return "salePriceAmount1000: integer|Long expected";
                    }
                    if (message.signedUrl != null && message.hasOwnProperty("signedUrl")) {
                        properties._signedUrl = 1;
                        if (!$util.isString(message.signedUrl))
                            return "signedUrl: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a ProductSnapshot message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.ProductMessage.ProductSnapshot} ProductSnapshot
                 */
                ProductSnapshot.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.ProductMessage.ProductSnapshot)
                        return object;
                    var message = new $root.E2E.Message.ProductMessage.ProductSnapshot();
                    if (object.productImage != null) {
                        if (typeof object.productImage !== "object")
                            throw TypeError(".E2E.Message.ProductMessage.ProductSnapshot.productImage: object expected");
                        message.productImage = $root.E2E.Message.ImageMessage.fromObject(object.productImage);
                    }
                    if (object.productId != null)
                        message.productId = String(object.productId);
                    if (object.title != null)
                        message.title = String(object.title);
                    if (object.description != null)
                        message.description = String(object.description);
                    if (object.currencyCode != null)
                        message.currencyCode = String(object.currencyCode);
                    if (object.priceAmount1000 != null)
                        if ($util.Long)
                            (message.priceAmount1000 = $util.Long.fromValue(object.priceAmount1000)).unsigned = false;
                        else if (typeof object.priceAmount1000 === "string")
                            message.priceAmount1000 = parseInt(object.priceAmount1000, 10);
                        else if (typeof object.priceAmount1000 === "number")
                            message.priceAmount1000 = object.priceAmount1000;
                        else if (typeof object.priceAmount1000 === "object")
                            message.priceAmount1000 = new $util.LongBits(object.priceAmount1000.low >>> 0, object.priceAmount1000.high >>> 0).toNumber();
                    if (object.retailerId != null)
                        message.retailerId = String(object.retailerId);
                    if (object.url != null)
                        message.url = String(object.url);
                    if (object.productImageCount != null)
                        message.productImageCount = object.productImageCount >>> 0;
                    if (object.firstImageId != null)
                        message.firstImageId = String(object.firstImageId);
                    if (object.salePriceAmount1000 != null)
                        if ($util.Long)
                            (message.salePriceAmount1000 = $util.Long.fromValue(object.salePriceAmount1000)).unsigned = false;
                        else if (typeof object.salePriceAmount1000 === "string")
                            message.salePriceAmount1000 = parseInt(object.salePriceAmount1000, 10);
                        else if (typeof object.salePriceAmount1000 === "number")
                            message.salePriceAmount1000 = object.salePriceAmount1000;
                        else if (typeof object.salePriceAmount1000 === "object")
                            message.salePriceAmount1000 = new $util.LongBits(object.salePriceAmount1000.low >>> 0, object.salePriceAmount1000.high >>> 0).toNumber();
                    if (object.signedUrl != null)
                        message.signedUrl = String(object.signedUrl);
                    return message;
                };

                /**
                 * Creates a plain object from a ProductSnapshot message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @static
                 * @param {E2E.Message.ProductMessage.ProductSnapshot} message ProductSnapshot
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ProductSnapshot.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.productImage != null && message.hasOwnProperty("productImage")) {
                        object.productImage = $root.E2E.Message.ImageMessage.toObject(message.productImage, options);
                        if (options.oneofs)
                            object._productImage = "productImage";
                    }
                    if (message.productId != null && message.hasOwnProperty("productId")) {
                        object.productId = message.productId;
                        if (options.oneofs)
                            object._productId = "productId";
                    }
                    if (message.title != null && message.hasOwnProperty("title")) {
                        object.title = message.title;
                        if (options.oneofs)
                            object._title = "title";
                    }
                    if (message.description != null && message.hasOwnProperty("description")) {
                        object.description = message.description;
                        if (options.oneofs)
                            object._description = "description";
                    }
                    if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) {
                        object.currencyCode = message.currencyCode;
                        if (options.oneofs)
                            object._currencyCode = "currencyCode";
                    }
                    if (message.priceAmount1000 != null && message.hasOwnProperty("priceAmount1000")) {
                        if (typeof message.priceAmount1000 === "number")
                            object.priceAmount1000 = options.longs === String ? String(message.priceAmount1000) : message.priceAmount1000;
                        else
                            object.priceAmount1000 = options.longs === String ? $util.Long.prototype.toString.call(message.priceAmount1000) : options.longs === Number ? new $util.LongBits(message.priceAmount1000.low >>> 0, message.priceAmount1000.high >>> 0).toNumber() : message.priceAmount1000;
                        if (options.oneofs)
                            object._priceAmount1000 = "priceAmount1000";
                    }
                    if (message.retailerId != null && message.hasOwnProperty("retailerId")) {
                        object.retailerId = message.retailerId;
                        if (options.oneofs)
                            object._retailerId = "retailerId";
                    }
                    if (message.url != null && message.hasOwnProperty("url")) {
                        object.url = message.url;
                        if (options.oneofs)
                            object._url = "url";
                    }
                    if (message.productImageCount != null && message.hasOwnProperty("productImageCount")) {
                        object.productImageCount = message.productImageCount;
                        if (options.oneofs)
                            object._productImageCount = "productImageCount";
                    }
                    if (message.firstImageId != null && message.hasOwnProperty("firstImageId")) {
                        object.firstImageId = message.firstImageId;
                        if (options.oneofs)
                            object._firstImageId = "firstImageId";
                    }
                    if (message.salePriceAmount1000 != null && message.hasOwnProperty("salePriceAmount1000")) {
                        if (typeof message.salePriceAmount1000 === "number")
                            object.salePriceAmount1000 = options.longs === String ? String(message.salePriceAmount1000) : message.salePriceAmount1000;
                        else
                            object.salePriceAmount1000 = options.longs === String ? $util.Long.prototype.toString.call(message.salePriceAmount1000) : options.longs === Number ? new $util.LongBits(message.salePriceAmount1000.low >>> 0, message.salePriceAmount1000.high >>> 0).toNumber() : message.salePriceAmount1000;
                        if (options.oneofs)
                            object._salePriceAmount1000 = "salePriceAmount1000";
                    }
                    if (message.signedUrl != null && message.hasOwnProperty("signedUrl")) {
                        object.signedUrl = message.signedUrl;
                        if (options.oneofs)
                            object._signedUrl = "signedUrl";
                    }
                    return object;
                };

                /**
                 * Converts this ProductSnapshot to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ProductSnapshot.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for ProductSnapshot
                 * @function getTypeUrl
                 * @memberof E2E.Message.ProductMessage.ProductSnapshot
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                ProductSnapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.ProductMessage.ProductSnapshot";
                };

                return ProductSnapshot;
            })();

            return ProductMessage;
        })();

        Message.ProtocolMessage = (function() {

            /**
             * Properties of a ProtocolMessage.
             * @memberof E2E.Message
             * @interface IProtocolMessage
             * @property {Protocol.IMessageKey|null} [key] ProtocolMessage key
             * @property {E2E.Message.ProtocolMessage.Type|null} [type] ProtocolMessage type
             * @property {number|null} [ephemeralExpiration] ProtocolMessage ephemeralExpiration
             * @property {number|Long|null} [ephemeralSettingTimestamp] ProtocolMessage ephemeralSettingTimestamp
             * @property {E2E.Message.IHistorySyncNotification|null} [historySyncNotification] ProtocolMessage historySyncNotification
             * @property {E2E.Message.IAppStateSyncKeyShare|null} [appStateSyncKeyShare] ProtocolMessage appStateSyncKeyShare
             * @property {E2E.Message.IAppStateSyncKeyRequest|null} [appStateSyncKeyRequest] ProtocolMessage appStateSyncKeyRequest
             * @property {E2E.Message.IInitialSecurityNotificationSettingSync|null} [initialSecurityNotificationSettingSync] ProtocolMessage initialSecurityNotificationSettingSync
             * @property {E2E.Message.IAppStateFatalExceptionNotification|null} [appStateFatalExceptionNotification] ProtocolMessage appStateFatalExceptionNotification
             * @property {E2E.IDisappearingMode|null} [disappearingMode] ProtocolMessage disappearingMode
             * @property {E2E.IMessage|null} [editedMessage] ProtocolMessage editedMessage
             * @property {number|Long|null} [timestampMs] ProtocolMessage timestampMs
             * @property {E2E.Message.IPeerDataOperationRequestMessage|null} [peerDataOperationRequestMessage] ProtocolMessage peerDataOperationRequestMessage
             * @property {E2E.Message.IPeerDataOperationRequestResponseMessage|null} [peerDataOperationRequestResponseMessage] ProtocolMessage peerDataOperationRequestResponseMessage
             * @property {AICommon.IBotFeedbackMessage|null} [botFeedbackMessage] ProtocolMessage botFeedbackMessage
             * @property {string|null} [invokerJid] ProtocolMessage invokerJid
             * @property {E2E.Message.IRequestWelcomeMessageMetadata|null} [requestWelcomeMessageMetadata] ProtocolMessage requestWelcomeMessageMetadata
             * @property {E2E.IMediaNotifyMessage|null} [mediaNotifyMessage] ProtocolMessage mediaNotifyMessage
             * @property {E2E.Message.ICloudAPIThreadControlNotification|null} [cloudApiThreadControlNotification] ProtocolMessage cloudApiThreadControlNotification
             * @property {E2E.ILIDMigrationMappingSyncMessage|null} [lidMigrationMappingSyncMessage] ProtocolMessage lidMigrationMappingSyncMessage
             * @property {Protocol.ILimitSharing|null} [limitSharing] ProtocolMessage limitSharing
             * @property {Uint8Array|null} [aiPsiMetadata] ProtocolMessage aiPsiMetadata
             * @property {E2E.IAIQueryFanout|null} [aiQueryFanout] ProtocolMessage aiQueryFanout
             * @property {E2E.IMemberLabel|null} [memberLabel] ProtocolMessage memberLabel
             */

            /**
             * Constructs a new ProtocolMessage.
             * @memberof E2E.Message
             * @classdesc Represents a ProtocolMessage.
             * @implements IProtocolMessage
             * @constructor
             * @param {E2E.Message.IProtocolMessage=} [properties] Properties to set
             */
            function ProtocolMessage(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]];
            }

            /**
             * ProtocolMessage key.
             * @member {Protocol.IMessageKey|null|undefined} key
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.key = null;

            /**
             * ProtocolMessage type.
             * @member {E2E.Message.ProtocolMessage.Type|null|undefined} type
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.type = null;

            /**
             * ProtocolMessage ephemeralExpiration.
             * @member {number|null|undefined} ephemeralExpiration
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.ephemeralExpiration = null;

            /**
             * ProtocolMessage ephemeralSettingTimestamp.
             * @member {number|Long|null|undefined} ephemeralSettingTimestamp
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.ephemeralSettingTimestamp = null;

            /**
             * ProtocolMessage historySyncNotification.
             * @member {E2E.Message.IHistorySyncNotification|null|undefined} historySyncNotification
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.historySyncNotification = null;

            /**
             * ProtocolMessage appStateSyncKeyShare.
             * @member {E2E.Message.IAppStateSyncKeyShare|null|undefined} appStateSyncKeyShare
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.appStateSyncKeyShare = null;

            /**
             * ProtocolMessage appStateSyncKeyRequest.
             * @member {E2E.Message.IAppStateSyncKeyRequest|null|undefined} appStateSyncKeyRequest
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.appStateSyncKeyRequest = null;

            /**
             * ProtocolMessage initialSecurityNotificationSettingSync.
             * @member {E2E.Message.IInitialSecurityNotificationSettingSync|null|undefined} initialSecurityNotificationSettingSync
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.initialSecurityNotificationSettingSync = null;

            /**
             * ProtocolMessage appStateFatalExceptionNotification.
             * @member {E2E.Message.IAppStateFatalExceptionNotification|null|undefined} appStateFatalExceptionNotification
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.appStateFatalExceptionNotification = null;

            /**
             * ProtocolMessage disappearingMode.
             * @member {E2E.IDisappearingMode|null|undefined} disappearingMode
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.disappearingMode = null;

            /**
             * ProtocolMessage editedMessage.
             * @member {E2E.IMessage|null|undefined} editedMessage
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.editedMessage = null;

            /**
             * ProtocolMessage timestampMs.
             * @member {number|Long|null|undefined} timestampMs
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.timestampMs = null;

            /**
             * ProtocolMessage peerDataOperationRequestMessage.
             * @member {E2E.Message.IPeerDataOperationRequestMessage|null|undefined} peerDataOperationRequestMessage
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.peerDataOperationRequestMessage = null;

            /**
             * ProtocolMessage peerDataOperationRequestResponseMessage.
             * @member {E2E.Message.IPeerDataOperationRequestResponseMessage|null|undefined} peerDataOperationRequestResponseMessage
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.peerDataOperationRequestResponseMessage = null;

            /**
             * ProtocolMessage botFeedbackMessage.
             * @member {AICommon.IBotFeedbackMessage|null|undefined} botFeedbackMessage
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.botFeedbackMessage = null;

            /**
             * ProtocolMessage invokerJid.
             * @member {string|null|undefined} invokerJid
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.invokerJid = null;

            /**
             * ProtocolMessage requestWelcomeMessageMetadata.
             * @member {E2E.Message.IRequestWelcomeMessageMetadata|null|undefined} requestWelcomeMessageMetadata
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.requestWelcomeMessageMetadata = null;

            /**
             * ProtocolMessage mediaNotifyMessage.
             * @member {E2E.IMediaNotifyMessage|null|undefined} mediaNotifyMessage
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.mediaNotifyMessage = null;

            /**
             * ProtocolMessage cloudApiThreadControlNotification.
             * @member {E2E.Message.ICloudAPIThreadControlNotification|null|undefined} cloudApiThreadControlNotification
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.cloudApiThreadControlNotification = null;

            /**
             * ProtocolMessage lidMigrationMappingSyncMessage.
             * @member {E2E.ILIDMigrationMappingSyncMessage|null|undefined} lidMigrationMappingSyncMessage
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.lidMigrationMappingSyncMessage = null;

            /**
             * ProtocolMessage limitSharing.
             * @member {Protocol.ILimitSharing|null|undefined} limitSharing
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.limitSharing = null;

            /**
             * ProtocolMessage aiPsiMetadata.
             * @member {Uint8Array|null|undefined} aiPsiMetadata
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.aiPsiMetadata = null;

            /**
             * ProtocolMessage aiQueryFanout.
             * @member {E2E.IAIQueryFanout|null|undefined} aiQueryFanout
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.aiQueryFanout = null;

            /**
             * ProtocolMessage memberLabel.
             * @member {E2E.IMemberLabel|null|undefined} memberLabel
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            ProtocolMessage.prototype.memberLabel = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * ProtocolMessage _key.
             * @member {"key"|undefined} _key
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_key", {
                get: $util.oneOfGetter($oneOfFields = ["key"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _type.
             * @member {"type"|undefined} _type
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_type", {
                get: $util.oneOfGetter($oneOfFields = ["type"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _ephemeralExpiration.
             * @member {"ephemeralExpiration"|undefined} _ephemeralExpiration
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_ephemeralExpiration", {
                get: $util.oneOfGetter($oneOfFields = ["ephemeralExpiration"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _ephemeralSettingTimestamp.
             * @member {"ephemeralSettingTimestamp"|undefined} _ephemeralSettingTimestamp
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_ephemeralSettingTimestamp", {
                get: $util.oneOfGetter($oneOfFields = ["ephemeralSettingTimestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _historySyncNotification.
             * @member {"historySyncNotification"|undefined} _historySyncNotification
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_historySyncNotification", {
                get: $util.oneOfGetter($oneOfFields = ["historySyncNotification"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _appStateSyncKeyShare.
             * @member {"appStateSyncKeyShare"|undefined} _appStateSyncKeyShare
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_appStateSyncKeyShare", {
                get: $util.oneOfGetter($oneOfFields = ["appStateSyncKeyShare"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _appStateSyncKeyRequest.
             * @member {"appStateSyncKeyRequest"|undefined} _appStateSyncKeyRequest
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_appStateSyncKeyRequest", {
                get: $util.oneOfGetter($oneOfFields = ["appStateSyncKeyRequest"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _initialSecurityNotificationSettingSync.
             * @member {"initialSecurityNotificationSettingSync"|undefined} _initialSecurityNotificationSettingSync
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_initialSecurityNotificationSettingSync", {
                get: $util.oneOfGetter($oneOfFields = ["initialSecurityNotificationSettingSync"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _appStateFatalExceptionNotification.
             * @member {"appStateFatalExceptionNotification"|undefined} _appStateFatalExceptionNotification
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_appStateFatalExceptionNotification", {
                get: $util.oneOfGetter($oneOfFields = ["appStateFatalExceptionNotification"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _disappearingMode.
             * @member {"disappearingMode"|undefined} _disappearingMode
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_disappearingMode", {
                get: $util.oneOfGetter($oneOfFields = ["disappearingMode"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _editedMessage.
             * @member {"editedMessage"|undefined} _editedMessage
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_editedMessage", {
                get: $util.oneOfGetter($oneOfFields = ["editedMessage"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _timestampMs.
             * @member {"timestampMs"|undefined} _timestampMs
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_timestampMs", {
                get: $util.oneOfGetter($oneOfFields = ["timestampMs"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _peerDataOperationRequestMessage.
             * @member {"peerDataOperationRequestMessage"|undefined} _peerDataOperationRequestMessage
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_peerDataOperationRequestMessage", {
                get: $util.oneOfGetter($oneOfFields = ["peerDataOperationRequestMessage"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _peerDataOperationRequestResponseMessage.
             * @member {"peerDataOperationRequestResponseMessage"|undefined} _peerDataOperationRequestResponseMessage
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_peerDataOperationRequestResponseMessage", {
                get: $util.oneOfGetter($oneOfFields = ["peerDataOperationRequestResponseMessage"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _botFeedbackMessage.
             * @member {"botFeedbackMessage"|undefined} _botFeedbackMessage
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_botFeedbackMessage", {
                get: $util.oneOfGetter($oneOfFields = ["botFeedbackMessage"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _invokerJid.
             * @member {"invokerJid"|undefined} _invokerJid
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_invokerJid", {
                get: $util.oneOfGetter($oneOfFields = ["invokerJid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _requestWelcomeMessageMetadata.
             * @member {"requestWelcomeMessageMetadata"|undefined} _requestWelcomeMessageMetadata
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_requestWelcomeMessageMetadata", {
                get: $util.oneOfGetter($oneOfFields = ["requestWelcomeMessageMetadata"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _mediaNotifyMessage.
             * @member {"mediaNotifyMessage"|undefined} _mediaNotifyMessage
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_mediaNotifyMessage", {
                get: $util.oneOfGetter($oneOfFields = ["mediaNotifyMessage"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _cloudApiThreadControlNotification.
             * @member {"cloudApiThreadControlNotification"|undefined} _cloudApiThreadControlNotification
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_cloudApiThreadControlNotification", {
                get: $util.oneOfGetter($oneOfFields = ["cloudApiThreadControlNotification"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _lidMigrationMappingSyncMessage.
             * @member {"lidMigrationMappingSyncMessage"|undefined} _lidMigrationMappingSyncMessage
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_lidMigrationMappingSyncMessage", {
                get: $util.oneOfGetter($oneOfFields = ["lidMigrationMappingSyncMessage"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _limitSharing.
             * @member {"limitSharing"|undefined} _limitSharing
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_limitSharing", {
                get: $util.oneOfGetter($oneOfFields = ["limitSharing"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _aiPsiMetadata.
             * @member {"aiPsiMetadata"|undefined} _aiPsiMetadata
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_aiPsiMetadata", {
                get: $util.oneOfGetter($oneOfFields = ["aiPsiMetadata"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _aiQueryFanout.
             * @member {"aiQueryFanout"|undefined} _aiQueryFanout
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_aiQueryFanout", {
                get: $util.oneOfGetter($oneOfFields = ["aiQueryFanout"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ProtocolMessage _memberLabel.
             * @member {"memberLabel"|undefined} _memberLabel
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             */
            Object.defineProperty(ProtocolMessage.prototype, "_memberLabel", {
                get: $util.oneOfGetter($oneOfFields = ["memberLabel"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new ProtocolMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.ProtocolMessage
             * @static
             * @param {E2E.Message.IProtocolMessage=} [properties] Properties to set
             * @returns {E2E.Message.ProtocolMessage} ProtocolMessage instance
             */
            ProtocolMessage.create = function create(properties) {
                return new ProtocolMessage(properties);
            };

            /**
             * Encodes the specified ProtocolMessage message. Does not implicitly {@link E2E.Message.ProtocolMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.ProtocolMessage
             * @static
             * @param {E2E.Message.IProtocolMessage} message ProtocolMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProtocolMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.key != null && Object.hasOwnProperty.call(message, "key"))
                    $root.Protocol.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type);
                if (message.ephemeralExpiration != null && Object.hasOwnProperty.call(message, "ephemeralExpiration"))
                    writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.ephemeralExpiration);
                if (message.ephemeralSettingTimestamp != null && Object.hasOwnProperty.call(message, "ephemeralSettingTimestamp"))
                    writer.uint32(/* id 5, wireType 0 =*/40).int64(message.ephemeralSettingTimestamp);
                if (message.historySyncNotification != null && Object.hasOwnProperty.call(message, "historySyncNotification"))
                    $root.E2E.Message.HistorySyncNotification.encode(message.historySyncNotification, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                if (message.appStateSyncKeyShare != null && Object.hasOwnProperty.call(message, "appStateSyncKeyShare"))
                    $root.E2E.Message.AppStateSyncKeyShare.encode(message.appStateSyncKeyShare, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                if (message.appStateSyncKeyRequest != null && Object.hasOwnProperty.call(message, "appStateSyncKeyRequest"))
                    $root.E2E.Message.AppStateSyncKeyRequest.encode(message.appStateSyncKeyRequest, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                if (message.initialSecurityNotificationSettingSync != null && Object.hasOwnProperty.call(message, "initialSecurityNotificationSettingSync"))
                    $root.E2E.Message.InitialSecurityNotificationSettingSync.encode(message.initialSecurityNotificationSettingSync, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                if (message.appStateFatalExceptionNotification != null && Object.hasOwnProperty.call(message, "appStateFatalExceptionNotification"))
                    $root.E2E.Message.AppStateFatalExceptionNotification.encode(message.appStateFatalExceptionNotification, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
                if (message.disappearingMode != null && Object.hasOwnProperty.call(message, "disappearingMode"))
                    $root.E2E.DisappearingMode.encode(message.disappearingMode, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
                if (message.editedMessage != null && Object.hasOwnProperty.call(message, "editedMessage"))
                    $root.E2E.Message.encode(message.editedMessage, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
                if (message.timestampMs != null && Object.hasOwnProperty.call(message, "timestampMs"))
                    writer.uint32(/* id 15, wireType 0 =*/120).int64(message.timestampMs);
                if (message.peerDataOperationRequestMessage != null && Object.hasOwnProperty.call(message, "peerDataOperationRequestMessage"))
                    $root.E2E.Message.PeerDataOperationRequestMessage.encode(message.peerDataOperationRequestMessage, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
                if (message.peerDataOperationRequestResponseMessage != null && Object.hasOwnProperty.call(message, "peerDataOperationRequestResponseMessage"))
                    $root.E2E.Message.PeerDataOperationRequestResponseMessage.encode(message.peerDataOperationRequestResponseMessage, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
                if (message.botFeedbackMessage != null && Object.hasOwnProperty.call(message, "botFeedbackMessage"))
                    $root.AICommon.BotFeedbackMessage.encode(message.botFeedbackMessage, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
                if (message.invokerJid != null && Object.hasOwnProperty.call(message, "invokerJid"))
                    writer.uint32(/* id 19, wireType 2 =*/154).string(message.invokerJid);
                if (message.requestWelcomeMessageMetadata != null && Object.hasOwnProperty.call(message, "requestWelcomeMessageMetadata"))
                    $root.E2E.Message.RequestWelcomeMessageMetadata.encode(message.requestWelcomeMessageMetadata, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim();
                if (message.mediaNotifyMessage != null && Object.hasOwnProperty.call(message, "mediaNotifyMessage"))
                    $root.E2E.MediaNotifyMessage.encode(message.mediaNotifyMessage, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim();
                if (message.cloudApiThreadControlNotification != null && Object.hasOwnProperty.call(message, "cloudApiThreadControlNotification"))
                    $root.E2E.Message.CloudAPIThreadControlNotification.encode(message.cloudApiThreadControlNotification, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim();
                if (message.lidMigrationMappingSyncMessage != null && Object.hasOwnProperty.call(message, "lidMigrationMappingSyncMessage"))
                    $root.E2E.LIDMigrationMappingSyncMessage.encode(message.lidMigrationMappingSyncMessage, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
                if (message.limitSharing != null && Object.hasOwnProperty.call(message, "limitSharing"))
                    $root.Protocol.LimitSharing.encode(message.limitSharing, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim();
                if (message.aiPsiMetadata != null && Object.hasOwnProperty.call(message, "aiPsiMetadata"))
                    writer.uint32(/* id 25, wireType 2 =*/202).bytes(message.aiPsiMetadata);
                if (message.aiQueryFanout != null && Object.hasOwnProperty.call(message, "aiQueryFanout"))
                    $root.E2E.AIQueryFanout.encode(message.aiQueryFanout, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim();
                if (message.memberLabel != null && Object.hasOwnProperty.call(message, "memberLabel"))
                    $root.E2E.MemberLabel.encode(message.memberLabel, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified ProtocolMessage message, length delimited. Does not implicitly {@link E2E.Message.ProtocolMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.ProtocolMessage
             * @static
             * @param {E2E.Message.IProtocolMessage} message ProtocolMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProtocolMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ProtocolMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.ProtocolMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.ProtocolMessage} ProtocolMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProtocolMessage.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.E2E.Message.ProtocolMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.key = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.type = reader.int32();
                            break;
                        }
                    case 4: {
                            message.ephemeralExpiration = reader.uint32();
                            break;
                        }
                    case 5: {
                            message.ephemeralSettingTimestamp = reader.int64();
                            break;
                        }
                    case 6: {
                            message.historySyncNotification = $root.E2E.Message.HistorySyncNotification.decode(reader, reader.uint32());
                            break;
                        }
                    case 7: {
                            message.appStateSyncKeyShare = $root.E2E.Message.AppStateSyncKeyShare.decode(reader, reader.uint32());
                            break;
                        }
                    case 8: {
                            message.appStateSyncKeyRequest = $root.E2E.Message.AppStateSyncKeyRequest.decode(reader, reader.uint32());
                            break;
                        }
                    case 9: {
                            message.initialSecurityNotificationSettingSync = $root.E2E.Message.InitialSecurityNotificationSettingSync.decode(reader, reader.uint32());
                            break;
                        }
                    case 10: {
                            message.appStateFatalExceptionNotification = $root.E2E.Message.AppStateFatalExceptionNotification.decode(reader, reader.uint32());
                            break;
                        }
                    case 11: {
                            message.disappearingMode = $root.E2E.DisappearingMode.decode(reader, reader.uint32());
                            break;
                        }
                    case 14: {
                            message.editedMessage = $root.E2E.Message.decode(reader, reader.uint32());
                            break;
                        }
                    case 15: {
                            message.timestampMs = reader.int64();
                            break;
                        }
                    case 16: {
                            message.peerDataOperationRequestMessage = $root.E2E.Message.PeerDataOperationRequestMessage.decode(reader, reader.uint32());
                            break;
                        }
                    case 17: {
                            message.peerDataOperationRequestResponseMessage = $root.E2E.Message.PeerDataOperationRequestResponseMessage.decode(reader, reader.uint32());
                            break;
                        }
                    case 18: {
                            message.botFeedbackMessage = $root.AICommon.BotFeedbackMessage.decode(reader, reader.uint32());
                            break;
                        }
                    case 19: {
                            message.invokerJid = reader.string();
                            break;
                        }
                    case 20: {
                            message.requestWelcomeMessageMetadata = $root.E2E.Message.RequestWelcomeMessageMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    case 21: {
                            message.mediaNotifyMessage = $root.E2E.MediaNotifyMessage.decode(reader, reader.uint32());
                            break;
                        }
                    case 22: {
                            message.cloudApiThreadControlNotification = $root.E2E.Message.CloudAPIThreadControlNotification.decode(reader, reader.uint32());
                            break;
                        }
                    case 23: {
                            message.lidMigrationMappingSyncMessage = $root.E2E.LIDMigrationMappingSyncMessage.decode(reader, reader.uint32());
                            break;
                        }
                    case 24: {
                            message.limitSharing = $root.Protocol.LimitSharing.decode(reader, reader.uint32());
                            break;
                        }
                    case 25: {
                            message.aiPsiMetadata = reader.bytes();
                            break;
                        }
                    case 26: {
                            message.aiQueryFanout = $root.E2E.AIQueryFanout.decode(reader, reader.uint32());
                            break;
                        }
                    case 27: {
                            message.memberLabel = $root.E2E.MemberLabel.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a ProtocolMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.ProtocolMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.ProtocolMessage} ProtocolMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProtocolMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ProtocolMessage message.
             * @function verify
             * @memberof E2E.Message.ProtocolMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ProtocolMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    properties._key = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.key);
                        if (error)
                            return "key." + error;
                    }
                }
                if (message.type != null && message.hasOwnProperty("type")) {
                    properties._type = 1;
                    switch (message.type) {
                    default:
                        return "type: enum value expected";
                    case 0:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                    case 9:
                    case 10:
                    case 11:
                    case 14:
                    case 16:
                    case 17:
                    case 18:
                    case 19:
                    case 20:
                    case 21:
                    case 22:
                    case 23:
                    case 24:
                    case 25:
                    case 26:
                    case 27:
                    case 28:
                    case 29:
                    case 30:
                        break;
                    }
                }
                if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration")) {
                    properties._ephemeralExpiration = 1;
                    if (!$util.isInteger(message.ephemeralExpiration))
                        return "ephemeralExpiration: integer expected";
                }
                if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) {
                    properties._ephemeralSettingTimestamp = 1;
                    if (!$util.isInteger(message.ephemeralSettingTimestamp) && !(message.ephemeralSettingTimestamp && $util.isInteger(message.ephemeralSettingTimestamp.low) && $util.isInteger(message.ephemeralSettingTimestamp.high)))
                        return "ephemeralSettingTimestamp: integer|Long expected";
                }
                if (message.historySyncNotification != null && message.hasOwnProperty("historySyncNotification")) {
                    properties._historySyncNotification = 1;
                    {
                        var error = $root.E2E.Message.HistorySyncNotification.verify(message.historySyncNotification);
                        if (error)
                            return "historySyncNotification." + error;
                    }
                }
                if (message.appStateSyncKeyShare != null && message.hasOwnProperty("appStateSyncKeyShare")) {
                    properties._appStateSyncKeyShare = 1;
                    {
                        var error = $root.E2E.Message.AppStateSyncKeyShare.verify(message.appStateSyncKeyShare);
                        if (error)
                            return "appStateSyncKeyShare." + error;
                    }
                }
                if (message.appStateSyncKeyRequest != null && message.hasOwnProperty("appStateSyncKeyRequest")) {
                    properties._appStateSyncKeyRequest = 1;
                    {
                        var error = $root.E2E.Message.AppStateSyncKeyRequest.verify(message.appStateSyncKeyRequest);
                        if (error)
                            return "appStateSyncKeyRequest." + error;
                    }
                }
                if (message.initialSecurityNotificationSettingSync != null && message.hasOwnProperty("initialSecurityNotificationSettingSync")) {
                    properties._initialSecurityNotificationSettingSync = 1;
                    {
                        var error = $root.E2E.Message.InitialSecurityNotificationSettingSync.verify(message.initialSecurityNotificationSettingSync);
                        if (error)
                            return "initialSecurityNotificationSettingSync." + error;
                    }
                }
                if (message.appStateFatalExceptionNotification != null && message.hasOwnProperty("appStateFatalExceptionNotification")) {
                    properties._appStateFatalExceptionNotification = 1;
                    {
                        var error = $root.E2E.Message.AppStateFatalExceptionNotification.verify(message.appStateFatalExceptionNotification);
                        if (error)
                            return "appStateFatalExceptionNotification." + error;
                    }
                }
                if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) {
                    properties._disappearingMode = 1;
                    {
                        var error = $root.E2E.DisappearingMode.verify(message.disappearingMode);
                        if (error)
                            return "disappearingMode." + error;
                    }
                }
                if (message.editedMessage != null && message.hasOwnProperty("editedMessage")) {
                    properties._editedMessage = 1;
                    {
                        var error = $root.E2E.Message.verify(message.editedMessage);
                        if (error)
                            return "editedMessage." + error;
                    }
                }
                if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) {
                    properties._timestampMs = 1;
                    if (!$util.isInteger(message.timestampMs) && !(message.timestampMs && $util.isInteger(message.timestampMs.low) && $util.isInteger(message.timestampMs.high)))
                        return "timestampMs: integer|Long expected";
                }
                if (message.peerDataOperationRequestMessage != null && message.hasOwnProperty("peerDataOperationRequestMessage")) {
                    properties._peerDataOperationRequestMessage = 1;
                    {
                        var error = $root.E2E.Message.PeerDataOperationRequestMessage.verify(message.peerDataOperationRequestMessage);
                        if (error)
                            return "peerDataOperationRequestMessage." + error;
                    }
                }
                if (message.peerDataOperationRequestResponseMessage != null && message.hasOwnProperty("peerDataOperationRequestResponseMessage")) {
                    properties._peerDataOperationRequestResponseMessage = 1;
                    {
                        var error = $root.E2E.Message.PeerDataOperationRequestResponseMessage.verify(message.peerDataOperationRequestResponseMessage);
                        if (error)
                            return "peerDataOperationRequestResponseMessage." + error;
                    }
                }
                if (message.botFeedbackMessage != null && message.hasOwnProperty("botFeedbackMessage")) {
                    properties._botFeedbackMessage = 1;
                    {
                        var error = $root.AICommon.BotFeedbackMessage.verify(message.botFeedbackMessage);
                        if (error)
                            return "botFeedbackMessage." + error;
                    }
                }
                if (message.invokerJid != null && message.hasOwnProperty("invokerJid")) {
                    properties._invokerJid = 1;
                    if (!$util.isString(message.invokerJid))
                        return "invokerJid: string expected";
                }
                if (message.requestWelcomeMessageMetadata != null && message.hasOwnProperty("requestWelcomeMessageMetadata")) {
                    properties._requestWelcomeMessageMetadata = 1;
                    {
                        var error = $root.E2E.Message.RequestWelcomeMessageMetadata.verify(message.requestWelcomeMessageMetadata);
                        if (error)
                            return "requestWelcomeMessageMetadata." + error;
                    }
                }
                if (message.mediaNotifyMessage != null && message.hasOwnProperty("mediaNotifyMessage")) {
                    properties._mediaNotifyMessage = 1;
                    {
                        var error = $root.E2E.MediaNotifyMessage.verify(message.mediaNotifyMessage);
                        if (error)
                            return "mediaNotifyMessage." + error;
                    }
                }
                if (message.cloudApiThreadControlNotification != null && message.hasOwnProperty("cloudApiThreadControlNotification")) {
                    properties._cloudApiThreadControlNotification = 1;
                    {
                        var error = $root.E2E.Message.CloudAPIThreadControlNotification.verify(message.cloudApiThreadControlNotification);
                        if (error)
                            return "cloudApiThreadControlNotification." + error;
                    }
                }
                if (message.lidMigrationMappingSyncMessage != null && message.hasOwnProperty("lidMigrationMappingSyncMessage")) {
                    properties._lidMigrationMappingSyncMessage = 1;
                    {
                        var error = $root.E2E.LIDMigrationMappingSyncMessage.verify(message.lidMigrationMappingSyncMessage);
                        if (error)
                            return "lidMigrationMappingSyncMessage." + error;
                    }
                }
                if (message.limitSharing != null && message.hasOwnProperty("limitSharing")) {
                    properties._limitSharing = 1;
                    {
                        var error = $root.Protocol.LimitSharing.verify(message.limitSharing);
                        if (error)
                            return "limitSharing." + error;
                    }
                }
                if (message.aiPsiMetadata != null && message.hasOwnProperty("aiPsiMetadata")) {
                    properties._aiPsiMetadata = 1;
                    if (!(message.aiPsiMetadata && typeof message.aiPsiMetadata.length === "number" || $util.isString(message.aiPsiMetadata)))
                        return "aiPsiMetadata: buffer expected";
                }
                if (message.aiQueryFanout != null && message.hasOwnProperty("aiQueryFanout")) {
                    properties._aiQueryFanout = 1;
                    {
                        var error = $root.E2E.AIQueryFanout.verify(message.aiQueryFanout);
                        if (error)
                            return "aiQueryFanout." + error;
                    }
                }
                if (message.memberLabel != null && message.hasOwnProperty("memberLabel")) {
                    properties._memberLabel = 1;
                    {
                        var error = $root.E2E.MemberLabel.verify(message.memberLabel);
                        if (error)
                            return "memberLabel." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a ProtocolMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.ProtocolMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.ProtocolMessage} ProtocolMessage
             */
            ProtocolMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.ProtocolMessage)
                    return object;
                var message = new $root.E2E.Message.ProtocolMessage();
                if (object.key != null) {
                    if (typeof object.key !== "object")
                        throw TypeError(".E2E.Message.ProtocolMessage.key: object expected");
                    message.key = $root.Protocol.MessageKey.fromObject(object.key);
                }
                switch (object.type) {
                default:
                    if (typeof object.type === "number") {
                        message.type = object.type;
                        break;
                    }
                    break;
                case "REVOKE":
                case 0:
                    message.type = 0;
                    break;
                case "EPHEMERAL_SETTING":
                case 3:
                    message.type = 3;
                    break;
                case "EPHEMERAL_SYNC_RESPONSE":
                case 4:
                    message.type = 4;
                    break;
                case "HISTORY_SYNC_NOTIFICATION":
                case 5:
                    message.type = 5;
                    break;
                case "APP_STATE_SYNC_KEY_SHARE":
                case 6:
                    message.type = 6;
                    break;
                case "APP_STATE_SYNC_KEY_REQUEST":
                case 7:
                    message.type = 7;
                    break;
                case "MSG_FANOUT_BACKFILL_REQUEST":
                case 8:
                    message.type = 8;
                    break;
                case "INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC":
                case 9:
                    message.type = 9;
                    break;
                case "APP_STATE_FATAL_EXCEPTION_NOTIFICATION":
                case 10:
                    message.type = 10;
                    break;
                case "SHARE_PHONE_NUMBER":
                case 11:
                    message.type = 11;
                    break;
                case "MESSAGE_EDIT":
                case 14:
                    message.type = 14;
                    break;
                case "PEER_DATA_OPERATION_REQUEST_MESSAGE":
                case 16:
                    message.type = 16;
                    break;
                case "PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE":
                case 17:
                    message.type = 17;
                    break;
                case "REQUEST_WELCOME_MESSAGE":
                case 18:
                    message.type = 18;
                    break;
                case "BOT_FEEDBACK_MESSAGE":
                case 19:
                    message.type = 19;
                    break;
                case "MEDIA_NOTIFY_MESSAGE":
                case 20:
                    message.type = 20;
                    break;
                case "CLOUD_API_THREAD_CONTROL_NOTIFICATION":
                case 21:
                    message.type = 21;
                    break;
                case "LID_MIGRATION_MAPPING_SYNC":
                case 22:
                    message.type = 22;
                    break;
                case "REMINDER_MESSAGE":
                case 23:
                    message.type = 23;
                    break;
                case "BOT_MEMU_ONBOARDING_MESSAGE":
                case 24:
                    message.type = 24;
                    break;
                case "STATUS_MENTION_MESSAGE":
                case 25:
                    message.type = 25;
                    break;
                case "STOP_GENERATION_MESSAGE":
                case 26:
                    message.type = 26;
                    break;
                case "LIMIT_SHARING":
                case 27:
                    message.type = 27;
                    break;
                case "AI_PSI_METADATA":
                case 28:
                    message.type = 28;
                    break;
                case "AI_QUERY_FANOUT":
                case 29:
                    message.type = 29;
                    break;
                case "GROUP_MEMBER_LABEL_CHANGE":
                case 30:
                    message.type = 30;
                    break;
                }
                if (object.ephemeralExpiration != null)
                    message.ephemeralExpiration = object.ephemeralExpiration >>> 0;
                if (object.ephemeralSettingTimestamp != null)
                    if ($util.Long)
                        (message.ephemeralSettingTimestamp = $util.Long.fromValue(object.ephemeralSettingTimestamp)).unsigned = false;
                    else if (typeof object.ephemeralSettingTimestamp === "string")
                        message.ephemeralSettingTimestamp = parseInt(object.ephemeralSettingTimestamp, 10);
                    else if (typeof object.ephemeralSettingTimestamp === "number")
                        message.ephemeralSettingTimestamp = object.ephemeralSettingTimestamp;
                    else if (typeof object.ephemeralSettingTimestamp === "object")
                        message.ephemeralSettingTimestamp = new $util.LongBits(object.ephemeralSettingTimestamp.low >>> 0, object.ephemeralSettingTimestamp.high >>> 0).toNumber();
                if (object.historySyncNotification != null) {
                    if (typeof object.historySyncNotification !== "object")
                        throw TypeError(".E2E.Message.ProtocolMessage.historySyncNotification: object expected");
                    message.historySyncNotification = $root.E2E.Message.HistorySyncNotification.fromObject(object.historySyncNotification);
                }
                if (object.appStateSyncKeyShare != null) {
                    if (typeof object.appStateSyncKeyShare !== "object")
                        throw TypeError(".E2E.Message.ProtocolMessage.appStateSyncKeyShare: object expected");
                    message.appStateSyncKeyShare = $root.E2E.Message.AppStateSyncKeyShare.fromObject(object.appStateSyncKeyShare);
                }
                if (object.appStateSyncKeyRequest != null) {
                    if (typeof object.appStateSyncKeyRequest !== "object")
                        throw TypeError(".E2E.Message.ProtocolMessage.appStateSyncKeyRequest: object expected");
                    message.appStateSyncKeyRequest = $root.E2E.Message.AppStateSyncKeyRequest.fromObject(object.appStateSyncKeyRequest);
                }
                if (object.initialSecurityNotificationSettingSync != null) {
                    if (typeof object.initialSecurityNotificationSettingSync !== "object")
                        throw TypeError(".E2E.Message.ProtocolMessage.initialSecurityNotificationSettingSync: object expected");
                    message.initialSecurityNotificationSettingSync = $root.E2E.Message.InitialSecurityNotificationSettingSync.fromObject(object.initialSecurityNotificationSettingSync);
                }
                if (object.appStateFatalExceptionNotification != null) {
                    if (typeof object.appStateFatalExceptionNotification !== "object")
                        throw TypeError(".E2E.Message.ProtocolMessage.appStateFatalExceptionNotification: object expected");
                    message.appStateFatalExceptionNotification = $root.E2E.Message.AppStateFatalExceptionNotification.fromObject(object.appStateFatalExceptionNotification);
                }
                if (object.disappearingMode != null) {
                    if (typeof object.disappearingMode !== "object")
                        throw TypeError(".E2E.Message.ProtocolMessage.disappearingMode: object expected");
                    message.disappearingMode = $root.E2E.DisappearingMode.fromObject(object.disappearingMode);
                }
                if (object.editedMessage != null) {
                    if (typeof object.editedMessage !== "object")
                        throw TypeError(".E2E.Message.ProtocolMessage.editedMessage: object expected");
                    message.editedMessage = $root.E2E.Message.fromObject(object.editedMessage);
                }
                if (object.timestampMs != null)
                    if ($util.Long)
                        (message.timestampMs = $util.Long.fromValue(object.timestampMs)).unsigned = false;
                    else if (typeof object.timestampMs === "string")
                        message.timestampMs = parseInt(object.timestampMs, 10);
                    else if (typeof object.timestampMs === "number")
                        message.timestampMs = object.timestampMs;
                    else if (typeof object.timestampMs === "object")
                        message.timestampMs = new $util.LongBits(object.timestampMs.low >>> 0, object.timestampMs.high >>> 0).toNumber();
                if (object.peerDataOperationRequestMessage != null) {
                    if (typeof object.peerDataOperationRequestMessage !== "object")
                        throw TypeError(".E2E.Message.ProtocolMessage.peerDataOperationRequestMessage: object expected");
                    message.peerDataOperationRequestMessage = $root.E2E.Message.PeerDataOperationRequestMessage.fromObject(object.peerDataOperationRequestMessage);
                }
                if (object.peerDataOperationRequestResponseMessage != null) {
                    if (typeof object.peerDataOperationRequestResponseMessage !== "object")
                        throw TypeError(".E2E.Message.ProtocolMessage.peerDataOperationRequestResponseMessage: object expected");
                    message.peerDataOperationRequestResponseMessage = $root.E2E.Message.PeerDataOperationRequestResponseMessage.fromObject(object.peerDataOperationRequestResponseMessage);
                }
                if (object.botFeedbackMessage != null) {
                    if (typeof object.botFeedbackMessage !== "object")
                        throw TypeError(".E2E.Message.ProtocolMessage.botFeedbackMessage: object expected");
                    message.botFeedbackMessage = $root.AICommon.BotFeedbackMessage.fromObject(object.botFeedbackMessage);
                }
                if (object.invokerJid != null)
                    message.invokerJid = String(object.invokerJid);
                if (object.requestWelcomeMessageMetadata != null) {
                    if (typeof object.requestWelcomeMessageMetadata !== "object")
                        throw TypeError(".E2E.Message.ProtocolMessage.requestWelcomeMessageMetadata: object expected");
                    message.requestWelcomeMessageMetadata = $root.E2E.Message.RequestWelcomeMessageMetadata.fromObject(object.requestWelcomeMessageMetadata);
                }
                if (object.mediaNotifyMessage != null) {
                    if (typeof object.mediaNotifyMessage !== "object")
                        throw TypeError(".E2E.Message.ProtocolMessage.mediaNotifyMessage: object expected");
                    message.mediaNotifyMessage = $root.E2E.MediaNotifyMessage.fromObject(object.mediaNotifyMessage);
                }
                if (object.cloudApiThreadControlNotification != null) {
                    if (typeof object.cloudApiThreadControlNotification !== "object")
                        throw TypeError(".E2E.Message.ProtocolMessage.cloudApiThreadControlNotification: object expected");
                    message.cloudApiThreadControlNotification = $root.E2E.Message.CloudAPIThreadControlNotification.fromObject(object.cloudApiThreadControlNotification);
                }
                if (object.lidMigrationMappingSyncMessage != null) {
                    if (typeof object.lidMigrationMappingSyncMessage !== "object")
                        throw TypeError(".E2E.Message.ProtocolMessage.lidMigrationMappingSyncMessage: object expected");
                    message.lidMigrationMappingSyncMessage = $root.E2E.LIDMigrationMappingSyncMessage.fromObject(object.lidMigrationMappingSyncMessage);
                }
                if (object.limitSharing != null) {
                    if (typeof object.limitSharing !== "object")
                        throw TypeError(".E2E.Message.ProtocolMessage.limitSharing: object expected");
                    message.limitSharing = $root.Protocol.LimitSharing.fromObject(object.limitSharing);
                }
                if (object.aiPsiMetadata != null)
                    if (typeof object.aiPsiMetadata === "string")
                        $util.base64.decode(object.aiPsiMetadata, message.aiPsiMetadata = $util.newBuffer($util.base64.length(object.aiPsiMetadata)), 0);
                    else if (object.aiPsiMetadata.length >= 0)
                        message.aiPsiMetadata = object.aiPsiMetadata;
                if (object.aiQueryFanout != null) {
                    if (typeof object.aiQueryFanout !== "object")
                        throw TypeError(".E2E.Message.ProtocolMessage.aiQueryFanout: object expected");
                    message.aiQueryFanout = $root.E2E.AIQueryFanout.fromObject(object.aiQueryFanout);
                }
                if (object.memberLabel != null) {
                    if (typeof object.memberLabel !== "object")
                        throw TypeError(".E2E.Message.ProtocolMessage.memberLabel: object expected");
                    message.memberLabel = $root.E2E.MemberLabel.fromObject(object.memberLabel);
                }
                return message;
            };

            /**
             * Creates a plain object from a ProtocolMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.ProtocolMessage
             * @static
             * @param {E2E.Message.ProtocolMessage} message ProtocolMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ProtocolMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                    if (options.oneofs)
                        object._key = "key";
                }
                if (message.type != null && message.hasOwnProperty("type")) {
                    object.type = options.enums === String ? $root.E2E.Message.ProtocolMessage.Type[message.type] === undefined ? message.type : $root.E2E.Message.ProtocolMessage.Type[message.type] : message.type;
                    if (options.oneofs)
                        object._type = "type";
                }
                if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration")) {
                    object.ephemeralExpiration = message.ephemeralExpiration;
                    if (options.oneofs)
                        object._ephemeralExpiration = "ephemeralExpiration";
                }
                if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) {
                    if (typeof message.ephemeralSettingTimestamp === "number")
                        object.ephemeralSettingTimestamp = options.longs === String ? String(message.ephemeralSettingTimestamp) : message.ephemeralSettingTimestamp;
                    else
                        object.ephemeralSettingTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.ephemeralSettingTimestamp) : options.longs === Number ? new $util.LongBits(message.ephemeralSettingTimestamp.low >>> 0, message.ephemeralSettingTimestamp.high >>> 0).toNumber() : message.ephemeralSettingTimestamp;
                    if (options.oneofs)
                        object._ephemeralSettingTimestamp = "ephemeralSettingTimestamp";
                }
                if (message.historySyncNotification != null && message.hasOwnProperty("historySyncNotification")) {
                    object.historySyncNotification = $root.E2E.Message.HistorySyncNotification.toObject(message.historySyncNotification, options);
                    if (options.oneofs)
                        object._historySyncNotification = "historySyncNotification";
                }
                if (message.appStateSyncKeyShare != null && message.hasOwnProperty("appStateSyncKeyShare")) {
                    object.appStateSyncKeyShare = $root.E2E.Message.AppStateSyncKeyShare.toObject(message.appStateSyncKeyShare, options);
                    if (options.oneofs)
                        object._appStateSyncKeyShare = "appStateSyncKeyShare";
                }
                if (message.appStateSyncKeyRequest != null && message.hasOwnProperty("appStateSyncKeyRequest")) {
                    object.appStateSyncKeyRequest = $root.E2E.Message.AppStateSyncKeyRequest.toObject(message.appStateSyncKeyRequest, options);
                    if (options.oneofs)
                        object._appStateSyncKeyRequest = "appStateSyncKeyRequest";
                }
                if (message.initialSecurityNotificationSettingSync != null && message.hasOwnProperty("initialSecurityNotificationSettingSync")) {
                    object.initialSecurityNotificationSettingSync = $root.E2E.Message.InitialSecurityNotificationSettingSync.toObject(message.initialSecurityNotificationSettingSync, options);
                    if (options.oneofs)
                        object._initialSecurityNotificationSettingSync = "initialSecurityNotificationSettingSync";
                }
                if (message.appStateFatalExceptionNotification != null && message.hasOwnProperty("appStateFatalExceptionNotification")) {
                    object.appStateFatalExceptionNotification = $root.E2E.Message.AppStateFatalExceptionNotification.toObject(message.appStateFatalExceptionNotification, options);
                    if (options.oneofs)
                        object._appStateFatalExceptionNotification = "appStateFatalExceptionNotification";
                }
                if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) {
                    object.disappearingMode = $root.E2E.DisappearingMode.toObject(message.disappearingMode, options);
                    if (options.oneofs)
                        object._disappearingMode = "disappearingMode";
                }
                if (message.editedMessage != null && message.hasOwnProperty("editedMessage")) {
                    object.editedMessage = $root.E2E.Message.toObject(message.editedMessage, options);
                    if (options.oneofs)
                        object._editedMessage = "editedMessage";
                }
                if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) {
                    if (typeof message.timestampMs === "number")
                        object.timestampMs = options.longs === String ? String(message.timestampMs) : message.timestampMs;
                    else
                        object.timestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.timestampMs) : options.longs === Number ? new $util.LongBits(message.timestampMs.low >>> 0, message.timestampMs.high >>> 0).toNumber() : message.timestampMs;
                    if (options.oneofs)
                        object._timestampMs = "timestampMs";
                }
                if (message.peerDataOperationRequestMessage != null && message.hasOwnProperty("peerDataOperationRequestMessage")) {
                    object.peerDataOperationRequestMessage = $root.E2E.Message.PeerDataOperationRequestMessage.toObject(message.peerDataOperationRequestMessage, options);
                    if (options.oneofs)
                        object._peerDataOperationRequestMessage = "peerDataOperationRequestMessage";
                }
                if (message.peerDataOperationRequestResponseMessage != null && message.hasOwnProperty("peerDataOperationRequestResponseMessage")) {
                    object.peerDataOperationRequestResponseMessage = $root.E2E.Message.PeerDataOperationRequestResponseMessage.toObject(message.peerDataOperationRequestResponseMessage, options);
                    if (options.oneofs)
                        object._peerDataOperationRequestResponseMessage = "peerDataOperationRequestResponseMessage";
                }
                if (message.botFeedbackMessage != null && message.hasOwnProperty("botFeedbackMessage")) {
                    object.botFeedbackMessage = $root.AICommon.BotFeedbackMessage.toObject(message.botFeedbackMessage, options);
                    if (options.oneofs)
                        object._botFeedbackMessage = "botFeedbackMessage";
                }
                if (message.invokerJid != null && message.hasOwnProperty("invokerJid")) {
                    object.invokerJid = message.invokerJid;
                    if (options.oneofs)
                        object._invokerJid = "invokerJid";
                }
                if (message.requestWelcomeMessageMetadata != null && message.hasOwnProperty("requestWelcomeMessageMetadata")) {
                    object.requestWelcomeMessageMetadata = $root.E2E.Message.RequestWelcomeMessageMetadata.toObject(message.requestWelcomeMessageMetadata, options);
                    if (options.oneofs)
                        object._requestWelcomeMessageMetadata = "requestWelcomeMessageMetadata";
                }
                if (message.mediaNotifyMessage != null && message.hasOwnProperty("mediaNotifyMessage")) {
                    object.mediaNotifyMessage = $root.E2E.MediaNotifyMessage.toObject(message.mediaNotifyMessage, options);
                    if (options.oneofs)
                        object._mediaNotifyMessage = "mediaNotifyMessage";
                }
                if (message.cloudApiThreadControlNotification != null && message.hasOwnProperty("cloudApiThreadControlNotification")) {
                    object.cloudApiThreadControlNotification = $root.E2E.Message.CloudAPIThreadControlNotification.toObject(message.cloudApiThreadControlNotification, options);
                    if (options.oneofs)
                        object._cloudApiThreadControlNotification = "cloudApiThreadControlNotification";
                }
                if (message.lidMigrationMappingSyncMessage != null && message.hasOwnProperty("lidMigrationMappingSyncMessage")) {
                    object.lidMigrationMappingSyncMessage = $root.E2E.LIDMigrationMappingSyncMessage.toObject(message.lidMigrationMappingSyncMessage, options);
                    if (options.oneofs)
                        object._lidMigrationMappingSyncMessage = "lidMigrationMappingSyncMessage";
                }
                if (message.limitSharing != null && message.hasOwnProperty("limitSharing")) {
                    object.limitSharing = $root.Protocol.LimitSharing.toObject(message.limitSharing, options);
                    if (options.oneofs)
                        object._limitSharing = "limitSharing";
                }
                if (message.aiPsiMetadata != null && message.hasOwnProperty("aiPsiMetadata")) {
                    object.aiPsiMetadata = options.bytes === String ? $util.base64.encode(message.aiPsiMetadata, 0, message.aiPsiMetadata.length) : options.bytes === Array ? Array.prototype.slice.call(message.aiPsiMetadata) : message.aiPsiMetadata;
                    if (options.oneofs)
                        object._aiPsiMetadata = "aiPsiMetadata";
                }
                if (message.aiQueryFanout != null && message.hasOwnProperty("aiQueryFanout")) {
                    object.aiQueryFanout = $root.E2E.AIQueryFanout.toObject(message.aiQueryFanout, options);
                    if (options.oneofs)
                        object._aiQueryFanout = "aiQueryFanout";
                }
                if (message.memberLabel != null && message.hasOwnProperty("memberLabel")) {
                    object.memberLabel = $root.E2E.MemberLabel.toObject(message.memberLabel, options);
                    if (options.oneofs)
                        object._memberLabel = "memberLabel";
                }
                return object;
            };

            /**
             * Converts this ProtocolMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.ProtocolMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ProtocolMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for ProtocolMessage
             * @function getTypeUrl
             * @memberof E2E.Message.ProtocolMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            ProtocolMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.ProtocolMessage";
            };

            /**
             * Type enum.
             * @name E2E.Message.ProtocolMessage.Type
             * @enum {number}
             * @property {number} REVOKE=0 REVOKE value
             * @property {number} EPHEMERAL_SETTING=3 EPHEMERAL_SETTING value
             * @property {number} EPHEMERAL_SYNC_RESPONSE=4 EPHEMERAL_SYNC_RESPONSE value
             * @property {number} HISTORY_SYNC_NOTIFICATION=5 HISTORY_SYNC_NOTIFICATION value
             * @property {number} APP_STATE_SYNC_KEY_SHARE=6 APP_STATE_SYNC_KEY_SHARE value
             * @property {number} APP_STATE_SYNC_KEY_REQUEST=7 APP_STATE_SYNC_KEY_REQUEST value
             * @property {number} MSG_FANOUT_BACKFILL_REQUEST=8 MSG_FANOUT_BACKFILL_REQUEST value
             * @property {number} INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC=9 INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC value
             * @property {number} APP_STATE_FATAL_EXCEPTION_NOTIFICATION=10 APP_STATE_FATAL_EXCEPTION_NOTIFICATION value
             * @property {number} SHARE_PHONE_NUMBER=11 SHARE_PHONE_NUMBER value
             * @property {number} MESSAGE_EDIT=14 MESSAGE_EDIT value
             * @property {number} PEER_DATA_OPERATION_REQUEST_MESSAGE=16 PEER_DATA_OPERATION_REQUEST_MESSAGE value
             * @property {number} PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE=17 PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE value
             * @property {number} REQUEST_WELCOME_MESSAGE=18 REQUEST_WELCOME_MESSAGE value
             * @property {number} BOT_FEEDBACK_MESSAGE=19 BOT_FEEDBACK_MESSAGE value
             * @property {number} MEDIA_NOTIFY_MESSAGE=20 MEDIA_NOTIFY_MESSAGE value
             * @property {number} CLOUD_API_THREAD_CONTROL_NOTIFICATION=21 CLOUD_API_THREAD_CONTROL_NOTIFICATION value
             * @property {number} LID_MIGRATION_MAPPING_SYNC=22 LID_MIGRATION_MAPPING_SYNC value
             * @property {number} REMINDER_MESSAGE=23 REMINDER_MESSAGE value
             * @property {number} BOT_MEMU_ONBOARDING_MESSAGE=24 BOT_MEMU_ONBOARDING_MESSAGE value
             * @property {number} STATUS_MENTION_MESSAGE=25 STATUS_MENTION_MESSAGE value
             * @property {number} STOP_GENERATION_MESSAGE=26 STOP_GENERATION_MESSAGE value
             * @property {number} LIMIT_SHARING=27 LIMIT_SHARING value
             * @property {number} AI_PSI_METADATA=28 AI_PSI_METADATA value
             * @property {number} AI_QUERY_FANOUT=29 AI_QUERY_FANOUT value
             * @property {number} GROUP_MEMBER_LABEL_CHANGE=30 GROUP_MEMBER_LABEL_CHANGE value
             */
            ProtocolMessage.Type = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "REVOKE"] = 0;
                values[valuesById[3] = "EPHEMERAL_SETTING"] = 3;
                values[valuesById[4] = "EPHEMERAL_SYNC_RESPONSE"] = 4;
                values[valuesById[5] = "HISTORY_SYNC_NOTIFICATION"] = 5;
                values[valuesById[6] = "APP_STATE_SYNC_KEY_SHARE"] = 6;
                values[valuesById[7] = "APP_STATE_SYNC_KEY_REQUEST"] = 7;
                values[valuesById[8] = "MSG_FANOUT_BACKFILL_REQUEST"] = 8;
                values[valuesById[9] = "INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC"] = 9;
                values[valuesById[10] = "APP_STATE_FATAL_EXCEPTION_NOTIFICATION"] = 10;
                values[valuesById[11] = "SHARE_PHONE_NUMBER"] = 11;
                values[valuesById[14] = "MESSAGE_EDIT"] = 14;
                values[valuesById[16] = "PEER_DATA_OPERATION_REQUEST_MESSAGE"] = 16;
                values[valuesById[17] = "PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE"] = 17;
                values[valuesById[18] = "REQUEST_WELCOME_MESSAGE"] = 18;
                values[valuesById[19] = "BOT_FEEDBACK_MESSAGE"] = 19;
                values[valuesById[20] = "MEDIA_NOTIFY_MESSAGE"] = 20;
                values[valuesById[21] = "CLOUD_API_THREAD_CONTROL_NOTIFICATION"] = 21;
                values[valuesById[22] = "LID_MIGRATION_MAPPING_SYNC"] = 22;
                values[valuesById[23] = "REMINDER_MESSAGE"] = 23;
                values[valuesById[24] = "BOT_MEMU_ONBOARDING_MESSAGE"] = 24;
                values[valuesById[25] = "STATUS_MENTION_MESSAGE"] = 25;
                values[valuesById[26] = "STOP_GENERATION_MESSAGE"] = 26;
                values[valuesById[27] = "LIMIT_SHARING"] = 27;
                values[valuesById[28] = "AI_PSI_METADATA"] = 28;
                values[valuesById[29] = "AI_QUERY_FANOUT"] = 29;
                values[valuesById[30] = "GROUP_MEMBER_LABEL_CHANGE"] = 30;
                return values;
            })();

            return ProtocolMessage;
        })();

        Message.QuestionResponseMessage = (function() {

            /**
             * Properties of a QuestionResponseMessage.
             * @memberof E2E.Message
             * @interface IQuestionResponseMessage
             * @property {Protocol.IMessageKey|null} [key] QuestionResponseMessage key
             * @property {string|null} [text] QuestionResponseMessage text
             */

            /**
             * Constructs a new QuestionResponseMessage.
             * @memberof E2E.Message
             * @classdesc Represents a QuestionResponseMessage.
             * @implements IQuestionResponseMessage
             * @constructor
             * @param {E2E.Message.IQuestionResponseMessage=} [properties] Properties to set
             */
            function QuestionResponseMessage(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]];
            }

            /**
             * QuestionResponseMessage key.
             * @member {Protocol.IMessageKey|null|undefined} key
             * @memberof E2E.Message.QuestionResponseMessage
             * @instance
             */
            QuestionResponseMessage.prototype.key = null;

            /**
             * QuestionResponseMessage text.
             * @member {string|null|undefined} text
             * @memberof E2E.Message.QuestionResponseMessage
             * @instance
             */
            QuestionResponseMessage.prototype.text = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * QuestionResponseMessage _key.
             * @member {"key"|undefined} _key
             * @memberof E2E.Message.QuestionResponseMessage
             * @instance
             */
            Object.defineProperty(QuestionResponseMessage.prototype, "_key", {
                get: $util.oneOfGetter($oneOfFields = ["key"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * QuestionResponseMessage _text.
             * @member {"text"|undefined} _text
             * @memberof E2E.Message.QuestionResponseMessage
             * @instance
             */
            Object.defineProperty(QuestionResponseMessage.prototype, "_text", {
                get: $util.oneOfGetter($oneOfFields = ["text"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new QuestionResponseMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.QuestionResponseMessage
             * @static
             * @param {E2E.Message.IQuestionResponseMessage=} [properties] Properties to set
             * @returns {E2E.Message.QuestionResponseMessage} QuestionResponseMessage instance
             */
            QuestionResponseMessage.create = function create(properties) {
                return new QuestionResponseMessage(properties);
            };

            /**
             * Encodes the specified QuestionResponseMessage message. Does not implicitly {@link E2E.Message.QuestionResponseMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.QuestionResponseMessage
             * @static
             * @param {E2E.Message.IQuestionResponseMessage} message QuestionResponseMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            QuestionResponseMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.key != null && Object.hasOwnProperty.call(message, "key"))
                    $root.Protocol.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.text);
                return writer;
            };

            /**
             * Encodes the specified QuestionResponseMessage message, length delimited. Does not implicitly {@link E2E.Message.QuestionResponseMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.QuestionResponseMessage
             * @static
             * @param {E2E.Message.IQuestionResponseMessage} message QuestionResponseMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            QuestionResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a QuestionResponseMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.QuestionResponseMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.QuestionResponseMessage} QuestionResponseMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            QuestionResponseMessage.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.E2E.Message.QuestionResponseMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.key = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.text = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a QuestionResponseMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.QuestionResponseMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.QuestionResponseMessage} QuestionResponseMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            QuestionResponseMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a QuestionResponseMessage message.
             * @function verify
             * @memberof E2E.Message.QuestionResponseMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            QuestionResponseMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    properties._key = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.key);
                        if (error)
                            return "key." + error;
                    }
                }
                if (message.text != null && message.hasOwnProperty("text")) {
                    properties._text = 1;
                    if (!$util.isString(message.text))
                        return "text: string expected";
                }
                return null;
            };

            /**
             * Creates a QuestionResponseMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.QuestionResponseMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.QuestionResponseMessage} QuestionResponseMessage
             */
            QuestionResponseMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.QuestionResponseMessage)
                    return object;
                var message = new $root.E2E.Message.QuestionResponseMessage();
                if (object.key != null) {
                    if (typeof object.key !== "object")
                        throw TypeError(".E2E.Message.QuestionResponseMessage.key: object expected");
                    message.key = $root.Protocol.MessageKey.fromObject(object.key);
                }
                if (object.text != null)
                    message.text = String(object.text);
                return message;
            };

            /**
             * Creates a plain object from a QuestionResponseMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.QuestionResponseMessage
             * @static
             * @param {E2E.Message.QuestionResponseMessage} message QuestionResponseMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            QuestionResponseMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                    if (options.oneofs)
                        object._key = "key";
                }
                if (message.text != null && message.hasOwnProperty("text")) {
                    object.text = message.text;
                    if (options.oneofs)
                        object._text = "text";
                }
                return object;
            };

            /**
             * Converts this QuestionResponseMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.QuestionResponseMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            QuestionResponseMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for QuestionResponseMessage
             * @function getTypeUrl
             * @memberof E2E.Message.QuestionResponseMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            QuestionResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.QuestionResponseMessage";
            };

            return QuestionResponseMessage;
        })();

        Message.ReactionMessage = (function() {

            /**
             * Properties of a ReactionMessage.
             * @memberof E2E.Message
             * @interface IReactionMessage
             * @property {Protocol.IMessageKey|null} [key] ReactionMessage key
             * @property {string|null} [text] ReactionMessage text
             * @property {string|null} [groupingKey] ReactionMessage groupingKey
             * @property {number|Long|null} [senderTimestampMs] ReactionMessage senderTimestampMs
             */

            /**
             * Constructs a new ReactionMessage.
             * @memberof E2E.Message
             * @classdesc Represents a ReactionMessage.
             * @implements IReactionMessage
             * @constructor
             * @param {E2E.Message.IReactionMessage=} [properties] Properties to set
             */
            function ReactionMessage(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]];
            }

            /**
             * ReactionMessage key.
             * @member {Protocol.IMessageKey|null|undefined} key
             * @memberof E2E.Message.ReactionMessage
             * @instance
             */
            ReactionMessage.prototype.key = null;

            /**
             * ReactionMessage text.
             * @member {string|null|undefined} text
             * @memberof E2E.Message.ReactionMessage
             * @instance
             */
            ReactionMessage.prototype.text = null;

            /**
             * ReactionMessage groupingKey.
             * @member {string|null|undefined} groupingKey
             * @memberof E2E.Message.ReactionMessage
             * @instance
             */
            ReactionMessage.prototype.groupingKey = null;

            /**
             * ReactionMessage senderTimestampMs.
             * @member {number|Long|null|undefined} senderTimestampMs
             * @memberof E2E.Message.ReactionMessage
             * @instance
             */
            ReactionMessage.prototype.senderTimestampMs = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * ReactionMessage _key.
             * @member {"key"|undefined} _key
             * @memberof E2E.Message.ReactionMessage
             * @instance
             */
            Object.defineProperty(ReactionMessage.prototype, "_key", {
                get: $util.oneOfGetter($oneOfFields = ["key"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ReactionMessage _text.
             * @member {"text"|undefined} _text
             * @memberof E2E.Message.ReactionMessage
             * @instance
             */
            Object.defineProperty(ReactionMessage.prototype, "_text", {
                get: $util.oneOfGetter($oneOfFields = ["text"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ReactionMessage _groupingKey.
             * @member {"groupingKey"|undefined} _groupingKey
             * @memberof E2E.Message.ReactionMessage
             * @instance
             */
            Object.defineProperty(ReactionMessage.prototype, "_groupingKey", {
                get: $util.oneOfGetter($oneOfFields = ["groupingKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ReactionMessage _senderTimestampMs.
             * @member {"senderTimestampMs"|undefined} _senderTimestampMs
             * @memberof E2E.Message.ReactionMessage
             * @instance
             */
            Object.defineProperty(ReactionMessage.prototype, "_senderTimestampMs", {
                get: $util.oneOfGetter($oneOfFields = ["senderTimestampMs"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new ReactionMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.ReactionMessage
             * @static
             * @param {E2E.Message.IReactionMessage=} [properties] Properties to set
             * @returns {E2E.Message.ReactionMessage} ReactionMessage instance
             */
            ReactionMessage.create = function create(properties) {
                return new ReactionMessage(properties);
            };

            /**
             * Encodes the specified ReactionMessage message. Does not implicitly {@link E2E.Message.ReactionMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.ReactionMessage
             * @static
             * @param {E2E.Message.IReactionMessage} message ReactionMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ReactionMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.key != null && Object.hasOwnProperty.call(message, "key"))
                    $root.Protocol.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.text);
                if (message.groupingKey != null && Object.hasOwnProperty.call(message, "groupingKey"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.groupingKey);
                if (message.senderTimestampMs != null && Object.hasOwnProperty.call(message, "senderTimestampMs"))
                    writer.uint32(/* id 4, wireType 0 =*/32).int64(message.senderTimestampMs);
                return writer;
            };

            /**
             * Encodes the specified ReactionMessage message, length delimited. Does not implicitly {@link E2E.Message.ReactionMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.ReactionMessage
             * @static
             * @param {E2E.Message.IReactionMessage} message ReactionMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ReactionMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ReactionMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.ReactionMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.ReactionMessage} ReactionMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ReactionMessage.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.E2E.Message.ReactionMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.key = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.text = reader.string();
                            break;
                        }
                    case 3: {
                            message.groupingKey = reader.string();
                            break;
                        }
                    case 4: {
                            message.senderTimestampMs = reader.int64();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a ReactionMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.ReactionMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.ReactionMessage} ReactionMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ReactionMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ReactionMessage message.
             * @function verify
             * @memberof E2E.Message.ReactionMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ReactionMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    properties._key = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.key);
                        if (error)
                            return "key." + error;
                    }
                }
                if (message.text != null && message.hasOwnProperty("text")) {
                    properties._text = 1;
                    if (!$util.isString(message.text))
                        return "text: string expected";
                }
                if (message.groupingKey != null && message.hasOwnProperty("groupingKey")) {
                    properties._groupingKey = 1;
                    if (!$util.isString(message.groupingKey))
                        return "groupingKey: 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";
                }
                return null;
            };

            /**
             * Creates a ReactionMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.ReactionMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.ReactionMessage} ReactionMessage
             */
            ReactionMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.ReactionMessage)
                    return object;
                var message = new $root.E2E.Message.ReactionMessage();
                if (object.key != null) {
                    if (typeof object.key !== "object")
                        throw TypeError(".E2E.Message.ReactionMessage.key: object expected");
                    message.key = $root.Protocol.MessageKey.fromObject(object.key);
                }
                if (object.text != null)
                    message.text = String(object.text);
                if (object.groupingKey != null)
                    message.groupingKey = String(object.groupingKey);
                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(object.senderTimestampMs.low >>> 0, object.senderTimestampMs.high >>> 0).toNumber();
                return message;
            };

            /**
             * Creates a plain object from a ReactionMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.ReactionMessage
             * @static
             * @param {E2E.Message.ReactionMessage} message ReactionMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ReactionMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                    if (options.oneofs)
                        object._key = "key";
                }
                if (message.text != null && message.hasOwnProperty("text")) {
                    object.text = message.text;
                    if (options.oneofs)
                        object._text = "text";
                }
                if (message.groupingKey != null && message.hasOwnProperty("groupingKey")) {
                    object.groupingKey = message.groupingKey;
                    if (options.oneofs)
                        object._groupingKey = "groupingKey";
                }
                if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) {
                    if (typeof message.senderTimestampMs === "number")
                        object.senderTimestampMs = options.longs === String ? String(message.senderTimestampMs) : message.senderTimestampMs;
                    else
                        object.senderTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.senderTimestampMs) : options.longs === Number ? new $util.LongBits(message.senderTimestampMs.low >>> 0, message.senderTimestampMs.high >>> 0).toNumber() : message.senderTimestampMs;
                    if (options.oneofs)
                        object._senderTimestampMs = "senderTimestampMs";
                }
                return object;
            };

            /**
             * Converts this ReactionMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.ReactionMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ReactionMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for ReactionMessage
             * @function getTypeUrl
             * @memberof E2E.Message.ReactionMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            ReactionMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.ReactionMessage";
            };

            return ReactionMessage;
        })();

        Message.RequestPaymentMessage = (function() {

            /**
             * Properties of a RequestPaymentMessage.
             * @memberof E2E.Message
             * @interface IRequestPaymentMessage
             * @property {E2E.IMessage|null} [noteMessage] RequestPaymentMessage noteMessage
             * @property {string|null} [currencyCodeIso4217] RequestPaymentMessage currencyCodeIso4217
             * @property {number|Long|null} [amount1000] RequestPaymentMessage amount1000
             * @property {string|null} [requestFrom] RequestPaymentMessage requestFrom
             * @property {number|Long|null} [expiryTimestamp] RequestPaymentMessage expiryTimestamp
             * @property {E2E.IMoney|null} [amount] RequestPaymentMessage amount
             * @property {E2E.IPaymentBackground|null} [background] RequestPaymentMessage background
             */

            /**
             * Constructs a new RequestPaymentMessage.
             * @memberof E2E.Message
             * @classdesc Represents a RequestPaymentMessage.
             * @implements IRequestPaymentMessage
             * @constructor
             * @param {E2E.Message.IRequestPaymentMessage=} [properties] Properties to set
             */
            function RequestPaymentMessage(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]];
            }

            /**
             * RequestPaymentMessage noteMessage.
             * @member {E2E.IMessage|null|undefined} noteMessage
             * @memberof E2E.Message.RequestPaymentMessage
             * @instance
             */
            RequestPaymentMessage.prototype.noteMessage = null;

            /**
             * RequestPaymentMessage currencyCodeIso4217.
             * @member {string|null|undefined} currencyCodeIso4217
             * @memberof E2E.Message.RequestPaymentMessage
             * @instance
             */
            RequestPaymentMessage.prototype.currencyCodeIso4217 = null;

            /**
             * RequestPaymentMessage amount1000.
             * @member {number|Long|null|undefined} amount1000
             * @memberof E2E.Message.RequestPaymentMessage
             * @instance
             */
            RequestPaymentMessage.prototype.amount1000 = null;

            /**
             * RequestPaymentMessage requestFrom.
             * @member {string|null|undefined} requestFrom
             * @memberof E2E.Message.RequestPaymentMessage
             * @instance
             */
            RequestPaymentMessage.prototype.requestFrom = null;

            /**
             * RequestPaymentMessage expiryTimestamp.
             * @member {number|Long|null|undefined} expiryTimestamp
             * @memberof E2E.Message.RequestPaymentMessage
             * @instance
             */
            RequestPaymentMessage.prototype.expiryTimestamp = null;

            /**
             * RequestPaymentMessage amount.
             * @member {E2E.IMoney|null|undefined} amount
             * @memberof E2E.Message.RequestPaymentMessage
             * @instance
             */
            RequestPaymentMessage.prototype.amount = null;

            /**
             * RequestPaymentMessage background.
             * @member {E2E.IPaymentBackground|null|undefined} background
             * @memberof E2E.Message.RequestPaymentMessage
             * @instance
             */
            RequestPaymentMessage.prototype.background = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * RequestPaymentMessage _noteMessage.
             * @member {"noteMessage"|undefined} _noteMessage
             * @memberof E2E.Message.RequestPaymentMessage
             * @instance
             */
            Object.defineProperty(RequestPaymentMessage.prototype, "_noteMessage", {
                get: $util.oneOfGetter($oneOfFields = ["noteMessage"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * RequestPaymentMessage _currencyCodeIso4217.
             * @member {"currencyCodeIso4217"|undefined} _currencyCodeIso4217
             * @memberof E2E.Message.RequestPaymentMessage
             * @instance
             */
            Object.defineProperty(RequestPaymentMessage.prototype, "_currencyCodeIso4217", {
                get: $util.oneOfGetter($oneOfFields = ["currencyCodeIso4217"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * RequestPaymentMessage _amount1000.
             * @member {"amount1000"|undefined} _amount1000
             * @memberof E2E.Message.RequestPaymentMessage
             * @instance
             */
            Object.defineProperty(RequestPaymentMessage.prototype, "_amount1000", {
                get: $util.oneOfGetter($oneOfFields = ["amount1000"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * RequestPaymentMessage _requestFrom.
             * @member {"requestFrom"|undefined} _requestFrom
             * @memberof E2E.Message.RequestPaymentMessage
             * @instance
             */
            Object.defineProperty(RequestPaymentMessage.prototype, "_requestFrom", {
                get: $util.oneOfGetter($oneOfFields = ["requestFrom"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * RequestPaymentMessage _expiryTimestamp.
             * @member {"expiryTimestamp"|undefined} _expiryTimestamp
             * @memberof E2E.Message.RequestPaymentMessage
             * @instance
             */
            Object.defineProperty(RequestPaymentMessage.prototype, "_expiryTimestamp", {
                get: $util.oneOfGetter($oneOfFields = ["expiryTimestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * RequestPaymentMessage _amount.
             * @member {"amount"|undefined} _amount
             * @memberof E2E.Message.RequestPaymentMessage
             * @instance
             */
            Object.defineProperty(RequestPaymentMessage.prototype, "_amount", {
                get: $util.oneOfGetter($oneOfFields = ["amount"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * RequestPaymentMessage _background.
             * @member {"background"|undefined} _background
             * @memberof E2E.Message.RequestPaymentMessage
             * @instance
             */
            Object.defineProperty(RequestPaymentMessage.prototype, "_background", {
                get: $util.oneOfGetter($oneOfFields = ["background"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new RequestPaymentMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.RequestPaymentMessage
             * @static
             * @param {E2E.Message.IRequestPaymentMessage=} [properties] Properties to set
             * @returns {E2E.Message.RequestPaymentMessage} RequestPaymentMessage instance
             */
            RequestPaymentMessage.create = function create(properties) {
                return new RequestPaymentMessage(properties);
            };

            /**
             * Encodes the specified RequestPaymentMessage message. Does not implicitly {@link E2E.Message.RequestPaymentMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.RequestPaymentMessage
             * @static
             * @param {E2E.Message.IRequestPaymentMessage} message RequestPaymentMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RequestPaymentMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.currencyCodeIso4217 != null && Object.hasOwnProperty.call(message, "currencyCodeIso4217"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.currencyCodeIso4217);
                if (message.amount1000 != null && Object.hasOwnProperty.call(message, "amount1000"))
                    writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.amount1000);
                if (message.requestFrom != null && Object.hasOwnProperty.call(message, "requestFrom"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestFrom);
                if (message.noteMessage != null && Object.hasOwnProperty.call(message, "noteMessage"))
                    $root.E2E.Message.encode(message.noteMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                if (message.expiryTimestamp != null && Object.hasOwnProperty.call(message, "expiryTimestamp"))
                    writer.uint32(/* id 5, wireType 0 =*/40).int64(message.expiryTimestamp);
                if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
                    $root.E2E.Money.encode(message.amount, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                if (message.background != null && Object.hasOwnProperty.call(message, "background"))
                    $root.E2E.PaymentBackground.encode(message.background, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified RequestPaymentMessage message, length delimited. Does not implicitly {@link E2E.Message.RequestPaymentMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.RequestPaymentMessage
             * @static
             * @param {E2E.Message.IRequestPaymentMessage} message RequestPaymentMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RequestPaymentMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a RequestPaymentMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.RequestPaymentMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.RequestPaymentMessage} RequestPaymentMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RequestPaymentMessage.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.E2E.Message.RequestPaymentMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 4: {
                            message.noteMessage = $root.E2E.Message.decode(reader, reader.uint32());
                            break;
                        }
                    case 1: {
                            message.currencyCodeIso4217 = reader.string();
                            break;
                        }
                    case 2: {
                            message.amount1000 = reader.uint64();
                            break;
                        }
                    case 3: {
                            message.requestFrom = reader.string();
                            break;
                        }
                    case 5: {
                            message.expiryTimestamp = reader.int64();
                            break;
                        }
                    case 6: {
                            message.amount = $root.E2E.Money.decode(reader, reader.uint32());
                            break;
                        }
                    case 7: {
                            message.background = $root.E2E.PaymentBackground.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a RequestPaymentMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.RequestPaymentMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.RequestPaymentMessage} RequestPaymentMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RequestPaymentMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a RequestPaymentMessage message.
             * @function verify
             * @memberof E2E.Message.RequestPaymentMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            RequestPaymentMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) {
                    properties._noteMessage = 1;
                    {
                        var error = $root.E2E.Message.verify(message.noteMessage);
                        if (error)
                            return "noteMessage." + error;
                    }
                }
                if (message.currencyCodeIso4217 != null && message.hasOwnProperty("currencyCodeIso4217")) {
                    properties._currencyCodeIso4217 = 1;
                    if (!$util.isString(message.currencyCodeIso4217))
                        return "currencyCodeIso4217: string expected";
                }
                if (message.amount1000 != null && message.hasOwnProperty("amount1000")) {
                    properties._amount1000 = 1;
                    if (!$util.isInteger(message.amount1000) && !(message.amount1000 && $util.isInteger(message.amount1000.low) && $util.isInteger(message.amount1000.high)))
                        return "amount1000: integer|Long expected";
                }
                if (message.requestFrom != null && message.hasOwnProperty("requestFrom")) {
                    properties._requestFrom = 1;
                    if (!$util.isString(message.requestFrom))
                        return "requestFrom: string expected";
                }
                if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) {
                    properties._expiryTimestamp = 1;
                    if (!$util.isInteger(message.expiryTimestamp) && !(message.expiryTimestamp && $util.isInteger(message.expiryTimestamp.low) && $util.isInteger(message.expiryTimestamp.high)))
                        return "expiryTimestamp: integer|Long expected";
                }
                if (message.amount != null && message.hasOwnProperty("amount")) {
                    properties._amount = 1;
                    {
                        var error = $root.E2E.Money.verify(message.amount);
                        if (error)
                            return "amount." + error;
                    }
                }
                if (message.background != null && message.hasOwnProperty("background")) {
                    properties._background = 1;
                    {
                        var error = $root.E2E.PaymentBackground.verify(message.background);
                        if (error)
                            return "background." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a RequestPaymentMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.RequestPaymentMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.RequestPaymentMessage} RequestPaymentMessage
             */
            RequestPaymentMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.RequestPaymentMessage)
                    return object;
                var message = new $root.E2E.Message.RequestPaymentMessage();
                if (object.noteMessage != null) {
                    if (typeof object.noteMessage !== "object")
                        throw TypeError(".E2E.Message.RequestPaymentMessage.noteMessage: object expected");
                    message.noteMessage = $root.E2E.Message.fromObject(object.noteMessage);
                }
                if (object.currencyCodeIso4217 != null)
                    message.currencyCodeIso4217 = String(object.currencyCodeIso4217);
                if (object.amount1000 != null)
                    if ($util.Long)
                        (message.amount1000 = $util.Long.fromValue(object.amount1000)).unsigned = true;
                    else if (typeof object.amount1000 === "string")
                        message.amount1000 = parseInt(object.amount1000, 10);
                    else if (typeof object.amount1000 === "number")
                        message.amount1000 = object.amount1000;
                    else if (typeof object.amount1000 === "object")
                        message.amount1000 = new $util.LongBits(object.amount1000.low >>> 0, object.amount1000.high >>> 0).toNumber(true);
                if (object.requestFrom != null)
                    message.requestFrom = String(object.requestFrom);
                if (object.expiryTimestamp != null)
                    if ($util.Long)
                        (message.expiryTimestamp = $util.Long.fromValue(object.expiryTimestamp)).unsigned = false;
                    else if (typeof object.expiryTimestamp === "string")
                        message.expiryTimestamp = parseInt(object.expiryTimestamp, 10);
                    else if (typeof object.expiryTimestamp === "number")
                        message.expiryTimestamp = object.expiryTimestamp;
                    else if (typeof object.expiryTimestamp === "object")
                        message.expiryTimestamp = new $util.LongBits(object.expiryTimestamp.low >>> 0, object.expiryTimestamp.high >>> 0).toNumber();
                if (object.amount != null) {
                    if (typeof object.amount !== "object")
                        throw TypeError(".E2E.Message.RequestPaymentMessage.amount: object expected");
                    message.amount = $root.E2E.Money.fromObject(object.amount);
                }
                if (object.background != null) {
                    if (typeof object.background !== "object")
                        throw TypeError(".E2E.Message.RequestPaymentMessage.background: object expected");
                    message.background = $root.E2E.PaymentBackground.fromObject(object.background);
                }
                return message;
            };

            /**
             * Creates a plain object from a RequestPaymentMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.RequestPaymentMessage
             * @static
             * @param {E2E.Message.RequestPaymentMessage} message RequestPaymentMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            RequestPaymentMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.currencyCodeIso4217 != null && message.hasOwnProperty("currencyCodeIso4217")) {
                    object.currencyCodeIso4217 = message.currencyCodeIso4217;
                    if (options.oneofs)
                        object._currencyCodeIso4217 = "currencyCodeIso4217";
                }
                if (message.amount1000 != null && message.hasOwnProperty("amount1000")) {
                    if (typeof message.amount1000 === "number")
                        object.amount1000 = options.longs === String ? String(message.amount1000) : message.amount1000;
                    else
                        object.amount1000 = options.longs === String ? $util.Long.prototype.toString.call(message.amount1000) : options.longs === Number ? new $util.LongBits(message.amount1000.low >>> 0, message.amount1000.high >>> 0).toNumber(true) : message.amount1000;
                    if (options.oneofs)
                        object._amount1000 = "amount1000";
                }
                if (message.requestFrom != null && message.hasOwnProperty("requestFrom")) {
                    object.requestFrom = message.requestFrom;
                    if (options.oneofs)
                        object._requestFrom = "requestFrom";
                }
                if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) {
                    object.noteMessage = $root.E2E.Message.toObject(message.noteMessage, options);
                    if (options.oneofs)
                        object._noteMessage = "noteMessage";
                }
                if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) {
                    if (typeof message.expiryTimestamp === "number")
                        object.expiryTimestamp = options.longs === String ? String(message.expiryTimestamp) : message.expiryTimestamp;
                    else
                        object.expiryTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.expiryTimestamp) : options.longs === Number ? new $util.LongBits(message.expiryTimestamp.low >>> 0, message.expiryTimestamp.high >>> 0).toNumber() : message.expiryTimestamp;
                    if (options.oneofs)
                        object._expiryTimestamp = "expiryTimestamp";
                }
                if (message.amount != null && message.hasOwnProperty("amount")) {
                    object.amount = $root.E2E.Money.toObject(message.amount, options);
                    if (options.oneofs)
                        object._amount = "amount";
                }
                if (message.background != null && message.hasOwnProperty("background")) {
                    object.background = $root.E2E.PaymentBackground.toObject(message.background, options);
                    if (options.oneofs)
                        object._background = "background";
                }
                return object;
            };

            /**
             * Converts this RequestPaymentMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.RequestPaymentMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            RequestPaymentMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for RequestPaymentMessage
             * @function getTypeUrl
             * @memberof E2E.Message.RequestPaymentMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            RequestPaymentMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.RequestPaymentMessage";
            };

            return RequestPaymentMessage;
        })();

        Message.RequestPhoneNumberMessage = (function() {

            /**
             * Properties of a RequestPhoneNumberMessage.
             * @memberof E2E.Message
             * @interface IRequestPhoneNumberMessage
             * @property {E2E.IContextInfo|null} [contextInfo] RequestPhoneNumberMessage contextInfo
             */

            /**
             * Constructs a new RequestPhoneNumberMessage.
             * @memberof E2E.Message
             * @classdesc Represents a RequestPhoneNumberMessage.
             * @implements IRequestPhoneNumberMessage
             * @constructor
             * @param {E2E.Message.IRequestPhoneNumberMessage=} [properties] Properties to set
             */
            function RequestPhoneNumberMessage(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]];
            }

            /**
             * RequestPhoneNumberMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.RequestPhoneNumberMessage
             * @instance
             */
            RequestPhoneNumberMessage.prototype.contextInfo = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * RequestPhoneNumberMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.RequestPhoneNumberMessage
             * @instance
             */
            Object.defineProperty(RequestPhoneNumberMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new RequestPhoneNumberMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.RequestPhoneNumberMessage
             * @static
             * @param {E2E.Message.IRequestPhoneNumberMessage=} [properties] Properties to set
             * @returns {E2E.Message.RequestPhoneNumberMessage} RequestPhoneNumberMessage instance
             */
            RequestPhoneNumberMessage.create = function create(properties) {
                return new RequestPhoneNumberMessage(properties);
            };

            /**
             * Encodes the specified RequestPhoneNumberMessage message. Does not implicitly {@link E2E.Message.RequestPhoneNumberMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.RequestPhoneNumberMessage
             * @static
             * @param {E2E.Message.IRequestPhoneNumberMessage} message RequestPhoneNumberMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RequestPhoneNumberMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified RequestPhoneNumberMessage message, length delimited. Does not implicitly {@link E2E.Message.RequestPhoneNumberMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.RequestPhoneNumberMessage
             * @static
             * @param {E2E.Message.IRequestPhoneNumberMessage} message RequestPhoneNumberMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RequestPhoneNumberMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a RequestPhoneNumberMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.RequestPhoneNumberMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.RequestPhoneNumberMessage} RequestPhoneNumberMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RequestPhoneNumberMessage.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.E2E.Message.RequestPhoneNumberMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a RequestPhoneNumberMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.RequestPhoneNumberMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.RequestPhoneNumberMessage} RequestPhoneNumberMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RequestPhoneNumberMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a RequestPhoneNumberMessage message.
             * @function verify
             * @memberof E2E.Message.RequestPhoneNumberMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            RequestPhoneNumberMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a RequestPhoneNumberMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.RequestPhoneNumberMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.RequestPhoneNumberMessage} RequestPhoneNumberMessage
             */
            RequestPhoneNumberMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.RequestPhoneNumberMessage)
                    return object;
                var message = new $root.E2E.Message.RequestPhoneNumberMessage();
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.RequestPhoneNumberMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                return message;
            };

            /**
             * Creates a plain object from a RequestPhoneNumberMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.RequestPhoneNumberMessage
             * @static
             * @param {E2E.Message.RequestPhoneNumberMessage} message RequestPhoneNumberMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            RequestPhoneNumberMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                return object;
            };

            /**
             * Converts this RequestPhoneNumberMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.RequestPhoneNumberMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            RequestPhoneNumberMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for RequestPhoneNumberMessage
             * @function getTypeUrl
             * @memberof E2E.Message.RequestPhoneNumberMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            RequestPhoneNumberMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.RequestPhoneNumberMessage";
            };

            return RequestPhoneNumberMessage;
        })();

        Message.RequestWelcomeMessageMetadata = (function() {

            /**
             * Properties of a RequestWelcomeMessageMetadata.
             * @memberof E2E.Message
             * @interface IRequestWelcomeMessageMetadata
             * @property {E2E.Message.RequestWelcomeMessageMetadata.LocalChatState|null} [localChatState] RequestWelcomeMessageMetadata localChatState
             */

            /**
             * Constructs a new RequestWelcomeMessageMetadata.
             * @memberof E2E.Message
             * @classdesc Represents a RequestWelcomeMessageMetadata.
             * @implements IRequestWelcomeMessageMetadata
             * @constructor
             * @param {E2E.Message.IRequestWelcomeMessageMetadata=} [properties] Properties to set
             */
            function RequestWelcomeMessageMetadata(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]];
            }

            /**
             * RequestWelcomeMessageMetadata localChatState.
             * @member {E2E.Message.RequestWelcomeMessageMetadata.LocalChatState|null|undefined} localChatState
             * @memberof E2E.Message.RequestWelcomeMessageMetadata
             * @instance
             */
            RequestWelcomeMessageMetadata.prototype.localChatState = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * RequestWelcomeMessageMetadata _localChatState.
             * @member {"localChatState"|undefined} _localChatState
             * @memberof E2E.Message.RequestWelcomeMessageMetadata
             * @instance
             */
            Object.defineProperty(RequestWelcomeMessageMetadata.prototype, "_localChatState", {
                get: $util.oneOfGetter($oneOfFields = ["localChatState"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new RequestWelcomeMessageMetadata instance using the specified properties.
             * @function create
             * @memberof E2E.Message.RequestWelcomeMessageMetadata
             * @static
             * @param {E2E.Message.IRequestWelcomeMessageMetadata=} [properties] Properties to set
             * @returns {E2E.Message.RequestWelcomeMessageMetadata} RequestWelcomeMessageMetadata instance
             */
            RequestWelcomeMessageMetadata.create = function create(properties) {
                return new RequestWelcomeMessageMetadata(properties);
            };

            /**
             * Encodes the specified RequestWelcomeMessageMetadata message. Does not implicitly {@link E2E.Message.RequestWelcomeMessageMetadata.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.RequestWelcomeMessageMetadata
             * @static
             * @param {E2E.Message.IRequestWelcomeMessageMetadata} message RequestWelcomeMessageMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RequestWelcomeMessageMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.localChatState != null && Object.hasOwnProperty.call(message, "localChatState"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.localChatState);
                return writer;
            };

            /**
             * Encodes the specified RequestWelcomeMessageMetadata message, length delimited. Does not implicitly {@link E2E.Message.RequestWelcomeMessageMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.RequestWelcomeMessageMetadata
             * @static
             * @param {E2E.Message.IRequestWelcomeMessageMetadata} message RequestWelcomeMessageMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RequestWelcomeMessageMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a RequestWelcomeMessageMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.RequestWelcomeMessageMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.RequestWelcomeMessageMetadata} RequestWelcomeMessageMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RequestWelcomeMessageMetadata.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.E2E.Message.RequestWelcomeMessageMetadata();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.localChatState = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a RequestWelcomeMessageMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.RequestWelcomeMessageMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.RequestWelcomeMessageMetadata} RequestWelcomeMessageMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RequestWelcomeMessageMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a RequestWelcomeMessageMetadata message.
             * @function verify
             * @memberof E2E.Message.RequestWelcomeMessageMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            RequestWelcomeMessageMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.localChatState != null && message.hasOwnProperty("localChatState")) {
                    properties._localChatState = 1;
                    switch (message.localChatState) {
                    default:
                        return "localChatState: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a RequestWelcomeMessageMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.RequestWelcomeMessageMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.RequestWelcomeMessageMetadata} RequestWelcomeMessageMetadata
             */
            RequestWelcomeMessageMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.RequestWelcomeMessageMetadata)
                    return object;
                var message = new $root.E2E.Message.RequestWelcomeMessageMetadata();
                switch (object.localChatState) {
                default:
                    if (typeof object.localChatState === "number") {
                        message.localChatState = object.localChatState;
                        break;
                    }
                    break;
                case "EMPTY":
                case 0:
                    message.localChatState = 0;
                    break;
                case "NON_EMPTY":
                case 1:
                    message.localChatState = 1;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a RequestWelcomeMessageMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.RequestWelcomeMessageMetadata
             * @static
             * @param {E2E.Message.RequestWelcomeMessageMetadata} message RequestWelcomeMessageMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            RequestWelcomeMessageMetadata.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.localChatState != null && message.hasOwnProperty("localChatState")) {
                    object.localChatState = options.enums === String ? $root.E2E.Message.RequestWelcomeMessageMetadata.LocalChatState[message.localChatState] === undefined ? message.localChatState : $root.E2E.Message.RequestWelcomeMessageMetadata.LocalChatState[message.localChatState] : message.localChatState;
                    if (options.oneofs)
                        object._localChatState = "localChatState";
                }
                return object;
            };

            /**
             * Converts this RequestWelcomeMessageMetadata to JSON.
             * @function toJSON
             * @memberof E2E.Message.RequestWelcomeMessageMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            RequestWelcomeMessageMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for RequestWelcomeMessageMetadata
             * @function getTypeUrl
             * @memberof E2E.Message.RequestWelcomeMessageMetadata
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            RequestWelcomeMessageMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.RequestWelcomeMessageMetadata";
            };

            /**
             * LocalChatState enum.
             * @name E2E.Message.RequestWelcomeMessageMetadata.LocalChatState
             * @enum {number}
             * @property {number} EMPTY=0 EMPTY value
             * @property {number} NON_EMPTY=1 NON_EMPTY value
             */
            RequestWelcomeMessageMetadata.LocalChatState = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "EMPTY"] = 0;
                values[valuesById[1] = "NON_EMPTY"] = 1;
                return values;
            })();

            return RequestWelcomeMessageMetadata;
        })();

        Message.ScheduledCallCreationMessage = (function() {

            /**
             * Properties of a ScheduledCallCreationMessage.
             * @memberof E2E.Message
             * @interface IScheduledCallCreationMessage
             * @property {number|Long|null} [scheduledTimestampMs] ScheduledCallCreationMessage scheduledTimestampMs
             * @property {E2E.Message.ScheduledCallCreationMessage.CallType|null} [callType] ScheduledCallCreationMessage callType
             * @property {string|null} [title] ScheduledCallCreationMessage title
             */

            /**
             * Constructs a new ScheduledCallCreationMessage.
             * @memberof E2E.Message
             * @classdesc Represents a ScheduledCallCreationMessage.
             * @implements IScheduledCallCreationMessage
             * @constructor
             * @param {E2E.Message.IScheduledCallCreationMessage=} [properties] Properties to set
             */
            function ScheduledCallCreationMessage(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]];
            }

            /**
             * ScheduledCallCreationMessage scheduledTimestampMs.
             * @member {number|Long|null|undefined} scheduledTimestampMs
             * @memberof E2E.Message.ScheduledCallCreationMessage
             * @instance
             */
            ScheduledCallCreationMessage.prototype.scheduledTimestampMs = null;

            /**
             * ScheduledCallCreationMessage callType.
             * @member {E2E.Message.ScheduledCallCreationMessage.CallType|null|undefined} callType
             * @memberof E2E.Message.ScheduledCallCreationMessage
             * @instance
             */
            ScheduledCallCreationMessage.prototype.callType = null;

            /**
             * ScheduledCallCreationMessage title.
             * @member {string|null|undefined} title
             * @memberof E2E.Message.ScheduledCallCreationMessage
             * @instance
             */
            ScheduledCallCreationMessage.prototype.title = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * ScheduledCallCreationMessage _scheduledTimestampMs.
             * @member {"scheduledTimestampMs"|undefined} _scheduledTimestampMs
             * @memberof E2E.Message.ScheduledCallCreationMessage
             * @instance
             */
            Object.defineProperty(ScheduledCallCreationMessage.prototype, "_scheduledTimestampMs", {
                get: $util.oneOfGetter($oneOfFields = ["scheduledTimestampMs"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ScheduledCallCreationMessage _callType.
             * @member {"callType"|undefined} _callType
             * @memberof E2E.Message.ScheduledCallCreationMessage
             * @instance
             */
            Object.defineProperty(ScheduledCallCreationMessage.prototype, "_callType", {
                get: $util.oneOfGetter($oneOfFields = ["callType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ScheduledCallCreationMessage _title.
             * @member {"title"|undefined} _title
             * @memberof E2E.Message.ScheduledCallCreationMessage
             * @instance
             */
            Object.defineProperty(ScheduledCallCreationMessage.prototype, "_title", {
                get: $util.oneOfGetter($oneOfFields = ["title"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new ScheduledCallCreationMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.ScheduledCallCreationMessage
             * @static
             * @param {E2E.Message.IScheduledCallCreationMessage=} [properties] Properties to set
             * @returns {E2E.Message.ScheduledCallCreationMessage} ScheduledCallCreationMessage instance
             */
            ScheduledCallCreationMessage.create = function create(properties) {
                return new ScheduledCallCreationMessage(properties);
            };

            /**
             * Encodes the specified ScheduledCallCreationMessage message. Does not implicitly {@link E2E.Message.ScheduledCallCreationMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.ScheduledCallCreationMessage
             * @static
             * @param {E2E.Message.IScheduledCallCreationMessage} message ScheduledCallCreationMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ScheduledCallCreationMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.scheduledTimestampMs != null && Object.hasOwnProperty.call(message, "scheduledTimestampMs"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int64(message.scheduledTimestampMs);
                if (message.callType != null && Object.hasOwnProperty.call(message, "callType"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int32(message.callType);
                if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.title);
                return writer;
            };

            /**
             * Encodes the specified ScheduledCallCreationMessage message, length delimited. Does not implicitly {@link E2E.Message.ScheduledCallCreationMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.ScheduledCallCreationMessage
             * @static
             * @param {E2E.Message.IScheduledCallCreationMessage} message ScheduledCallCreationMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ScheduledCallCreationMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ScheduledCallCreationMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.ScheduledCallCreationMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.ScheduledCallCreationMessage} ScheduledCallCreationMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ScheduledCallCreationMessage.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.E2E.Message.ScheduledCallCreationMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.scheduledTimestampMs = reader.int64();
                            break;
                        }
                    case 2: {
                            message.callType = reader.int32();
                            break;
                        }
                    case 3: {
                            message.title = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a ScheduledCallCreationMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.ScheduledCallCreationMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.ScheduledCallCreationMessage} ScheduledCallCreationMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ScheduledCallCreationMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ScheduledCallCreationMessage message.
             * @function verify
             * @memberof E2E.Message.ScheduledCallCreationMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ScheduledCallCreationMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.scheduledTimestampMs != null && message.hasOwnProperty("scheduledTimestampMs")) {
                    properties._scheduledTimestampMs = 1;
                    if (!$util.isInteger(message.scheduledTimestampMs) && !(message.scheduledTimestampMs && $util.isInteger(message.scheduledTimestampMs.low) && $util.isInteger(message.scheduledTimestampMs.high)))
                        return "scheduledTimestampMs: integer|Long expected";
                }
                if (message.callType != null && message.hasOwnProperty("callType")) {
                    properties._callType = 1;
                    switch (message.callType) {
                    default:
                        return "callType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                if (message.title != null && message.hasOwnProperty("title")) {
                    properties._title = 1;
                    if (!$util.isString(message.title))
                        return "title: string expected";
                }
                return null;
            };

            /**
             * Creates a ScheduledCallCreationMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.ScheduledCallCreationMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.ScheduledCallCreationMessage} ScheduledCallCreationMessage
             */
            ScheduledCallCreationMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.ScheduledCallCreationMessage)
                    return object;
                var message = new $root.E2E.Message.ScheduledCallCreationMessage();
                if (object.scheduledTimestampMs != null)
                    if ($util.Long)
                        (message.scheduledTimestampMs = $util.Long.fromValue(object.scheduledTimestampMs)).unsigned = false;
                    else if (typeof object.scheduledTimestampMs === "string")
                        message.scheduledTimestampMs = parseInt(object.scheduledTimestampMs, 10);
                    else if (typeof object.scheduledTimestampMs === "number")
                        message.scheduledTimestampMs = object.scheduledTimestampMs;
                    else if (typeof object.scheduledTimestampMs === "object")
                        message.scheduledTimestampMs = new $util.LongBits(object.scheduledTimestampMs.low >>> 0, object.scheduledTimestampMs.high >>> 0).toNumber();
                switch (object.callType) {
                default:
                    if (typeof object.callType === "number") {
                        message.callType = object.callType;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.callType = 0;
                    break;
                case "VOICE":
                case 1:
                    message.callType = 1;
                    break;
                case "VIDEO":
                case 2:
                    message.callType = 2;
                    break;
                }
                if (object.title != null)
                    message.title = String(object.title);
                return message;
            };

            /**
             * Creates a plain object from a ScheduledCallCreationMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.ScheduledCallCreationMessage
             * @static
             * @param {E2E.Message.ScheduledCallCreationMessage} message ScheduledCallCreationMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ScheduledCallCreationMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.scheduledTimestampMs != null && message.hasOwnProperty("scheduledTimestampMs")) {
                    if (typeof message.scheduledTimestampMs === "number")
                        object.scheduledTimestampMs = options.longs === String ? String(message.scheduledTimestampMs) : message.scheduledTimestampMs;
                    else
                        object.scheduledTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.scheduledTimestampMs) : options.longs === Number ? new $util.LongBits(message.scheduledTimestampMs.low >>> 0, message.scheduledTimestampMs.high >>> 0).toNumber() : message.scheduledTimestampMs;
                    if (options.oneofs)
                        object._scheduledTimestampMs = "scheduledTimestampMs";
                }
                if (message.callType != null && message.hasOwnProperty("callType")) {
                    object.callType = options.enums === String ? $root.E2E.Message.ScheduledCallCreationMessage.CallType[message.callType] === undefined ? message.callType : $root.E2E.Message.ScheduledCallCreationMessage.CallType[message.callType] : message.callType;
                    if (options.oneofs)
                        object._callType = "callType";
                }
                if (message.title != null && message.hasOwnProperty("title")) {
                    object.title = message.title;
                    if (options.oneofs)
                        object._title = "title";
                }
                return object;
            };

            /**
             * Converts this ScheduledCallCreationMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.ScheduledCallCreationMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ScheduledCallCreationMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for ScheduledCallCreationMessage
             * @function getTypeUrl
             * @memberof E2E.Message.ScheduledCallCreationMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            ScheduledCallCreationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.ScheduledCallCreationMessage";
            };

            /**
             * CallType enum.
             * @name E2E.Message.ScheduledCallCreationMessage.CallType
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} VOICE=1 VOICE value
             * @property {number} VIDEO=2 VIDEO value
             */
            ScheduledCallCreationMessage.CallType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "VOICE"] = 1;
                values[valuesById[2] = "VIDEO"] = 2;
                return values;
            })();

            return ScheduledCallCreationMessage;
        })();

        Message.ScheduledCallEditMessage = (function() {

            /**
             * Properties of a ScheduledCallEditMessage.
             * @memberof E2E.Message
             * @interface IScheduledCallEditMessage
             * @property {Protocol.IMessageKey|null} [key] ScheduledCallEditMessage key
             * @property {E2E.Message.ScheduledCallEditMessage.EditType|null} [editType] ScheduledCallEditMessage editType
             */

            /**
             * Constructs a new ScheduledCallEditMessage.
             * @memberof E2E.Message
             * @classdesc Represents a ScheduledCallEditMessage.
             * @implements IScheduledCallEditMessage
             * @constructor
             * @param {E2E.Message.IScheduledCallEditMessage=} [properties] Properties to set
             */
            function ScheduledCallEditMessage(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]];
            }

            /**
             * ScheduledCallEditMessage key.
             * @member {Protocol.IMessageKey|null|undefined} key
             * @memberof E2E.Message.ScheduledCallEditMessage
             * @instance
             */
            ScheduledCallEditMessage.prototype.key = null;

            /**
             * ScheduledCallEditMessage editType.
             * @member {E2E.Message.ScheduledCallEditMessage.EditType|null|undefined} editType
             * @memberof E2E.Message.ScheduledCallEditMessage
             * @instance
             */
            ScheduledCallEditMessage.prototype.editType = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * ScheduledCallEditMessage _key.
             * @member {"key"|undefined} _key
             * @memberof E2E.Message.ScheduledCallEditMessage
             * @instance
             */
            Object.defineProperty(ScheduledCallEditMessage.prototype, "_key", {
                get: $util.oneOfGetter($oneOfFields = ["key"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ScheduledCallEditMessage _editType.
             * @member {"editType"|undefined} _editType
             * @memberof E2E.Message.ScheduledCallEditMessage
             * @instance
             */
            Object.defineProperty(ScheduledCallEditMessage.prototype, "_editType", {
                get: $util.oneOfGetter($oneOfFields = ["editType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new ScheduledCallEditMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.ScheduledCallEditMessage
             * @static
             * @param {E2E.Message.IScheduledCallEditMessage=} [properties] Properties to set
             * @returns {E2E.Message.ScheduledCallEditMessage} ScheduledCallEditMessage instance
             */
            ScheduledCallEditMessage.create = function create(properties) {
                return new ScheduledCallEditMessage(properties);
            };

            /**
             * Encodes the specified ScheduledCallEditMessage message. Does not implicitly {@link E2E.Message.ScheduledCallEditMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.ScheduledCallEditMessage
             * @static
             * @param {E2E.Message.IScheduledCallEditMessage} message ScheduledCallEditMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ScheduledCallEditMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.key != null && Object.hasOwnProperty.call(message, "key"))
                    $root.Protocol.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.editType != null && Object.hasOwnProperty.call(message, "editType"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int32(message.editType);
                return writer;
            };

            /**
             * Encodes the specified ScheduledCallEditMessage message, length delimited. Does not implicitly {@link E2E.Message.ScheduledCallEditMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.ScheduledCallEditMessage
             * @static
             * @param {E2E.Message.IScheduledCallEditMessage} message ScheduledCallEditMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ScheduledCallEditMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ScheduledCallEditMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.ScheduledCallEditMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.ScheduledCallEditMessage} ScheduledCallEditMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ScheduledCallEditMessage.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.E2E.Message.ScheduledCallEditMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.key = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.editType = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a ScheduledCallEditMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.ScheduledCallEditMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.ScheduledCallEditMessage} ScheduledCallEditMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ScheduledCallEditMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ScheduledCallEditMessage message.
             * @function verify
             * @memberof E2E.Message.ScheduledCallEditMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ScheduledCallEditMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    properties._key = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.key);
                        if (error)
                            return "key." + error;
                    }
                }
                if (message.editType != null && message.hasOwnProperty("editType")) {
                    properties._editType = 1;
                    switch (message.editType) {
                    default:
                        return "editType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a ScheduledCallEditMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.ScheduledCallEditMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.ScheduledCallEditMessage} ScheduledCallEditMessage
             */
            ScheduledCallEditMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.ScheduledCallEditMessage)
                    return object;
                var message = new $root.E2E.Message.ScheduledCallEditMessage();
                if (object.key != null) {
                    if (typeof object.key !== "object")
                        throw TypeError(".E2E.Message.ScheduledCallEditMessage.key: object expected");
                    message.key = $root.Protocol.MessageKey.fromObject(object.key);
                }
                switch (object.editType) {
                default:
                    if (typeof object.editType === "number") {
                        message.editType = object.editType;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.editType = 0;
                    break;
                case "CANCEL":
                case 1:
                    message.editType = 1;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a ScheduledCallEditMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.ScheduledCallEditMessage
             * @static
             * @param {E2E.Message.ScheduledCallEditMessage} message ScheduledCallEditMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ScheduledCallEditMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                    if (options.oneofs)
                        object._key = "key";
                }
                if (message.editType != null && message.hasOwnProperty("editType")) {
                    object.editType = options.enums === String ? $root.E2E.Message.ScheduledCallEditMessage.EditType[message.editType] === undefined ? message.editType : $root.E2E.Message.ScheduledCallEditMessage.EditType[message.editType] : message.editType;
                    if (options.oneofs)
                        object._editType = "editType";
                }
                return object;
            };

            /**
             * Converts this ScheduledCallEditMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.ScheduledCallEditMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ScheduledCallEditMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for ScheduledCallEditMessage
             * @function getTypeUrl
             * @memberof E2E.Message.ScheduledCallEditMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            ScheduledCallEditMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.ScheduledCallEditMessage";
            };

            /**
             * EditType enum.
             * @name E2E.Message.ScheduledCallEditMessage.EditType
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} CANCEL=1 CANCEL value
             */
            ScheduledCallEditMessage.EditType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "CANCEL"] = 1;
                return values;
            })();

            return ScheduledCallEditMessage;
        })();

        Message.SecretEncryptedMessage = (function() {

            /**
             * Properties of a SecretEncryptedMessage.
             * @memberof E2E.Message
             * @interface ISecretEncryptedMessage
             * @property {Protocol.IMessageKey|null} [targetMessageKey] SecretEncryptedMessage targetMessageKey
             * @property {Uint8Array|null} [encPayload] SecretEncryptedMessage encPayload
             * @property {Uint8Array|null} [encIv] SecretEncryptedMessage encIv
             * @property {E2E.Message.SecretEncryptedMessage.SecretEncType|null} [secretEncType] SecretEncryptedMessage secretEncType
             */

            /**
             * Constructs a new SecretEncryptedMessage.
             * @memberof E2E.Message
             * @classdesc Represents a SecretEncryptedMessage.
             * @implements ISecretEncryptedMessage
             * @constructor
             * @param {E2E.Message.ISecretEncryptedMessage=} [properties] Properties to set
             */
            function SecretEncryptedMessage(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]];
            }

            /**
             * SecretEncryptedMessage targetMessageKey.
             * @member {Protocol.IMessageKey|null|undefined} targetMessageKey
             * @memberof E2E.Message.SecretEncryptedMessage
             * @instance
             */
            SecretEncryptedMessage.prototype.targetMessageKey = null;

            /**
             * SecretEncryptedMessage encPayload.
             * @member {Uint8Array|null|undefined} encPayload
             * @memberof E2E.Message.SecretEncryptedMessage
             * @instance
             */
            SecretEncryptedMessage.prototype.encPayload = null;

            /**
             * SecretEncryptedMessage encIv.
             * @member {Uint8Array|null|undefined} encIv
             * @memberof E2E.Message.SecretEncryptedMessage
             * @instance
             */
            SecretEncryptedMessage.prototype.encIv = null;

            /**
             * SecretEncryptedMessage secretEncType.
             * @member {E2E.Message.SecretEncryptedMessage.SecretEncType|null|undefined} secretEncType
             * @memberof E2E.Message.SecretEncryptedMessage
             * @instance
             */
            SecretEncryptedMessage.prototype.secretEncType = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * SecretEncryptedMessage _targetMessageKey.
             * @member {"targetMessageKey"|undefined} _targetMessageKey
             * @memberof E2E.Message.SecretEncryptedMessage
             * @instance
             */
            Object.defineProperty(SecretEncryptedMessage.prototype, "_targetMessageKey", {
                get: $util.oneOfGetter($oneOfFields = ["targetMessageKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SecretEncryptedMessage _encPayload.
             * @member {"encPayload"|undefined} _encPayload
             * @memberof E2E.Message.SecretEncryptedMessage
             * @instance
             */
            Object.defineProperty(SecretEncryptedMessage.prototype, "_encPayload", {
                get: $util.oneOfGetter($oneOfFields = ["encPayload"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SecretEncryptedMessage _encIv.
             * @member {"encIv"|undefined} _encIv
             * @memberof E2E.Message.SecretEncryptedMessage
             * @instance
             */
            Object.defineProperty(SecretEncryptedMessage.prototype, "_encIv", {
                get: $util.oneOfGetter($oneOfFields = ["encIv"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SecretEncryptedMessage _secretEncType.
             * @member {"secretEncType"|undefined} _secretEncType
             * @memberof E2E.Message.SecretEncryptedMessage
             * @instance
             */
            Object.defineProperty(SecretEncryptedMessage.prototype, "_secretEncType", {
                get: $util.oneOfGetter($oneOfFields = ["secretEncType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new SecretEncryptedMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.SecretEncryptedMessage
             * @static
             * @param {E2E.Message.ISecretEncryptedMessage=} [properties] Properties to set
             * @returns {E2E.Message.SecretEncryptedMessage} SecretEncryptedMessage instance
             */
            SecretEncryptedMessage.create = function create(properties) {
                return new SecretEncryptedMessage(properties);
            };

            /**
             * Encodes the specified SecretEncryptedMessage message. Does not implicitly {@link E2E.Message.SecretEncryptedMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.SecretEncryptedMessage
             * @static
             * @param {E2E.Message.ISecretEncryptedMessage} message SecretEncryptedMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SecretEncryptedMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.targetMessageKey != null && Object.hasOwnProperty.call(message, "targetMessageKey"))
                    $root.Protocol.MessageKey.encode(message.targetMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.encPayload != null && Object.hasOwnProperty.call(message, "encPayload"))
                    writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encPayload);
                if (message.encIv != null && Object.hasOwnProperty.call(message, "encIv"))
                    writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.encIv);
                if (message.secretEncType != null && Object.hasOwnProperty.call(message, "secretEncType"))
                    writer.uint32(/* id 4, wireType 0 =*/32).int32(message.secretEncType);
                return writer;
            };

            /**
             * Encodes the specified SecretEncryptedMessage message, length delimited. Does not implicitly {@link E2E.Message.SecretEncryptedMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.SecretEncryptedMessage
             * @static
             * @param {E2E.Message.ISecretEncryptedMessage} message SecretEncryptedMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SecretEncryptedMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SecretEncryptedMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.SecretEncryptedMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.SecretEncryptedMessage} SecretEncryptedMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SecretEncryptedMessage.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.E2E.Message.SecretEncryptedMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.targetMessageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.encPayload = reader.bytes();
                            break;
                        }
                    case 3: {
                            message.encIv = reader.bytes();
                            break;
                        }
                    case 4: {
                            message.secretEncType = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a SecretEncryptedMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.SecretEncryptedMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.SecretEncryptedMessage} SecretEncryptedMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SecretEncryptedMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SecretEncryptedMessage message.
             * @function verify
             * @memberof E2E.Message.SecretEncryptedMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SecretEncryptedMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) {
                    properties._targetMessageKey = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.targetMessageKey);
                        if (error)
                            return "targetMessageKey." + error;
                    }
                }
                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.secretEncType != null && message.hasOwnProperty("secretEncType")) {
                    properties._secretEncType = 1;
                    switch (message.secretEncType) {
                    default:
                        return "secretEncType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a SecretEncryptedMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.SecretEncryptedMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.SecretEncryptedMessage} SecretEncryptedMessage
             */
            SecretEncryptedMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.SecretEncryptedMessage)
                    return object;
                var message = new $root.E2E.Message.SecretEncryptedMessage();
                if (object.targetMessageKey != null) {
                    if (typeof object.targetMessageKey !== "object")
                        throw TypeError(".E2E.Message.SecretEncryptedMessage.targetMessageKey: object expected");
                    message.targetMessageKey = $root.Protocol.MessageKey.fromObject(object.targetMessageKey);
                }
                if (object.encPayload != null)
                    if (typeof object.encPayload === "string")
                        $util.base64.decode(object.encPayload, message.encPayload = $util.newBuffer($util.base64.length(object.encPayload)), 0);
                    else if (object.encPayload.length >= 0)
                        message.encPayload = object.encPayload;
                if (object.encIv != null)
                    if (typeof object.encIv === "string")
                        $util.base64.decode(object.encIv, message.encIv = $util.newBuffer($util.base64.length(object.encIv)), 0);
                    else if (object.encIv.length >= 0)
                        message.encIv = object.encIv;
                switch (object.secretEncType) {
                default:
                    if (typeof object.secretEncType === "number") {
                        message.secretEncType = object.secretEncType;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.secretEncType = 0;
                    break;
                case "EVENT_EDIT":
                case 1:
                    message.secretEncType = 1;
                    break;
                case "MESSAGE_EDIT":
                case 2:
                    message.secretEncType = 2;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a SecretEncryptedMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.SecretEncryptedMessage
             * @static
             * @param {E2E.Message.SecretEncryptedMessage} message SecretEncryptedMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SecretEncryptedMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) {
                    object.targetMessageKey = $root.Protocol.MessageKey.toObject(message.targetMessageKey, options);
                    if (options.oneofs)
                        object._targetMessageKey = "targetMessageKey";
                }
                if (message.encPayload != null && message.hasOwnProperty("encPayload")) {
                    object.encPayload = options.bytes === String ? $util.base64.encode(message.encPayload, 0, message.encPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encPayload) : message.encPayload;
                    if (options.oneofs)
                        object._encPayload = "encPayload";
                }
                if (message.encIv != null && message.hasOwnProperty("encIv")) {
                    object.encIv = options.bytes === String ? $util.base64.encode(message.encIv, 0, message.encIv.length) : options.bytes === Array ? Array.prototype.slice.call(message.encIv) : message.encIv;
                    if (options.oneofs)
                        object._encIv = "encIv";
                }
                if (message.secretEncType != null && message.hasOwnProperty("secretEncType")) {
                    object.secretEncType = options.enums === String ? $root.E2E.Message.SecretEncryptedMessage.SecretEncType[message.secretEncType] === undefined ? message.secretEncType : $root.E2E.Message.SecretEncryptedMessage.SecretEncType[message.secretEncType] : message.secretEncType;
                    if (options.oneofs)
                        object._secretEncType = "secretEncType";
                }
                return object;
            };

            /**
             * Converts this SecretEncryptedMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.SecretEncryptedMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SecretEncryptedMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for SecretEncryptedMessage
             * @function getTypeUrl
             * @memberof E2E.Message.SecretEncryptedMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            SecretEncryptedMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.SecretEncryptedMessage";
            };

            /**
             * SecretEncType enum.
             * @name E2E.Message.SecretEncryptedMessage.SecretEncType
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} EVENT_EDIT=1 EVENT_EDIT value
             * @property {number} MESSAGE_EDIT=2 MESSAGE_EDIT value
             */
            SecretEncryptedMessage.SecretEncType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "EVENT_EDIT"] = 1;
                values[valuesById[2] = "MESSAGE_EDIT"] = 2;
                return values;
            })();

            return SecretEncryptedMessage;
        })();

        Message.SendPaymentMessage = (function() {

            /**
             * Properties of a SendPaymentMessage.
             * @memberof E2E.Message
             * @interface ISendPaymentMessage
             * @property {E2E.IMessage|null} [noteMessage] SendPaymentMessage noteMessage
             * @property {Protocol.IMessageKey|null} [requestMessageKey] SendPaymentMessage requestMessageKey
             * @property {E2E.IPaymentBackground|null} [background] SendPaymentMessage background
             * @property {string|null} [transactionData] SendPaymentMessage transactionData
             */

            /**
             * Constructs a new SendPaymentMessage.
             * @memberof E2E.Message
             * @classdesc Represents a SendPaymentMessage.
             * @implements ISendPaymentMessage
             * @constructor
             * @param {E2E.Message.ISendPaymentMessage=} [properties] Properties to set
             */
            function SendPaymentMessage(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]];
            }

            /**
             * SendPaymentMessage noteMessage.
             * @member {E2E.IMessage|null|undefined} noteMessage
             * @memberof E2E.Message.SendPaymentMessage
             * @instance
             */
            SendPaymentMessage.prototype.noteMessage = null;

            /**
             * SendPaymentMessage requestMessageKey.
             * @member {Protocol.IMessageKey|null|undefined} requestMessageKey
             * @memberof E2E.Message.SendPaymentMessage
             * @instance
             */
            SendPaymentMessage.prototype.requestMessageKey = null;

            /**
             * SendPaymentMessage background.
             * @member {E2E.IPaymentBackground|null|undefined} background
             * @memberof E2E.Message.SendPaymentMessage
             * @instance
             */
            SendPaymentMessage.prototype.background = null;

            /**
             * SendPaymentMessage transactionData.
             * @member {string|null|undefined} transactionData
             * @memberof E2E.Message.SendPaymentMessage
             * @instance
             */
            SendPaymentMessage.prototype.transactionData = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * SendPaymentMessage _noteMessage.
             * @member {"noteMessage"|undefined} _noteMessage
             * @memberof E2E.Message.SendPaymentMessage
             * @instance
             */
            Object.defineProperty(SendPaymentMessage.prototype, "_noteMessage", {
                get: $util.oneOfGetter($oneOfFields = ["noteMessage"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SendPaymentMessage _requestMessageKey.
             * @member {"requestMessageKey"|undefined} _requestMessageKey
             * @memberof E2E.Message.SendPaymentMessage
             * @instance
             */
            Object.defineProperty(SendPaymentMessage.prototype, "_requestMessageKey", {
                get: $util.oneOfGetter($oneOfFields = ["requestMessageKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SendPaymentMessage _background.
             * @member {"background"|undefined} _background
             * @memberof E2E.Message.SendPaymentMessage
             * @instance
             */
            Object.defineProperty(SendPaymentMessage.prototype, "_background", {
                get: $util.oneOfGetter($oneOfFields = ["background"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SendPaymentMessage _transactionData.
             * @member {"transactionData"|undefined} _transactionData
             * @memberof E2E.Message.SendPaymentMessage
             * @instance
             */
            Object.defineProperty(SendPaymentMessage.prototype, "_transactionData", {
                get: $util.oneOfGetter($oneOfFields = ["transactionData"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new SendPaymentMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.SendPaymentMessage
             * @static
             * @param {E2E.Message.ISendPaymentMessage=} [properties] Properties to set
             * @returns {E2E.Message.SendPaymentMessage} SendPaymentMessage instance
             */
            SendPaymentMessage.create = function create(properties) {
                return new SendPaymentMessage(properties);
            };

            /**
             * Encodes the specified SendPaymentMessage message. Does not implicitly {@link E2E.Message.SendPaymentMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.SendPaymentMessage
             * @static
             * @param {E2E.Message.ISendPaymentMessage} message SendPaymentMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SendPaymentMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.noteMessage != null && Object.hasOwnProperty.call(message, "noteMessage"))
                    $root.E2E.Message.encode(message.noteMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                if (message.requestMessageKey != null && Object.hasOwnProperty.call(message, "requestMessageKey"))
                    $root.Protocol.MessageKey.encode(message.requestMessageKey, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                if (message.background != null && Object.hasOwnProperty.call(message, "background"))
                    $root.E2E.PaymentBackground.encode(message.background, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                if (message.transactionData != null && Object.hasOwnProperty.call(message, "transactionData"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.transactionData);
                return writer;
            };

            /**
             * Encodes the specified SendPaymentMessage message, length delimited. Does not implicitly {@link E2E.Message.SendPaymentMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.SendPaymentMessage
             * @static
             * @param {E2E.Message.ISendPaymentMessage} message SendPaymentMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SendPaymentMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SendPaymentMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.SendPaymentMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.SendPaymentMessage} SendPaymentMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SendPaymentMessage.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.E2E.Message.SendPaymentMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 2: {
                            message.noteMessage = $root.E2E.Message.decode(reader, reader.uint32());
                            break;
                        }
                    case 3: {
                            message.requestMessageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    case 4: {
                            message.background = $root.E2E.PaymentBackground.decode(reader, reader.uint32());
                            break;
                        }
                    case 5: {
                            message.transactionData = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a SendPaymentMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.SendPaymentMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.SendPaymentMessage} SendPaymentMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SendPaymentMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SendPaymentMessage message.
             * @function verify
             * @memberof E2E.Message.SendPaymentMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SendPaymentMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) {
                    properties._noteMessage = 1;
                    {
                        var error = $root.E2E.Message.verify(message.noteMessage);
                        if (error)
                            return "noteMessage." + error;
                    }
                }
                if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) {
                    properties._requestMessageKey = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.requestMessageKey);
                        if (error)
                            return "requestMessageKey." + error;
                    }
                }
                if (message.background != null && message.hasOwnProperty("background")) {
                    properties._background = 1;
                    {
                        var error = $root.E2E.PaymentBackground.verify(message.background);
                        if (error)
                            return "background." + error;
                    }
                }
                if (message.transactionData != null && message.hasOwnProperty("transactionData")) {
                    properties._transactionData = 1;
                    if (!$util.isString(message.transactionData))
                        return "transactionData: string expected";
                }
                return null;
            };

            /**
             * Creates a SendPaymentMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.SendPaymentMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.SendPaymentMessage} SendPaymentMessage
             */
            SendPaymentMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.SendPaymentMessage)
                    return object;
                var message = new $root.E2E.Message.SendPaymentMessage();
                if (object.noteMessage != null) {
                    if (typeof object.noteMessage !== "object")
                        throw TypeError(".E2E.Message.SendPaymentMessage.noteMessage: object expected");
                    message.noteMessage = $root.E2E.Message.fromObject(object.noteMessage);
                }
                if (object.requestMessageKey != null) {
                    if (typeof object.requestMessageKey !== "object")
                        throw TypeError(".E2E.Message.SendPaymentMessage.requestMessageKey: object expected");
                    message.requestMessageKey = $root.Protocol.MessageKey.fromObject(object.requestMessageKey);
                }
                if (object.background != null) {
                    if (typeof object.background !== "object")
                        throw TypeError(".E2E.Message.SendPaymentMessage.background: object expected");
                    message.background = $root.E2E.PaymentBackground.fromObject(object.background);
                }
                if (object.transactionData != null)
                    message.transactionData = String(object.transactionData);
                return message;
            };

            /**
             * Creates a plain object from a SendPaymentMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.SendPaymentMessage
             * @static
             * @param {E2E.Message.SendPaymentMessage} message SendPaymentMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SendPaymentMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) {
                    object.noteMessage = $root.E2E.Message.toObject(message.noteMessage, options);
                    if (options.oneofs)
                        object._noteMessage = "noteMessage";
                }
                if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) {
                    object.requestMessageKey = $root.Protocol.MessageKey.toObject(message.requestMessageKey, options);
                    if (options.oneofs)
                        object._requestMessageKey = "requestMessageKey";
                }
                if (message.background != null && message.hasOwnProperty("background")) {
                    object.background = $root.E2E.PaymentBackground.toObject(message.background, options);
                    if (options.oneofs)
                        object._background = "background";
                }
                if (message.transactionData != null && message.hasOwnProperty("transactionData")) {
                    object.transactionData = message.transactionData;
                    if (options.oneofs)
                        object._transactionData = "transactionData";
                }
                return object;
            };

            /**
             * Converts this SendPaymentMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.SendPaymentMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SendPaymentMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for SendPaymentMessage
             * @function getTypeUrl
             * @memberof E2E.Message.SendPaymentMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            SendPaymentMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.SendPaymentMessage";
            };

            return SendPaymentMessage;
        })();

        Message.SenderKeyDistributionMessage = (function() {

            /**
             * Properties of a SenderKeyDistributionMessage.
             * @memberof E2E.Message
             * @interface ISenderKeyDistributionMessage
             * @property {string|null} [groupId] SenderKeyDistributionMessage groupId
             * @property {Uint8Array|null} [axolotlSenderKeyDistributionMessage] SenderKeyDistributionMessage axolotlSenderKeyDistributionMessage
             */

            /**
             * Constructs a new SenderKeyDistributionMessage.
             * @memberof E2E.Message
             * @classdesc Represents a SenderKeyDistributionMessage.
             * @implements ISenderKeyDistributionMessage
             * @constructor
             * @param {E2E.Message.ISenderKeyDistributionMessage=} [properties] Properties to set
             */
            function SenderKeyDistributionMessage(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]];
            }

            /**
             * SenderKeyDistributionMessage groupId.
             * @member {string|null|undefined} groupId
             * @memberof E2E.Message.SenderKeyDistributionMessage
             * @instance
             */
            SenderKeyDistributionMessage.prototype.groupId = null;

            /**
             * SenderKeyDistributionMessage axolotlSenderKeyDistributionMessage.
             * @member {Uint8Array|null|undefined} axolotlSenderKeyDistributionMessage
             * @memberof E2E.Message.SenderKeyDistributionMessage
             * @instance
             */
            SenderKeyDistributionMessage.prototype.axolotlSenderKeyDistributionMessage = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * SenderKeyDistributionMessage _groupId.
             * @member {"groupId"|undefined} _groupId
             * @memberof E2E.Message.SenderKeyDistributionMessage
             * @instance
             */
            Object.defineProperty(SenderKeyDistributionMessage.prototype, "_groupId", {
                get: $util.oneOfGetter($oneOfFields = ["groupId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SenderKeyDistributionMessage _axolotlSenderKeyDistributionMessage.
             * @member {"axolotlSenderKeyDistributionMessage"|undefined} _axolotlSenderKeyDistributionMessage
             * @memberof E2E.Message.SenderKeyDistributionMessage
             * @instance
             */
            Object.defineProperty(SenderKeyDistributionMessage.prototype, "_axolotlSenderKeyDistributionMessage", {
                get: $util.oneOfGetter($oneOfFields = ["axolotlSenderKeyDistributionMessage"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new SenderKeyDistributionMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.SenderKeyDistributionMessage
             * @static
             * @param {E2E.Message.ISenderKeyDistributionMessage=} [properties] Properties to set
             * @returns {E2E.Message.SenderKeyDistributionMessage} SenderKeyDistributionMessage instance
             */
            SenderKeyDistributionMessage.create = function create(properties) {
                return new SenderKeyDistributionMessage(properties);
            };

            /**
             * Encodes the specified SenderKeyDistributionMessage message. Does not implicitly {@link E2E.Message.SenderKeyDistributionMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.SenderKeyDistributionMessage
             * @static
             * @param {E2E.Message.ISenderKeyDistributionMessage} message SenderKeyDistributionMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SenderKeyDistributionMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.groupId);
                if (message.axolotlSenderKeyDistributionMessage != null && Object.hasOwnProperty.call(message, "axolotlSenderKeyDistributionMessage"))
                    writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.axolotlSenderKeyDistributionMessage);
                return writer;
            };

            /**
             * Encodes the specified SenderKeyDistributionMessage message, length delimited. Does not implicitly {@link E2E.Message.SenderKeyDistributionMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.SenderKeyDistributionMessage
             * @static
             * @param {E2E.Message.ISenderKeyDistributionMessage} message SenderKeyDistributionMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SenderKeyDistributionMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SenderKeyDistributionMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.SenderKeyDistributionMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.SenderKeyDistributionMessage} SenderKeyDistributionMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SenderKeyDistributionMessage.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.E2E.Message.SenderKeyDistributionMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.groupId = reader.string();
                            break;
                        }
                    case 2: {
                            message.axolotlSenderKeyDistributionMessage = reader.bytes();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a SenderKeyDistributionMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.SenderKeyDistributionMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.SenderKeyDistributionMessage} SenderKeyDistributionMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SenderKeyDistributionMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SenderKeyDistributionMessage message.
             * @function verify
             * @memberof E2E.Message.SenderKeyDistributionMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SenderKeyDistributionMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.groupId != null && message.hasOwnProperty("groupId")) {
                    properties._groupId = 1;
                    if (!$util.isString(message.groupId))
                        return "groupId: string expected";
                }
                if (message.axolotlSenderKeyDistributionMessage != null && message.hasOwnProperty("axolotlSenderKeyDistributionMessage")) {
                    properties._axolotlSenderKeyDistributionMessage = 1;
                    if (!(message.axolotlSenderKeyDistributionMessage && typeof message.axolotlSenderKeyDistributionMessage.length === "number" || $util.isString(message.axolotlSenderKeyDistributionMessage)))
                        return "axolotlSenderKeyDistributionMessage: buffer expected";
                }
                return null;
            };

            /**
             * Creates a SenderKeyDistributionMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.SenderKeyDistributionMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.SenderKeyDistributionMessage} SenderKeyDistributionMessage
             */
            SenderKeyDistributionMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.SenderKeyDistributionMessage)
                    return object;
                var message = new $root.E2E.Message.SenderKeyDistributionMessage();
                if (object.groupId != null)
                    message.groupId = String(object.groupId);
                if (object.axolotlSenderKeyDistributionMessage != null)
                    if (typeof object.axolotlSenderKeyDistributionMessage === "string")
                        $util.base64.decode(object.axolotlSenderKeyDistributionMessage, message.axolotlSenderKeyDistributionMessage = $util.newBuffer($util.base64.length(object.axolotlSenderKeyDistributionMessage)), 0);
                    else if (object.axolotlSenderKeyDistributionMessage.length >= 0)
                        message.axolotlSenderKeyDistributionMessage = object.axolotlSenderKeyDistributionMessage;
                return message;
            };

            /**
             * Creates a plain object from a SenderKeyDistributionMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.SenderKeyDistributionMessage
             * @static
             * @param {E2E.Message.SenderKeyDistributionMessage} message SenderKeyDistributionMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SenderKeyDistributionMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.groupId != null && message.hasOwnProperty("groupId")) {
                    object.groupId = message.groupId;
                    if (options.oneofs)
                        object._groupId = "groupId";
                }
                if (message.axolotlSenderKeyDistributionMessage != null && message.hasOwnProperty("axolotlSenderKeyDistributionMessage")) {
                    object.axolotlSenderKeyDistributionMessage = options.bytes === String ? $util.base64.encode(message.axolotlSenderKeyDistributionMessage, 0, message.axolotlSenderKeyDistributionMessage.length) : options.bytes === Array ? Array.prototype.slice.call(message.axolotlSenderKeyDistributionMessage) : message.axolotlSenderKeyDistributionMessage;
                    if (options.oneofs)
                        object._axolotlSenderKeyDistributionMessage = "axolotlSenderKeyDistributionMessage";
                }
                return object;
            };

            /**
             * Converts this SenderKeyDistributionMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.SenderKeyDistributionMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SenderKeyDistributionMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for SenderKeyDistributionMessage
             * @function getTypeUrl
             * @memberof E2E.Message.SenderKeyDistributionMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            SenderKeyDistributionMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.SenderKeyDistributionMessage";
            };

            return SenderKeyDistributionMessage;
        })();

        Message.StatusNotificationMessage = (function() {

            /**
             * Properties of a StatusNotificationMessage.
             * @memberof E2E.Message
             * @interface IStatusNotificationMessage
             * @property {Protocol.IMessageKey|null} [responseMessageKey] StatusNotificationMessage responseMessageKey
             * @property {Protocol.IMessageKey|null} [originalMessageKey] StatusNotificationMessage originalMessageKey
             * @property {E2E.Message.StatusNotificationMessage.StatusNotificationType|null} [type] StatusNotificationMessage type
             */

            /**
             * Constructs a new StatusNotificationMessage.
             * @memberof E2E.Message
             * @classdesc Represents a StatusNotificationMessage.
             * @implements IStatusNotificationMessage
             * @constructor
             * @param {E2E.Message.IStatusNotificationMessage=} [properties] Properties to set
             */
            function StatusNotificationMessage(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]];
            }

            /**
             * StatusNotificationMessage responseMessageKey.
             * @member {Protocol.IMessageKey|null|undefined} responseMessageKey
             * @memberof E2E.Message.StatusNotificationMessage
             * @instance
             */
            StatusNotificationMessage.prototype.responseMessageKey = null;

            /**
             * StatusNotificationMessage originalMessageKey.
             * @member {Protocol.IMessageKey|null|undefined} originalMessageKey
             * @memberof E2E.Message.StatusNotificationMessage
             * @instance
             */
            StatusNotificationMessage.prototype.originalMessageKey = null;

            /**
             * StatusNotificationMessage type.
             * @member {E2E.Message.StatusNotificationMessage.StatusNotificationType|null|undefined} type
             * @memberof E2E.Message.StatusNotificationMessage
             * @instance
             */
            StatusNotificationMessage.prototype.type = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * StatusNotificationMessage _responseMessageKey.
             * @member {"responseMessageKey"|undefined} _responseMessageKey
             * @memberof E2E.Message.StatusNotificationMessage
             * @instance
             */
            Object.defineProperty(StatusNotificationMessage.prototype, "_responseMessageKey", {
                get: $util.oneOfGetter($oneOfFields = ["responseMessageKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StatusNotificationMessage _originalMessageKey.
             * @member {"originalMessageKey"|undefined} _originalMessageKey
             * @memberof E2E.Message.StatusNotificationMessage
             * @instance
             */
            Object.defineProperty(StatusNotificationMessage.prototype, "_originalMessageKey", {
                get: $util.oneOfGetter($oneOfFields = ["originalMessageKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StatusNotificationMessage _type.
             * @member {"type"|undefined} _type
             * @memberof E2E.Message.StatusNotificationMessage
             * @instance
             */
            Object.defineProperty(StatusNotificationMessage.prototype, "_type", {
                get: $util.oneOfGetter($oneOfFields = ["type"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new StatusNotificationMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.StatusNotificationMessage
             * @static
             * @param {E2E.Message.IStatusNotificationMessage=} [properties] Properties to set
             * @returns {E2E.Message.StatusNotificationMessage} StatusNotificationMessage instance
             */
            StatusNotificationMessage.create = function create(properties) {
                return new StatusNotificationMessage(properties);
            };

            /**
             * Encodes the specified StatusNotificationMessage message. Does not implicitly {@link E2E.Message.StatusNotificationMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.StatusNotificationMessage
             * @static
             * @param {E2E.Message.IStatusNotificationMessage} message StatusNotificationMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatusNotificationMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.responseMessageKey != null && Object.hasOwnProperty.call(message, "responseMessageKey"))
                    $root.Protocol.MessageKey.encode(message.responseMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.originalMessageKey != null && Object.hasOwnProperty.call(message, "originalMessageKey"))
                    $root.Protocol.MessageKey.encode(message.originalMessageKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                    writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type);
                return writer;
            };

            /**
             * Encodes the specified StatusNotificationMessage message, length delimited. Does not implicitly {@link E2E.Message.StatusNotificationMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.StatusNotificationMessage
             * @static
             * @param {E2E.Message.IStatusNotificationMessage} message StatusNotificationMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatusNotificationMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StatusNotificationMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.StatusNotificationMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.StatusNotificationMessage} StatusNotificationMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusNotificationMessage.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.E2E.Message.StatusNotificationMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.responseMessageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.originalMessageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    case 3: {
                            message.type = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a StatusNotificationMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.StatusNotificationMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.StatusNotificationMessage} StatusNotificationMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusNotificationMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StatusNotificationMessage message.
             * @function verify
             * @memberof E2E.Message.StatusNotificationMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StatusNotificationMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.responseMessageKey != null && message.hasOwnProperty("responseMessageKey")) {
                    properties._responseMessageKey = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.responseMessageKey);
                        if (error)
                            return "responseMessageKey." + error;
                    }
                }
                if (message.originalMessageKey != null && message.hasOwnProperty("originalMessageKey")) {
                    properties._originalMessageKey = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.originalMessageKey);
                        if (error)
                            return "originalMessageKey." + error;
                    }
                }
                if (message.type != null && message.hasOwnProperty("type")) {
                    properties._type = 1;
                    switch (message.type) {
                    default:
                        return "type: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a StatusNotificationMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.StatusNotificationMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.StatusNotificationMessage} StatusNotificationMessage
             */
            StatusNotificationMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.StatusNotificationMessage)
                    return object;
                var message = new $root.E2E.Message.StatusNotificationMessage();
                if (object.responseMessageKey != null) {
                    if (typeof object.responseMessageKey !== "object")
                        throw TypeError(".E2E.Message.StatusNotificationMessage.responseMessageKey: object expected");
                    message.responseMessageKey = $root.Protocol.MessageKey.fromObject(object.responseMessageKey);
                }
                if (object.originalMessageKey != null) {
                    if (typeof object.originalMessageKey !== "object")
                        throw TypeError(".E2E.Message.StatusNotificationMessage.originalMessageKey: object expected");
                    message.originalMessageKey = $root.Protocol.MessageKey.fromObject(object.originalMessageKey);
                }
                switch (object.type) {
                default:
                    if (typeof object.type === "number") {
                        message.type = object.type;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.type = 0;
                    break;
                case "STATUS_ADD_YOURS":
                case 1:
                    message.type = 1;
                    break;
                case "STATUS_RESHARE":
                case 2:
                    message.type = 2;
                    break;
                case "STATUS_QUESTION_ANSWER_RESHARE":
                case 3:
                    message.type = 3;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a StatusNotificationMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.StatusNotificationMessage
             * @static
             * @param {E2E.Message.StatusNotificationMessage} message StatusNotificationMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StatusNotificationMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.responseMessageKey != null && message.hasOwnProperty("responseMessageKey")) {
                    object.responseMessageKey = $root.Protocol.MessageKey.toObject(message.responseMessageKey, options);
                    if (options.oneofs)
                        object._responseMessageKey = "responseMessageKey";
                }
                if (message.originalMessageKey != null && message.hasOwnProperty("originalMessageKey")) {
                    object.originalMessageKey = $root.Protocol.MessageKey.toObject(message.originalMessageKey, options);
                    if (options.oneofs)
                        object._originalMessageKey = "originalMessageKey";
                }
                if (message.type != null && message.hasOwnProperty("type")) {
                    object.type = options.enums === String ? $root.E2E.Message.StatusNotificationMessage.StatusNotificationType[message.type] === undefined ? message.type : $root.E2E.Message.StatusNotificationMessage.StatusNotificationType[message.type] : message.type;
                    if (options.oneofs)
                        object._type = "type";
                }
                return object;
            };

            /**
             * Converts this StatusNotificationMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.StatusNotificationMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StatusNotificationMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for StatusNotificationMessage
             * @function getTypeUrl
             * @memberof E2E.Message.StatusNotificationMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            StatusNotificationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.StatusNotificationMessage";
            };

            /**
             * StatusNotificationType enum.
             * @name E2E.Message.StatusNotificationMessage.StatusNotificationType
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} STATUS_ADD_YOURS=1 STATUS_ADD_YOURS value
             * @property {number} STATUS_RESHARE=2 STATUS_RESHARE value
             * @property {number} STATUS_QUESTION_ANSWER_RESHARE=3 STATUS_QUESTION_ANSWER_RESHARE value
             */
            StatusNotificationMessage.StatusNotificationType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "STATUS_ADD_YOURS"] = 1;
                values[valuesById[2] = "STATUS_RESHARE"] = 2;
                values[valuesById[3] = "STATUS_QUESTION_ANSWER_RESHARE"] = 3;
                return values;
            })();

            return StatusNotificationMessage;
        })();

        Message.StatusQuestionAnswerMessage = (function() {

            /**
             * Properties of a StatusQuestionAnswerMessage.
             * @memberof E2E.Message
             * @interface IStatusQuestionAnswerMessage
             * @property {Protocol.IMessageKey|null} [key] StatusQuestionAnswerMessage key
             * @property {string|null} [text] StatusQuestionAnswerMessage text
             */

            /**
             * Constructs a new StatusQuestionAnswerMessage.
             * @memberof E2E.Message
             * @classdesc Represents a StatusQuestionAnswerMessage.
             * @implements IStatusQuestionAnswerMessage
             * @constructor
             * @param {E2E.Message.IStatusQuestionAnswerMessage=} [properties] Properties to set
             */
            function StatusQuestionAnswerMessage(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]];
            }

            /**
             * StatusQuestionAnswerMessage key.
             * @member {Protocol.IMessageKey|null|undefined} key
             * @memberof E2E.Message.StatusQuestionAnswerMessage
             * @instance
             */
            StatusQuestionAnswerMessage.prototype.key = null;

            /**
             * StatusQuestionAnswerMessage text.
             * @member {string|null|undefined} text
             * @memberof E2E.Message.StatusQuestionAnswerMessage
             * @instance
             */
            StatusQuestionAnswerMessage.prototype.text = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * StatusQuestionAnswerMessage _key.
             * @member {"key"|undefined} _key
             * @memberof E2E.Message.StatusQuestionAnswerMessage
             * @instance
             */
            Object.defineProperty(StatusQuestionAnswerMessage.prototype, "_key", {
                get: $util.oneOfGetter($oneOfFields = ["key"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StatusQuestionAnswerMessage _text.
             * @member {"text"|undefined} _text
             * @memberof E2E.Message.StatusQuestionAnswerMessage
             * @instance
             */
            Object.defineProperty(StatusQuestionAnswerMessage.prototype, "_text", {
                get: $util.oneOfGetter($oneOfFields = ["text"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new StatusQuestionAnswerMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.StatusQuestionAnswerMessage
             * @static
             * @param {E2E.Message.IStatusQuestionAnswerMessage=} [properties] Properties to set
             * @returns {E2E.Message.StatusQuestionAnswerMessage} StatusQuestionAnswerMessage instance
             */
            StatusQuestionAnswerMessage.create = function create(properties) {
                return new StatusQuestionAnswerMessage(properties);
            };

            /**
             * Encodes the specified StatusQuestionAnswerMessage message. Does not implicitly {@link E2E.Message.StatusQuestionAnswerMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.StatusQuestionAnswerMessage
             * @static
             * @param {E2E.Message.IStatusQuestionAnswerMessage} message StatusQuestionAnswerMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatusQuestionAnswerMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.key != null && Object.hasOwnProperty.call(message, "key"))
                    $root.Protocol.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.text);
                return writer;
            };

            /**
             * Encodes the specified StatusQuestionAnswerMessage message, length delimited. Does not implicitly {@link E2E.Message.StatusQuestionAnswerMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.StatusQuestionAnswerMessage
             * @static
             * @param {E2E.Message.IStatusQuestionAnswerMessage} message StatusQuestionAnswerMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatusQuestionAnswerMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StatusQuestionAnswerMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.StatusQuestionAnswerMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.StatusQuestionAnswerMessage} StatusQuestionAnswerMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusQuestionAnswerMessage.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.E2E.Message.StatusQuestionAnswerMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.key = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.text = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a StatusQuestionAnswerMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.StatusQuestionAnswerMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.StatusQuestionAnswerMessage} StatusQuestionAnswerMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusQuestionAnswerMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StatusQuestionAnswerMessage message.
             * @function verify
             * @memberof E2E.Message.StatusQuestionAnswerMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StatusQuestionAnswerMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    properties._key = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.key);
                        if (error)
                            return "key." + error;
                    }
                }
                if (message.text != null && message.hasOwnProperty("text")) {
                    properties._text = 1;
                    if (!$util.isString(message.text))
                        return "text: string expected";
                }
                return null;
            };

            /**
             * Creates a StatusQuestionAnswerMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.StatusQuestionAnswerMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.StatusQuestionAnswerMessage} StatusQuestionAnswerMessage
             */
            StatusQuestionAnswerMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.StatusQuestionAnswerMessage)
                    return object;
                var message = new $root.E2E.Message.StatusQuestionAnswerMessage();
                if (object.key != null) {
                    if (typeof object.key !== "object")
                        throw TypeError(".E2E.Message.StatusQuestionAnswerMessage.key: object expected");
                    message.key = $root.Protocol.MessageKey.fromObject(object.key);
                }
                if (object.text != null)
                    message.text = String(object.text);
                return message;
            };

            /**
             * Creates a plain object from a StatusQuestionAnswerMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.StatusQuestionAnswerMessage
             * @static
             * @param {E2E.Message.StatusQuestionAnswerMessage} message StatusQuestionAnswerMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StatusQuestionAnswerMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                    if (options.oneofs)
                        object._key = "key";
                }
                if (message.text != null && message.hasOwnProperty("text")) {
                    object.text = message.text;
                    if (options.oneofs)
                        object._text = "text";
                }
                return object;
            };

            /**
             * Converts this StatusQuestionAnswerMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.StatusQuestionAnswerMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StatusQuestionAnswerMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for StatusQuestionAnswerMessage
             * @function getTypeUrl
             * @memberof E2E.Message.StatusQuestionAnswerMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            StatusQuestionAnswerMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.StatusQuestionAnswerMessage";
            };

            return StatusQuestionAnswerMessage;
        })();

        Message.StatusQuotedMessage = (function() {

            /**
             * Properties of a StatusQuotedMessage.
             * @memberof E2E.Message
             * @interface IStatusQuotedMessage
             * @property {E2E.Message.StatusQuotedMessage.StatusQuotedMessageType|null} [type] StatusQuotedMessage type
             * @property {string|null} [text] StatusQuotedMessage text
             * @property {Uint8Array|null} [thumbnail] StatusQuotedMessage thumbnail
             * @property {Protocol.IMessageKey|null} [originalStatusId] StatusQuotedMessage originalStatusId
             */

            /**
             * Constructs a new StatusQuotedMessage.
             * @memberof E2E.Message
             * @classdesc Represents a StatusQuotedMessage.
             * @implements IStatusQuotedMessage
             * @constructor
             * @param {E2E.Message.IStatusQuotedMessage=} [properties] Properties to set
             */
            function StatusQuotedMessage(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]];
            }

            /**
             * StatusQuotedMessage type.
             * @member {E2E.Message.StatusQuotedMessage.StatusQuotedMessageType|null|undefined} type
             * @memberof E2E.Message.StatusQuotedMessage
             * @instance
             */
            StatusQuotedMessage.prototype.type = null;

            /**
             * StatusQuotedMessage text.
             * @member {string|null|undefined} text
             * @memberof E2E.Message.StatusQuotedMessage
             * @instance
             */
            StatusQuotedMessage.prototype.text = null;

            /**
             * StatusQuotedMessage thumbnail.
             * @member {Uint8Array|null|undefined} thumbnail
             * @memberof E2E.Message.StatusQuotedMessage
             * @instance
             */
            StatusQuotedMessage.prototype.thumbnail = null;

            /**
             * StatusQuotedMessage originalStatusId.
             * @member {Protocol.IMessageKey|null|undefined} originalStatusId
             * @memberof E2E.Message.StatusQuotedMessage
             * @instance
             */
            StatusQuotedMessage.prototype.originalStatusId = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * StatusQuotedMessage _type.
             * @member {"type"|undefined} _type
             * @memberof E2E.Message.StatusQuotedMessage
             * @instance
             */
            Object.defineProperty(StatusQuotedMessage.prototype, "_type", {
                get: $util.oneOfGetter($oneOfFields = ["type"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StatusQuotedMessage _text.
             * @member {"text"|undefined} _text
             * @memberof E2E.Message.StatusQuotedMessage
             * @instance
             */
            Object.defineProperty(StatusQuotedMessage.prototype, "_text", {
                get: $util.oneOfGetter($oneOfFields = ["text"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StatusQuotedMessage _thumbnail.
             * @member {"thumbnail"|undefined} _thumbnail
             * @memberof E2E.Message.StatusQuotedMessage
             * @instance
             */
            Object.defineProperty(StatusQuotedMessage.prototype, "_thumbnail", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnail"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StatusQuotedMessage _originalStatusId.
             * @member {"originalStatusId"|undefined} _originalStatusId
             * @memberof E2E.Message.StatusQuotedMessage
             * @instance
             */
            Object.defineProperty(StatusQuotedMessage.prototype, "_originalStatusId", {
                get: $util.oneOfGetter($oneOfFields = ["originalStatusId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new StatusQuotedMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.StatusQuotedMessage
             * @static
             * @param {E2E.Message.IStatusQuotedMessage=} [properties] Properties to set
             * @returns {E2E.Message.StatusQuotedMessage} StatusQuotedMessage instance
             */
            StatusQuotedMessage.create = function create(properties) {
                return new StatusQuotedMessage(properties);
            };

            /**
             * Encodes the specified StatusQuotedMessage message. Does not implicitly {@link E2E.Message.StatusQuotedMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.StatusQuotedMessage
             * @static
             * @param {E2E.Message.IStatusQuotedMessage} message StatusQuotedMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatusQuotedMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
                if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.text);
                if (message.thumbnail != null && Object.hasOwnProperty.call(message, "thumbnail"))
                    writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.thumbnail);
                if (message.originalStatusId != null && Object.hasOwnProperty.call(message, "originalStatusId"))
                    $root.Protocol.MessageKey.encode(message.originalStatusId, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified StatusQuotedMessage message, length delimited. Does not implicitly {@link E2E.Message.StatusQuotedMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.StatusQuotedMessage
             * @static
             * @param {E2E.Message.IStatusQuotedMessage} message StatusQuotedMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatusQuotedMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StatusQuotedMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.StatusQuotedMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.StatusQuotedMessage} StatusQuotedMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusQuotedMessage.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.E2E.Message.StatusQuotedMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.type = reader.int32();
                            break;
                        }
                    case 2: {
                            message.text = reader.string();
                            break;
                        }
                    case 3: {
                            message.thumbnail = reader.bytes();
                            break;
                        }
                    case 4: {
                            message.originalStatusId = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a StatusQuotedMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.StatusQuotedMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.StatusQuotedMessage} StatusQuotedMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusQuotedMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StatusQuotedMessage message.
             * @function verify
             * @memberof E2E.Message.StatusQuotedMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StatusQuotedMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.type != null && message.hasOwnProperty("type")) {
                    properties._type = 1;
                    switch (message.type) {
                    default:
                        return "type: enum value expected";
                    case 1:
                        break;
                    }
                }
                if (message.text != null && message.hasOwnProperty("text")) {
                    properties._text = 1;
                    if (!$util.isString(message.text))
                        return "text: string expected";
                }
                if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) {
                    properties._thumbnail = 1;
                    if (!(message.thumbnail && typeof message.thumbnail.length === "number" || $util.isString(message.thumbnail)))
                        return "thumbnail: buffer expected";
                }
                if (message.originalStatusId != null && message.hasOwnProperty("originalStatusId")) {
                    properties._originalStatusId = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.originalStatusId);
                        if (error)
                            return "originalStatusId." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a StatusQuotedMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.StatusQuotedMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.StatusQuotedMessage} StatusQuotedMessage
             */
            StatusQuotedMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.StatusQuotedMessage)
                    return object;
                var message = new $root.E2E.Message.StatusQuotedMessage();
                switch (object.type) {
                default:
                    if (typeof object.type === "number") {
                        message.type = object.type;
                        break;
                    }
                    break;
                case "QUESTION_ANSWER":
                case 1:
                    message.type = 1;
                    break;
                }
                if (object.text != null)
                    message.text = String(object.text);
                if (object.thumbnail != null)
                    if (typeof object.thumbnail === "string")
                        $util.base64.decode(object.thumbnail, message.thumbnail = $util.newBuffer($util.base64.length(object.thumbnail)), 0);
                    else if (object.thumbnail.length >= 0)
                        message.thumbnail = object.thumbnail;
                if (object.originalStatusId != null) {
                    if (typeof object.originalStatusId !== "object")
                        throw TypeError(".E2E.Message.StatusQuotedMessage.originalStatusId: object expected");
                    message.originalStatusId = $root.Protocol.MessageKey.fromObject(object.originalStatusId);
                }
                return message;
            };

            /**
             * Creates a plain object from a StatusQuotedMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.StatusQuotedMessage
             * @static
             * @param {E2E.Message.StatusQuotedMessage} message StatusQuotedMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StatusQuotedMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.type != null && message.hasOwnProperty("type")) {
                    object.type = options.enums === String ? $root.E2E.Message.StatusQuotedMessage.StatusQuotedMessageType[message.type] === undefined ? message.type : $root.E2E.Message.StatusQuotedMessage.StatusQuotedMessageType[message.type] : message.type;
                    if (options.oneofs)
                        object._type = "type";
                }
                if (message.text != null && message.hasOwnProperty("text")) {
                    object.text = message.text;
                    if (options.oneofs)
                        object._text = "text";
                }
                if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) {
                    object.thumbnail = options.bytes === String ? $util.base64.encode(message.thumbnail, 0, message.thumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnail) : message.thumbnail;
                    if (options.oneofs)
                        object._thumbnail = "thumbnail";
                }
                if (message.originalStatusId != null && message.hasOwnProperty("originalStatusId")) {
                    object.originalStatusId = $root.Protocol.MessageKey.toObject(message.originalStatusId, options);
                    if (options.oneofs)
                        object._originalStatusId = "originalStatusId";
                }
                return object;
            };

            /**
             * Converts this StatusQuotedMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.StatusQuotedMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StatusQuotedMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for StatusQuotedMessage
             * @function getTypeUrl
             * @memberof E2E.Message.StatusQuotedMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            StatusQuotedMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.StatusQuotedMessage";
            };

            /**
             * StatusQuotedMessageType enum.
             * @name E2E.Message.StatusQuotedMessage.StatusQuotedMessageType
             * @enum {number}
             * @property {number} QUESTION_ANSWER=1 QUESTION_ANSWER value
             */
            StatusQuotedMessage.StatusQuotedMessageType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[1] = "QUESTION_ANSWER"] = 1;
                return values;
            })();

            return StatusQuotedMessage;
        })();

        Message.StatusStickerInteractionMessage = (function() {

            /**
             * Properties of a StatusStickerInteractionMessage.
             * @memberof E2E.Message
             * @interface IStatusStickerInteractionMessage
             * @property {Protocol.IMessageKey|null} [key] StatusStickerInteractionMessage key
             * @property {string|null} [stickerKey] StatusStickerInteractionMessage stickerKey
             * @property {E2E.Message.StatusStickerInteractionMessage.StatusStickerType|null} [type] StatusStickerInteractionMessage type
             */

            /**
             * Constructs a new StatusStickerInteractionMessage.
             * @memberof E2E.Message
             * @classdesc Represents a StatusStickerInteractionMessage.
             * @implements IStatusStickerInteractionMessage
             * @constructor
             * @param {E2E.Message.IStatusStickerInteractionMessage=} [properties] Properties to set
             */
            function StatusStickerInteractionMessage(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]];
            }

            /**
             * StatusStickerInteractionMessage key.
             * @member {Protocol.IMessageKey|null|undefined} key
             * @memberof E2E.Message.StatusStickerInteractionMessage
             * @instance
             */
            StatusStickerInteractionMessage.prototype.key = null;

            /**
             * StatusStickerInteractionMessage stickerKey.
             * @member {string|null|undefined} stickerKey
             * @memberof E2E.Message.StatusStickerInteractionMessage
             * @instance
             */
            StatusStickerInteractionMessage.prototype.stickerKey = null;

            /**
             * StatusStickerInteractionMessage type.
             * @member {E2E.Message.StatusStickerInteractionMessage.StatusStickerType|null|undefined} type
             * @memberof E2E.Message.StatusStickerInteractionMessage
             * @instance
             */
            StatusStickerInteractionMessage.prototype.type = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * StatusStickerInteractionMessage _key.
             * @member {"key"|undefined} _key
             * @memberof E2E.Message.StatusStickerInteractionMessage
             * @instance
             */
            Object.defineProperty(StatusStickerInteractionMessage.prototype, "_key", {
                get: $util.oneOfGetter($oneOfFields = ["key"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StatusStickerInteractionMessage _stickerKey.
             * @member {"stickerKey"|undefined} _stickerKey
             * @memberof E2E.Message.StatusStickerInteractionMessage
             * @instance
             */
            Object.defineProperty(StatusStickerInteractionMessage.prototype, "_stickerKey", {
                get: $util.oneOfGetter($oneOfFields = ["stickerKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StatusStickerInteractionMessage _type.
             * @member {"type"|undefined} _type
             * @memberof E2E.Message.StatusStickerInteractionMessage
             * @instance
             */
            Object.defineProperty(StatusStickerInteractionMessage.prototype, "_type", {
                get: $util.oneOfGetter($oneOfFields = ["type"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new StatusStickerInteractionMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.StatusStickerInteractionMessage
             * @static
             * @param {E2E.Message.IStatusStickerInteractionMessage=} [properties] Properties to set
             * @returns {E2E.Message.StatusStickerInteractionMessage} StatusStickerInteractionMessage instance
             */
            StatusStickerInteractionMessage.create = function create(properties) {
                return new StatusStickerInteractionMessage(properties);
            };

            /**
             * Encodes the specified StatusStickerInteractionMessage message. Does not implicitly {@link E2E.Message.StatusStickerInteractionMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.StatusStickerInteractionMessage
             * @static
             * @param {E2E.Message.IStatusStickerInteractionMessage} message StatusStickerInteractionMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatusStickerInteractionMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.key != null && Object.hasOwnProperty.call(message, "key"))
                    $root.Protocol.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.stickerKey != null && Object.hasOwnProperty.call(message, "stickerKey"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.stickerKey);
                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                    writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type);
                return writer;
            };

            /**
             * Encodes the specified StatusStickerInteractionMessage message, length delimited. Does not implicitly {@link E2E.Message.StatusStickerInteractionMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.StatusStickerInteractionMessage
             * @static
             * @param {E2E.Message.IStatusStickerInteractionMessage} message StatusStickerInteractionMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatusStickerInteractionMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StatusStickerInteractionMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.StatusStickerInteractionMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.StatusStickerInteractionMessage} StatusStickerInteractionMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusStickerInteractionMessage.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.E2E.Message.StatusStickerInteractionMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.key = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.stickerKey = reader.string();
                            break;
                        }
                    case 3: {
                            message.type = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a StatusStickerInteractionMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.StatusStickerInteractionMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.StatusStickerInteractionMessage} StatusStickerInteractionMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusStickerInteractionMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StatusStickerInteractionMessage message.
             * @function verify
             * @memberof E2E.Message.StatusStickerInteractionMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StatusStickerInteractionMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    properties._key = 1;
                    {
                        var error = $root.Protocol.MessageKey.verify(message.key);
                        if (error)
                            return "key." + error;
                    }
                }
                if (message.stickerKey != null && message.hasOwnProperty("stickerKey")) {
                    properties._stickerKey = 1;
                    if (!$util.isString(message.stickerKey))
                        return "stickerKey: string expected";
                }
                if (message.type != null && message.hasOwnProperty("type")) {
                    properties._type = 1;
                    switch (message.type) {
                    default:
                        return "type: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a StatusStickerInteractionMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.StatusStickerInteractionMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.StatusStickerInteractionMessage} StatusStickerInteractionMessage
             */
            StatusStickerInteractionMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.StatusStickerInteractionMessage)
                    return object;
                var message = new $root.E2E.Message.StatusStickerInteractionMessage();
                if (object.key != null) {
                    if (typeof object.key !== "object")
                        throw TypeError(".E2E.Message.StatusStickerInteractionMessage.key: object expected");
                    message.key = $root.Protocol.MessageKey.fromObject(object.key);
                }
                if (object.stickerKey != null)
                    message.stickerKey = String(object.stickerKey);
                switch (object.type) {
                default:
                    if (typeof object.type === "number") {
                        message.type = object.type;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.type = 0;
                    break;
                case "REACTION":
                case 1:
                    message.type = 1;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a StatusStickerInteractionMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.StatusStickerInteractionMessage
             * @static
             * @param {E2E.Message.StatusStickerInteractionMessage} message StatusStickerInteractionMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StatusStickerInteractionMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.key != null && message.hasOwnProperty("key")) {
                    object.key = $root.Protocol.MessageKey.toObject(message.key, options);
                    if (options.oneofs)
                        object._key = "key";
                }
                if (message.stickerKey != null && message.hasOwnProperty("stickerKey")) {
                    object.stickerKey = message.stickerKey;
                    if (options.oneofs)
                        object._stickerKey = "stickerKey";
                }
                if (message.type != null && message.hasOwnProperty("type")) {
                    object.type = options.enums === String ? $root.E2E.Message.StatusStickerInteractionMessage.StatusStickerType[message.type] === undefined ? message.type : $root.E2E.Message.StatusStickerInteractionMessage.StatusStickerType[message.type] : message.type;
                    if (options.oneofs)
                        object._type = "type";
                }
                return object;
            };

            /**
             * Converts this StatusStickerInteractionMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.StatusStickerInteractionMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StatusStickerInteractionMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for StatusStickerInteractionMessage
             * @function getTypeUrl
             * @memberof E2E.Message.StatusStickerInteractionMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            StatusStickerInteractionMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.StatusStickerInteractionMessage";
            };

            /**
             * StatusStickerType enum.
             * @name E2E.Message.StatusStickerInteractionMessage.StatusStickerType
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} REACTION=1 REACTION value
             */
            StatusStickerInteractionMessage.StatusStickerType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "REACTION"] = 1;
                return values;
            })();

            return StatusStickerInteractionMessage;
        })();

        Message.StickerMessage = (function() {

            /**
             * Properties of a StickerMessage.
             * @memberof E2E.Message
             * @interface IStickerMessage
             * @property {string|null} [url] StickerMessage url
             * @property {Uint8Array|null} [fileSha256] StickerMessage fileSha256
             * @property {Uint8Array|null} [fileEncSha256] StickerMessage fileEncSha256
             * @property {Uint8Array|null} [mediaKey] StickerMessage mediaKey
             * @property {string|null} [mimetype] StickerMessage mimetype
             * @property {number|null} [height] StickerMessage height
             * @property {number|null} [width] StickerMessage width
             * @property {string|null} [directPath] StickerMessage directPath
             * @property {number|Long|null} [fileLength] StickerMessage fileLength
             * @property {number|Long|null} [mediaKeyTimestamp] StickerMessage mediaKeyTimestamp
             * @property {number|null} [firstFrameLength] StickerMessage firstFrameLength
             * @property {Uint8Array|null} [firstFrameSidecar] StickerMessage firstFrameSidecar
             * @property {boolean|null} [isAnimated] StickerMessage isAnimated
             * @property {Uint8Array|null} [pngThumbnail] StickerMessage pngThumbnail
             * @property {E2E.IContextInfo|null} [contextInfo] StickerMessage contextInfo
             * @property {number|Long|null} [stickerSentTs] StickerMessage stickerSentTs
             * @property {boolean|null} [isAvatar] StickerMessage isAvatar
             * @property {boolean|null} [isAiSticker] StickerMessage isAiSticker
             * @property {boolean|null} [isLottie] StickerMessage isLottie
             * @property {string|null} [accessibilityLabel] StickerMessage accessibilityLabel
             * @property {E2E.Message.MediaKeyDomain|null} [mediaKeyDomain] StickerMessage mediaKeyDomain
             */

            /**
             * Constructs a new StickerMessage.
             * @memberof E2E.Message
             * @classdesc Represents a StickerMessage.
             * @implements IStickerMessage
             * @constructor
             * @param {E2E.Message.IStickerMessage=} [properties] Properties to set
             */
            function StickerMessage(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]];
            }

            /**
             * StickerMessage url.
             * @member {string|null|undefined} url
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.url = null;

            /**
             * StickerMessage fileSha256.
             * @member {Uint8Array|null|undefined} fileSha256
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.fileSha256 = null;

            /**
             * StickerMessage fileEncSha256.
             * @member {Uint8Array|null|undefined} fileEncSha256
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.fileEncSha256 = null;

            /**
             * StickerMessage mediaKey.
             * @member {Uint8Array|null|undefined} mediaKey
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.mediaKey = null;

            /**
             * StickerMessage mimetype.
             * @member {string|null|undefined} mimetype
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.mimetype = null;

            /**
             * StickerMessage height.
             * @member {number|null|undefined} height
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.height = null;

            /**
             * StickerMessage width.
             * @member {number|null|undefined} width
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.width = null;

            /**
             * StickerMessage directPath.
             * @member {string|null|undefined} directPath
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.directPath = null;

            /**
             * StickerMessage fileLength.
             * @member {number|Long|null|undefined} fileLength
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.fileLength = null;

            /**
             * StickerMessage mediaKeyTimestamp.
             * @member {number|Long|null|undefined} mediaKeyTimestamp
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.mediaKeyTimestamp = null;

            /**
             * StickerMessage firstFrameLength.
             * @member {number|null|undefined} firstFrameLength
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.firstFrameLength = null;

            /**
             * StickerMessage firstFrameSidecar.
             * @member {Uint8Array|null|undefined} firstFrameSidecar
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.firstFrameSidecar = null;

            /**
             * StickerMessage isAnimated.
             * @member {boolean|null|undefined} isAnimated
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.isAnimated = null;

            /**
             * StickerMessage pngThumbnail.
             * @member {Uint8Array|null|undefined} pngThumbnail
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.pngThumbnail = null;

            /**
             * StickerMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.contextInfo = null;

            /**
             * StickerMessage stickerSentTs.
             * @member {number|Long|null|undefined} stickerSentTs
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.stickerSentTs = null;

            /**
             * StickerMessage isAvatar.
             * @member {boolean|null|undefined} isAvatar
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.isAvatar = null;

            /**
             * StickerMessage isAiSticker.
             * @member {boolean|null|undefined} isAiSticker
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.isAiSticker = null;

            /**
             * StickerMessage isLottie.
             * @member {boolean|null|undefined} isLottie
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.isLottie = null;

            /**
             * StickerMessage accessibilityLabel.
             * @member {string|null|undefined} accessibilityLabel
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.accessibilityLabel = null;

            /**
             * StickerMessage mediaKeyDomain.
             * @member {E2E.Message.MediaKeyDomain|null|undefined} mediaKeyDomain
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            StickerMessage.prototype.mediaKeyDomain = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * StickerMessage _url.
             * @member {"url"|undefined} _url
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_url", {
                get: $util.oneOfGetter($oneOfFields = ["url"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _fileSha256.
             * @member {"fileSha256"|undefined} _fileSha256
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_fileSha256", {
                get: $util.oneOfGetter($oneOfFields = ["fileSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _fileEncSha256.
             * @member {"fileEncSha256"|undefined} _fileEncSha256
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_fileEncSha256", {
                get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _mediaKey.
             * @member {"mediaKey"|undefined} _mediaKey
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_mediaKey", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _mimetype.
             * @member {"mimetype"|undefined} _mimetype
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_mimetype", {
                get: $util.oneOfGetter($oneOfFields = ["mimetype"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _height.
             * @member {"height"|undefined} _height
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_height", {
                get: $util.oneOfGetter($oneOfFields = ["height"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _width.
             * @member {"width"|undefined} _width
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_width", {
                get: $util.oneOfGetter($oneOfFields = ["width"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _directPath.
             * @member {"directPath"|undefined} _directPath
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_directPath", {
                get: $util.oneOfGetter($oneOfFields = ["directPath"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _fileLength.
             * @member {"fileLength"|undefined} _fileLength
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_fileLength", {
                get: $util.oneOfGetter($oneOfFields = ["fileLength"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _mediaKeyTimestamp.
             * @member {"mediaKeyTimestamp"|undefined} _mediaKeyTimestamp
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_mediaKeyTimestamp", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _firstFrameLength.
             * @member {"firstFrameLength"|undefined} _firstFrameLength
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_firstFrameLength", {
                get: $util.oneOfGetter($oneOfFields = ["firstFrameLength"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _firstFrameSidecar.
             * @member {"firstFrameSidecar"|undefined} _firstFrameSidecar
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_firstFrameSidecar", {
                get: $util.oneOfGetter($oneOfFields = ["firstFrameSidecar"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _isAnimated.
             * @member {"isAnimated"|undefined} _isAnimated
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_isAnimated", {
                get: $util.oneOfGetter($oneOfFields = ["isAnimated"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _pngThumbnail.
             * @member {"pngThumbnail"|undefined} _pngThumbnail
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_pngThumbnail", {
                get: $util.oneOfGetter($oneOfFields = ["pngThumbnail"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _stickerSentTs.
             * @member {"stickerSentTs"|undefined} _stickerSentTs
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_stickerSentTs", {
                get: $util.oneOfGetter($oneOfFields = ["stickerSentTs"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _isAvatar.
             * @member {"isAvatar"|undefined} _isAvatar
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_isAvatar", {
                get: $util.oneOfGetter($oneOfFields = ["isAvatar"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _isAiSticker.
             * @member {"isAiSticker"|undefined} _isAiSticker
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_isAiSticker", {
                get: $util.oneOfGetter($oneOfFields = ["isAiSticker"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _isLottie.
             * @member {"isLottie"|undefined} _isLottie
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_isLottie", {
                get: $util.oneOfGetter($oneOfFields = ["isLottie"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _accessibilityLabel.
             * @member {"accessibilityLabel"|undefined} _accessibilityLabel
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_accessibilityLabel", {
                get: $util.oneOfGetter($oneOfFields = ["accessibilityLabel"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerMessage _mediaKeyDomain.
             * @member {"mediaKeyDomain"|undefined} _mediaKeyDomain
             * @memberof E2E.Message.StickerMessage
             * @instance
             */
            Object.defineProperty(StickerMessage.prototype, "_mediaKeyDomain", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKeyDomain"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new StickerMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.StickerMessage
             * @static
             * @param {E2E.Message.IStickerMessage=} [properties] Properties to set
             * @returns {E2E.Message.StickerMessage} StickerMessage instance
             */
            StickerMessage.create = function create(properties) {
                return new StickerMessage(properties);
            };

            /**
             * Encodes the specified StickerMessage message. Does not implicitly {@link E2E.Message.StickerMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.StickerMessage
             * @static
             * @param {E2E.Message.IStickerMessage} message StickerMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StickerMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.url);
                if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256"))
                    writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.fileSha256);
                if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256"))
                    writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.fileEncSha256);
                if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey"))
                    writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.mediaKey);
                if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.mimetype);
                if (message.height != null && Object.hasOwnProperty.call(message, "height"))
                    writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.height);
                if (message.width != null && Object.hasOwnProperty.call(message, "width"))
                    writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.width);
                if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath"))
                    writer.uint32(/* id 8, wireType 2 =*/66).string(message.directPath);
                if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength"))
                    writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.fileLength);
                if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp"))
                    writer.uint32(/* id 10, wireType 0 =*/80).int64(message.mediaKeyTimestamp);
                if (message.firstFrameLength != null && Object.hasOwnProperty.call(message, "firstFrameLength"))
                    writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.firstFrameLength);
                if (message.firstFrameSidecar != null && Object.hasOwnProperty.call(message, "firstFrameSidecar"))
                    writer.uint32(/* id 12, wireType 2 =*/98).bytes(message.firstFrameSidecar);
                if (message.isAnimated != null && Object.hasOwnProperty.call(message, "isAnimated"))
                    writer.uint32(/* id 13, wireType 0 =*/104).bool(message.isAnimated);
                if (message.pngThumbnail != null && Object.hasOwnProperty.call(message, "pngThumbnail"))
                    writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.pngThumbnail);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
                if (message.stickerSentTs != null && Object.hasOwnProperty.call(message, "stickerSentTs"))
                    writer.uint32(/* id 18, wireType 0 =*/144).int64(message.stickerSentTs);
                if (message.isAvatar != null && Object.hasOwnProperty.call(message, "isAvatar"))
                    writer.uint32(/* id 19, wireType 0 =*/152).bool(message.isAvatar);
                if (message.isAiSticker != null && Object.hasOwnProperty.call(message, "isAiSticker"))
                    writer.uint32(/* id 20, wireType 0 =*/160).bool(message.isAiSticker);
                if (message.isLottie != null && Object.hasOwnProperty.call(message, "isLottie"))
                    writer.uint32(/* id 21, wireType 0 =*/168).bool(message.isLottie);
                if (message.accessibilityLabel != null && Object.hasOwnProperty.call(message, "accessibilityLabel"))
                    writer.uint32(/* id 22, wireType 2 =*/178).string(message.accessibilityLabel);
                if (message.mediaKeyDomain != null && Object.hasOwnProperty.call(message, "mediaKeyDomain"))
                    writer.uint32(/* id 23, wireType 0 =*/184).int32(message.mediaKeyDomain);
                return writer;
            };

            /**
             * Encodes the specified StickerMessage message, length delimited. Does not implicitly {@link E2E.Message.StickerMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.StickerMessage
             * @static
             * @param {E2E.Message.IStickerMessage} message StickerMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StickerMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StickerMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.StickerMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.StickerMessage} StickerMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StickerMessage.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.E2E.Message.StickerMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.url = reader.string();
                            break;
                        }
                    case 2: {
                            message.fileSha256 = reader.bytes();
                            break;
                        }
                    case 3: {
                            message.fileEncSha256 = reader.bytes();
                            break;
                        }
                    case 4: {
                            message.mediaKey = reader.bytes();
                            break;
                        }
                    case 5: {
                            message.mimetype = reader.string();
                            break;
                        }
                    case 6: {
                            message.height = reader.uint32();
                            break;
                        }
                    case 7: {
                            message.width = reader.uint32();
                            break;
                        }
                    case 8: {
                            message.directPath = reader.string();
                            break;
                        }
                    case 9: {
                            message.fileLength = reader.uint64();
                            break;
                        }
                    case 10: {
                            message.mediaKeyTimestamp = reader.int64();
                            break;
                        }
                    case 11: {
                            message.firstFrameLength = reader.uint32();
                            break;
                        }
                    case 12: {
                            message.firstFrameSidecar = reader.bytes();
                            break;
                        }
                    case 13: {
                            message.isAnimated = reader.bool();
                            break;
                        }
                    case 16: {
                            message.pngThumbnail = reader.bytes();
                            break;
                        }
                    case 17: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 18: {
                            message.stickerSentTs = reader.int64();
                            break;
                        }
                    case 19: {
                            message.isAvatar = reader.bool();
                            break;
                        }
                    case 20: {
                            message.isAiSticker = reader.bool();
                            break;
                        }
                    case 21: {
                            message.isLottie = reader.bool();
                            break;
                        }
                    case 22: {
                            message.accessibilityLabel = reader.string();
                            break;
                        }
                    case 23: {
                            message.mediaKeyDomain = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a StickerMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.StickerMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.StickerMessage} StickerMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StickerMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StickerMessage message.
             * @function verify
             * @memberof E2E.Message.StickerMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StickerMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.url != null && message.hasOwnProperty("url")) {
                    properties._url = 1;
                    if (!$util.isString(message.url))
                        return "url: string expected";
                }
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                    properties._fileSha256 = 1;
                    if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                        return "fileSha256: buffer expected";
                }
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                    properties._fileEncSha256 = 1;
                    if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                        return "fileEncSha256: buffer expected";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    properties._mediaKey = 1;
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                }
                if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                    properties._mimetype = 1;
                    if (!$util.isString(message.mimetype))
                        return "mimetype: string expected";
                }
                if (message.height != null && message.hasOwnProperty("height")) {
                    properties._height = 1;
                    if (!$util.isInteger(message.height))
                        return "height: integer expected";
                }
                if (message.width != null && message.hasOwnProperty("width")) {
                    properties._width = 1;
                    if (!$util.isInteger(message.width))
                        return "width: integer expected";
                }
                if (message.directPath != null && message.hasOwnProperty("directPath")) {
                    properties._directPath = 1;
                    if (!$util.isString(message.directPath))
                        return "directPath: string expected";
                }
                if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                    properties._fileLength = 1;
                    if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high)))
                        return "fileLength: integer|Long expected";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    properties._mediaKeyTimestamp = 1;
                    if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high)))
                        return "mediaKeyTimestamp: integer|Long expected";
                }
                if (message.firstFrameLength != null && message.hasOwnProperty("firstFrameLength")) {
                    properties._firstFrameLength = 1;
                    if (!$util.isInteger(message.firstFrameLength))
                        return "firstFrameLength: integer expected";
                }
                if (message.firstFrameSidecar != null && message.hasOwnProperty("firstFrameSidecar")) {
                    properties._firstFrameSidecar = 1;
                    if (!(message.firstFrameSidecar && typeof message.firstFrameSidecar.length === "number" || $util.isString(message.firstFrameSidecar)))
                        return "firstFrameSidecar: buffer expected";
                }
                if (message.isAnimated != null && message.hasOwnProperty("isAnimated")) {
                    properties._isAnimated = 1;
                    if (typeof message.isAnimated !== "boolean")
                        return "isAnimated: boolean expected";
                }
                if (message.pngThumbnail != null && message.hasOwnProperty("pngThumbnail")) {
                    properties._pngThumbnail = 1;
                    if (!(message.pngThumbnail && typeof message.pngThumbnail.length === "number" || $util.isString(message.pngThumbnail)))
                        return "pngThumbnail: buffer expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.stickerSentTs != null && message.hasOwnProperty("stickerSentTs")) {
                    properties._stickerSentTs = 1;
                    if (!$util.isInteger(message.stickerSentTs) && !(message.stickerSentTs && $util.isInteger(message.stickerSentTs.low) && $util.isInteger(message.stickerSentTs.high)))
                        return "stickerSentTs: integer|Long expected";
                }
                if (message.isAvatar != null && message.hasOwnProperty("isAvatar")) {
                    properties._isAvatar = 1;
                    if (typeof message.isAvatar !== "boolean")
                        return "isAvatar: boolean expected";
                }
                if (message.isAiSticker != null && message.hasOwnProperty("isAiSticker")) {
                    properties._isAiSticker = 1;
                    if (typeof message.isAiSticker !== "boolean")
                        return "isAiSticker: boolean expected";
                }
                if (message.isLottie != null && message.hasOwnProperty("isLottie")) {
                    properties._isLottie = 1;
                    if (typeof message.isLottie !== "boolean")
                        return "isLottie: boolean expected";
                }
                if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) {
                    properties._accessibilityLabel = 1;
                    if (!$util.isString(message.accessibilityLabel))
                        return "accessibilityLabel: string expected";
                }
                if (message.mediaKeyDomain != null && message.hasOwnProperty("mediaKeyDomain")) {
                    properties._mediaKeyDomain = 1;
                    switch (message.mediaKeyDomain) {
                    default:
                        return "mediaKeyDomain: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a StickerMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.StickerMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.StickerMessage} StickerMessage
             */
            StickerMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.StickerMessage)
                    return object;
                var message = new $root.E2E.Message.StickerMessage();
                if (object.url != null)
                    message.url = String(object.url);
                if (object.fileSha256 != null)
                    if (typeof object.fileSha256 === "string")
                        $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0);
                    else if (object.fileSha256.length >= 0)
                        message.fileSha256 = object.fileSha256;
                if (object.fileEncSha256 != null)
                    if (typeof object.fileEncSha256 === "string")
                        $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0);
                    else if (object.fileEncSha256.length >= 0)
                        message.fileEncSha256 = object.fileEncSha256;
                if (object.mediaKey != null)
                    if (typeof object.mediaKey === "string")
                        $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0);
                    else if (object.mediaKey.length >= 0)
                        message.mediaKey = object.mediaKey;
                if (object.mimetype != null)
                    message.mimetype = String(object.mimetype);
                if (object.height != null)
                    message.height = object.height >>> 0;
                if (object.width != null)
                    message.width = object.width >>> 0;
                if (object.directPath != null)
                    message.directPath = String(object.directPath);
                if (object.fileLength != null)
                    if ($util.Long)
                        (message.fileLength = $util.Long.fromValue(object.fileLength)).unsigned = true;
                    else if (typeof object.fileLength === "string")
                        message.fileLength = parseInt(object.fileLength, 10);
                    else if (typeof object.fileLength === "number")
                        message.fileLength = object.fileLength;
                    else if (typeof object.fileLength === "object")
                        message.fileLength = new $util.LongBits(object.fileLength.low >>> 0, object.fileLength.high >>> 0).toNumber(true);
                if (object.mediaKeyTimestamp != null)
                    if ($util.Long)
                        (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false;
                    else if (typeof object.mediaKeyTimestamp === "string")
                        message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10);
                    else if (typeof object.mediaKeyTimestamp === "number")
                        message.mediaKeyTimestamp = object.mediaKeyTimestamp;
                    else if (typeof object.mediaKeyTimestamp === "object")
                        message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber();
                if (object.firstFrameLength != null)
                    message.firstFrameLength = object.firstFrameLength >>> 0;
                if (object.firstFrameSidecar != null)
                    if (typeof object.firstFrameSidecar === "string")
                        $util.base64.decode(object.firstFrameSidecar, message.firstFrameSidecar = $util.newBuffer($util.base64.length(object.firstFrameSidecar)), 0);
                    else if (object.firstFrameSidecar.length >= 0)
                        message.firstFrameSidecar = object.firstFrameSidecar;
                if (object.isAnimated != null)
                    message.isAnimated = Boolean(object.isAnimated);
                if (object.pngThumbnail != null)
                    if (typeof object.pngThumbnail === "string")
                        $util.base64.decode(object.pngThumbnail, message.pngThumbnail = $util.newBuffer($util.base64.length(object.pngThumbnail)), 0);
                    else if (object.pngThumbnail.length >= 0)
                        message.pngThumbnail = object.pngThumbnail;
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.StickerMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                if (object.stickerSentTs != null)
                    if ($util.Long)
                        (message.stickerSentTs = $util.Long.fromValue(object.stickerSentTs)).unsigned = false;
                    else if (typeof object.stickerSentTs === "string")
                        message.stickerSentTs = parseInt(object.stickerSentTs, 10);
                    else if (typeof object.stickerSentTs === "number")
                        message.stickerSentTs = object.stickerSentTs;
                    else if (typeof object.stickerSentTs === "object")
                        message.stickerSentTs = new $util.LongBits(object.stickerSentTs.low >>> 0, object.stickerSentTs.high >>> 0).toNumber();
                if (object.isAvatar != null)
                    message.isAvatar = Boolean(object.isAvatar);
                if (object.isAiSticker != null)
                    message.isAiSticker = Boolean(object.isAiSticker);
                if (object.isLottie != null)
                    message.isLottie = Boolean(object.isLottie);
                if (object.accessibilityLabel != null)
                    message.accessibilityLabel = String(object.accessibilityLabel);
                switch (object.mediaKeyDomain) {
                default:
                    if (typeof object.mediaKeyDomain === "number") {
                        message.mediaKeyDomain = object.mediaKeyDomain;
                        break;
                    }
                    break;
                case "UNSET":
                case 0:
                    message.mediaKeyDomain = 0;
                    break;
                case "E2EE_CHAT":
                case 1:
                    message.mediaKeyDomain = 1;
                    break;
                case "STATUS":
                case 2:
                    message.mediaKeyDomain = 2;
                    break;
                case "CAPI":
                case 3:
                    message.mediaKeyDomain = 3;
                    break;
                case "BOT":
                case 4:
                    message.mediaKeyDomain = 4;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a StickerMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.StickerMessage
             * @static
             * @param {E2E.Message.StickerMessage} message StickerMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StickerMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.url != null && message.hasOwnProperty("url")) {
                    object.url = message.url;
                    if (options.oneofs)
                        object._url = "url";
                }
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                    object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256;
                    if (options.oneofs)
                        object._fileSha256 = "fileSha256";
                }
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                    object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256;
                    if (options.oneofs)
                        object._fileEncSha256 = "fileEncSha256";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey;
                    if (options.oneofs)
                        object._mediaKey = "mediaKey";
                }
                if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                    object.mimetype = message.mimetype;
                    if (options.oneofs)
                        object._mimetype = "mimetype";
                }
                if (message.height != null && message.hasOwnProperty("height")) {
                    object.height = message.height;
                    if (options.oneofs)
                        object._height = "height";
                }
                if (message.width != null && message.hasOwnProperty("width")) {
                    object.width = message.width;
                    if (options.oneofs)
                        object._width = "width";
                }
                if (message.directPath != null && message.hasOwnProperty("directPath")) {
                    object.directPath = message.directPath;
                    if (options.oneofs)
                        object._directPath = "directPath";
                }
                if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                    if (typeof message.fileLength === "number")
                        object.fileLength = options.longs === String ? String(message.fileLength) : message.fileLength;
                    else
                        object.fileLength = options.longs === String ? $util.Long.prototype.toString.call(message.fileLength) : options.longs === Number ? new $util.LongBits(message.fileLength.low >>> 0, message.fileLength.high >>> 0).toNumber(true) : message.fileLength;
                    if (options.oneofs)
                        object._fileLength = "fileLength";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    if (typeof message.mediaKeyTimestamp === "number")
                        object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp;
                    else
                        object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp;
                    if (options.oneofs)
                        object._mediaKeyTimestamp = "mediaKeyTimestamp";
                }
                if (message.firstFrameLength != null && message.hasOwnProperty("firstFrameLength")) {
                    object.firstFrameLength = message.firstFrameLength;
                    if (options.oneofs)
                        object._firstFrameLength = "firstFrameLength";
                }
                if (message.firstFrameSidecar != null && message.hasOwnProperty("firstFrameSidecar")) {
                    object.firstFrameSidecar = options.bytes === String ? $util.base64.encode(message.firstFrameSidecar, 0, message.firstFrameSidecar.length) : options.bytes === Array ? Array.prototype.slice.call(message.firstFrameSidecar) : message.firstFrameSidecar;
                    if (options.oneofs)
                        object._firstFrameSidecar = "firstFrameSidecar";
                }
                if (message.isAnimated != null && message.hasOwnProperty("isAnimated")) {
                    object.isAnimated = message.isAnimated;
                    if (options.oneofs)
                        object._isAnimated = "isAnimated";
                }
                if (message.pngThumbnail != null && message.hasOwnProperty("pngThumbnail")) {
                    object.pngThumbnail = options.bytes === String ? $util.base64.encode(message.pngThumbnail, 0, message.pngThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.pngThumbnail) : message.pngThumbnail;
                    if (options.oneofs)
                        object._pngThumbnail = "pngThumbnail";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.stickerSentTs != null && message.hasOwnProperty("stickerSentTs")) {
                    if (typeof message.stickerSentTs === "number")
                        object.stickerSentTs = options.longs === String ? String(message.stickerSentTs) : message.stickerSentTs;
                    else
                        object.stickerSentTs = options.longs === String ? $util.Long.prototype.toString.call(message.stickerSentTs) : options.longs === Number ? new $util.LongBits(message.stickerSentTs.low >>> 0, message.stickerSentTs.high >>> 0).toNumber() : message.stickerSentTs;
                    if (options.oneofs)
                        object._stickerSentTs = "stickerSentTs";
                }
                if (message.isAvatar != null && message.hasOwnProperty("isAvatar")) {
                    object.isAvatar = message.isAvatar;
                    if (options.oneofs)
                        object._isAvatar = "isAvatar";
                }
                if (message.isAiSticker != null && message.hasOwnProperty("isAiSticker")) {
                    object.isAiSticker = message.isAiSticker;
                    if (options.oneofs)
                        object._isAiSticker = "isAiSticker";
                }
                if (message.isLottie != null && message.hasOwnProperty("isLottie")) {
                    object.isLottie = message.isLottie;
                    if (options.oneofs)
                        object._isLottie = "isLottie";
                }
                if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) {
                    object.accessibilityLabel = message.accessibilityLabel;
                    if (options.oneofs)
                        object._accessibilityLabel = "accessibilityLabel";
                }
                if (message.mediaKeyDomain != null && message.hasOwnProperty("mediaKeyDomain")) {
                    object.mediaKeyDomain = options.enums === String ? $root.E2E.Message.MediaKeyDomain[message.mediaKeyDomain] === undefined ? message.mediaKeyDomain : $root.E2E.Message.MediaKeyDomain[message.mediaKeyDomain] : message.mediaKeyDomain;
                    if (options.oneofs)
                        object._mediaKeyDomain = "mediaKeyDomain";
                }
                return object;
            };

            /**
             * Converts this StickerMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.StickerMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StickerMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for StickerMessage
             * @function getTypeUrl
             * @memberof E2E.Message.StickerMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            StickerMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.StickerMessage";
            };

            return StickerMessage;
        })();

        Message.StickerPackMessage = (function() {

            /**
             * Properties of a StickerPackMessage.
             * @memberof E2E.Message
             * @interface IStickerPackMessage
             * @property {string|null} [stickerPackId] StickerPackMessage stickerPackId
             * @property {string|null} [name] StickerPackMessage name
             * @property {string|null} [publisher] StickerPackMessage publisher
             * @property {Array.<E2E.Message.StickerPackMessage.ISticker>|null} [stickers] StickerPackMessage stickers
             * @property {number|Long|null} [fileLength] StickerPackMessage fileLength
             * @property {Uint8Array|null} [fileSha256] StickerPackMessage fileSha256
             * @property {Uint8Array|null} [fileEncSha256] StickerPackMessage fileEncSha256
             * @property {Uint8Array|null} [mediaKey] StickerPackMessage mediaKey
             * @property {string|null} [directPath] StickerPackMessage directPath
             * @property {string|null} [caption] StickerPackMessage caption
             * @property {E2E.IContextInfo|null} [contextInfo] StickerPackMessage contextInfo
             * @property {string|null} [packDescription] StickerPackMessage packDescription
             * @property {number|Long|null} [mediaKeyTimestamp] StickerPackMessage mediaKeyTimestamp
             * @property {string|null} [trayIconFileName] StickerPackMessage trayIconFileName
             * @property {string|null} [thumbnailDirectPath] StickerPackMessage thumbnailDirectPath
             * @property {Uint8Array|null} [thumbnailSha256] StickerPackMessage thumbnailSha256
             * @property {Uint8Array|null} [thumbnailEncSha256] StickerPackMessage thumbnailEncSha256
             * @property {number|null} [thumbnailHeight] StickerPackMessage thumbnailHeight
             * @property {number|null} [thumbnailWidth] StickerPackMessage thumbnailWidth
             * @property {string|null} [imageDataHash] StickerPackMessage imageDataHash
             * @property {number|Long|null} [stickerPackSize] StickerPackMessage stickerPackSize
             * @property {E2E.Message.StickerPackMessage.StickerPackOrigin|null} [stickerPackOrigin] StickerPackMessage stickerPackOrigin
             */

            /**
             * Constructs a new StickerPackMessage.
             * @memberof E2E.Message
             * @classdesc Represents a StickerPackMessage.
             * @implements IStickerPackMessage
             * @constructor
             * @param {E2E.Message.IStickerPackMessage=} [properties] Properties to set
             */
            function StickerPackMessage(properties) {
                this.stickers = [];
                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]];
            }

            /**
             * StickerPackMessage stickerPackId.
             * @member {string|null|undefined} stickerPackId
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.stickerPackId = null;

            /**
             * StickerPackMessage name.
             * @member {string|null|undefined} name
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.name = null;

            /**
             * StickerPackMessage publisher.
             * @member {string|null|undefined} publisher
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.publisher = null;

            /**
             * StickerPackMessage stickers.
             * @member {Array.<E2E.Message.StickerPackMessage.ISticker>} stickers
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.stickers = $util.emptyArray;

            /**
             * StickerPackMessage fileLength.
             * @member {number|Long|null|undefined} fileLength
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.fileLength = null;

            /**
             * StickerPackMessage fileSha256.
             * @member {Uint8Array|null|undefined} fileSha256
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.fileSha256 = null;

            /**
             * StickerPackMessage fileEncSha256.
             * @member {Uint8Array|null|undefined} fileEncSha256
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.fileEncSha256 = null;

            /**
             * StickerPackMessage mediaKey.
             * @member {Uint8Array|null|undefined} mediaKey
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.mediaKey = null;

            /**
             * StickerPackMessage directPath.
             * @member {string|null|undefined} directPath
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.directPath = null;

            /**
             * StickerPackMessage caption.
             * @member {string|null|undefined} caption
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.caption = null;

            /**
             * StickerPackMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.contextInfo = null;

            /**
             * StickerPackMessage packDescription.
             * @member {string|null|undefined} packDescription
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.packDescription = null;

            /**
             * StickerPackMessage mediaKeyTimestamp.
             * @member {number|Long|null|undefined} mediaKeyTimestamp
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.mediaKeyTimestamp = null;

            /**
             * StickerPackMessage trayIconFileName.
             * @member {string|null|undefined} trayIconFileName
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.trayIconFileName = null;

            /**
             * StickerPackMessage thumbnailDirectPath.
             * @member {string|null|undefined} thumbnailDirectPath
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.thumbnailDirectPath = null;

            /**
             * StickerPackMessage thumbnailSha256.
             * @member {Uint8Array|null|undefined} thumbnailSha256
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.thumbnailSha256 = null;

            /**
             * StickerPackMessage thumbnailEncSha256.
             * @member {Uint8Array|null|undefined} thumbnailEncSha256
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.thumbnailEncSha256 = null;

            /**
             * StickerPackMessage thumbnailHeight.
             * @member {number|null|undefined} thumbnailHeight
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.thumbnailHeight = null;

            /**
             * StickerPackMessage thumbnailWidth.
             * @member {number|null|undefined} thumbnailWidth
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.thumbnailWidth = null;

            /**
             * StickerPackMessage imageDataHash.
             * @member {string|null|undefined} imageDataHash
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.imageDataHash = null;

            /**
             * StickerPackMessage stickerPackSize.
             * @member {number|Long|null|undefined} stickerPackSize
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.stickerPackSize = null;

            /**
             * StickerPackMessage stickerPackOrigin.
             * @member {E2E.Message.StickerPackMessage.StickerPackOrigin|null|undefined} stickerPackOrigin
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            StickerPackMessage.prototype.stickerPackOrigin = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * StickerPackMessage _stickerPackId.
             * @member {"stickerPackId"|undefined} _stickerPackId
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_stickerPackId", {
                get: $util.oneOfGetter($oneOfFields = ["stickerPackId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _name.
             * @member {"name"|undefined} _name
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_name", {
                get: $util.oneOfGetter($oneOfFields = ["name"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _publisher.
             * @member {"publisher"|undefined} _publisher
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_publisher", {
                get: $util.oneOfGetter($oneOfFields = ["publisher"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _fileLength.
             * @member {"fileLength"|undefined} _fileLength
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_fileLength", {
                get: $util.oneOfGetter($oneOfFields = ["fileLength"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _fileSha256.
             * @member {"fileSha256"|undefined} _fileSha256
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_fileSha256", {
                get: $util.oneOfGetter($oneOfFields = ["fileSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _fileEncSha256.
             * @member {"fileEncSha256"|undefined} _fileEncSha256
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_fileEncSha256", {
                get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _mediaKey.
             * @member {"mediaKey"|undefined} _mediaKey
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_mediaKey", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _directPath.
             * @member {"directPath"|undefined} _directPath
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_directPath", {
                get: $util.oneOfGetter($oneOfFields = ["directPath"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _caption.
             * @member {"caption"|undefined} _caption
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_caption", {
                get: $util.oneOfGetter($oneOfFields = ["caption"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _packDescription.
             * @member {"packDescription"|undefined} _packDescription
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_packDescription", {
                get: $util.oneOfGetter($oneOfFields = ["packDescription"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _mediaKeyTimestamp.
             * @member {"mediaKeyTimestamp"|undefined} _mediaKeyTimestamp
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_mediaKeyTimestamp", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _trayIconFileName.
             * @member {"trayIconFileName"|undefined} _trayIconFileName
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_trayIconFileName", {
                get: $util.oneOfGetter($oneOfFields = ["trayIconFileName"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _thumbnailDirectPath.
             * @member {"thumbnailDirectPath"|undefined} _thumbnailDirectPath
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_thumbnailDirectPath", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailDirectPath"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _thumbnailSha256.
             * @member {"thumbnailSha256"|undefined} _thumbnailSha256
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_thumbnailSha256", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _thumbnailEncSha256.
             * @member {"thumbnailEncSha256"|undefined} _thumbnailEncSha256
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_thumbnailEncSha256", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailEncSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _thumbnailHeight.
             * @member {"thumbnailHeight"|undefined} _thumbnailHeight
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_thumbnailHeight", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailHeight"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _thumbnailWidth.
             * @member {"thumbnailWidth"|undefined} _thumbnailWidth
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_thumbnailWidth", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailWidth"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _imageDataHash.
             * @member {"imageDataHash"|undefined} _imageDataHash
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_imageDataHash", {
                get: $util.oneOfGetter($oneOfFields = ["imageDataHash"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _stickerPackSize.
             * @member {"stickerPackSize"|undefined} _stickerPackSize
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_stickerPackSize", {
                get: $util.oneOfGetter($oneOfFields = ["stickerPackSize"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerPackMessage _stickerPackOrigin.
             * @member {"stickerPackOrigin"|undefined} _stickerPackOrigin
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             */
            Object.defineProperty(StickerPackMessage.prototype, "_stickerPackOrigin", {
                get: $util.oneOfGetter($oneOfFields = ["stickerPackOrigin"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new StickerPackMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.StickerPackMessage
             * @static
             * @param {E2E.Message.IStickerPackMessage=} [properties] Properties to set
             * @returns {E2E.Message.StickerPackMessage} StickerPackMessage instance
             */
            StickerPackMessage.create = function create(properties) {
                return new StickerPackMessage(properties);
            };

            /**
             * Encodes the specified StickerPackMessage message. Does not implicitly {@link E2E.Message.StickerPackMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.StickerPackMessage
             * @static
             * @param {E2E.Message.IStickerPackMessage} message StickerPackMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StickerPackMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.stickerPackId != null && Object.hasOwnProperty.call(message, "stickerPackId"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.stickerPackId);
                if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.name);
                if (message.publisher != null && Object.hasOwnProperty.call(message, "publisher"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.publisher);
                if (message.stickers != null && message.stickers.length)
                    for (var i = 0; i < message.stickers.length; ++i)
                        $root.E2E.Message.StickerPackMessage.Sticker.encode(message.stickers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength"))
                    writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.fileLength);
                if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256"))
                    writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.fileSha256);
                if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256"))
                    writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.fileEncSha256);
                if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey"))
                    writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.mediaKey);
                if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath"))
                    writer.uint32(/* id 9, wireType 2 =*/74).string(message.directPath);
                if (message.caption != null && Object.hasOwnProperty.call(message, "caption"))
                    writer.uint32(/* id 10, wireType 2 =*/82).string(message.caption);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
                if (message.packDescription != null && Object.hasOwnProperty.call(message, "packDescription"))
                    writer.uint32(/* id 12, wireType 2 =*/98).string(message.packDescription);
                if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp"))
                    writer.uint32(/* id 13, wireType 0 =*/104).int64(message.mediaKeyTimestamp);
                if (message.trayIconFileName != null && Object.hasOwnProperty.call(message, "trayIconFileName"))
                    writer.uint32(/* id 14, wireType 2 =*/114).string(message.trayIconFileName);
                if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath"))
                    writer.uint32(/* id 15, wireType 2 =*/122).string(message.thumbnailDirectPath);
                if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256"))
                    writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.thumbnailSha256);
                if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256"))
                    writer.uint32(/* id 17, wireType 2 =*/138).bytes(message.thumbnailEncSha256);
                if (message.thumbnailHeight != null && Object.hasOwnProperty.call(message, "thumbnailHeight"))
                    writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.thumbnailHeight);
                if (message.thumbnailWidth != null && Object.hasOwnProperty.call(message, "thumbnailWidth"))
                    writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.thumbnailWidth);
                if (message.imageDataHash != null && Object.hasOwnProperty.call(message, "imageDataHash"))
                    writer.uint32(/* id 20, wireType 2 =*/162).string(message.imageDataHash);
                if (message.stickerPackSize != null && Object.hasOwnProperty.call(message, "stickerPackSize"))
                    writer.uint32(/* id 21, wireType 0 =*/168).uint64(message.stickerPackSize);
                if (message.stickerPackOrigin != null && Object.hasOwnProperty.call(message, "stickerPackOrigin"))
                    writer.uint32(/* id 22, wireType 0 =*/176).int32(message.stickerPackOrigin);
                return writer;
            };

            /**
             * Encodes the specified StickerPackMessage message, length delimited. Does not implicitly {@link E2E.Message.StickerPackMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.StickerPackMessage
             * @static
             * @param {E2E.Message.IStickerPackMessage} message StickerPackMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StickerPackMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StickerPackMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.StickerPackMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.StickerPackMessage} StickerPackMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StickerPackMessage.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.E2E.Message.StickerPackMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.stickerPackId = reader.string();
                            break;
                        }
                    case 2: {
                            message.name = reader.string();
                            break;
                        }
                    case 3: {
                            message.publisher = reader.string();
                            break;
                        }
                    case 4: {
                            if (!(message.stickers && message.stickers.length))
                                message.stickers = [];
                            message.stickers.push($root.E2E.Message.StickerPackMessage.Sticker.decode(reader, reader.uint32()));
                            break;
                        }
                    case 5: {
                            message.fileLength = reader.uint64();
                            break;
                        }
                    case 6: {
                            message.fileSha256 = reader.bytes();
                            break;
                        }
                    case 7: {
                            message.fileEncSha256 = reader.bytes();
                            break;
                        }
                    case 8: {
                            message.mediaKey = reader.bytes();
                            break;
                        }
                    case 9: {
                            message.directPath = reader.string();
                            break;
                        }
                    case 10: {
                            message.caption = reader.string();
                            break;
                        }
                    case 11: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 12: {
                            message.packDescription = reader.string();
                            break;
                        }
                    case 13: {
                            message.mediaKeyTimestamp = reader.int64();
                            break;
                        }
                    case 14: {
                            message.trayIconFileName = reader.string();
                            break;
                        }
                    case 15: {
                            message.thumbnailDirectPath = reader.string();
                            break;
                        }
                    case 16: {
                            message.thumbnailSha256 = reader.bytes();
                            break;
                        }
                    case 17: {
                            message.thumbnailEncSha256 = reader.bytes();
                            break;
                        }
                    case 18: {
                            message.thumbnailHeight = reader.uint32();
                            break;
                        }
                    case 19: {
                            message.thumbnailWidth = reader.uint32();
                            break;
                        }
                    case 20: {
                            message.imageDataHash = reader.string();
                            break;
                        }
                    case 21: {
                            message.stickerPackSize = reader.uint64();
                            break;
                        }
                    case 22: {
                            message.stickerPackOrigin = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a StickerPackMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.StickerPackMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.StickerPackMessage} StickerPackMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StickerPackMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StickerPackMessage message.
             * @function verify
             * @memberof E2E.Message.StickerPackMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StickerPackMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.stickerPackId != null && message.hasOwnProperty("stickerPackId")) {
                    properties._stickerPackId = 1;
                    if (!$util.isString(message.stickerPackId))
                        return "stickerPackId: string expected";
                }
                if (message.name != null && message.hasOwnProperty("name")) {
                    properties._name = 1;
                    if (!$util.isString(message.name))
                        return "name: string expected";
                }
                if (message.publisher != null && message.hasOwnProperty("publisher")) {
                    properties._publisher = 1;
                    if (!$util.isString(message.publisher))
                        return "publisher: string expected";
                }
                if (message.stickers != null && message.hasOwnProperty("stickers")) {
                    if (!Array.isArray(message.stickers))
                        return "stickers: array expected";
                    for (var i = 0; i < message.stickers.length; ++i) {
                        var error = $root.E2E.Message.StickerPackMessage.Sticker.verify(message.stickers[i]);
                        if (error)
                            return "stickers." + error;
                    }
                }
                if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                    properties._fileLength = 1;
                    if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high)))
                        return "fileLength: integer|Long expected";
                }
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                    properties._fileSha256 = 1;
                    if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                        return "fileSha256: buffer expected";
                }
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                    properties._fileEncSha256 = 1;
                    if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                        return "fileEncSha256: buffer expected";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    properties._mediaKey = 1;
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                }
                if (message.directPath != null && message.hasOwnProperty("directPath")) {
                    properties._directPath = 1;
                    if (!$util.isString(message.directPath))
                        return "directPath: string expected";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    properties._caption = 1;
                    if (!$util.isString(message.caption))
                        return "caption: string expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.packDescription != null && message.hasOwnProperty("packDescription")) {
                    properties._packDescription = 1;
                    if (!$util.isString(message.packDescription))
                        return "packDescription: string expected";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    properties._mediaKeyTimestamp = 1;
                    if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high)))
                        return "mediaKeyTimestamp: integer|Long expected";
                }
                if (message.trayIconFileName != null && message.hasOwnProperty("trayIconFileName")) {
                    properties._trayIconFileName = 1;
                    if (!$util.isString(message.trayIconFileName))
                        return "trayIconFileName: string expected";
                }
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) {
                    properties._thumbnailDirectPath = 1;
                    if (!$util.isString(message.thumbnailDirectPath))
                        return "thumbnailDirectPath: string expected";
                }
                if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) {
                    properties._thumbnailSha256 = 1;
                    if (!(message.thumbnailSha256 && typeof message.thumbnailSha256.length === "number" || $util.isString(message.thumbnailSha256)))
                        return "thumbnailSha256: buffer expected";
                }
                if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) {
                    properties._thumbnailEncSha256 = 1;
                    if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256)))
                        return "thumbnailEncSha256: buffer expected";
                }
                if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) {
                    properties._thumbnailHeight = 1;
                    if (!$util.isInteger(message.thumbnailHeight))
                        return "thumbnailHeight: integer expected";
                }
                if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) {
                    properties._thumbnailWidth = 1;
                    if (!$util.isInteger(message.thumbnailWidth))
                        return "thumbnailWidth: integer expected";
                }
                if (message.imageDataHash != null && message.hasOwnProperty("imageDataHash")) {
                    properties._imageDataHash = 1;
                    if (!$util.isString(message.imageDataHash))
                        return "imageDataHash: string expected";
                }
                if (message.stickerPackSize != null && message.hasOwnProperty("stickerPackSize")) {
                    properties._stickerPackSize = 1;
                    if (!$util.isInteger(message.stickerPackSize) && !(message.stickerPackSize && $util.isInteger(message.stickerPackSize.low) && $util.isInteger(message.stickerPackSize.high)))
                        return "stickerPackSize: integer|Long expected";
                }
                if (message.stickerPackOrigin != null && message.hasOwnProperty("stickerPackOrigin")) {
                    properties._stickerPackOrigin = 1;
                    switch (message.stickerPackOrigin) {
                    default:
                        return "stickerPackOrigin: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a StickerPackMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.StickerPackMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.StickerPackMessage} StickerPackMessage
             */
            StickerPackMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.StickerPackMessage)
                    return object;
                var message = new $root.E2E.Message.StickerPackMessage();
                if (object.stickerPackId != null)
                    message.stickerPackId = String(object.stickerPackId);
                if (object.name != null)
                    message.name = String(object.name);
                if (object.publisher != null)
                    message.publisher = String(object.publisher);
                if (object.stickers) {
                    if (!Array.isArray(object.stickers))
                        throw TypeError(".E2E.Message.StickerPackMessage.stickers: array expected");
                    message.stickers = [];
                    for (var i = 0; i < object.stickers.length; ++i) {
                        if (typeof object.stickers[i] !== "object")
                            throw TypeError(".E2E.Message.StickerPackMessage.stickers: object expected");
                        message.stickers[i] = $root.E2E.Message.StickerPackMessage.Sticker.fromObject(object.stickers[i]);
                    }
                }
                if (object.fileLength != null)
                    if ($util.Long)
                        (message.fileLength = $util.Long.fromValue(object.fileLength)).unsigned = true;
                    else if (typeof object.fileLength === "string")
                        message.fileLength = parseInt(object.fileLength, 10);
                    else if (typeof object.fileLength === "number")
                        message.fileLength = object.fileLength;
                    else if (typeof object.fileLength === "object")
                        message.fileLength = new $util.LongBits(object.fileLength.low >>> 0, object.fileLength.high >>> 0).toNumber(true);
                if (object.fileSha256 != null)
                    if (typeof object.fileSha256 === "string")
                        $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0);
                    else if (object.fileSha256.length >= 0)
                        message.fileSha256 = object.fileSha256;
                if (object.fileEncSha256 != null)
                    if (typeof object.fileEncSha256 === "string")
                        $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0);
                    else if (object.fileEncSha256.length >= 0)
                        message.fileEncSha256 = object.fileEncSha256;
                if (object.mediaKey != null)
                    if (typeof object.mediaKey === "string")
                        $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0);
                    else if (object.mediaKey.length >= 0)
                        message.mediaKey = object.mediaKey;
                if (object.directPath != null)
                    message.directPath = String(object.directPath);
                if (object.caption != null)
                    message.caption = String(object.caption);
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.StickerPackMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                if (object.packDescription != null)
                    message.packDescription = String(object.packDescription);
                if (object.mediaKeyTimestamp != null)
                    if ($util.Long)
                        (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false;
                    else if (typeof object.mediaKeyTimestamp === "string")
                        message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10);
                    else if (typeof object.mediaKeyTimestamp === "number")
                        message.mediaKeyTimestamp = object.mediaKeyTimestamp;
                    else if (typeof object.mediaKeyTimestamp === "object")
                        message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber();
                if (object.trayIconFileName != null)
                    message.trayIconFileName = String(object.trayIconFileName);
                if (object.thumbnailDirectPath != null)
                    message.thumbnailDirectPath = String(object.thumbnailDirectPath);
                if (object.thumbnailSha256 != null)
                    if (typeof object.thumbnailSha256 === "string")
                        $util.base64.decode(object.thumbnailSha256, message.thumbnailSha256 = $util.newBuffer($util.base64.length(object.thumbnailSha256)), 0);
                    else if (object.thumbnailSha256.length >= 0)
                        message.thumbnailSha256 = object.thumbnailSha256;
                if (object.thumbnailEncSha256 != null)
                    if (typeof object.thumbnailEncSha256 === "string")
                        $util.base64.decode(object.thumbnailEncSha256, message.thumbnailEncSha256 = $util.newBuffer($util.base64.length(object.thumbnailEncSha256)), 0);
                    else if (object.thumbnailEncSha256.length >= 0)
                        message.thumbnailEncSha256 = object.thumbnailEncSha256;
                if (object.thumbnailHeight != null)
                    message.thumbnailHeight = object.thumbnailHeight >>> 0;
                if (object.thumbnailWidth != null)
                    message.thumbnailWidth = object.thumbnailWidth >>> 0;
                if (object.imageDataHash != null)
                    message.imageDataHash = String(object.imageDataHash);
                if (object.stickerPackSize != null)
                    if ($util.Long)
                        (message.stickerPackSize = $util.Long.fromValue(object.stickerPackSize)).unsigned = true;
                    else if (typeof object.stickerPackSize === "string")
                        message.stickerPackSize = parseInt(object.stickerPackSize, 10);
                    else if (typeof object.stickerPackSize === "number")
                        message.stickerPackSize = object.stickerPackSize;
                    else if (typeof object.stickerPackSize === "object")
                        message.stickerPackSize = new $util.LongBits(object.stickerPackSize.low >>> 0, object.stickerPackSize.high >>> 0).toNumber(true);
                switch (object.stickerPackOrigin) {
                default:
                    if (typeof object.stickerPackOrigin === "number") {
                        message.stickerPackOrigin = object.stickerPackOrigin;
                        break;
                    }
                    break;
                case "FIRST_PARTY":
                case 0:
                    message.stickerPackOrigin = 0;
                    break;
                case "THIRD_PARTY":
                case 1:
                    message.stickerPackOrigin = 1;
                    break;
                case "USER_CREATED":
                case 2:
                    message.stickerPackOrigin = 2;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a StickerPackMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.StickerPackMessage
             * @static
             * @param {E2E.Message.StickerPackMessage} message StickerPackMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StickerPackMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.stickers = [];
                if (message.stickerPackId != null && message.hasOwnProperty("stickerPackId")) {
                    object.stickerPackId = message.stickerPackId;
                    if (options.oneofs)
                        object._stickerPackId = "stickerPackId";
                }
                if (message.name != null && message.hasOwnProperty("name")) {
                    object.name = message.name;
                    if (options.oneofs)
                        object._name = "name";
                }
                if (message.publisher != null && message.hasOwnProperty("publisher")) {
                    object.publisher = message.publisher;
                    if (options.oneofs)
                        object._publisher = "publisher";
                }
                if (message.stickers && message.stickers.length) {
                    object.stickers = [];
                    for (var j = 0; j < message.stickers.length; ++j)
                        object.stickers[j] = $root.E2E.Message.StickerPackMessage.Sticker.toObject(message.stickers[j], options);
                }
                if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                    if (typeof message.fileLength === "number")
                        object.fileLength = options.longs === String ? String(message.fileLength) : message.fileLength;
                    else
                        object.fileLength = options.longs === String ? $util.Long.prototype.toString.call(message.fileLength) : options.longs === Number ? new $util.LongBits(message.fileLength.low >>> 0, message.fileLength.high >>> 0).toNumber(true) : message.fileLength;
                    if (options.oneofs)
                        object._fileLength = "fileLength";
                }
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                    object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256;
                    if (options.oneofs)
                        object._fileSha256 = "fileSha256";
                }
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                    object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256;
                    if (options.oneofs)
                        object._fileEncSha256 = "fileEncSha256";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey;
                    if (options.oneofs)
                        object._mediaKey = "mediaKey";
                }
                if (message.directPath != null && message.hasOwnProperty("directPath")) {
                    object.directPath = message.directPath;
                    if (options.oneofs)
                        object._directPath = "directPath";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    object.caption = message.caption;
                    if (options.oneofs)
                        object._caption = "caption";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.packDescription != null && message.hasOwnProperty("packDescription")) {
                    object.packDescription = message.packDescription;
                    if (options.oneofs)
                        object._packDescription = "packDescription";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    if (typeof message.mediaKeyTimestamp === "number")
                        object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp;
                    else
                        object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp;
                    if (options.oneofs)
                        object._mediaKeyTimestamp = "mediaKeyTimestamp";
                }
                if (message.trayIconFileName != null && message.hasOwnProperty("trayIconFileName")) {
                    object.trayIconFileName = message.trayIconFileName;
                    if (options.oneofs)
                        object._trayIconFileName = "trayIconFileName";
                }
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) {
                    object.thumbnailDirectPath = message.thumbnailDirectPath;
                    if (options.oneofs)
                        object._thumbnailDirectPath = "thumbnailDirectPath";
                }
                if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) {
                    object.thumbnailSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailSha256, 0, message.thumbnailSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailSha256) : message.thumbnailSha256;
                    if (options.oneofs)
                        object._thumbnailSha256 = "thumbnailSha256";
                }
                if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) {
                    object.thumbnailEncSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailEncSha256, 0, message.thumbnailEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailEncSha256) : message.thumbnailEncSha256;
                    if (options.oneofs)
                        object._thumbnailEncSha256 = "thumbnailEncSha256";
                }
                if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) {
                    object.thumbnailHeight = message.thumbnailHeight;
                    if (options.oneofs)
                        object._thumbnailHeight = "thumbnailHeight";
                }
                if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) {
                    object.thumbnailWidth = message.thumbnailWidth;
                    if (options.oneofs)
                        object._thumbnailWidth = "thumbnailWidth";
                }
                if (message.imageDataHash != null && message.hasOwnProperty("imageDataHash")) {
                    object.imageDataHash = message.imageDataHash;
                    if (options.oneofs)
                        object._imageDataHash = "imageDataHash";
                }
                if (message.stickerPackSize != null && message.hasOwnProperty("stickerPackSize")) {
                    if (typeof message.stickerPackSize === "number")
                        object.stickerPackSize = options.longs === String ? String(message.stickerPackSize) : message.stickerPackSize;
                    else
                        object.stickerPackSize = options.longs === String ? $util.Long.prototype.toString.call(message.stickerPackSize) : options.longs === Number ? new $util.LongBits(message.stickerPackSize.low >>> 0, message.stickerPackSize.high >>> 0).toNumber(true) : message.stickerPackSize;
                    if (options.oneofs)
                        object._stickerPackSize = "stickerPackSize";
                }
                if (message.stickerPackOrigin != null && message.hasOwnProperty("stickerPackOrigin")) {
                    object.stickerPackOrigin = options.enums === String ? $root.E2E.Message.StickerPackMessage.StickerPackOrigin[message.stickerPackOrigin] === undefined ? message.stickerPackOrigin : $root.E2E.Message.StickerPackMessage.StickerPackOrigin[message.stickerPackOrigin] : message.stickerPackOrigin;
                    if (options.oneofs)
                        object._stickerPackOrigin = "stickerPackOrigin";
                }
                return object;
            };

            /**
             * Converts this StickerPackMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.StickerPackMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StickerPackMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for StickerPackMessage
             * @function getTypeUrl
             * @memberof E2E.Message.StickerPackMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            StickerPackMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.StickerPackMessage";
            };

            StickerPackMessage.Sticker = (function() {

                /**
                 * Properties of a Sticker.
                 * @memberof E2E.Message.StickerPackMessage
                 * @interface ISticker
                 * @property {string|null} [fileName] Sticker fileName
                 * @property {boolean|null} [isAnimated] Sticker isAnimated
                 * @property {Array.<string>|null} [emojis] Sticker emojis
                 * @property {string|null} [accessibilityLabel] Sticker accessibilityLabel
                 * @property {boolean|null} [isLottie] Sticker isLottie
                 * @property {string|null} [mimetype] Sticker mimetype
                 */

                /**
                 * Constructs a new Sticker.
                 * @memberof E2E.Message.StickerPackMessage
                 * @classdesc Represents a Sticker.
                 * @implements ISticker
                 * @constructor
                 * @param {E2E.Message.StickerPackMessage.ISticker=} [properties] Properties to set
                 */
                function Sticker(properties) {
                    this.emojis = [];
                    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]];
                }

                /**
                 * Sticker fileName.
                 * @member {string|null|undefined} fileName
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @instance
                 */
                Sticker.prototype.fileName = null;

                /**
                 * Sticker isAnimated.
                 * @member {boolean|null|undefined} isAnimated
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @instance
                 */
                Sticker.prototype.isAnimated = null;

                /**
                 * Sticker emojis.
                 * @member {Array.<string>} emojis
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @instance
                 */
                Sticker.prototype.emojis = $util.emptyArray;

                /**
                 * Sticker accessibilityLabel.
                 * @member {string|null|undefined} accessibilityLabel
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @instance
                 */
                Sticker.prototype.accessibilityLabel = null;

                /**
                 * Sticker isLottie.
                 * @member {boolean|null|undefined} isLottie
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @instance
                 */
                Sticker.prototype.isLottie = null;

                /**
                 * Sticker mimetype.
                 * @member {string|null|undefined} mimetype
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @instance
                 */
                Sticker.prototype.mimetype = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * Sticker _fileName.
                 * @member {"fileName"|undefined} _fileName
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @instance
                 */
                Object.defineProperty(Sticker.prototype, "_fileName", {
                    get: $util.oneOfGetter($oneOfFields = ["fileName"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Sticker _isAnimated.
                 * @member {"isAnimated"|undefined} _isAnimated
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @instance
                 */
                Object.defineProperty(Sticker.prototype, "_isAnimated", {
                    get: $util.oneOfGetter($oneOfFields = ["isAnimated"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Sticker _accessibilityLabel.
                 * @member {"accessibilityLabel"|undefined} _accessibilityLabel
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @instance
                 */
                Object.defineProperty(Sticker.prototype, "_accessibilityLabel", {
                    get: $util.oneOfGetter($oneOfFields = ["accessibilityLabel"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Sticker _isLottie.
                 * @member {"isLottie"|undefined} _isLottie
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @instance
                 */
                Object.defineProperty(Sticker.prototype, "_isLottie", {
                    get: $util.oneOfGetter($oneOfFields = ["isLottie"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Sticker _mimetype.
                 * @member {"mimetype"|undefined} _mimetype
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @instance
                 */
                Object.defineProperty(Sticker.prototype, "_mimetype", {
                    get: $util.oneOfGetter($oneOfFields = ["mimetype"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new Sticker instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @static
                 * @param {E2E.Message.StickerPackMessage.ISticker=} [properties] Properties to set
                 * @returns {E2E.Message.StickerPackMessage.Sticker} Sticker instance
                 */
                Sticker.create = function create(properties) {
                    return new Sticker(properties);
                };

                /**
                 * Encodes the specified Sticker message. Does not implicitly {@link E2E.Message.StickerPackMessage.Sticker.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @static
                 * @param {E2E.Message.StickerPackMessage.ISticker} message Sticker message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Sticker.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.fileName);
                    if (message.isAnimated != null && Object.hasOwnProperty.call(message, "isAnimated"))
                        writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isAnimated);
                    if (message.emojis != null && message.emojis.length)
                        for (var i = 0; i < message.emojis.length; ++i)
                            writer.uint32(/* id 3, wireType 2 =*/26).string(message.emojis[i]);
                    if (message.accessibilityLabel != null && Object.hasOwnProperty.call(message, "accessibilityLabel"))
                        writer.uint32(/* id 4, wireType 2 =*/34).string(message.accessibilityLabel);
                    if (message.isLottie != null && Object.hasOwnProperty.call(message, "isLottie"))
                        writer.uint32(/* id 5, wireType 0 =*/40).bool(message.isLottie);
                    if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype"))
                        writer.uint32(/* id 6, wireType 2 =*/50).string(message.mimetype);
                    return writer;
                };

                /**
                 * Encodes the specified Sticker message, length delimited. Does not implicitly {@link E2E.Message.StickerPackMessage.Sticker.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @static
                 * @param {E2E.Message.StickerPackMessage.ISticker} message Sticker message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Sticker.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Sticker message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.StickerPackMessage.Sticker} Sticker
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Sticker.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.E2E.Message.StickerPackMessage.Sticker();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.fileName = reader.string();
                                break;
                            }
                        case 2: {
                                message.isAnimated = reader.bool();
                                break;
                            }
                        case 3: {
                                if (!(message.emojis && message.emojis.length))
                                    message.emojis = [];
                                message.emojis.push(reader.string());
                                break;
                            }
                        case 4: {
                                message.accessibilityLabel = reader.string();
                                break;
                            }
                        case 5: {
                                message.isLottie = reader.bool();
                                break;
                            }
                        case 6: {
                                message.mimetype = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a Sticker message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.StickerPackMessage.Sticker} Sticker
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Sticker.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Sticker message.
                 * @function verify
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Sticker.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.fileName != null && message.hasOwnProperty("fileName")) {
                        properties._fileName = 1;
                        if (!$util.isString(message.fileName))
                            return "fileName: string expected";
                    }
                    if (message.isAnimated != null && message.hasOwnProperty("isAnimated")) {
                        properties._isAnimated = 1;
                        if (typeof message.isAnimated !== "boolean")
                            return "isAnimated: boolean expected";
                    }
                    if (message.emojis != null && message.hasOwnProperty("emojis")) {
                        if (!Array.isArray(message.emojis))
                            return "emojis: array expected";
                        for (var i = 0; i < message.emojis.length; ++i)
                            if (!$util.isString(message.emojis[i]))
                                return "emojis: string[] expected";
                    }
                    if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) {
                        properties._accessibilityLabel = 1;
                        if (!$util.isString(message.accessibilityLabel))
                            return "accessibilityLabel: string expected";
                    }
                    if (message.isLottie != null && message.hasOwnProperty("isLottie")) {
                        properties._isLottie = 1;
                        if (typeof message.isLottie !== "boolean")
                            return "isLottie: boolean expected";
                    }
                    if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                        properties._mimetype = 1;
                        if (!$util.isString(message.mimetype))
                            return "mimetype: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a Sticker message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.StickerPackMessage.Sticker} Sticker
                 */
                Sticker.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.StickerPackMessage.Sticker)
                        return object;
                    var message = new $root.E2E.Message.StickerPackMessage.Sticker();
                    if (object.fileName != null)
                        message.fileName = String(object.fileName);
                    if (object.isAnimated != null)
                        message.isAnimated = Boolean(object.isAnimated);
                    if (object.emojis) {
                        if (!Array.isArray(object.emojis))
                            throw TypeError(".E2E.Message.StickerPackMessage.Sticker.emojis: array expected");
                        message.emojis = [];
                        for (var i = 0; i < object.emojis.length; ++i)
                            message.emojis[i] = String(object.emojis[i]);
                    }
                    if (object.accessibilityLabel != null)
                        message.accessibilityLabel = String(object.accessibilityLabel);
                    if (object.isLottie != null)
                        message.isLottie = Boolean(object.isLottie);
                    if (object.mimetype != null)
                        message.mimetype = String(object.mimetype);
                    return message;
                };

                /**
                 * Creates a plain object from a Sticker message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @static
                 * @param {E2E.Message.StickerPackMessage.Sticker} message Sticker
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Sticker.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.emojis = [];
                    if (message.fileName != null && message.hasOwnProperty("fileName")) {
                        object.fileName = message.fileName;
                        if (options.oneofs)
                            object._fileName = "fileName";
                    }
                    if (message.isAnimated != null && message.hasOwnProperty("isAnimated")) {
                        object.isAnimated = message.isAnimated;
                        if (options.oneofs)
                            object._isAnimated = "isAnimated";
                    }
                    if (message.emojis && message.emojis.length) {
                        object.emojis = [];
                        for (var j = 0; j < message.emojis.length; ++j)
                            object.emojis[j] = message.emojis[j];
                    }
                    if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) {
                        object.accessibilityLabel = message.accessibilityLabel;
                        if (options.oneofs)
                            object._accessibilityLabel = "accessibilityLabel";
                    }
                    if (message.isLottie != null && message.hasOwnProperty("isLottie")) {
                        object.isLottie = message.isLottie;
                        if (options.oneofs)
                            object._isLottie = "isLottie";
                    }
                    if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                        object.mimetype = message.mimetype;
                        if (options.oneofs)
                            object._mimetype = "mimetype";
                    }
                    return object;
                };

                /**
                 * Converts this Sticker to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Sticker.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for Sticker
                 * @function getTypeUrl
                 * @memberof E2E.Message.StickerPackMessage.Sticker
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Sticker.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.StickerPackMessage.Sticker";
                };

                return Sticker;
            })();

            /**
             * StickerPackOrigin enum.
             * @name E2E.Message.StickerPackMessage.StickerPackOrigin
             * @enum {number}
             * @property {number} FIRST_PARTY=0 FIRST_PARTY value
             * @property {number} THIRD_PARTY=1 THIRD_PARTY value
             * @property {number} USER_CREATED=2 USER_CREATED value
             */
            StickerPackMessage.StickerPackOrigin = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "FIRST_PARTY"] = 0;
                values[valuesById[1] = "THIRD_PARTY"] = 1;
                values[valuesById[2] = "USER_CREATED"] = 2;
                return values;
            })();

            return StickerPackMessage;
        })();

        Message.StickerSyncRMRMessage = (function() {

            /**
             * Properties of a StickerSyncRMRMessage.
             * @memberof E2E.Message
             * @interface IStickerSyncRMRMessage
             * @property {Array.<string>|null} [filehash] StickerSyncRMRMessage filehash
             * @property {string|null} [rmrSource] StickerSyncRMRMessage rmrSource
             * @property {number|Long|null} [requestTimestamp] StickerSyncRMRMessage requestTimestamp
             */

            /**
             * Constructs a new StickerSyncRMRMessage.
             * @memberof E2E.Message
             * @classdesc Represents a StickerSyncRMRMessage.
             * @implements IStickerSyncRMRMessage
             * @constructor
             * @param {E2E.Message.IStickerSyncRMRMessage=} [properties] Properties to set
             */
            function StickerSyncRMRMessage(properties) {
                this.filehash = [];
                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]];
            }

            /**
             * StickerSyncRMRMessage filehash.
             * @member {Array.<string>} filehash
             * @memberof E2E.Message.StickerSyncRMRMessage
             * @instance
             */
            StickerSyncRMRMessage.prototype.filehash = $util.emptyArray;

            /**
             * StickerSyncRMRMessage rmrSource.
             * @member {string|null|undefined} rmrSource
             * @memberof E2E.Message.StickerSyncRMRMessage
             * @instance
             */
            StickerSyncRMRMessage.prototype.rmrSource = null;

            /**
             * StickerSyncRMRMessage requestTimestamp.
             * @member {number|Long|null|undefined} requestTimestamp
             * @memberof E2E.Message.StickerSyncRMRMessage
             * @instance
             */
            StickerSyncRMRMessage.prototype.requestTimestamp = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * StickerSyncRMRMessage _rmrSource.
             * @member {"rmrSource"|undefined} _rmrSource
             * @memberof E2E.Message.StickerSyncRMRMessage
             * @instance
             */
            Object.defineProperty(StickerSyncRMRMessage.prototype, "_rmrSource", {
                get: $util.oneOfGetter($oneOfFields = ["rmrSource"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StickerSyncRMRMessage _requestTimestamp.
             * @member {"requestTimestamp"|undefined} _requestTimestamp
             * @memberof E2E.Message.StickerSyncRMRMessage
             * @instance
             */
            Object.defineProperty(StickerSyncRMRMessage.prototype, "_requestTimestamp", {
                get: $util.oneOfGetter($oneOfFields = ["requestTimestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new StickerSyncRMRMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.StickerSyncRMRMessage
             * @static
             * @param {E2E.Message.IStickerSyncRMRMessage=} [properties] Properties to set
             * @returns {E2E.Message.StickerSyncRMRMessage} StickerSyncRMRMessage instance
             */
            StickerSyncRMRMessage.create = function create(properties) {
                return new StickerSyncRMRMessage(properties);
            };

            /**
             * Encodes the specified StickerSyncRMRMessage message. Does not implicitly {@link E2E.Message.StickerSyncRMRMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.StickerSyncRMRMessage
             * @static
             * @param {E2E.Message.IStickerSyncRMRMessage} message StickerSyncRMRMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StickerSyncRMRMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.filehash != null && message.filehash.length)
                    for (var i = 0; i < message.filehash.length; ++i)
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.filehash[i]);
                if (message.rmrSource != null && Object.hasOwnProperty.call(message, "rmrSource"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.rmrSource);
                if (message.requestTimestamp != null && Object.hasOwnProperty.call(message, "requestTimestamp"))
                    writer.uint32(/* id 3, wireType 0 =*/24).int64(message.requestTimestamp);
                return writer;
            };

            /**
             * Encodes the specified StickerSyncRMRMessage message, length delimited. Does not implicitly {@link E2E.Message.StickerSyncRMRMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.StickerSyncRMRMessage
             * @static
             * @param {E2E.Message.IStickerSyncRMRMessage} message StickerSyncRMRMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StickerSyncRMRMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StickerSyncRMRMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.StickerSyncRMRMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.StickerSyncRMRMessage} StickerSyncRMRMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StickerSyncRMRMessage.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.E2E.Message.StickerSyncRMRMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            if (!(message.filehash && message.filehash.length))
                                message.filehash = [];
                            message.filehash.push(reader.string());
                            break;
                        }
                    case 2: {
                            message.rmrSource = reader.string();
                            break;
                        }
                    case 3: {
                            message.requestTimestamp = reader.int64();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a StickerSyncRMRMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.StickerSyncRMRMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.StickerSyncRMRMessage} StickerSyncRMRMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StickerSyncRMRMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StickerSyncRMRMessage message.
             * @function verify
             * @memberof E2E.Message.StickerSyncRMRMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StickerSyncRMRMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.filehash != null && message.hasOwnProperty("filehash")) {
                    if (!Array.isArray(message.filehash))
                        return "filehash: array expected";
                    for (var i = 0; i < message.filehash.length; ++i)
                        if (!$util.isString(message.filehash[i]))
                            return "filehash: string[] expected";
                }
                if (message.rmrSource != null && message.hasOwnProperty("rmrSource")) {
                    properties._rmrSource = 1;
                    if (!$util.isString(message.rmrSource))
                        return "rmrSource: string expected";
                }
                if (message.requestTimestamp != null && message.hasOwnProperty("requestTimestamp")) {
                    properties._requestTimestamp = 1;
                    if (!$util.isInteger(message.requestTimestamp) && !(message.requestTimestamp && $util.isInteger(message.requestTimestamp.low) && $util.isInteger(message.requestTimestamp.high)))
                        return "requestTimestamp: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a StickerSyncRMRMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.StickerSyncRMRMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.StickerSyncRMRMessage} StickerSyncRMRMessage
             */
            StickerSyncRMRMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.StickerSyncRMRMessage)
                    return object;
                var message = new $root.E2E.Message.StickerSyncRMRMessage();
                if (object.filehash) {
                    if (!Array.isArray(object.filehash))
                        throw TypeError(".E2E.Message.StickerSyncRMRMessage.filehash: array expected");
                    message.filehash = [];
                    for (var i = 0; i < object.filehash.length; ++i)
                        message.filehash[i] = String(object.filehash[i]);
                }
                if (object.rmrSource != null)
                    message.rmrSource = String(object.rmrSource);
                if (object.requestTimestamp != null)
                    if ($util.Long)
                        (message.requestTimestamp = $util.Long.fromValue(object.requestTimestamp)).unsigned = false;
                    else if (typeof object.requestTimestamp === "string")
                        message.requestTimestamp = parseInt(object.requestTimestamp, 10);
                    else if (typeof object.requestTimestamp === "number")
                        message.requestTimestamp = object.requestTimestamp;
                    else if (typeof object.requestTimestamp === "object")
                        message.requestTimestamp = new $util.LongBits(object.requestTimestamp.low >>> 0, object.requestTimestamp.high >>> 0).toNumber();
                return message;
            };

            /**
             * Creates a plain object from a StickerSyncRMRMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.StickerSyncRMRMessage
             * @static
             * @param {E2E.Message.StickerSyncRMRMessage} message StickerSyncRMRMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StickerSyncRMRMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.filehash = [];
                if (message.filehash && message.filehash.length) {
                    object.filehash = [];
                    for (var j = 0; j < message.filehash.length; ++j)
                        object.filehash[j] = message.filehash[j];
                }
                if (message.rmrSource != null && message.hasOwnProperty("rmrSource")) {
                    object.rmrSource = message.rmrSource;
                    if (options.oneofs)
                        object._rmrSource = "rmrSource";
                }
                if (message.requestTimestamp != null && message.hasOwnProperty("requestTimestamp")) {
                    if (typeof message.requestTimestamp === "number")
                        object.requestTimestamp = options.longs === String ? String(message.requestTimestamp) : message.requestTimestamp;
                    else
                        object.requestTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.requestTimestamp) : options.longs === Number ? new $util.LongBits(message.requestTimestamp.low >>> 0, message.requestTimestamp.high >>> 0).toNumber() : message.requestTimestamp;
                    if (options.oneofs)
                        object._requestTimestamp = "requestTimestamp";
                }
                return object;
            };

            /**
             * Converts this StickerSyncRMRMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.StickerSyncRMRMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StickerSyncRMRMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for StickerSyncRMRMessage
             * @function getTypeUrl
             * @memberof E2E.Message.StickerSyncRMRMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            StickerSyncRMRMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.StickerSyncRMRMessage";
            };

            return StickerSyncRMRMessage;
        })();

        Message.TemplateButtonReplyMessage = (function() {

            /**
             * Properties of a TemplateButtonReplyMessage.
             * @memberof E2E.Message
             * @interface ITemplateButtonReplyMessage
             * @property {string|null} [selectedId] TemplateButtonReplyMessage selectedId
             * @property {string|null} [selectedDisplayText] TemplateButtonReplyMessage selectedDisplayText
             * @property {E2E.IContextInfo|null} [contextInfo] TemplateButtonReplyMessage contextInfo
             * @property {number|null} [selectedIndex] TemplateButtonReplyMessage selectedIndex
             * @property {number|null} [selectedCarouselCardIndex] TemplateButtonReplyMessage selectedCarouselCardIndex
             */

            /**
             * Constructs a new TemplateButtonReplyMessage.
             * @memberof E2E.Message
             * @classdesc Represents a TemplateButtonReplyMessage.
             * @implements ITemplateButtonReplyMessage
             * @constructor
             * @param {E2E.Message.ITemplateButtonReplyMessage=} [properties] Properties to set
             */
            function TemplateButtonReplyMessage(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]];
            }

            /**
             * TemplateButtonReplyMessage selectedId.
             * @member {string|null|undefined} selectedId
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @instance
             */
            TemplateButtonReplyMessage.prototype.selectedId = null;

            /**
             * TemplateButtonReplyMessage selectedDisplayText.
             * @member {string|null|undefined} selectedDisplayText
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @instance
             */
            TemplateButtonReplyMessage.prototype.selectedDisplayText = null;

            /**
             * TemplateButtonReplyMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @instance
             */
            TemplateButtonReplyMessage.prototype.contextInfo = null;

            /**
             * TemplateButtonReplyMessage selectedIndex.
             * @member {number|null|undefined} selectedIndex
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @instance
             */
            TemplateButtonReplyMessage.prototype.selectedIndex = null;

            /**
             * TemplateButtonReplyMessage selectedCarouselCardIndex.
             * @member {number|null|undefined} selectedCarouselCardIndex
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @instance
             */
            TemplateButtonReplyMessage.prototype.selectedCarouselCardIndex = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * TemplateButtonReplyMessage _selectedId.
             * @member {"selectedId"|undefined} _selectedId
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @instance
             */
            Object.defineProperty(TemplateButtonReplyMessage.prototype, "_selectedId", {
                get: $util.oneOfGetter($oneOfFields = ["selectedId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * TemplateButtonReplyMessage _selectedDisplayText.
             * @member {"selectedDisplayText"|undefined} _selectedDisplayText
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @instance
             */
            Object.defineProperty(TemplateButtonReplyMessage.prototype, "_selectedDisplayText", {
                get: $util.oneOfGetter($oneOfFields = ["selectedDisplayText"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * TemplateButtonReplyMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @instance
             */
            Object.defineProperty(TemplateButtonReplyMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * TemplateButtonReplyMessage _selectedIndex.
             * @member {"selectedIndex"|undefined} _selectedIndex
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @instance
             */
            Object.defineProperty(TemplateButtonReplyMessage.prototype, "_selectedIndex", {
                get: $util.oneOfGetter($oneOfFields = ["selectedIndex"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * TemplateButtonReplyMessage _selectedCarouselCardIndex.
             * @member {"selectedCarouselCardIndex"|undefined} _selectedCarouselCardIndex
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @instance
             */
            Object.defineProperty(TemplateButtonReplyMessage.prototype, "_selectedCarouselCardIndex", {
                get: $util.oneOfGetter($oneOfFields = ["selectedCarouselCardIndex"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new TemplateButtonReplyMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @static
             * @param {E2E.Message.ITemplateButtonReplyMessage=} [properties] Properties to set
             * @returns {E2E.Message.TemplateButtonReplyMessage} TemplateButtonReplyMessage instance
             */
            TemplateButtonReplyMessage.create = function create(properties) {
                return new TemplateButtonReplyMessage(properties);
            };

            /**
             * Encodes the specified TemplateButtonReplyMessage message. Does not implicitly {@link E2E.Message.TemplateButtonReplyMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @static
             * @param {E2E.Message.ITemplateButtonReplyMessage} message TemplateButtonReplyMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TemplateButtonReplyMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.selectedId != null && Object.hasOwnProperty.call(message, "selectedId"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedId);
                if (message.selectedDisplayText != null && Object.hasOwnProperty.call(message, "selectedDisplayText"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.selectedDisplayText);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                if (message.selectedIndex != null && Object.hasOwnProperty.call(message, "selectedIndex"))
                    writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.selectedIndex);
                if (message.selectedCarouselCardIndex != null && Object.hasOwnProperty.call(message, "selectedCarouselCardIndex"))
                    writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.selectedCarouselCardIndex);
                return writer;
            };

            /**
             * Encodes the specified TemplateButtonReplyMessage message, length delimited. Does not implicitly {@link E2E.Message.TemplateButtonReplyMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @static
             * @param {E2E.Message.ITemplateButtonReplyMessage} message TemplateButtonReplyMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TemplateButtonReplyMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TemplateButtonReplyMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.TemplateButtonReplyMessage} TemplateButtonReplyMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TemplateButtonReplyMessage.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.E2E.Message.TemplateButtonReplyMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.selectedId = reader.string();
                            break;
                        }
                    case 2: {
                            message.selectedDisplayText = reader.string();
                            break;
                        }
                    case 3: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 4: {
                            message.selectedIndex = reader.uint32();
                            break;
                        }
                    case 5: {
                            message.selectedCarouselCardIndex = reader.uint32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a TemplateButtonReplyMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.TemplateButtonReplyMessage} TemplateButtonReplyMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TemplateButtonReplyMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TemplateButtonReplyMessage message.
             * @function verify
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TemplateButtonReplyMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.selectedId != null && message.hasOwnProperty("selectedId")) {
                    properties._selectedId = 1;
                    if (!$util.isString(message.selectedId))
                        return "selectedId: string expected";
                }
                if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) {
                    properties._selectedDisplayText = 1;
                    if (!$util.isString(message.selectedDisplayText))
                        return "selectedDisplayText: string expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.selectedIndex != null && message.hasOwnProperty("selectedIndex")) {
                    properties._selectedIndex = 1;
                    if (!$util.isInteger(message.selectedIndex))
                        return "selectedIndex: integer expected";
                }
                if (message.selectedCarouselCardIndex != null && message.hasOwnProperty("selectedCarouselCardIndex")) {
                    properties._selectedCarouselCardIndex = 1;
                    if (!$util.isInteger(message.selectedCarouselCardIndex))
                        return "selectedCarouselCardIndex: integer expected";
                }
                return null;
            };

            /**
             * Creates a TemplateButtonReplyMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.TemplateButtonReplyMessage} TemplateButtonReplyMessage
             */
            TemplateButtonReplyMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.TemplateButtonReplyMessage)
                    return object;
                var message = new $root.E2E.Message.TemplateButtonReplyMessage();
                if (object.selectedId != null)
                    message.selectedId = String(object.selectedId);
                if (object.selectedDisplayText != null)
                    message.selectedDisplayText = String(object.selectedDisplayText);
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.TemplateButtonReplyMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                if (object.selectedIndex != null)
                    message.selectedIndex = object.selectedIndex >>> 0;
                if (object.selectedCarouselCardIndex != null)
                    message.selectedCarouselCardIndex = object.selectedCarouselCardIndex >>> 0;
                return message;
            };

            /**
             * Creates a plain object from a TemplateButtonReplyMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @static
             * @param {E2E.Message.TemplateButtonReplyMessage} message TemplateButtonReplyMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TemplateButtonReplyMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.selectedId != null && message.hasOwnProperty("selectedId")) {
                    object.selectedId = message.selectedId;
                    if (options.oneofs)
                        object._selectedId = "selectedId";
                }
                if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) {
                    object.selectedDisplayText = message.selectedDisplayText;
                    if (options.oneofs)
                        object._selectedDisplayText = "selectedDisplayText";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.selectedIndex != null && message.hasOwnProperty("selectedIndex")) {
                    object.selectedIndex = message.selectedIndex;
                    if (options.oneofs)
                        object._selectedIndex = "selectedIndex";
                }
                if (message.selectedCarouselCardIndex != null && message.hasOwnProperty("selectedCarouselCardIndex")) {
                    object.selectedCarouselCardIndex = message.selectedCarouselCardIndex;
                    if (options.oneofs)
                        object._selectedCarouselCardIndex = "selectedCarouselCardIndex";
                }
                return object;
            };

            /**
             * Converts this TemplateButtonReplyMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TemplateButtonReplyMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for TemplateButtonReplyMessage
             * @function getTypeUrl
             * @memberof E2E.Message.TemplateButtonReplyMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            TemplateButtonReplyMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.TemplateButtonReplyMessage";
            };

            return TemplateButtonReplyMessage;
        })();

        Message.TemplateMessage = (function() {

            /**
             * Properties of a TemplateMessage.
             * @memberof E2E.Message
             * @interface ITemplateMessage
             * @property {E2E.IContextInfo|null} [contextInfo] TemplateMessage contextInfo
             * @property {E2E.Message.TemplateMessage.IHydratedFourRowTemplate|null} [hydratedTemplate] TemplateMessage hydratedTemplate
             * @property {string|null} [templateId] TemplateMessage templateId
             * @property {E2E.Message.TemplateMessage.IFourRowTemplate|null} [fourRowTemplate] TemplateMessage fourRowTemplate
             * @property {E2E.Message.TemplateMessage.IHydratedFourRowTemplate|null} [hydratedFourRowTemplate] TemplateMessage hydratedFourRowTemplate
             * @property {E2E.Message.IInteractiveMessage|null} [interactiveMessageTemplate] TemplateMessage interactiveMessageTemplate
             */

            /**
             * Constructs a new TemplateMessage.
             * @memberof E2E.Message
             * @classdesc Represents a TemplateMessage.
             * @implements ITemplateMessage
             * @constructor
             * @param {E2E.Message.ITemplateMessage=} [properties] Properties to set
             */
            function TemplateMessage(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]];
            }

            /**
             * TemplateMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.TemplateMessage
             * @instance
             */
            TemplateMessage.prototype.contextInfo = null;

            /**
             * TemplateMessage hydratedTemplate.
             * @member {E2E.Message.TemplateMessage.IHydratedFourRowTemplate|null|undefined} hydratedTemplate
             * @memberof E2E.Message.TemplateMessage
             * @instance
             */
            TemplateMessage.prototype.hydratedTemplate = null;

            /**
             * TemplateMessage templateId.
             * @member {string|null|undefined} templateId
             * @memberof E2E.Message.TemplateMessage
             * @instance
             */
            TemplateMessage.prototype.templateId = null;

            /**
             * TemplateMessage fourRowTemplate.
             * @member {E2E.Message.TemplateMessage.IFourRowTemplate|null|undefined} fourRowTemplate
             * @memberof E2E.Message.TemplateMessage
             * @instance
             */
            TemplateMessage.prototype.fourRowTemplate = null;

            /**
             * TemplateMessage hydratedFourRowTemplate.
             * @member {E2E.Message.TemplateMessage.IHydratedFourRowTemplate|null|undefined} hydratedFourRowTemplate
             * @memberof E2E.Message.TemplateMessage
             * @instance
             */
            TemplateMessage.prototype.hydratedFourRowTemplate = null;

            /**
             * TemplateMessage interactiveMessageTemplate.
             * @member {E2E.Message.IInteractiveMessage|null|undefined} interactiveMessageTemplate
             * @memberof E2E.Message.TemplateMessage
             * @instance
             */
            TemplateMessage.prototype.interactiveMessageTemplate = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * TemplateMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.TemplateMessage
             * @instance
             */
            Object.defineProperty(TemplateMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * TemplateMessage _hydratedTemplate.
             * @member {"hydratedTemplate"|undefined} _hydratedTemplate
             * @memberof E2E.Message.TemplateMessage
             * @instance
             */
            Object.defineProperty(TemplateMessage.prototype, "_hydratedTemplate", {
                get: $util.oneOfGetter($oneOfFields = ["hydratedTemplate"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * TemplateMessage _templateId.
             * @member {"templateId"|undefined} _templateId
             * @memberof E2E.Message.TemplateMessage
             * @instance
             */
            Object.defineProperty(TemplateMessage.prototype, "_templateId", {
                get: $util.oneOfGetter($oneOfFields = ["templateId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * TemplateMessage format.
             * @member {"fourRowTemplate"|"hydratedFourRowTemplate"|"interactiveMessageTemplate"|undefined} format
             * @memberof E2E.Message.TemplateMessage
             * @instance
             */
            Object.defineProperty(TemplateMessage.prototype, "format", {
                get: $util.oneOfGetter($oneOfFields = ["fourRowTemplate", "hydratedFourRowTemplate", "interactiveMessageTemplate"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new TemplateMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.TemplateMessage
             * @static
             * @param {E2E.Message.ITemplateMessage=} [properties] Properties to set
             * @returns {E2E.Message.TemplateMessage} TemplateMessage instance
             */
            TemplateMessage.create = function create(properties) {
                return new TemplateMessage(properties);
            };

            /**
             * Encodes the specified TemplateMessage message. Does not implicitly {@link E2E.Message.TemplateMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.TemplateMessage
             * @static
             * @param {E2E.Message.ITemplateMessage} message TemplateMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TemplateMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.fourRowTemplate != null && Object.hasOwnProperty.call(message, "fourRowTemplate"))
                    $root.E2E.Message.TemplateMessage.FourRowTemplate.encode(message.fourRowTemplate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.hydratedFourRowTemplate != null && Object.hasOwnProperty.call(message, "hydratedFourRowTemplate"))
                    $root.E2E.Message.TemplateMessage.HydratedFourRowTemplate.encode(message.hydratedFourRowTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                if (message.hydratedTemplate != null && Object.hasOwnProperty.call(message, "hydratedTemplate"))
                    $root.E2E.Message.TemplateMessage.HydratedFourRowTemplate.encode(message.hydratedTemplate, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                if (message.interactiveMessageTemplate != null && Object.hasOwnProperty.call(message, "interactiveMessageTemplate"))
                    $root.E2E.Message.InteractiveMessage.encode(message.interactiveMessageTemplate, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                if (message.templateId != null && Object.hasOwnProperty.call(message, "templateId"))
                    writer.uint32(/* id 9, wireType 2 =*/74).string(message.templateId);
                return writer;
            };

            /**
             * Encodes the specified TemplateMessage message, length delimited. Does not implicitly {@link E2E.Message.TemplateMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.TemplateMessage
             * @static
             * @param {E2E.Message.ITemplateMessage} message TemplateMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TemplateMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TemplateMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.TemplateMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.TemplateMessage} TemplateMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TemplateMessage.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.E2E.Message.TemplateMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 3: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 4: {
                            message.hydratedTemplate = $root.E2E.Message.TemplateMessage.HydratedFourRowTemplate.decode(reader, reader.uint32());
                            break;
                        }
                    case 9: {
                            message.templateId = reader.string();
                            break;
                        }
                    case 1: {
                            message.fourRowTemplate = $root.E2E.Message.TemplateMessage.FourRowTemplate.decode(reader, reader.uint32());
                            break;
                        }
                    case 2: {
                            message.hydratedFourRowTemplate = $root.E2E.Message.TemplateMessage.HydratedFourRowTemplate.decode(reader, reader.uint32());
                            break;
                        }
                    case 5: {
                            message.interactiveMessageTemplate = $root.E2E.Message.InteractiveMessage.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a TemplateMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.TemplateMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.TemplateMessage} TemplateMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TemplateMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TemplateMessage message.
             * @function verify
             * @memberof E2E.Message.TemplateMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TemplateMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.hydratedTemplate != null && message.hasOwnProperty("hydratedTemplate")) {
                    properties._hydratedTemplate = 1;
                    {
                        var error = $root.E2E.Message.TemplateMessage.HydratedFourRowTemplate.verify(message.hydratedTemplate);
                        if (error)
                            return "hydratedTemplate." + error;
                    }
                }
                if (message.templateId != null && message.hasOwnProperty("templateId")) {
                    properties._templateId = 1;
                    if (!$util.isString(message.templateId))
                        return "templateId: string expected";
                }
                if (message.fourRowTemplate != null && message.hasOwnProperty("fourRowTemplate")) {
                    properties.format = 1;
                    {
                        var error = $root.E2E.Message.TemplateMessage.FourRowTemplate.verify(message.fourRowTemplate);
                        if (error)
                            return "fourRowTemplate." + error;
                    }
                }
                if (message.hydratedFourRowTemplate != null && message.hasOwnProperty("hydratedFourRowTemplate")) {
                    if (properties.format === 1)
                        return "format: multiple values";
                    properties.format = 1;
                    {
                        var error = $root.E2E.Message.TemplateMessage.HydratedFourRowTemplate.verify(message.hydratedFourRowTemplate);
                        if (error)
                            return "hydratedFourRowTemplate." + error;
                    }
                }
                if (message.interactiveMessageTemplate != null && message.hasOwnProperty("interactiveMessageTemplate")) {
                    if (properties.format === 1)
                        return "format: multiple values";
                    properties.format = 1;
                    {
                        var error = $root.E2E.Message.InteractiveMessage.verify(message.interactiveMessageTemplate);
                        if (error)
                            return "interactiveMessageTemplate." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a TemplateMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.TemplateMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.TemplateMessage} TemplateMessage
             */
            TemplateMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.TemplateMessage)
                    return object;
                var message = new $root.E2E.Message.TemplateMessage();
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.TemplateMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                if (object.hydratedTemplate != null) {
                    if (typeof object.hydratedTemplate !== "object")
                        throw TypeError(".E2E.Message.TemplateMessage.hydratedTemplate: object expected");
                    message.hydratedTemplate = $root.E2E.Message.TemplateMessage.HydratedFourRowTemplate.fromObject(object.hydratedTemplate);
                }
                if (object.templateId != null)
                    message.templateId = String(object.templateId);
                if (object.fourRowTemplate != null) {
                    if (typeof object.fourRowTemplate !== "object")
                        throw TypeError(".E2E.Message.TemplateMessage.fourRowTemplate: object expected");
                    message.fourRowTemplate = $root.E2E.Message.TemplateMessage.FourRowTemplate.fromObject(object.fourRowTemplate);
                }
                if (object.hydratedFourRowTemplate != null) {
                    if (typeof object.hydratedFourRowTemplate !== "object")
                        throw TypeError(".E2E.Message.TemplateMessage.hydratedFourRowTemplate: object expected");
                    message.hydratedFourRowTemplate = $root.E2E.Message.TemplateMessage.HydratedFourRowTemplate.fromObject(object.hydratedFourRowTemplate);
                }
                if (object.interactiveMessageTemplate != null) {
                    if (typeof object.interactiveMessageTemplate !== "object")
                        throw TypeError(".E2E.Message.TemplateMessage.interactiveMessageTemplate: object expected");
                    message.interactiveMessageTemplate = $root.E2E.Message.InteractiveMessage.fromObject(object.interactiveMessageTemplate);
                }
                return message;
            };

            /**
             * Creates a plain object from a TemplateMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.TemplateMessage
             * @static
             * @param {E2E.Message.TemplateMessage} message TemplateMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TemplateMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.fourRowTemplate != null && message.hasOwnProperty("fourRowTemplate")) {
                    object.fourRowTemplate = $root.E2E.Message.TemplateMessage.FourRowTemplate.toObject(message.fourRowTemplate, options);
                    if (options.oneofs)
                        object.format = "fourRowTemplate";
                }
                if (message.hydratedFourRowTemplate != null && message.hasOwnProperty("hydratedFourRowTemplate")) {
                    object.hydratedFourRowTemplate = $root.E2E.Message.TemplateMessage.HydratedFourRowTemplate.toObject(message.hydratedFourRowTemplate, options);
                    if (options.oneofs)
                        object.format = "hydratedFourRowTemplate";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.hydratedTemplate != null && message.hasOwnProperty("hydratedTemplate")) {
                    object.hydratedTemplate = $root.E2E.Message.TemplateMessage.HydratedFourRowTemplate.toObject(message.hydratedTemplate, options);
                    if (options.oneofs)
                        object._hydratedTemplate = "hydratedTemplate";
                }
                if (message.interactiveMessageTemplate != null && message.hasOwnProperty("interactiveMessageTemplate")) {
                    object.interactiveMessageTemplate = $root.E2E.Message.InteractiveMessage.toObject(message.interactiveMessageTemplate, options);
                    if (options.oneofs)
                        object.format = "interactiveMessageTemplate";
                }
                if (message.templateId != null && message.hasOwnProperty("templateId")) {
                    object.templateId = message.templateId;
                    if (options.oneofs)
                        object._templateId = "templateId";
                }
                return object;
            };

            /**
             * Converts this TemplateMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.TemplateMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TemplateMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for TemplateMessage
             * @function getTypeUrl
             * @memberof E2E.Message.TemplateMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            TemplateMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.TemplateMessage";
            };

            TemplateMessage.FourRowTemplate = (function() {

                /**
                 * Properties of a FourRowTemplate.
                 * @memberof E2E.Message.TemplateMessage
                 * @interface IFourRowTemplate
                 * @property {E2E.Message.IHighlyStructuredMessage|null} [content] FourRowTemplate content
                 * @property {E2E.Message.IHighlyStructuredMessage|null} [footer] FourRowTemplate footer
                 * @property {Array.<E2E.ITemplateButton>|null} [buttons] FourRowTemplate buttons
                 * @property {E2E.Message.IDocumentMessage|null} [documentMessage] FourRowTemplate documentMessage
                 * @property {E2E.Message.IHighlyStructuredMessage|null} [highlyStructuredMessage] FourRowTemplate highlyStructuredMessage
                 * @property {E2E.Message.IImageMessage|null} [imageMessage] FourRowTemplate imageMessage
                 * @property {E2E.Message.IVideoMessage|null} [videoMessage] FourRowTemplate videoMessage
                 * @property {E2E.Message.ILocationMessage|null} [locationMessage] FourRowTemplate locationMessage
                 */

                /**
                 * Constructs a new FourRowTemplate.
                 * @memberof E2E.Message.TemplateMessage
                 * @classdesc Represents a FourRowTemplate.
                 * @implements IFourRowTemplate
                 * @constructor
                 * @param {E2E.Message.TemplateMessage.IFourRowTemplate=} [properties] Properties to set
                 */
                function FourRowTemplate(properties) {
                    this.buttons = [];
                    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]];
                }

                /**
                 * FourRowTemplate content.
                 * @member {E2E.Message.IHighlyStructuredMessage|null|undefined} content
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @instance
                 */
                FourRowTemplate.prototype.content = null;

                /**
                 * FourRowTemplate footer.
                 * @member {E2E.Message.IHighlyStructuredMessage|null|undefined} footer
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @instance
                 */
                FourRowTemplate.prototype.footer = null;

                /**
                 * FourRowTemplate buttons.
                 * @member {Array.<E2E.ITemplateButton>} buttons
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @instance
                 */
                FourRowTemplate.prototype.buttons = $util.emptyArray;

                /**
                 * FourRowTemplate documentMessage.
                 * @member {E2E.Message.IDocumentMessage|null|undefined} documentMessage
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @instance
                 */
                FourRowTemplate.prototype.documentMessage = null;

                /**
                 * FourRowTemplate highlyStructuredMessage.
                 * @member {E2E.Message.IHighlyStructuredMessage|null|undefined} highlyStructuredMessage
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @instance
                 */
                FourRowTemplate.prototype.highlyStructuredMessage = null;

                /**
                 * FourRowTemplate imageMessage.
                 * @member {E2E.Message.IImageMessage|null|undefined} imageMessage
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @instance
                 */
                FourRowTemplate.prototype.imageMessage = null;

                /**
                 * FourRowTemplate videoMessage.
                 * @member {E2E.Message.IVideoMessage|null|undefined} videoMessage
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @instance
                 */
                FourRowTemplate.prototype.videoMessage = null;

                /**
                 * FourRowTemplate locationMessage.
                 * @member {E2E.Message.ILocationMessage|null|undefined} locationMessage
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @instance
                 */
                FourRowTemplate.prototype.locationMessage = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * FourRowTemplate _content.
                 * @member {"content"|undefined} _content
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @instance
                 */
                Object.defineProperty(FourRowTemplate.prototype, "_content", {
                    get: $util.oneOfGetter($oneOfFields = ["content"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * FourRowTemplate _footer.
                 * @member {"footer"|undefined} _footer
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @instance
                 */
                Object.defineProperty(FourRowTemplate.prototype, "_footer", {
                    get: $util.oneOfGetter($oneOfFields = ["footer"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * FourRowTemplate title.
                 * @member {"documentMessage"|"highlyStructuredMessage"|"imageMessage"|"videoMessage"|"locationMessage"|undefined} title
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @instance
                 */
                Object.defineProperty(FourRowTemplate.prototype, "title", {
                    get: $util.oneOfGetter($oneOfFields = ["documentMessage", "highlyStructuredMessage", "imageMessage", "videoMessage", "locationMessage"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new FourRowTemplate instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @static
                 * @param {E2E.Message.TemplateMessage.IFourRowTemplate=} [properties] Properties to set
                 * @returns {E2E.Message.TemplateMessage.FourRowTemplate} FourRowTemplate instance
                 */
                FourRowTemplate.create = function create(properties) {
                    return new FourRowTemplate(properties);
                };

                /**
                 * Encodes the specified FourRowTemplate message. Does not implicitly {@link E2E.Message.TemplateMessage.FourRowTemplate.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @static
                 * @param {E2E.Message.TemplateMessage.IFourRowTemplate} message FourRowTemplate message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FourRowTemplate.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.documentMessage != null && Object.hasOwnProperty.call(message, "documentMessage"))
                        $root.E2E.Message.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    if (message.highlyStructuredMessage != null && Object.hasOwnProperty.call(message, "highlyStructuredMessage"))
                        $root.E2E.Message.HighlyStructuredMessage.encode(message.highlyStructuredMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage"))
                        $root.E2E.Message.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                    if (message.videoMessage != null && Object.hasOwnProperty.call(message, "videoMessage"))
                        $root.E2E.Message.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                    if (message.locationMessage != null && Object.hasOwnProperty.call(message, "locationMessage"))
                        $root.E2E.Message.LocationMessage.encode(message.locationMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                    if (message.content != null && Object.hasOwnProperty.call(message, "content"))
                        $root.E2E.Message.HighlyStructuredMessage.encode(message.content, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                    if (message.footer != null && Object.hasOwnProperty.call(message, "footer"))
                        $root.E2E.Message.HighlyStructuredMessage.encode(message.footer, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                    if (message.buttons != null && message.buttons.length)
                        for (var i = 0; i < message.buttons.length; ++i)
                            $root.E2E.TemplateButton.encode(message.buttons[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                    return writer;
                };

                /**
                 * Encodes the specified FourRowTemplate message, length delimited. Does not implicitly {@link E2E.Message.TemplateMessage.FourRowTemplate.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @static
                 * @param {E2E.Message.TemplateMessage.IFourRowTemplate} message FourRowTemplate message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FourRowTemplate.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a FourRowTemplate message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.TemplateMessage.FourRowTemplate} FourRowTemplate
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FourRowTemplate.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.E2E.Message.TemplateMessage.FourRowTemplate();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 6: {
                                message.content = $root.E2E.Message.HighlyStructuredMessage.decode(reader, reader.uint32());
                                break;
                            }
                        case 7: {
                                message.footer = $root.E2E.Message.HighlyStructuredMessage.decode(reader, reader.uint32());
                                break;
                            }
                        case 8: {
                                if (!(message.buttons && message.buttons.length))
                                    message.buttons = [];
                                message.buttons.push($root.E2E.TemplateButton.decode(reader, reader.uint32()));
                                break;
                            }
                        case 1: {
                                message.documentMessage = $root.E2E.Message.DocumentMessage.decode(reader, reader.uint32());
                                break;
                            }
                        case 2: {
                                message.highlyStructuredMessage = $root.E2E.Message.HighlyStructuredMessage.decode(reader, reader.uint32());
                                break;
                            }
                        case 3: {
                                message.imageMessage = $root.E2E.Message.ImageMessage.decode(reader, reader.uint32());
                                break;
                            }
                        case 4: {
                                message.videoMessage = $root.E2E.Message.VideoMessage.decode(reader, reader.uint32());
                                break;
                            }
                        case 5: {
                                message.locationMessage = $root.E2E.Message.LocationMessage.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a FourRowTemplate message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.TemplateMessage.FourRowTemplate} FourRowTemplate
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FourRowTemplate.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a FourRowTemplate message.
                 * @function verify
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                FourRowTemplate.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.content != null && message.hasOwnProperty("content")) {
                        properties._content = 1;
                        {
                            var error = $root.E2E.Message.HighlyStructuredMessage.verify(message.content);
                            if (error)
                                return "content." + error;
                        }
                    }
                    if (message.footer != null && message.hasOwnProperty("footer")) {
                        properties._footer = 1;
                        {
                            var error = $root.E2E.Message.HighlyStructuredMessage.verify(message.footer);
                            if (error)
                                return "footer." + error;
                        }
                    }
                    if (message.buttons != null && message.hasOwnProperty("buttons")) {
                        if (!Array.isArray(message.buttons))
                            return "buttons: array expected";
                        for (var i = 0; i < message.buttons.length; ++i) {
                            var error = $root.E2E.TemplateButton.verify(message.buttons[i]);
                            if (error)
                                return "buttons." + error;
                        }
                    }
                    if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) {
                        properties.title = 1;
                        {
                            var error = $root.E2E.Message.DocumentMessage.verify(message.documentMessage);
                            if (error)
                                return "documentMessage." + error;
                        }
                    }
                    if (message.highlyStructuredMessage != null && message.hasOwnProperty("highlyStructuredMessage")) {
                        if (properties.title === 1)
                            return "title: multiple values";
                        properties.title = 1;
                        {
                            var error = $root.E2E.Message.HighlyStructuredMessage.verify(message.highlyStructuredMessage);
                            if (error)
                                return "highlyStructuredMessage." + error;
                        }
                    }
                    if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) {
                        if (properties.title === 1)
                            return "title: multiple values";
                        properties.title = 1;
                        {
                            var error = $root.E2E.Message.ImageMessage.verify(message.imageMessage);
                            if (error)
                                return "imageMessage." + error;
                        }
                    }
                    if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) {
                        if (properties.title === 1)
                            return "title: multiple values";
                        properties.title = 1;
                        {
                            var error = $root.E2E.Message.VideoMessage.verify(message.videoMessage);
                            if (error)
                                return "videoMessage." + error;
                        }
                    }
                    if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) {
                        if (properties.title === 1)
                            return "title: multiple values";
                        properties.title = 1;
                        {
                            var error = $root.E2E.Message.LocationMessage.verify(message.locationMessage);
                            if (error)
                                return "locationMessage." + error;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a FourRowTemplate message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.TemplateMessage.FourRowTemplate} FourRowTemplate
                 */
                FourRowTemplate.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.TemplateMessage.FourRowTemplate)
                        return object;
                    var message = new $root.E2E.Message.TemplateMessage.FourRowTemplate();
                    if (object.content != null) {
                        if (typeof object.content !== "object")
                            throw TypeError(".E2E.Message.TemplateMessage.FourRowTemplate.content: object expected");
                        message.content = $root.E2E.Message.HighlyStructuredMessage.fromObject(object.content);
                    }
                    if (object.footer != null) {
                        if (typeof object.footer !== "object")
                            throw TypeError(".E2E.Message.TemplateMessage.FourRowTemplate.footer: object expected");
                        message.footer = $root.E2E.Message.HighlyStructuredMessage.fromObject(object.footer);
                    }
                    if (object.buttons) {
                        if (!Array.isArray(object.buttons))
                            throw TypeError(".E2E.Message.TemplateMessage.FourRowTemplate.buttons: array expected");
                        message.buttons = [];
                        for (var i = 0; i < object.buttons.length; ++i) {
                            if (typeof object.buttons[i] !== "object")
                                throw TypeError(".E2E.Message.TemplateMessage.FourRowTemplate.buttons: object expected");
                            message.buttons[i] = $root.E2E.TemplateButton.fromObject(object.buttons[i]);
                        }
                    }
                    if (object.documentMessage != null) {
                        if (typeof object.documentMessage !== "object")
                            throw TypeError(".E2E.Message.TemplateMessage.FourRowTemplate.documentMessage: object expected");
                        message.documentMessage = $root.E2E.Message.DocumentMessage.fromObject(object.documentMessage);
                    }
                    if (object.highlyStructuredMessage != null) {
                        if (typeof object.highlyStructuredMessage !== "object")
                            throw TypeError(".E2E.Message.TemplateMessage.FourRowTemplate.highlyStructuredMessage: object expected");
                        message.highlyStructuredMessage = $root.E2E.Message.HighlyStructuredMessage.fromObject(object.highlyStructuredMessage);
                    }
                    if (object.imageMessage != null) {
                        if (typeof object.imageMessage !== "object")
                            throw TypeError(".E2E.Message.TemplateMessage.FourRowTemplate.imageMessage: object expected");
                        message.imageMessage = $root.E2E.Message.ImageMessage.fromObject(object.imageMessage);
                    }
                    if (object.videoMessage != null) {
                        if (typeof object.videoMessage !== "object")
                            throw TypeError(".E2E.Message.TemplateMessage.FourRowTemplate.videoMessage: object expected");
                        message.videoMessage = $root.E2E.Message.VideoMessage.fromObject(object.videoMessage);
                    }
                    if (object.locationMessage != null) {
                        if (typeof object.locationMessage !== "object")
                            throw TypeError(".E2E.Message.TemplateMessage.FourRowTemplate.locationMessage: object expected");
                        message.locationMessage = $root.E2E.Message.LocationMessage.fromObject(object.locationMessage);
                    }
                    return message;
                };

                /**
                 * Creates a plain object from a FourRowTemplate message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @static
                 * @param {E2E.Message.TemplateMessage.FourRowTemplate} message FourRowTemplate
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                FourRowTemplate.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.buttons = [];
                    if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) {
                        object.documentMessage = $root.E2E.Message.DocumentMessage.toObject(message.documentMessage, options);
                        if (options.oneofs)
                            object.title = "documentMessage";
                    }
                    if (message.highlyStructuredMessage != null && message.hasOwnProperty("highlyStructuredMessage")) {
                        object.highlyStructuredMessage = $root.E2E.Message.HighlyStructuredMessage.toObject(message.highlyStructuredMessage, options);
                        if (options.oneofs)
                            object.title = "highlyStructuredMessage";
                    }
                    if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) {
                        object.imageMessage = $root.E2E.Message.ImageMessage.toObject(message.imageMessage, options);
                        if (options.oneofs)
                            object.title = "imageMessage";
                    }
                    if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) {
                        object.videoMessage = $root.E2E.Message.VideoMessage.toObject(message.videoMessage, options);
                        if (options.oneofs)
                            object.title = "videoMessage";
                    }
                    if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) {
                        object.locationMessage = $root.E2E.Message.LocationMessage.toObject(message.locationMessage, options);
                        if (options.oneofs)
                            object.title = "locationMessage";
                    }
                    if (message.content != null && message.hasOwnProperty("content")) {
                        object.content = $root.E2E.Message.HighlyStructuredMessage.toObject(message.content, options);
                        if (options.oneofs)
                            object._content = "content";
                    }
                    if (message.footer != null && message.hasOwnProperty("footer")) {
                        object.footer = $root.E2E.Message.HighlyStructuredMessage.toObject(message.footer, options);
                        if (options.oneofs)
                            object._footer = "footer";
                    }
                    if (message.buttons && message.buttons.length) {
                        object.buttons = [];
                        for (var j = 0; j < message.buttons.length; ++j)
                            object.buttons[j] = $root.E2E.TemplateButton.toObject(message.buttons[j], options);
                    }
                    return object;
                };

                /**
                 * Converts this FourRowTemplate to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                FourRowTemplate.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for FourRowTemplate
                 * @function getTypeUrl
                 * @memberof E2E.Message.TemplateMessage.FourRowTemplate
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                FourRowTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.TemplateMessage.FourRowTemplate";
                };

                return FourRowTemplate;
            })();

            TemplateMessage.HydratedFourRowTemplate = (function() {

                /**
                 * Properties of a HydratedFourRowTemplate.
                 * @memberof E2E.Message.TemplateMessage
                 * @interface IHydratedFourRowTemplate
                 * @property {string|null} [hydratedContentText] HydratedFourRowTemplate hydratedContentText
                 * @property {string|null} [hydratedFooterText] HydratedFourRowTemplate hydratedFooterText
                 * @property {Array.<E2E.IHydratedTemplateButton>|null} [hydratedButtons] HydratedFourRowTemplate hydratedButtons
                 * @property {string|null} [templateId] HydratedFourRowTemplate templateId
                 * @property {boolean|null} [maskLinkedDevices] HydratedFourRowTemplate maskLinkedDevices
                 * @property {E2E.Message.IDocumentMessage|null} [documentMessage] HydratedFourRowTemplate documentMessage
                 * @property {string|null} [hydratedTitleText] HydratedFourRowTemplate hydratedTitleText
                 * @property {E2E.Message.IImageMessage|null} [imageMessage] HydratedFourRowTemplate imageMessage
                 * @property {E2E.Message.IVideoMessage|null} [videoMessage] HydratedFourRowTemplate videoMessage
                 * @property {E2E.Message.ILocationMessage|null} [locationMessage] HydratedFourRowTemplate locationMessage
                 */

                /**
                 * Constructs a new HydratedFourRowTemplate.
                 * @memberof E2E.Message.TemplateMessage
                 * @classdesc Represents a HydratedFourRowTemplate.
                 * @implements IHydratedFourRowTemplate
                 * @constructor
                 * @param {E2E.Message.TemplateMessage.IHydratedFourRowTemplate=} [properties] Properties to set
                 */
                function HydratedFourRowTemplate(properties) {
                    this.hydratedButtons = [];
                    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]];
                }

                /**
                 * HydratedFourRowTemplate hydratedContentText.
                 * @member {string|null|undefined} hydratedContentText
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                HydratedFourRowTemplate.prototype.hydratedContentText = null;

                /**
                 * HydratedFourRowTemplate hydratedFooterText.
                 * @member {string|null|undefined} hydratedFooterText
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                HydratedFourRowTemplate.prototype.hydratedFooterText = null;

                /**
                 * HydratedFourRowTemplate hydratedButtons.
                 * @member {Array.<E2E.IHydratedTemplateButton>} hydratedButtons
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                HydratedFourRowTemplate.prototype.hydratedButtons = $util.emptyArray;

                /**
                 * HydratedFourRowTemplate templateId.
                 * @member {string|null|undefined} templateId
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                HydratedFourRowTemplate.prototype.templateId = null;

                /**
                 * HydratedFourRowTemplate maskLinkedDevices.
                 * @member {boolean|null|undefined} maskLinkedDevices
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                HydratedFourRowTemplate.prototype.maskLinkedDevices = null;

                /**
                 * HydratedFourRowTemplate documentMessage.
                 * @member {E2E.Message.IDocumentMessage|null|undefined} documentMessage
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                HydratedFourRowTemplate.prototype.documentMessage = null;

                /**
                 * HydratedFourRowTemplate hydratedTitleText.
                 * @member {string|null|undefined} hydratedTitleText
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                HydratedFourRowTemplate.prototype.hydratedTitleText = null;

                /**
                 * HydratedFourRowTemplate imageMessage.
                 * @member {E2E.Message.IImageMessage|null|undefined} imageMessage
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                HydratedFourRowTemplate.prototype.imageMessage = null;

                /**
                 * HydratedFourRowTemplate videoMessage.
                 * @member {E2E.Message.IVideoMessage|null|undefined} videoMessage
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                HydratedFourRowTemplate.prototype.videoMessage = null;

                /**
                 * HydratedFourRowTemplate locationMessage.
                 * @member {E2E.Message.ILocationMessage|null|undefined} locationMessage
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                HydratedFourRowTemplate.prototype.locationMessage = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * HydratedFourRowTemplate _hydratedContentText.
                 * @member {"hydratedContentText"|undefined} _hydratedContentText
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                Object.defineProperty(HydratedFourRowTemplate.prototype, "_hydratedContentText", {
                    get: $util.oneOfGetter($oneOfFields = ["hydratedContentText"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * HydratedFourRowTemplate _hydratedFooterText.
                 * @member {"hydratedFooterText"|undefined} _hydratedFooterText
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                Object.defineProperty(HydratedFourRowTemplate.prototype, "_hydratedFooterText", {
                    get: $util.oneOfGetter($oneOfFields = ["hydratedFooterText"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * HydratedFourRowTemplate _templateId.
                 * @member {"templateId"|undefined} _templateId
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                Object.defineProperty(HydratedFourRowTemplate.prototype, "_templateId", {
                    get: $util.oneOfGetter($oneOfFields = ["templateId"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * HydratedFourRowTemplate _maskLinkedDevices.
                 * @member {"maskLinkedDevices"|undefined} _maskLinkedDevices
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                Object.defineProperty(HydratedFourRowTemplate.prototype, "_maskLinkedDevices", {
                    get: $util.oneOfGetter($oneOfFields = ["maskLinkedDevices"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * HydratedFourRowTemplate title.
                 * @member {"documentMessage"|"hydratedTitleText"|"imageMessage"|"videoMessage"|"locationMessage"|undefined} title
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 */
                Object.defineProperty(HydratedFourRowTemplate.prototype, "title", {
                    get: $util.oneOfGetter($oneOfFields = ["documentMessage", "hydratedTitleText", "imageMessage", "videoMessage", "locationMessage"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new HydratedFourRowTemplate instance using the specified properties.
                 * @function create
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @static
                 * @param {E2E.Message.TemplateMessage.IHydratedFourRowTemplate=} [properties] Properties to set
                 * @returns {E2E.Message.TemplateMessage.HydratedFourRowTemplate} HydratedFourRowTemplate instance
                 */
                HydratedFourRowTemplate.create = function create(properties) {
                    return new HydratedFourRowTemplate(properties);
                };

                /**
                 * Encodes the specified HydratedFourRowTemplate message. Does not implicitly {@link E2E.Message.TemplateMessage.HydratedFourRowTemplate.verify|verify} messages.
                 * @function encode
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @static
                 * @param {E2E.Message.TemplateMessage.IHydratedFourRowTemplate} message HydratedFourRowTemplate message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                HydratedFourRowTemplate.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.documentMessage != null && Object.hasOwnProperty.call(message, "documentMessage"))
                        $root.E2E.Message.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    if (message.hydratedTitleText != null && Object.hasOwnProperty.call(message, "hydratedTitleText"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.hydratedTitleText);
                    if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage"))
                        $root.E2E.Message.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                    if (message.videoMessage != null && Object.hasOwnProperty.call(message, "videoMessage"))
                        $root.E2E.Message.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                    if (message.locationMessage != null && Object.hasOwnProperty.call(message, "locationMessage"))
                        $root.E2E.Message.LocationMessage.encode(message.locationMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                    if (message.hydratedContentText != null && Object.hasOwnProperty.call(message, "hydratedContentText"))
                        writer.uint32(/* id 6, wireType 2 =*/50).string(message.hydratedContentText);
                    if (message.hydratedFooterText != null && Object.hasOwnProperty.call(message, "hydratedFooterText"))
                        writer.uint32(/* id 7, wireType 2 =*/58).string(message.hydratedFooterText);
                    if (message.hydratedButtons != null && message.hydratedButtons.length)
                        for (var i = 0; i < message.hydratedButtons.length; ++i)
                            $root.E2E.HydratedTemplateButton.encode(message.hydratedButtons[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                    if (message.templateId != null && Object.hasOwnProperty.call(message, "templateId"))
                        writer.uint32(/* id 9, wireType 2 =*/74).string(message.templateId);
                    if (message.maskLinkedDevices != null && Object.hasOwnProperty.call(message, "maskLinkedDevices"))
                        writer.uint32(/* id 10, wireType 0 =*/80).bool(message.maskLinkedDevices);
                    return writer;
                };

                /**
                 * Encodes the specified HydratedFourRowTemplate message, length delimited. Does not implicitly {@link E2E.Message.TemplateMessage.HydratedFourRowTemplate.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @static
                 * @param {E2E.Message.TemplateMessage.IHydratedFourRowTemplate} message HydratedFourRowTemplate message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                HydratedFourRowTemplate.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a HydratedFourRowTemplate message from the specified reader or buffer.
                 * @function decode
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {E2E.Message.TemplateMessage.HydratedFourRowTemplate} HydratedFourRowTemplate
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                HydratedFourRowTemplate.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.E2E.Message.TemplateMessage.HydratedFourRowTemplate();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 6: {
                                message.hydratedContentText = reader.string();
                                break;
                            }
                        case 7: {
                                message.hydratedFooterText = reader.string();
                                break;
                            }
                        case 8: {
                                if (!(message.hydratedButtons && message.hydratedButtons.length))
                                    message.hydratedButtons = [];
                                message.hydratedButtons.push($root.E2E.HydratedTemplateButton.decode(reader, reader.uint32()));
                                break;
                            }
                        case 9: {
                                message.templateId = reader.string();
                                break;
                            }
                        case 10: {
                                message.maskLinkedDevices = reader.bool();
                                break;
                            }
                        case 1: {
                                message.documentMessage = $root.E2E.Message.DocumentMessage.decode(reader, reader.uint32());
                                break;
                            }
                        case 2: {
                                message.hydratedTitleText = reader.string();
                                break;
                            }
                        case 3: {
                                message.imageMessage = $root.E2E.Message.ImageMessage.decode(reader, reader.uint32());
                                break;
                            }
                        case 4: {
                                message.videoMessage = $root.E2E.Message.VideoMessage.decode(reader, reader.uint32());
                                break;
                            }
                        case 5: {
                                message.locationMessage = $root.E2E.Message.LocationMessage.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a HydratedFourRowTemplate message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {E2E.Message.TemplateMessage.HydratedFourRowTemplate} HydratedFourRowTemplate
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                HydratedFourRowTemplate.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a HydratedFourRowTemplate message.
                 * @function verify
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                HydratedFourRowTemplate.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.hydratedContentText != null && message.hasOwnProperty("hydratedContentText")) {
                        properties._hydratedContentText = 1;
                        if (!$util.isString(message.hydratedContentText))
                            return "hydratedContentText: string expected";
                    }
                    if (message.hydratedFooterText != null && message.hasOwnProperty("hydratedFooterText")) {
                        properties._hydratedFooterText = 1;
                        if (!$util.isString(message.hydratedFooterText))
                            return "hydratedFooterText: string expected";
                    }
                    if (message.hydratedButtons != null && message.hasOwnProperty("hydratedButtons")) {
                        if (!Array.isArray(message.hydratedButtons))
                            return "hydratedButtons: array expected";
                        for (var i = 0; i < message.hydratedButtons.length; ++i) {
                            var error = $root.E2E.HydratedTemplateButton.verify(message.hydratedButtons[i]);
                            if (error)
                                return "hydratedButtons." + error;
                        }
                    }
                    if (message.templateId != null && message.hasOwnProperty("templateId")) {
                        properties._templateId = 1;
                        if (!$util.isString(message.templateId))
                            return "templateId: string expected";
                    }
                    if (message.maskLinkedDevices != null && message.hasOwnProperty("maskLinkedDevices")) {
                        properties._maskLinkedDevices = 1;
                        if (typeof message.maskLinkedDevices !== "boolean")
                            return "maskLinkedDevices: boolean expected";
                    }
                    if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) {
                        properties.title = 1;
                        {
                            var error = $root.E2E.Message.DocumentMessage.verify(message.documentMessage);
                            if (error)
                                return "documentMessage." + error;
                        }
                    }
                    if (message.hydratedTitleText != null && message.hasOwnProperty("hydratedTitleText")) {
                        if (properties.title === 1)
                            return "title: multiple values";
                        properties.title = 1;
                        if (!$util.isString(message.hydratedTitleText))
                            return "hydratedTitleText: string expected";
                    }
                    if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) {
                        if (properties.title === 1)
                            return "title: multiple values";
                        properties.title = 1;
                        {
                            var error = $root.E2E.Message.ImageMessage.verify(message.imageMessage);
                            if (error)
                                return "imageMessage." + error;
                        }
                    }
                    if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) {
                        if (properties.title === 1)
                            return "title: multiple values";
                        properties.title = 1;
                        {
                            var error = $root.E2E.Message.VideoMessage.verify(message.videoMessage);
                            if (error)
                                return "videoMessage." + error;
                        }
                    }
                    if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) {
                        if (properties.title === 1)
                            return "title: multiple values";
                        properties.title = 1;
                        {
                            var error = $root.E2E.Message.LocationMessage.verify(message.locationMessage);
                            if (error)
                                return "locationMessage." + error;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a HydratedFourRowTemplate message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {E2E.Message.TemplateMessage.HydratedFourRowTemplate} HydratedFourRowTemplate
                 */
                HydratedFourRowTemplate.fromObject = function fromObject(object) {
                    if (object instanceof $root.E2E.Message.TemplateMessage.HydratedFourRowTemplate)
                        return object;
                    var message = new $root.E2E.Message.TemplateMessage.HydratedFourRowTemplate();
                    if (object.hydratedContentText != null)
                        message.hydratedContentText = String(object.hydratedContentText);
                    if (object.hydratedFooterText != null)
                        message.hydratedFooterText = String(object.hydratedFooterText);
                    if (object.hydratedButtons) {
                        if (!Array.isArray(object.hydratedButtons))
                            throw TypeError(".E2E.Message.TemplateMessage.HydratedFourRowTemplate.hydratedButtons: array expected");
                        message.hydratedButtons = [];
                        for (var i = 0; i < object.hydratedButtons.length; ++i) {
                            if (typeof object.hydratedButtons[i] !== "object")
                                throw TypeError(".E2E.Message.TemplateMessage.HydratedFourRowTemplate.hydratedButtons: object expected");
                            message.hydratedButtons[i] = $root.E2E.HydratedTemplateButton.fromObject(object.hydratedButtons[i]);
                        }
                    }
                    if (object.templateId != null)
                        message.templateId = String(object.templateId);
                    if (object.maskLinkedDevices != null)
                        message.maskLinkedDevices = Boolean(object.maskLinkedDevices);
                    if (object.documentMessage != null) {
                        if (typeof object.documentMessage !== "object")
                            throw TypeError(".E2E.Message.TemplateMessage.HydratedFourRowTemplate.documentMessage: object expected");
                        message.documentMessage = $root.E2E.Message.DocumentMessage.fromObject(object.documentMessage);
                    }
                    if (object.hydratedTitleText != null)
                        message.hydratedTitleText = String(object.hydratedTitleText);
                    if (object.imageMessage != null) {
                        if (typeof object.imageMessage !== "object")
                            throw TypeError(".E2E.Message.TemplateMessage.HydratedFourRowTemplate.imageMessage: object expected");
                        message.imageMessage = $root.E2E.Message.ImageMessage.fromObject(object.imageMessage);
                    }
                    if (object.videoMessage != null) {
                        if (typeof object.videoMessage !== "object")
                            throw TypeError(".E2E.Message.TemplateMessage.HydratedFourRowTemplate.videoMessage: object expected");
                        message.videoMessage = $root.E2E.Message.VideoMessage.fromObject(object.videoMessage);
                    }
                    if (object.locationMessage != null) {
                        if (typeof object.locationMessage !== "object")
                            throw TypeError(".E2E.Message.TemplateMessage.HydratedFourRowTemplate.locationMessage: object expected");
                        message.locationMessage = $root.E2E.Message.LocationMessage.fromObject(object.locationMessage);
                    }
                    return message;
                };

                /**
                 * Creates a plain object from a HydratedFourRowTemplate message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @static
                 * @param {E2E.Message.TemplateMessage.HydratedFourRowTemplate} message HydratedFourRowTemplate
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                HydratedFourRowTemplate.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.hydratedButtons = [];
                    if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) {
                        object.documentMessage = $root.E2E.Message.DocumentMessage.toObject(message.documentMessage, options);
                        if (options.oneofs)
                            object.title = "documentMessage";
                    }
                    if (message.hydratedTitleText != null && message.hasOwnProperty("hydratedTitleText")) {
                        object.hydratedTitleText = message.hydratedTitleText;
                        if (options.oneofs)
                            object.title = "hydratedTitleText";
                    }
                    if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) {
                        object.imageMessage = $root.E2E.Message.ImageMessage.toObject(message.imageMessage, options);
                        if (options.oneofs)
                            object.title = "imageMessage";
                    }
                    if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) {
                        object.videoMessage = $root.E2E.Message.VideoMessage.toObject(message.videoMessage, options);
                        if (options.oneofs)
                            object.title = "videoMessage";
                    }
                    if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) {
                        object.locationMessage = $root.E2E.Message.LocationMessage.toObject(message.locationMessage, options);
                        if (options.oneofs)
                            object.title = "locationMessage";
                    }
                    if (message.hydratedContentText != null && message.hasOwnProperty("hydratedContentText")) {
                        object.hydratedContentText = message.hydratedContentText;
                        if (options.oneofs)
                            object._hydratedContentText = "hydratedContentText";
                    }
                    if (message.hydratedFooterText != null && message.hasOwnProperty("hydratedFooterText")) {
                        object.hydratedFooterText = message.hydratedFooterText;
                        if (options.oneofs)
                            object._hydratedFooterText = "hydratedFooterText";
                    }
                    if (message.hydratedButtons && message.hydratedButtons.length) {
                        object.hydratedButtons = [];
                        for (var j = 0; j < message.hydratedButtons.length; ++j)
                            object.hydratedButtons[j] = $root.E2E.HydratedTemplateButton.toObject(message.hydratedButtons[j], options);
                    }
                    if (message.templateId != null && message.hasOwnProperty("templateId")) {
                        object.templateId = message.templateId;
                        if (options.oneofs)
                            object._templateId = "templateId";
                    }
                    if (message.maskLinkedDevices != null && message.hasOwnProperty("maskLinkedDevices")) {
                        object.maskLinkedDevices = message.maskLinkedDevices;
                        if (options.oneofs)
                            object._maskLinkedDevices = "maskLinkedDevices";
                    }
                    return object;
                };

                /**
                 * Converts this HydratedFourRowTemplate to JSON.
                 * @function toJSON
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                HydratedFourRowTemplate.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for HydratedFourRowTemplate
                 * @function getTypeUrl
                 * @memberof E2E.Message.TemplateMessage.HydratedFourRowTemplate
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                HydratedFourRowTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/E2E.Message.TemplateMessage.HydratedFourRowTemplate";
                };

                return HydratedFourRowTemplate;
            })();

            return TemplateMessage;
        })();

        Message.URLMetadata = (function() {

            /**
             * Properties of a URLMetadata.
             * @memberof E2E.Message
             * @interface IURLMetadata
             * @property {number|null} [fbExperimentId] URLMetadata fbExperimentId
             */

            /**
             * Constructs a new URLMetadata.
             * @memberof E2E.Message
             * @classdesc Represents a URLMetadata.
             * @implements IURLMetadata
             * @constructor
             * @param {E2E.Message.IURLMetadata=} [properties] Properties to set
             */
            function URLMetadata(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]];
            }

            /**
             * URLMetadata fbExperimentId.
             * @member {number|null|undefined} fbExperimentId
             * @memberof E2E.Message.URLMetadata
             * @instance
             */
            URLMetadata.prototype.fbExperimentId = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * URLMetadata _fbExperimentId.
             * @member {"fbExperimentId"|undefined} _fbExperimentId
             * @memberof E2E.Message.URLMetadata
             * @instance
             */
            Object.defineProperty(URLMetadata.prototype, "_fbExperimentId", {
                get: $util.oneOfGetter($oneOfFields = ["fbExperimentId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new URLMetadata instance using the specified properties.
             * @function create
             * @memberof E2E.Message.URLMetadata
             * @static
             * @param {E2E.Message.IURLMetadata=} [properties] Properties to set
             * @returns {E2E.Message.URLMetadata} URLMetadata instance
             */
            URLMetadata.create = function create(properties) {
                return new URLMetadata(properties);
            };

            /**
             * Encodes the specified URLMetadata message. Does not implicitly {@link E2E.Message.URLMetadata.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.URLMetadata
             * @static
             * @param {E2E.Message.IURLMetadata} message URLMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            URLMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.fbExperimentId != null && Object.hasOwnProperty.call(message, "fbExperimentId"))
                    writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.fbExperimentId);
                return writer;
            };

            /**
             * Encodes the specified URLMetadata message, length delimited. Does not implicitly {@link E2E.Message.URLMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.URLMetadata
             * @static
             * @param {E2E.Message.IURLMetadata} message URLMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            URLMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a URLMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.URLMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.URLMetadata} URLMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            URLMetadata.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.E2E.Message.URLMetadata();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.fbExperimentId = reader.uint32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a URLMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.URLMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.URLMetadata} URLMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            URLMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a URLMetadata message.
             * @function verify
             * @memberof E2E.Message.URLMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            URLMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.fbExperimentId != null && message.hasOwnProperty("fbExperimentId")) {
                    properties._fbExperimentId = 1;
                    if (!$util.isInteger(message.fbExperimentId))
                        return "fbExperimentId: integer expected";
                }
                return null;
            };

            /**
             * Creates a URLMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.URLMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.URLMetadata} URLMetadata
             */
            URLMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.URLMetadata)
                    return object;
                var message = new $root.E2E.Message.URLMetadata();
                if (object.fbExperimentId != null)
                    message.fbExperimentId = object.fbExperimentId >>> 0;
                return message;
            };

            /**
             * Creates a plain object from a URLMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.URLMetadata
             * @static
             * @param {E2E.Message.URLMetadata} message URLMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            URLMetadata.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.fbExperimentId != null && message.hasOwnProperty("fbExperimentId")) {
                    object.fbExperimentId = message.fbExperimentId;
                    if (options.oneofs)
                        object._fbExperimentId = "fbExperimentId";
                }
                return object;
            };

            /**
             * Converts this URLMetadata to JSON.
             * @function toJSON
             * @memberof E2E.Message.URLMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            URLMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for URLMetadata
             * @function getTypeUrl
             * @memberof E2E.Message.URLMetadata
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            URLMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.URLMetadata";
            };

            return URLMetadata;
        })();

        Message.VideoEndCard = (function() {

            /**
             * Properties of a VideoEndCard.
             * @memberof E2E.Message
             * @interface IVideoEndCard
             * @property {string|null} [username] VideoEndCard username
             * @property {string|null} [caption] VideoEndCard caption
             * @property {string|null} [thumbnailImageUrl] VideoEndCard thumbnailImageUrl
             * @property {string|null} [profilePictureUrl] VideoEndCard profilePictureUrl
             */

            /**
             * Constructs a new VideoEndCard.
             * @memberof E2E.Message
             * @classdesc Represents a VideoEndCard.
             * @implements IVideoEndCard
             * @constructor
             * @param {E2E.Message.IVideoEndCard=} [properties] Properties to set
             */
            function VideoEndCard(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]];
            }

            /**
             * VideoEndCard username.
             * @member {string|null|undefined} username
             * @memberof E2E.Message.VideoEndCard
             * @instance
             */
            VideoEndCard.prototype.username = null;

            /**
             * VideoEndCard caption.
             * @member {string|null|undefined} caption
             * @memberof E2E.Message.VideoEndCard
             * @instance
             */
            VideoEndCard.prototype.caption = null;

            /**
             * VideoEndCard thumbnailImageUrl.
             * @member {string|null|undefined} thumbnailImageUrl
             * @memberof E2E.Message.VideoEndCard
             * @instance
             */
            VideoEndCard.prototype.thumbnailImageUrl = null;

            /**
             * VideoEndCard profilePictureUrl.
             * @member {string|null|undefined} profilePictureUrl
             * @memberof E2E.Message.VideoEndCard
             * @instance
             */
            VideoEndCard.prototype.profilePictureUrl = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * VideoEndCard _username.
             * @member {"username"|undefined} _username
             * @memberof E2E.Message.VideoEndCard
             * @instance
             */
            Object.defineProperty(VideoEndCard.prototype, "_username", {
                get: $util.oneOfGetter($oneOfFields = ["username"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoEndCard _caption.
             * @member {"caption"|undefined} _caption
             * @memberof E2E.Message.VideoEndCard
             * @instance
             */
            Object.defineProperty(VideoEndCard.prototype, "_caption", {
                get: $util.oneOfGetter($oneOfFields = ["caption"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoEndCard _thumbnailImageUrl.
             * @member {"thumbnailImageUrl"|undefined} _thumbnailImageUrl
             * @memberof E2E.Message.VideoEndCard
             * @instance
             */
            Object.defineProperty(VideoEndCard.prototype, "_thumbnailImageUrl", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailImageUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoEndCard _profilePictureUrl.
             * @member {"profilePictureUrl"|undefined} _profilePictureUrl
             * @memberof E2E.Message.VideoEndCard
             * @instance
             */
            Object.defineProperty(VideoEndCard.prototype, "_profilePictureUrl", {
                get: $util.oneOfGetter($oneOfFields = ["profilePictureUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new VideoEndCard instance using the specified properties.
             * @function create
             * @memberof E2E.Message.VideoEndCard
             * @static
             * @param {E2E.Message.IVideoEndCard=} [properties] Properties to set
             * @returns {E2E.Message.VideoEndCard} VideoEndCard instance
             */
            VideoEndCard.create = function create(properties) {
                return new VideoEndCard(properties);
            };

            /**
             * Encodes the specified VideoEndCard message. Does not implicitly {@link E2E.Message.VideoEndCard.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.VideoEndCard
             * @static
             * @param {E2E.Message.IVideoEndCard} message VideoEndCard message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VideoEndCard.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.username != null && Object.hasOwnProperty.call(message, "username"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.username);
                if (message.caption != null && Object.hasOwnProperty.call(message, "caption"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.caption);
                if (message.thumbnailImageUrl != null && Object.hasOwnProperty.call(message, "thumbnailImageUrl"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.thumbnailImageUrl);
                if (message.profilePictureUrl != null && Object.hasOwnProperty.call(message, "profilePictureUrl"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.profilePictureUrl);
                return writer;
            };

            /**
             * Encodes the specified VideoEndCard message, length delimited. Does not implicitly {@link E2E.Message.VideoEndCard.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.VideoEndCard
             * @static
             * @param {E2E.Message.IVideoEndCard} message VideoEndCard message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VideoEndCard.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a VideoEndCard message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.VideoEndCard
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.VideoEndCard} VideoEndCard
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VideoEndCard.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.E2E.Message.VideoEndCard();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.username = reader.string();
                            break;
                        }
                    case 2: {
                            message.caption = reader.string();
                            break;
                        }
                    case 3: {
                            message.thumbnailImageUrl = reader.string();
                            break;
                        }
                    case 4: {
                            message.profilePictureUrl = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a VideoEndCard message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.VideoEndCard
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.VideoEndCard} VideoEndCard
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VideoEndCard.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a VideoEndCard message.
             * @function verify
             * @memberof E2E.Message.VideoEndCard
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            VideoEndCard.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.username != null && message.hasOwnProperty("username")) {
                    properties._username = 1;
                    if (!$util.isString(message.username))
                        return "username: string expected";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    properties._caption = 1;
                    if (!$util.isString(message.caption))
                        return "caption: string expected";
                }
                if (message.thumbnailImageUrl != null && message.hasOwnProperty("thumbnailImageUrl")) {
                    properties._thumbnailImageUrl = 1;
                    if (!$util.isString(message.thumbnailImageUrl))
                        return "thumbnailImageUrl: string expected";
                }
                if (message.profilePictureUrl != null && message.hasOwnProperty("profilePictureUrl")) {
                    properties._profilePictureUrl = 1;
                    if (!$util.isString(message.profilePictureUrl))
                        return "profilePictureUrl: string expected";
                }
                return null;
            };

            /**
             * Creates a VideoEndCard message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.VideoEndCard
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.VideoEndCard} VideoEndCard
             */
            VideoEndCard.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.VideoEndCard)
                    return object;
                var message = new $root.E2E.Message.VideoEndCard();
                if (object.username != null)
                    message.username = String(object.username);
                if (object.caption != null)
                    message.caption = String(object.caption);
                if (object.thumbnailImageUrl != null)
                    message.thumbnailImageUrl = String(object.thumbnailImageUrl);
                if (object.profilePictureUrl != null)
                    message.profilePictureUrl = String(object.profilePictureUrl);
                return message;
            };

            /**
             * Creates a plain object from a VideoEndCard message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.VideoEndCard
             * @static
             * @param {E2E.Message.VideoEndCard} message VideoEndCard
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            VideoEndCard.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.username != null && message.hasOwnProperty("username")) {
                    object.username = message.username;
                    if (options.oneofs)
                        object._username = "username";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    object.caption = message.caption;
                    if (options.oneofs)
                        object._caption = "caption";
                }
                if (message.thumbnailImageUrl != null && message.hasOwnProperty("thumbnailImageUrl")) {
                    object.thumbnailImageUrl = message.thumbnailImageUrl;
                    if (options.oneofs)
                        object._thumbnailImageUrl = "thumbnailImageUrl";
                }
                if (message.profilePictureUrl != null && message.hasOwnProperty("profilePictureUrl")) {
                    object.profilePictureUrl = message.profilePictureUrl;
                    if (options.oneofs)
                        object._profilePictureUrl = "profilePictureUrl";
                }
                return object;
            };

            /**
             * Converts this VideoEndCard to JSON.
             * @function toJSON
             * @memberof E2E.Message.VideoEndCard
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            VideoEndCard.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for VideoEndCard
             * @function getTypeUrl
             * @memberof E2E.Message.VideoEndCard
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            VideoEndCard.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.VideoEndCard";
            };

            return VideoEndCard;
        })();

        Message.VideoMessage = (function() {

            /**
             * Properties of a VideoMessage.
             * @memberof E2E.Message
             * @interface IVideoMessage
             * @property {string|null} [url] VideoMessage url
             * @property {string|null} [mimetype] VideoMessage mimetype
             * @property {Uint8Array|null} [fileSha256] VideoMessage fileSha256
             * @property {number|Long|null} [fileLength] VideoMessage fileLength
             * @property {number|null} [seconds] VideoMessage seconds
             * @property {Uint8Array|null} [mediaKey] VideoMessage mediaKey
             * @property {string|null} [caption] VideoMessage caption
             * @property {boolean|null} [gifPlayback] VideoMessage gifPlayback
             * @property {number|null} [height] VideoMessage height
             * @property {number|null} [width] VideoMessage width
             * @property {Uint8Array|null} [fileEncSha256] VideoMessage fileEncSha256
             * @property {Array.<E2E.IInteractiveAnnotation>|null} [interactiveAnnotations] VideoMessage interactiveAnnotations
             * @property {string|null} [directPath] VideoMessage directPath
             * @property {number|Long|null} [mediaKeyTimestamp] VideoMessage mediaKeyTimestamp
             * @property {Uint8Array|null} [jpegThumbnail] VideoMessage jpegThumbnail
             * @property {E2E.IContextInfo|null} [contextInfo] VideoMessage contextInfo
             * @property {Uint8Array|null} [streamingSidecar] VideoMessage streamingSidecar
             * @property {E2E.Message.VideoMessage.Attribution|null} [gifAttribution] VideoMessage gifAttribution
             * @property {boolean|null} [viewOnce] VideoMessage viewOnce
             * @property {string|null} [thumbnailDirectPath] VideoMessage thumbnailDirectPath
             * @property {Uint8Array|null} [thumbnailSha256] VideoMessage thumbnailSha256
             * @property {Uint8Array|null} [thumbnailEncSha256] VideoMessage thumbnailEncSha256
             * @property {string|null} [staticUrl] VideoMessage staticUrl
             * @property {Array.<E2E.IInteractiveAnnotation>|null} [annotations] VideoMessage annotations
             * @property {string|null} [accessibilityLabel] VideoMessage accessibilityLabel
             * @property {Array.<E2E.IProcessedVideo>|null} [processedVideos] VideoMessage processedVideos
             * @property {number|null} [externalShareFullVideoDurationInSeconds] VideoMessage externalShareFullVideoDurationInSeconds
             * @property {number|Long|null} [motionPhotoPresentationOffsetMs] VideoMessage motionPhotoPresentationOffsetMs
             * @property {string|null} [metadataUrl] VideoMessage metadataUrl
             * @property {E2E.Message.VideoMessage.VideoSourceType|null} [videoSourceType] VideoMessage videoSourceType
             * @property {E2E.Message.MediaKeyDomain|null} [mediaKeyDomain] VideoMessage mediaKeyDomain
             */

            /**
             * Constructs a new VideoMessage.
             * @memberof E2E.Message
             * @classdesc Represents a VideoMessage.
             * @implements IVideoMessage
             * @constructor
             * @param {E2E.Message.IVideoMessage=} [properties] Properties to set
             */
            function VideoMessage(properties) {
                this.interactiveAnnotations = [];
                this.annotations = [];
                this.processedVideos = [];
                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]];
            }

            /**
             * VideoMessage url.
             * @member {string|null|undefined} url
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.url = null;

            /**
             * VideoMessage mimetype.
             * @member {string|null|undefined} mimetype
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.mimetype = null;

            /**
             * VideoMessage fileSha256.
             * @member {Uint8Array|null|undefined} fileSha256
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.fileSha256 = null;

            /**
             * VideoMessage fileLength.
             * @member {number|Long|null|undefined} fileLength
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.fileLength = null;

            /**
             * VideoMessage seconds.
             * @member {number|null|undefined} seconds
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.seconds = null;

            /**
             * VideoMessage mediaKey.
             * @member {Uint8Array|null|undefined} mediaKey
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.mediaKey = null;

            /**
             * VideoMessage caption.
             * @member {string|null|undefined} caption
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.caption = null;

            /**
             * VideoMessage gifPlayback.
             * @member {boolean|null|undefined} gifPlayback
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.gifPlayback = null;

            /**
             * VideoMessage height.
             * @member {number|null|undefined} height
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.height = null;

            /**
             * VideoMessage width.
             * @member {number|null|undefined} width
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.width = null;

            /**
             * VideoMessage fileEncSha256.
             * @member {Uint8Array|null|undefined} fileEncSha256
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.fileEncSha256 = null;

            /**
             * VideoMessage interactiveAnnotations.
             * @member {Array.<E2E.IInteractiveAnnotation>} interactiveAnnotations
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.interactiveAnnotations = $util.emptyArray;

            /**
             * VideoMessage directPath.
             * @member {string|null|undefined} directPath
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.directPath = null;

            /**
             * VideoMessage mediaKeyTimestamp.
             * @member {number|Long|null|undefined} mediaKeyTimestamp
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.mediaKeyTimestamp = null;

            /**
             * VideoMessage jpegThumbnail.
             * @member {Uint8Array|null|undefined} jpegThumbnail
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.jpegThumbnail = null;

            /**
             * VideoMessage contextInfo.
             * @member {E2E.IContextInfo|null|undefined} contextInfo
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.contextInfo = null;

            /**
             * VideoMessage streamingSidecar.
             * @member {Uint8Array|null|undefined} streamingSidecar
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.streamingSidecar = null;

            /**
             * VideoMessage gifAttribution.
             * @member {E2E.Message.VideoMessage.Attribution|null|undefined} gifAttribution
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.gifAttribution = null;

            /**
             * VideoMessage viewOnce.
             * @member {boolean|null|undefined} viewOnce
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.viewOnce = null;

            /**
             * VideoMessage thumbnailDirectPath.
             * @member {string|null|undefined} thumbnailDirectPath
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.thumbnailDirectPath = null;

            /**
             * VideoMessage thumbnailSha256.
             * @member {Uint8Array|null|undefined} thumbnailSha256
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.thumbnailSha256 = null;

            /**
             * VideoMessage thumbnailEncSha256.
             * @member {Uint8Array|null|undefined} thumbnailEncSha256
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.thumbnailEncSha256 = null;

            /**
             * VideoMessage staticUrl.
             * @member {string|null|undefined} staticUrl
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.staticUrl = null;

            /**
             * VideoMessage annotations.
             * @member {Array.<E2E.IInteractiveAnnotation>} annotations
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.annotations = $util.emptyArray;

            /**
             * VideoMessage accessibilityLabel.
             * @member {string|null|undefined} accessibilityLabel
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.accessibilityLabel = null;

            /**
             * VideoMessage processedVideos.
             * @member {Array.<E2E.IProcessedVideo>} processedVideos
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.processedVideos = $util.emptyArray;

            /**
             * VideoMessage externalShareFullVideoDurationInSeconds.
             * @member {number|null|undefined} externalShareFullVideoDurationInSeconds
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.externalShareFullVideoDurationInSeconds = null;

            /**
             * VideoMessage motionPhotoPresentationOffsetMs.
             * @member {number|Long|null|undefined} motionPhotoPresentationOffsetMs
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.motionPhotoPresentationOffsetMs = null;

            /**
             * VideoMessage metadataUrl.
             * @member {string|null|undefined} metadataUrl
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.metadataUrl = null;

            /**
             * VideoMessage videoSourceType.
             * @member {E2E.Message.VideoMessage.VideoSourceType|null|undefined} videoSourceType
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.videoSourceType = null;

            /**
             * VideoMessage mediaKeyDomain.
             * @member {E2E.Message.MediaKeyDomain|null|undefined} mediaKeyDomain
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            VideoMessage.prototype.mediaKeyDomain = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * VideoMessage _url.
             * @member {"url"|undefined} _url
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_url", {
                get: $util.oneOfGetter($oneOfFields = ["url"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _mimetype.
             * @member {"mimetype"|undefined} _mimetype
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_mimetype", {
                get: $util.oneOfGetter($oneOfFields = ["mimetype"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _fileSha256.
             * @member {"fileSha256"|undefined} _fileSha256
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_fileSha256", {
                get: $util.oneOfGetter($oneOfFields = ["fileSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _fileLength.
             * @member {"fileLength"|undefined} _fileLength
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_fileLength", {
                get: $util.oneOfGetter($oneOfFields = ["fileLength"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _seconds.
             * @member {"seconds"|undefined} _seconds
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_seconds", {
                get: $util.oneOfGetter($oneOfFields = ["seconds"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _mediaKey.
             * @member {"mediaKey"|undefined} _mediaKey
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_mediaKey", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKey"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _caption.
             * @member {"caption"|undefined} _caption
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_caption", {
                get: $util.oneOfGetter($oneOfFields = ["caption"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _gifPlayback.
             * @member {"gifPlayback"|undefined} _gifPlayback
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_gifPlayback", {
                get: $util.oneOfGetter($oneOfFields = ["gifPlayback"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _height.
             * @member {"height"|undefined} _height
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_height", {
                get: $util.oneOfGetter($oneOfFields = ["height"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _width.
             * @member {"width"|undefined} _width
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_width", {
                get: $util.oneOfGetter($oneOfFields = ["width"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _fileEncSha256.
             * @member {"fileEncSha256"|undefined} _fileEncSha256
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_fileEncSha256", {
                get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _directPath.
             * @member {"directPath"|undefined} _directPath
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_directPath", {
                get: $util.oneOfGetter($oneOfFields = ["directPath"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _mediaKeyTimestamp.
             * @member {"mediaKeyTimestamp"|undefined} _mediaKeyTimestamp
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_mediaKeyTimestamp", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _jpegThumbnail.
             * @member {"jpegThumbnail"|undefined} _jpegThumbnail
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_jpegThumbnail", {
                get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _contextInfo.
             * @member {"contextInfo"|undefined} _contextInfo
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_contextInfo", {
                get: $util.oneOfGetter($oneOfFields = ["contextInfo"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _streamingSidecar.
             * @member {"streamingSidecar"|undefined} _streamingSidecar
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_streamingSidecar", {
                get: $util.oneOfGetter($oneOfFields = ["streamingSidecar"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _gifAttribution.
             * @member {"gifAttribution"|undefined} _gifAttribution
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_gifAttribution", {
                get: $util.oneOfGetter($oneOfFields = ["gifAttribution"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _viewOnce.
             * @member {"viewOnce"|undefined} _viewOnce
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_viewOnce", {
                get: $util.oneOfGetter($oneOfFields = ["viewOnce"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _thumbnailDirectPath.
             * @member {"thumbnailDirectPath"|undefined} _thumbnailDirectPath
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_thumbnailDirectPath", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailDirectPath"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _thumbnailSha256.
             * @member {"thumbnailSha256"|undefined} _thumbnailSha256
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_thumbnailSha256", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _thumbnailEncSha256.
             * @member {"thumbnailEncSha256"|undefined} _thumbnailEncSha256
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_thumbnailEncSha256", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailEncSha256"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _staticUrl.
             * @member {"staticUrl"|undefined} _staticUrl
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_staticUrl", {
                get: $util.oneOfGetter($oneOfFields = ["staticUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _accessibilityLabel.
             * @member {"accessibilityLabel"|undefined} _accessibilityLabel
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_accessibilityLabel", {
                get: $util.oneOfGetter($oneOfFields = ["accessibilityLabel"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _externalShareFullVideoDurationInSeconds.
             * @member {"externalShareFullVideoDurationInSeconds"|undefined} _externalShareFullVideoDurationInSeconds
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_externalShareFullVideoDurationInSeconds", {
                get: $util.oneOfGetter($oneOfFields = ["externalShareFullVideoDurationInSeconds"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _motionPhotoPresentationOffsetMs.
             * @member {"motionPhotoPresentationOffsetMs"|undefined} _motionPhotoPresentationOffsetMs
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_motionPhotoPresentationOffsetMs", {
                get: $util.oneOfGetter($oneOfFields = ["motionPhotoPresentationOffsetMs"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _metadataUrl.
             * @member {"metadataUrl"|undefined} _metadataUrl
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_metadataUrl", {
                get: $util.oneOfGetter($oneOfFields = ["metadataUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _videoSourceType.
             * @member {"videoSourceType"|undefined} _videoSourceType
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_videoSourceType", {
                get: $util.oneOfGetter($oneOfFields = ["videoSourceType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * VideoMessage _mediaKeyDomain.
             * @member {"mediaKeyDomain"|undefined} _mediaKeyDomain
             * @memberof E2E.Message.VideoMessage
             * @instance
             */
            Object.defineProperty(VideoMessage.prototype, "_mediaKeyDomain", {
                get: $util.oneOfGetter($oneOfFields = ["mediaKeyDomain"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new VideoMessage instance using the specified properties.
             * @function create
             * @memberof E2E.Message.VideoMessage
             * @static
             * @param {E2E.Message.IVideoMessage=} [properties] Properties to set
             * @returns {E2E.Message.VideoMessage} VideoMessage instance
             */
            VideoMessage.create = function create(properties) {
                return new VideoMessage(properties);
            };

            /**
             * Encodes the specified VideoMessage message. Does not implicitly {@link E2E.Message.VideoMessage.verify|verify} messages.
             * @function encode
             * @memberof E2E.Message.VideoMessage
             * @static
             * @param {E2E.Message.IVideoMessage} message VideoMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VideoMessage.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.url);
                if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimetype);
                if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256"))
                    writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.fileSha256);
                if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength"))
                    writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.fileLength);
                if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds"))
                    writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.seconds);
                if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey"))
                    writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.mediaKey);
                if (message.caption != null && Object.hasOwnProperty.call(message, "caption"))
                    writer.uint32(/* id 7, wireType 2 =*/58).string(message.caption);
                if (message.gifPlayback != null && Object.hasOwnProperty.call(message, "gifPlayback"))
                    writer.uint32(/* id 8, wireType 0 =*/64).bool(message.gifPlayback);
                if (message.height != null && Object.hasOwnProperty.call(message, "height"))
                    writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.height);
                if (message.width != null && Object.hasOwnProperty.call(message, "width"))
                    writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.width);
                if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256"))
                    writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.fileEncSha256);
                if (message.interactiveAnnotations != null && message.interactiveAnnotations.length)
                    for (var i = 0; i < message.interactiveAnnotations.length; ++i)
                        $root.E2E.InteractiveAnnotation.encode(message.interactiveAnnotations[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
                if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath"))
                    writer.uint32(/* id 13, wireType 2 =*/106).string(message.directPath);
                if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp"))
                    writer.uint32(/* id 14, wireType 0 =*/112).int64(message.mediaKeyTimestamp);
                if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail"))
                    writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.jpegThumbnail);
                if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo"))
                    $root.E2E.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
                if (message.streamingSidecar != null && Object.hasOwnProperty.call(message, "streamingSidecar"))
                    writer.uint32(/* id 18, wireType 2 =*/146).bytes(message.streamingSidecar);
                if (message.gifAttribution != null && Object.hasOwnProperty.call(message, "gifAttribution"))
                    writer.uint32(/* id 19, wireType 0 =*/152).int32(message.gifAttribution);
                if (message.viewOnce != null && Object.hasOwnProperty.call(message, "viewOnce"))
                    writer.uint32(/* id 20, wireType 0 =*/160).bool(message.viewOnce);
                if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath"))
                    writer.uint32(/* id 21, wireType 2 =*/170).string(message.thumbnailDirectPath);
                if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256"))
                    writer.uint32(/* id 22, wireType 2 =*/178).bytes(message.thumbnailSha256);
                if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256"))
                    writer.uint32(/* id 23, wireType 2 =*/186).bytes(message.thumbnailEncSha256);
                if (message.staticUrl != null && Object.hasOwnProperty.call(message, "staticUrl"))
                    writer.uint32(/* id 24, wireType 2 =*/194).string(message.staticUrl);
                if (message.annotations != null && message.annotations.length)
                    for (var i = 0; i < message.annotations.length; ++i)
                        $root.E2E.InteractiveAnnotation.encode(message.annotations[i], writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim();
                if (message.accessibilityLabel != null && Object.hasOwnProperty.call(message, "accessibilityLabel"))
                    writer.uint32(/* id 26, wireType 2 =*/210).string(message.accessibilityLabel);
                if (message.processedVideos != null && message.processedVideos.length)
                    for (var i = 0; i < message.processedVideos.length; ++i)
                        $root.E2E.ProcessedVideo.encode(message.processedVideos[i], writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim();
                if (message.externalShareFullVideoDurationInSeconds != null && Object.hasOwnProperty.call(message, "externalShareFullVideoDurationInSeconds"))
                    writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.externalShareFullVideoDurationInSeconds);
                if (message.motionPhotoPresentationOffsetMs != null && Object.hasOwnProperty.call(message, "motionPhotoPresentationOffsetMs"))
                    writer.uint32(/* id 29, wireType 0 =*/232).uint64(message.motionPhotoPresentationOffsetMs);
                if (message.metadataUrl != null && Object.hasOwnProperty.call(message, "metadataUrl"))
                    writer.uint32(/* id 30, wireType 2 =*/242).string(message.metadataUrl);
                if (message.videoSourceType != null && Object.hasOwnProperty.call(message, "videoSourceType"))
                    writer.uint32(/* id 31, wireType 0 =*/248).int32(message.videoSourceType);
                if (message.mediaKeyDomain != null && Object.hasOwnProperty.call(message, "mediaKeyDomain"))
                    writer.uint32(/* id 32, wireType 0 =*/256).int32(message.mediaKeyDomain);
                return writer;
            };

            /**
             * Encodes the specified VideoMessage message, length delimited. Does not implicitly {@link E2E.Message.VideoMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof E2E.Message.VideoMessage
             * @static
             * @param {E2E.Message.IVideoMessage} message VideoMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VideoMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a VideoMessage message from the specified reader or buffer.
             * @function decode
             * @memberof E2E.Message.VideoMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {E2E.Message.VideoMessage} VideoMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VideoMessage.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.E2E.Message.VideoMessage();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.url = reader.string();
                            break;
                        }
                    case 2: {
                            message.mimetype = reader.string();
                            break;
                        }
                    case 3: {
                            message.fileSha256 = reader.bytes();
                            break;
                        }
                    case 4: {
                            message.fileLength = reader.uint64();
                            break;
                        }
                    case 5: {
                            message.seconds = reader.uint32();
                            break;
                        }
                    case 6: {
                            message.mediaKey = reader.bytes();
                            break;
                        }
                    case 7: {
                            message.caption = reader.string();
                            break;
                        }
                    case 8: {
                            message.gifPlayback = reader.bool();
                            break;
                        }
                    case 9: {
                            message.height = reader.uint32();
                            break;
                        }
                    case 10: {
                            message.width = reader.uint32();
                            break;
                        }
                    case 11: {
                            message.fileEncSha256 = reader.bytes();
                            break;
                        }
                    case 12: {
                            if (!(message.interactiveAnnotations && message.interactiveAnnotations.length))
                                message.interactiveAnnotations = [];
                            message.interactiveAnnotations.push($root.E2E.InteractiveAnnotation.decode(reader, reader.uint32()));
                            break;
                        }
                    case 13: {
                            message.directPath = reader.string();
                            break;
                        }
                    case 14: {
                            message.mediaKeyTimestamp = reader.int64();
                            break;
                        }
                    case 16: {
                            message.jpegThumbnail = reader.bytes();
                            break;
                        }
                    case 17: {
                            message.contextInfo = $root.E2E.ContextInfo.decode(reader, reader.uint32());
                            break;
                        }
                    case 18: {
                            message.streamingSidecar = reader.bytes();
                            break;
                        }
                    case 19: {
                            message.gifAttribution = reader.int32();
                            break;
                        }
                    case 20: {
                            message.viewOnce = reader.bool();
                            break;
                        }
                    case 21: {
                            message.thumbnailDirectPath = reader.string();
                            break;
                        }
                    case 22: {
                            message.thumbnailSha256 = reader.bytes();
                            break;
                        }
                    case 23: {
                            message.thumbnailEncSha256 = reader.bytes();
                            break;
                        }
                    case 24: {
                            message.staticUrl = reader.string();
                            break;
                        }
                    case 25: {
                            if (!(message.annotations && message.annotations.length))
                                message.annotations = [];
                            message.annotations.push($root.E2E.InteractiveAnnotation.decode(reader, reader.uint32()));
                            break;
                        }
                    case 26: {
                            message.accessibilityLabel = reader.string();
                            break;
                        }
                    case 27: {
                            if (!(message.processedVideos && message.processedVideos.length))
                                message.processedVideos = [];
                            message.processedVideos.push($root.E2E.ProcessedVideo.decode(reader, reader.uint32()));
                            break;
                        }
                    case 28: {
                            message.externalShareFullVideoDurationInSeconds = reader.uint32();
                            break;
                        }
                    case 29: {
                            message.motionPhotoPresentationOffsetMs = reader.uint64();
                            break;
                        }
                    case 30: {
                            message.metadataUrl = reader.string();
                            break;
                        }
                    case 31: {
                            message.videoSourceType = reader.int32();
                            break;
                        }
                    case 32: {
                            message.mediaKeyDomain = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a VideoMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof E2E.Message.VideoMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {E2E.Message.VideoMessage} VideoMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VideoMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a VideoMessage message.
             * @function verify
             * @memberof E2E.Message.VideoMessage
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            VideoMessage.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.url != null && message.hasOwnProperty("url")) {
                    properties._url = 1;
                    if (!$util.isString(message.url))
                        return "url: string expected";
                }
                if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                    properties._mimetype = 1;
                    if (!$util.isString(message.mimetype))
                        return "mimetype: string expected";
                }
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                    properties._fileSha256 = 1;
                    if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256)))
                        return "fileSha256: buffer expected";
                }
                if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                    properties._fileLength = 1;
                    if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high)))
                        return "fileLength: integer|Long expected";
                }
                if (message.seconds != null && message.hasOwnProperty("seconds")) {
                    properties._seconds = 1;
                    if (!$util.isInteger(message.seconds))
                        return "seconds: integer expected";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    properties._mediaKey = 1;
                    if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey)))
                        return "mediaKey: buffer expected";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    properties._caption = 1;
                    if (!$util.isString(message.caption))
                        return "caption: string expected";
                }
                if (message.gifPlayback != null && message.hasOwnProperty("gifPlayback")) {
                    properties._gifPlayback = 1;
                    if (typeof message.gifPlayback !== "boolean")
                        return "gifPlayback: boolean expected";
                }
                if (message.height != null && message.hasOwnProperty("height")) {
                    properties._height = 1;
                    if (!$util.isInteger(message.height))
                        return "height: integer expected";
                }
                if (message.width != null && message.hasOwnProperty("width")) {
                    properties._width = 1;
                    if (!$util.isInteger(message.width))
                        return "width: integer expected";
                }
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                    properties._fileEncSha256 = 1;
                    if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256)))
                        return "fileEncSha256: buffer expected";
                }
                if (message.interactiveAnnotations != null && message.hasOwnProperty("interactiveAnnotations")) {
                    if (!Array.isArray(message.interactiveAnnotations))
                        return "interactiveAnnotations: array expected";
                    for (var i = 0; i < message.interactiveAnnotations.length; ++i) {
                        var error = $root.E2E.InteractiveAnnotation.verify(message.interactiveAnnotations[i]);
                        if (error)
                            return "interactiveAnnotations." + error;
                    }
                }
                if (message.directPath != null && message.hasOwnProperty("directPath")) {
                    properties._directPath = 1;
                    if (!$util.isString(message.directPath))
                        return "directPath: string expected";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    properties._mediaKeyTimestamp = 1;
                    if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high)))
                        return "mediaKeyTimestamp: integer|Long expected";
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    properties._jpegThumbnail = 1;
                    if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail)))
                        return "jpegThumbnail: buffer expected";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    properties._contextInfo = 1;
                    {
                        var error = $root.E2E.ContextInfo.verify(message.contextInfo);
                        if (error)
                            return "contextInfo." + error;
                    }
                }
                if (message.streamingSidecar != null && message.hasOwnProperty("streamingSidecar")) {
                    properties._streamingSidecar = 1;
                    if (!(message.streamingSidecar && typeof message.streamingSidecar.length === "number" || $util.isString(message.streamingSidecar)))
                        return "streamingSidecar: buffer expected";
                }
                if (message.gifAttribution != null && message.hasOwnProperty("gifAttribution")) {
                    properties._gifAttribution = 1;
                    switch (message.gifAttribution) {
                    default:
                        return "gifAttribution: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) {
                    properties._viewOnce = 1;
                    if (typeof message.viewOnce !== "boolean")
                        return "viewOnce: boolean expected";
                }
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) {
                    properties._thumbnailDirectPath = 1;
                    if (!$util.isString(message.thumbnailDirectPath))
                        return "thumbnailDirectPath: string expected";
                }
                if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) {
                    properties._thumbnailSha256 = 1;
                    if (!(message.thumbnailSha256 && typeof message.thumbnailSha256.length === "number" || $util.isString(message.thumbnailSha256)))
                        return "thumbnailSha256: buffer expected";
                }
                if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) {
                    properties._thumbnailEncSha256 = 1;
                    if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256)))
                        return "thumbnailEncSha256: buffer expected";
                }
                if (message.staticUrl != null && message.hasOwnProperty("staticUrl")) {
                    properties._staticUrl = 1;
                    if (!$util.isString(message.staticUrl))
                        return "staticUrl: string expected";
                }
                if (message.annotations != null && message.hasOwnProperty("annotations")) {
                    if (!Array.isArray(message.annotations))
                        return "annotations: array expected";
                    for (var i = 0; i < message.annotations.length; ++i) {
                        var error = $root.E2E.InteractiveAnnotation.verify(message.annotations[i]);
                        if (error)
                            return "annotations." + error;
                    }
                }
                if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) {
                    properties._accessibilityLabel = 1;
                    if (!$util.isString(message.accessibilityLabel))
                        return "accessibilityLabel: string expected";
                }
                if (message.processedVideos != null && message.hasOwnProperty("processedVideos")) {
                    if (!Array.isArray(message.processedVideos))
                        return "processedVideos: array expected";
                    for (var i = 0; i < message.processedVideos.length; ++i) {
                        var error = $root.E2E.ProcessedVideo.verify(message.processedVideos[i]);
                        if (error)
                            return "processedVideos." + error;
                    }
                }
                if (message.externalShareFullVideoDurationInSeconds != null && message.hasOwnProperty("externalShareFullVideoDurationInSeconds")) {
                    properties._externalShareFullVideoDurationInSeconds = 1;
                    if (!$util.isInteger(message.externalShareFullVideoDurationInSeconds))
                        return "externalShareFullVideoDurationInSeconds: integer expected";
                }
                if (message.motionPhotoPresentationOffsetMs != null && message.hasOwnProperty("motionPhotoPresentationOffsetMs")) {
                    properties._motionPhotoPresentationOffsetMs = 1;
                    if (!$util.isInteger(message.motionPhotoPresentationOffsetMs) && !(message.motionPhotoPresentationOffsetMs && $util.isInteger(message.motionPhotoPresentationOffsetMs.low) && $util.isInteger(message.motionPhotoPresentationOffsetMs.high)))
                        return "motionPhotoPresentationOffsetMs: integer|Long expected";
                }
                if (message.metadataUrl != null && message.hasOwnProperty("metadataUrl")) {
                    properties._metadataUrl = 1;
                    if (!$util.isString(message.metadataUrl))
                        return "metadataUrl: string expected";
                }
                if (message.videoSourceType != null && message.hasOwnProperty("videoSourceType")) {
                    properties._videoSourceType = 1;
                    switch (message.videoSourceType) {
                    default:
                        return "videoSourceType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                if (message.mediaKeyDomain != null && message.hasOwnProperty("mediaKeyDomain")) {
                    properties._mediaKeyDomain = 1;
                    switch (message.mediaKeyDomain) {
                    default:
                        return "mediaKeyDomain: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a VideoMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof E2E.Message.VideoMessage
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {E2E.Message.VideoMessage} VideoMessage
             */
            VideoMessage.fromObject = function fromObject(object) {
                if (object instanceof $root.E2E.Message.VideoMessage)
                    return object;
                var message = new $root.E2E.Message.VideoMessage();
                if (object.url != null)
                    message.url = String(object.url);
                if (object.mimetype != null)
                    message.mimetype = String(object.mimetype);
                if (object.fileSha256 != null)
                    if (typeof object.fileSha256 === "string")
                        $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0);
                    else if (object.fileSha256.length >= 0)
                        message.fileSha256 = object.fileSha256;
                if (object.fileLength != null)
                    if ($util.Long)
                        (message.fileLength = $util.Long.fromValue(object.fileLength)).unsigned = true;
                    else if (typeof object.fileLength === "string")
                        message.fileLength = parseInt(object.fileLength, 10);
                    else if (typeof object.fileLength === "number")
                        message.fileLength = object.fileLength;
                    else if (typeof object.fileLength === "object")
                        message.fileLength = new $util.LongBits(object.fileLength.low >>> 0, object.fileLength.high >>> 0).toNumber(true);
                if (object.seconds != null)
                    message.seconds = object.seconds >>> 0;
                if (object.mediaKey != null)
                    if (typeof object.mediaKey === "string")
                        $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0);
                    else if (object.mediaKey.length >= 0)
                        message.mediaKey = object.mediaKey;
                if (object.caption != null)
                    message.caption = String(object.caption);
                if (object.gifPlayback != null)
                    message.gifPlayback = Boolean(object.gifPlayback);
                if (object.height != null)
                    message.height = object.height >>> 0;
                if (object.width != null)
                    message.width = object.width >>> 0;
                if (object.fileEncSha256 != null)
                    if (typeof object.fileEncSha256 === "string")
                        $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0);
                    else if (object.fileEncSha256.length >= 0)
                        message.fileEncSha256 = object.fileEncSha256;
                if (object.interactiveAnnotations) {
                    if (!Array.isArray(object.interactiveAnnotations))
                        throw TypeError(".E2E.Message.VideoMessage.interactiveAnnotations: array expected");
                    message.interactiveAnnotations = [];
                    for (var i = 0; i < object.interactiveAnnotations.length; ++i) {
                        if (typeof object.interactiveAnnotations[i] !== "object")
                            throw TypeError(".E2E.Message.VideoMessage.interactiveAnnotations: object expected");
                        message.interactiveAnnotations[i] = $root.E2E.InteractiveAnnotation.fromObject(object.interactiveAnnotations[i]);
                    }
                }
                if (object.directPath != null)
                    message.directPath = String(object.directPath);
                if (object.mediaKeyTimestamp != null)
                    if ($util.Long)
                        (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false;
                    else if (typeof object.mediaKeyTimestamp === "string")
                        message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10);
                    else if (typeof object.mediaKeyTimestamp === "number")
                        message.mediaKeyTimestamp = object.mediaKeyTimestamp;
                    else if (typeof object.mediaKeyTimestamp === "object")
                        message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber();
                if (object.jpegThumbnail != null)
                    if (typeof object.jpegThumbnail === "string")
                        $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0);
                    else if (object.jpegThumbnail.length >= 0)
                        message.jpegThumbnail = object.jpegThumbnail;
                if (object.contextInfo != null) {
                    if (typeof object.contextInfo !== "object")
                        throw TypeError(".E2E.Message.VideoMessage.contextInfo: object expected");
                    message.contextInfo = $root.E2E.ContextInfo.fromObject(object.contextInfo);
                }
                if (object.streamingSidecar != null)
                    if (typeof object.streamingSidecar === "string")
                        $util.base64.decode(object.streamingSidecar, message.streamingSidecar = $util.newBuffer($util.base64.length(object.streamingSidecar)), 0);
                    else if (object.streamingSidecar.length >= 0)
                        message.streamingSidecar = object.streamingSidecar;
                switch (object.gifAttribution) {
                default:
                    if (typeof object.gifAttribution === "number") {
                        message.gifAttribution = object.gifAttribution;
                        break;
                    }
                    break;
                case "NONE":
                case 0:
                    message.gifAttribution = 0;
                    break;
                case "GIPHY":
                case 1:
                    message.gifAttribution = 1;
                    break;
                case "TENOR":
                case 2:
                    message.gifAttribution = 2;
                    break;
                case "KLIPY":
                case 3:
                    message.gifAttribution = 3;
                    break;
                }
                if (object.viewOnce != null)
                    message.viewOnce = Boolean(object.viewOnce);
                if (object.thumbnailDirectPath != null)
                    message.thumbnailDirectPath = String(object.thumbnailDirectPath);
                if (object.thumbnailSha256 != null)
                    if (typeof object.thumbnailSha256 === "string")
                        $util.base64.decode(object.thumbnailSha256, message.thumbnailSha256 = $util.newBuffer($util.base64.length(object.thumbnailSha256)), 0);
                    else if (object.thumbnailSha256.length >= 0)
                        message.thumbnailSha256 = object.thumbnailSha256;
                if (object.thumbnailEncSha256 != null)
                    if (typeof object.thumbnailEncSha256 === "string")
                        $util.base64.decode(object.thumbnailEncSha256, message.thumbnailEncSha256 = $util.newBuffer($util.base64.length(object.thumbnailEncSha256)), 0);
                    else if (object.thumbnailEncSha256.length >= 0)
                        message.thumbnailEncSha256 = object.thumbnailEncSha256;
                if (object.staticUrl != null)
                    message.staticUrl = String(object.staticUrl);
                if (object.annotations) {
                    if (!Array.isArray(object.annotations))
                        throw TypeError(".E2E.Message.VideoMessage.annotations: array expected");
                    message.annotations = [];
                    for (var i = 0; i < object.annotations.length; ++i) {
                        if (typeof object.annotations[i] !== "object")
                            throw TypeError(".E2E.Message.VideoMessage.annotations: object expected");
                        message.annotations[i] = $root.E2E.InteractiveAnnotation.fromObject(object.annotations[i]);
                    }
                }
                if (object.accessibilityLabel != null)
                    message.accessibilityLabel = String(object.accessibilityLabel);
                if (object.processedVideos) {
                    if (!Array.isArray(object.processedVideos))
                        throw TypeError(".E2E.Message.VideoMessage.processedVideos: array expected");
                    message.processedVideos = [];
                    for (var i = 0; i < object.processedVideos.length; ++i) {
                        if (typeof object.processedVideos[i] !== "object")
                            throw TypeError(".E2E.Message.VideoMessage.processedVideos: object expected");
                        message.processedVideos[i] = $root.E2E.ProcessedVideo.fromObject(object.processedVideos[i]);
                    }
                }
                if (object.externalShareFullVideoDurationInSeconds != null)
                    message.externalShareFullVideoDurationInSeconds = object.externalShareFullVideoDurationInSeconds >>> 0;
                if (object.motionPhotoPresentationOffsetMs != null)
                    if ($util.Long)
                        (message.motionPhotoPresentationOffsetMs = $util.Long.fromValue(object.motionPhotoPresentationOffsetMs)).unsigned = true;
                    else if (typeof object.motionPhotoPresentationOffsetMs === "string")
                        message.motionPhotoPresentationOffsetMs = parseInt(object.motionPhotoPresentationOffsetMs, 10);
                    else if (typeof object.motionPhotoPresentationOffsetMs === "number")
                        message.motionPhotoPresentationOffsetMs = object.motionPhotoPresentationOffsetMs;
                    else if (typeof object.motionPhotoPresentationOffsetMs === "object")
                        message.motionPhotoPresentationOffsetMs = new $util.LongBits(object.motionPhotoPresentationOffsetMs.low >>> 0, object.motionPhotoPresentationOffsetMs.high >>> 0).toNumber(true);
                if (object.metadataUrl != null)
                    message.metadataUrl = String(object.metadataUrl);
                switch (object.videoSourceType) {
                default:
                    if (typeof object.videoSourceType === "number") {
                        message.videoSourceType = object.videoSourceType;
                        break;
                    }
                    break;
                case "USER_VIDEO":
                case 0:
                    message.videoSourceType = 0;
                    break;
                case "AI_GENERATED":
                case 1:
                    message.videoSourceType = 1;
                    break;
                }
                switch (object.mediaKeyDomain) {
                default:
                    if (typeof object.mediaKeyDomain === "number") {
                        message.mediaKeyDomain = object.mediaKeyDomain;
                        break;
                    }
                    break;
                case "UNSET":
                case 0:
                    message.mediaKeyDomain = 0;
                    break;
                case "E2EE_CHAT":
                case 1:
                    message.mediaKeyDomain = 1;
                    break;
                case "STATUS":
                case 2:
                    message.mediaKeyDomain = 2;
                    break;
                case "CAPI":
                case 3:
                    message.mediaKeyDomain = 3;
                    break;
                case "BOT":
                case 4:
                    message.mediaKeyDomain = 4;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a VideoMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof E2E.Message.VideoMessage
             * @static
             * @param {E2E.Message.VideoMessage} message VideoMessage
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            VideoMessage.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults) {
                    object.interactiveAnnotations = [];
                    object.annotations = [];
                    object.processedVideos = [];
                }
                if (message.url != null && message.hasOwnProperty("url")) {
                    object.url = message.url;
                    if (options.oneofs)
                        object._url = "url";
                }
                if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                    object.mimetype = message.mimetype;
                    if (options.oneofs)
                        object._mimetype = "mimetype";
                }
                if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                    object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256;
                    if (options.oneofs)
                        object._fileSha256 = "fileSha256";
                }
                if (message.fileLength != null && message.hasOwnProperty("fileLength")) {
                    if (typeof message.fileLength === "number")
                        object.fileLength = options.longs === String ? String(message.fileLength) : message.fileLength;
                    else
                        object.fileLength = options.longs === String ? $util.Long.prototype.toString.call(message.fileLength) : options.longs === Number ? new $util.LongBits(message.fileLength.low >>> 0, message.fileLength.high >>> 0).toNumber(true) : message.fileLength;
                    if (options.oneofs)
                        object._fileLength = "fileLength";
                }
                if (message.seconds != null && message.hasOwnProperty("seconds")) {
                    object.seconds = message.seconds;
                    if (options.oneofs)
                        object._seconds = "seconds";
                }
                if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                    object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey;
                    if (options.oneofs)
                        object._mediaKey = "mediaKey";
                }
                if (message.caption != null && message.hasOwnProperty("caption")) {
                    object.caption = message.caption;
                    if (options.oneofs)
                        object._caption = "caption";
                }
                if (message.gifPlayback != null && message.hasOwnProperty("gifPlayback")) {
                    object.gifPlayback = message.gifPlayback;
                    if (options.oneofs)
                        object._gifPlayback = "gifPlayback";
                }
                if (message.height != null && message.hasOwnProperty("height")) {
                    object.height = message.height;
                    if (options.oneofs)
                        object._height = "height";
                }
                if (message.width != null && message.hasOwnProperty("width")) {
                    object.width = message.width;
                    if (options.oneofs)
                        object._width = "width";
                }
                if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                    object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256;
                    if (options.oneofs)
                        object._fileEncSha256 = "fileEncSha256";
                }
                if (message.interactiveAnnotations && message.interactiveAnnotations.length) {
                    object.interactiveAnnotations = [];
                    for (var j = 0; j < message.interactiveAnnotations.length; ++j)
                        object.interactiveAnnotations[j] = $root.E2E.InteractiveAnnotation.toObject(message.interactiveAnnotations[j], options);
                }
                if (message.directPath != null && message.hasOwnProperty("directPath")) {
                    object.directPath = message.directPath;
                    if (options.oneofs)
                        object._directPath = "directPath";
                }
                if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                    if (typeof message.mediaKeyTimestamp === "number")
                        object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp;
                    else
                        object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp;
                    if (options.oneofs)
                        object._mediaKeyTimestamp = "mediaKeyTimestamp";
                }
                if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) {
                    object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail;
                    if (options.oneofs)
                        object._jpegThumbnail = "jpegThumbnail";
                }
                if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) {
                    object.contextInfo = $root.E2E.ContextInfo.toObject(message.contextInfo, options);
                    if (options.oneofs)
                        object._contextInfo = "contextInfo";
                }
                if (message.streamingSidecar != null && message.hasOwnProperty("streamingSidecar")) {
                    object.streamingSidecar = options.bytes === String ? $util.base64.encode(message.streamingSidecar, 0, message.streamingSidecar.length) : options.bytes === Array ? Array.prototype.slice.call(message.streamingSidecar) : message.streamingSidecar;
                    if (options.oneofs)
                        object._streamingSidecar = "streamingSidecar";
                }
                if (message.gifAttribution != null && message.hasOwnProperty("gifAttribution")) {
                    object.gifAttribution = options.enums === String ? $root.E2E.Message.VideoMessage.Attribution[message.gifAttribution] === undefined ? message.gifAttribution : $root.E2E.Message.VideoMessage.Attribution[message.gifAttribution] : message.gifAttribution;
                    if (options.oneofs)
                        object._gifAttribution = "gifAttribution";
                }
                if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) {
                    object.viewOnce = message.viewOnce;
                    if (options.oneofs)
                        object._viewOnce = "viewOnce";
                }
                if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) {
                    object.thumbnailDirectPath = message.thumbnailDirectPath;
                    if (options.oneofs)
                        object._thumbnailDirectPath = "thumbnailDirectPath";
                }
                if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) {
                    object.thumbnailSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailSha256, 0, message.thumbnailSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailSha256) : message.thumbnailSha256;
                    if (options.oneofs)
                        object._thumbnailSha256 = "thumbnailSha256";
                }
                if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) {
                    object.thumbnailEncSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailEncSha256, 0, message.thumbnailEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailEncSha256) : message.thumbnailEncSha256;
                    if (options.oneofs)
                        object._thumbnailEncSha256 = "thumbnailEncSha256";
                }
                if (message.staticUrl != null && message.hasOwnProperty("staticUrl")) {
                    object.staticUrl = message.staticUrl;
                    if (options.oneofs)
                        object._staticUrl = "staticUrl";
                }
                if (message.annotations && message.annotations.length) {
                    object.annotations = [];
                    for (var j = 0; j < message.annotations.length; ++j)
                        object.annotations[j] = $root.E2E.InteractiveAnnotation.toObject(message.annotations[j], options);
                }
                if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) {
                    object.accessibilityLabel = message.accessibilityLabel;
                    if (options.oneofs)
                        object._accessibilityLabel = "accessibilityLabel";
                }
                if (message.processedVideos && message.processedVideos.length) {
                    object.processedVideos = [];
                    for (var j = 0; j < message.processedVideos.length; ++j)
                        object.processedVideos[j] = $root.E2E.ProcessedVideo.toObject(message.processedVideos[j], options);
                }
                if (message.externalShareFullVideoDurationInSeconds != null && message.hasOwnProperty("externalShareFullVideoDurationInSeconds")) {
                    object.externalShareFullVideoDurationInSeconds = message.externalShareFullVideoDurationInSeconds;
                    if (options.oneofs)
                        object._externalShareFullVideoDurationInSeconds = "externalShareFullVideoDurationInSeconds";
                }
                if (message.motionPhotoPresentationOffsetMs != null && message.hasOwnProperty("motionPhotoPresentationOffsetMs")) {
                    if (typeof message.motionPhotoPresentationOffsetMs === "number")
                        object.motionPhotoPresentationOffsetMs = options.longs === String ? String(message.motionPhotoPresentationOffsetMs) : message.motionPhotoPresentationOffsetMs;
                    else
                        object.motionPhotoPresentationOffsetMs = options.longs === String ? $util.Long.prototype.toString.call(message.motionPhotoPresentationOffsetMs) : options.longs === Number ? new $util.LongBits(message.motionPhotoPresentationOffsetMs.low >>> 0, message.motionPhotoPresentationOffsetMs.high >>> 0).toNumber(true) : message.motionPhotoPresentationOffsetMs;
                    if (options.oneofs)
                        object._motionPhotoPresentationOffsetMs = "motionPhotoPresentationOffsetMs";
                }
                if (message.metadataUrl != null && message.hasOwnProperty("metadataUrl")) {
                    object.metadataUrl = message.metadataUrl;
                    if (options.oneofs)
                        object._metadataUrl = "metadataUrl";
                }
                if (message.videoSourceType != null && message.hasOwnProperty("videoSourceType")) {
                    object.videoSourceType = options.enums === String ? $root.E2E.Message.VideoMessage.VideoSourceType[message.videoSourceType] === undefined ? message.videoSourceType : $root.E2E.Message.VideoMessage.VideoSourceType[message.videoSourceType] : message.videoSourceType;
                    if (options.oneofs)
                        object._videoSourceType = "videoSourceType";
                }
                if (message.mediaKeyDomain != null && message.hasOwnProperty("mediaKeyDomain")) {
                    object.mediaKeyDomain = options.enums === String ? $root.E2E.Message.MediaKeyDomain[message.mediaKeyDomain] === undefined ? message.mediaKeyDomain : $root.E2E.Message.MediaKeyDomain[message.mediaKeyDomain] : message.mediaKeyDomain;
                    if (options.oneofs)
                        object._mediaKeyDomain = "mediaKeyDomain";
                }
                return object;
            };

            /**
             * Converts this VideoMessage to JSON.
             * @function toJSON
             * @memberof E2E.Message.VideoMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            VideoMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for VideoMessage
             * @function getTypeUrl
             * @memberof E2E.Message.VideoMessage
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            VideoMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/E2E.Message.VideoMessage";
            };

            /**
             * Attribution enum.
             * @name E2E.Message.VideoMessage.Attribution
             * @enum {number}
             * @property {number} NONE=0 NONE value
             * @property {number} GIPHY=1 GIPHY value
             * @property {number} TENOR=2 TENOR value
             * @property {number} KLIPY=3 KLIPY value
             */
            VideoMessage.Attribution = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "NONE"] = 0;
                values[valuesById[1] = "GIPHY"] = 1;
                values[valuesById[2] = "TENOR"] = 2;
                values[valuesById[3] = "KLIPY"] = 3;
                return values;
            })();

            /**
             * VideoSourceType enum.
             * @name E2E.Message.VideoMessage.VideoSourceType
             * @enum {number}
             * @property {number} USER_VIDEO=0 USER_VIDEO value
             * @property {number} AI_GENERATED=1 AI_GENERATED value
             */
            VideoMessage.VideoSourceType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "USER_VIDEO"] = 0;
                values[valuesById[1] = "AI_GENERATED"] = 1;
                return values;
            })();

            return VideoMessage;
        })();

        return Message;
    })();

    /**
     * KeepType enum.
     * @name E2E.KeepType
     * @enum {number}
     * @property {number} UNKNOWN=0 UNKNOWN value
     * @property {number} KEEP_FOR_ALL=1 KEEP_FOR_ALL value
     * @property {number} UNDO_KEEP_FOR_ALL=2 UNDO_KEEP_FOR_ALL value
     */
    E2E.KeepType = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "UNKNOWN"] = 0;
        values[valuesById[1] = "KEEP_FOR_ALL"] = 1;
        values[valuesById[2] = "UNDO_KEEP_FOR_ALL"] = 2;
        return values;
    })();

    /**
     * WebLinkRenderConfig enum.
     * @name E2E.WebLinkRenderConfig
     * @enum {number}
     * @property {number} WEBVIEW=0 WEBVIEW value
     * @property {number} SYSTEM=1 SYSTEM value
     */
    E2E.WebLinkRenderConfig = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "WEBVIEW"] = 0;
        values[valuesById[1] = "SYSTEM"] = 1;
        return values;
    })();

    return E2E;
})();

$root.Protocol = (function() {

    /**
     * Namespace Protocol.
     * @exports Protocol
     * @namespace
     */
    var Protocol = {};

    Protocol.LimitSharing = (function() {

        /**
         * Properties of a LimitSharing.
         * @memberof Protocol
         * @interface ILimitSharing
         * @property {boolean|null} [sharingLimited] LimitSharing sharingLimited
         * @property {Protocol.LimitSharing.TriggerType|null} [trigger] LimitSharing trigger
         * @property {number|Long|null} [limitSharingSettingTimestamp] LimitSharing limitSharingSettingTimestamp
         * @property {boolean|null} [initiatedByMe] LimitSharing initiatedByMe
         */

        /**
         * Constructs a new LimitSharing.
         * @memberof Protocol
         * @classdesc Represents a LimitSharing.
         * @implements ILimitSharing
         * @constructor
         * @param {Protocol.ILimitSharing=} [properties] Properties to set
         */
        function LimitSharing(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]];
        }

        /**
         * LimitSharing sharingLimited.
         * @member {boolean|null|undefined} sharingLimited
         * @memberof Protocol.LimitSharing
         * @instance
         */
        LimitSharing.prototype.sharingLimited = null;

        /**
         * LimitSharing trigger.
         * @member {Protocol.LimitSharing.TriggerType|null|undefined} trigger
         * @memberof Protocol.LimitSharing
         * @instance
         */
        LimitSharing.prototype.trigger = null;

        /**
         * LimitSharing limitSharingSettingTimestamp.
         * @member {number|Long|null|undefined} limitSharingSettingTimestamp
         * @memberof Protocol.LimitSharing
         * @instance
         */
        LimitSharing.prototype.limitSharingSettingTimestamp = null;

        /**
         * LimitSharing initiatedByMe.
         * @member {boolean|null|undefined} initiatedByMe
         * @memberof Protocol.LimitSharing
         * @instance
         */
        LimitSharing.prototype.initiatedByMe = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * LimitSharing _sharingLimited.
         * @member {"sharingLimited"|undefined} _sharingLimited
         * @memberof Protocol.LimitSharing
         * @instance
         */
        Object.defineProperty(LimitSharing.prototype, "_sharingLimited", {
            get: $util.oneOfGetter($oneOfFields = ["sharingLimited"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * LimitSharing _trigger.
         * @member {"trigger"|undefined} _trigger
         * @memberof Protocol.LimitSharing
         * @instance
         */
        Object.defineProperty(LimitSharing.prototype, "_trigger", {
            get: $util.oneOfGetter($oneOfFields = ["trigger"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * LimitSharing _limitSharingSettingTimestamp.
         * @member {"limitSharingSettingTimestamp"|undefined} _limitSharingSettingTimestamp
         * @memberof Protocol.LimitSharing
         * @instance
         */
        Object.defineProperty(LimitSharing.prototype, "_limitSharingSettingTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["limitSharingSettingTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * LimitSharing _initiatedByMe.
         * @member {"initiatedByMe"|undefined} _initiatedByMe
         * @memberof Protocol.LimitSharing
         * @instance
         */
        Object.defineProperty(LimitSharing.prototype, "_initiatedByMe", {
            get: $util.oneOfGetter($oneOfFields = ["initiatedByMe"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new LimitSharing instance using the specified properties.
         * @function create
         * @memberof Protocol.LimitSharing
         * @static
         * @param {Protocol.ILimitSharing=} [properties] Properties to set
         * @returns {Protocol.LimitSharing} LimitSharing instance
         */
        LimitSharing.create = function create(properties) {
            return new LimitSharing(properties);
        };

        /**
         * Encodes the specified LimitSharing message. Does not implicitly {@link Protocol.LimitSharing.verify|verify} messages.
         * @function encode
         * @memberof Protocol.LimitSharing
         * @static
         * @param {Protocol.ILimitSharing} message LimitSharing message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        LimitSharing.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.sharingLimited != null && Object.hasOwnProperty.call(message, "sharingLimited"))
                writer.uint32(/* id 1, wireType 0 =*/8).bool(message.sharingLimited);
            if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.trigger);
            if (message.limitSharingSettingTimestamp != null && Object.hasOwnProperty.call(message, "limitSharingSettingTimestamp"))
                writer.uint32(/* id 3, wireType 0 =*/24).int64(message.limitSharingSettingTimestamp);
            if (message.initiatedByMe != null && Object.hasOwnProperty.call(message, "initiatedByMe"))
                writer.uint32(/* id 4, wireType 0 =*/32).bool(message.initiatedByMe);
            return writer;
        };

        /**
         * Encodes the specified LimitSharing message, length delimited. Does not implicitly {@link Protocol.LimitSharing.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Protocol.LimitSharing
         * @static
         * @param {Protocol.ILimitSharing} message LimitSharing message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        LimitSharing.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a LimitSharing message from the specified reader or buffer.
         * @function decode
         * @memberof Protocol.LimitSharing
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Protocol.LimitSharing} LimitSharing
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        LimitSharing.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.Protocol.LimitSharing();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.sharingLimited = reader.bool();
                        break;
                    }
                case 2: {
                        message.trigger = reader.int32();
                        break;
                    }
                case 3: {
                        message.limitSharingSettingTimestamp = reader.int64();
                        break;
                    }
                case 4: {
                        message.initiatedByMe = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a LimitSharing message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Protocol.LimitSharing
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Protocol.LimitSharing} LimitSharing
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        LimitSharing.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a LimitSharing message.
         * @function verify
         * @memberof Protocol.LimitSharing
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        LimitSharing.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.sharingLimited != null && message.hasOwnProperty("sharingLimited")) {
                properties._sharingLimited = 1;
                if (typeof message.sharingLimited !== "boolean")
                    return "sharingLimited: boolean expected";
            }
            if (message.trigger != null && message.hasOwnProperty("trigger")) {
                properties._trigger = 1;
                switch (message.trigger) {
                default:
                    return "trigger: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.limitSharingSettingTimestamp != null && message.hasOwnProperty("limitSharingSettingTimestamp")) {
                properties._limitSharingSettingTimestamp = 1;
                if (!$util.isInteger(message.limitSharingSettingTimestamp) && !(message.limitSharingSettingTimestamp && $util.isInteger(message.limitSharingSettingTimestamp.low) && $util.isInteger(message.limitSharingSettingTimestamp.high)))
                    return "limitSharingSettingTimestamp: integer|Long expected";
            }
            if (message.initiatedByMe != null && message.hasOwnProperty("initiatedByMe")) {
                properties._initiatedByMe = 1;
                if (typeof message.initiatedByMe !== "boolean")
                    return "initiatedByMe: boolean expected";
            }
            return null;
        };

        /**
         * Creates a LimitSharing message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Protocol.LimitSharing
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Protocol.LimitSharing} LimitSharing
         */
        LimitSharing.fromObject = function fromObject(object) {
            if (object instanceof $root.Protocol.LimitSharing)
                return object;
            var message = new $root.Protocol.LimitSharing();
            if (object.sharingLimited != null)
                message.sharingLimited = Boolean(object.sharingLimited);
            switch (object.trigger) {
            default:
                if (typeof object.trigger === "number") {
                    message.trigger = object.trigger;
                    break;
                }
                break;
            case "UNKNOWN":
            case 0:
                message.trigger = 0;
                break;
            case "CHAT_SETTING":
            case 1:
                message.trigger = 1;
                break;
            case "BIZ_SUPPORTS_FB_HOSTING":
            case 2:
                message.trigger = 2;
                break;
            case "UNKNOWN_GROUP":
            case 3:
                message.trigger = 3;
                break;
            }
            if (object.limitSharingSettingTimestamp != null)
                if ($util.Long)
                    (message.limitSharingSettingTimestamp = $util.Long.fromValue(object.limitSharingSettingTimestamp)).unsigned = false;
                else if (typeof object.limitSharingSettingTimestamp === "string")
                    message.limitSharingSettingTimestamp = parseInt(object.limitSharingSettingTimestamp, 10);
                else if (typeof object.limitSharingSettingTimestamp === "number")
                    message.limitSharingSettingTimestamp = object.limitSharingSettingTimestamp;
                else if (typeof object.limitSharingSettingTimestamp === "object")
                    message.limitSharingSettingTimestamp = new $util.LongBits(object.limitSharingSettingTimestamp.low >>> 0, object.limitSharingSettingTimestamp.high >>> 0).toNumber();
            if (object.initiatedByMe != null)
                message.initiatedByMe = Boolean(object.initiatedByMe);
            return message;
        };

        /**
         * Creates a plain object from a LimitSharing message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Protocol.LimitSharing
         * @static
         * @param {Protocol.LimitSharing} message LimitSharing
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        LimitSharing.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.sharingLimited != null && message.hasOwnProperty("sharingLimited")) {
                object.sharingLimited = message.sharingLimited;
                if (options.oneofs)
                    object._sharingLimited = "sharingLimited";
            }
            if (message.trigger != null && message.hasOwnProperty("trigger")) {
                object.trigger = options.enums === String ? $root.Protocol.LimitSharing.TriggerType[message.trigger] === undefined ? message.trigger : $root.Protocol.LimitSharing.TriggerType[message.trigger] : message.trigger;
                if (options.oneofs)
                    object._trigger = "trigger";
            }
            if (message.limitSharingSettingTimestamp != null && message.hasOwnProperty("limitSharingSettingTimestamp")) {
                if (typeof message.limitSharingSettingTimestamp === "number")
                    object.limitSharingSettingTimestamp = options.longs === String ? String(message.limitSharingSettingTimestamp) : message.limitSharingSettingTimestamp;
                else
                    object.limitSharingSettingTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.limitSharingSettingTimestamp) : options.longs === Number ? new $util.LongBits(message.limitSharingSettingTimestamp.low >>> 0, message.limitSharingSettingTimestamp.high >>> 0).toNumber() : message.limitSharingSettingTimestamp;
                if (options.oneofs)
                    object._limitSharingSettingTimestamp = "limitSharingSettingTimestamp";
            }
            if (message.initiatedByMe != null && message.hasOwnProperty("initiatedByMe")) {
                object.initiatedByMe = message.initiatedByMe;
                if (options.oneofs)
                    object._initiatedByMe = "initiatedByMe";
            }
            return object;
        };

        /**
         * Converts this LimitSharing to JSON.
         * @function toJSON
         * @memberof Protocol.LimitSharing
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        LimitSharing.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for LimitSharing
         * @function getTypeUrl
         * @memberof Protocol.LimitSharing
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        LimitSharing.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Protocol.LimitSharing";
        };

        /**
         * TriggerType enum.
         * @name Protocol.LimitSharing.TriggerType
         * @enum {number}
         * @property {number} UNKNOWN=0 UNKNOWN value
         * @property {number} CHAT_SETTING=1 CHAT_SETTING value
         * @property {number} BIZ_SUPPORTS_FB_HOSTING=2 BIZ_SUPPORTS_FB_HOSTING value
         * @property {number} UNKNOWN_GROUP=3 UNKNOWN_GROUP value
         */
        LimitSharing.TriggerType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "CHAT_SETTING"] = 1;
            values[valuesById[2] = "BIZ_SUPPORTS_FB_HOSTING"] = 2;
            values[valuesById[3] = "UNKNOWN_GROUP"] = 3;
            return values;
        })();

        return LimitSharing;
    })();

    Protocol.MessageKey = (function() {

        /**
         * Properties of a MessageKey.
         * @memberof Protocol
         * @interface IMessageKey
         * @property {string|null} [remoteJid] MessageKey remoteJid
         * @property {boolean|null} [fromMe] MessageKey fromMe
         * @property {string|null} [id] MessageKey id
         * @property {string|null} [participant] MessageKey participant
         */

        /**
         * Constructs a new MessageKey.
         * @memberof Protocol
         * @classdesc Represents a MessageKey.
         * @implements IMessageKey
         * @constructor
         * @param {Protocol.IMessageKey=} [properties] Properties to set
         */
        function MessageKey(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]];
        }

        /**
         * MessageKey remoteJid.
         * @member {string|null|undefined} remoteJid
         * @memberof Protocol.MessageKey
         * @instance
         */
        MessageKey.prototype.remoteJid = null;

        /**
         * MessageKey fromMe.
         * @member {boolean|null|undefined} fromMe
         * @memberof Protocol.MessageKey
         * @instance
         */
        MessageKey.prototype.fromMe = null;

        /**
         * MessageKey id.
         * @member {string|null|undefined} id
         * @memberof Protocol.MessageKey
         * @instance
         */
        MessageKey.prototype.id = null;

        /**
         * MessageKey participant.
         * @member {string|null|undefined} participant
         * @memberof Protocol.MessageKey
         * @instance
         */
        MessageKey.prototype.participant = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * MessageKey _remoteJid.
         * @member {"remoteJid"|undefined} _remoteJid
         * @memberof Protocol.MessageKey
         * @instance
         */
        Object.defineProperty(MessageKey.prototype, "_remoteJid", {
            get: $util.oneOfGetter($oneOfFields = ["remoteJid"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageKey _fromMe.
         * @member {"fromMe"|undefined} _fromMe
         * @memberof Protocol.MessageKey
         * @instance
         */
        Object.defineProperty(MessageKey.prototype, "_fromMe", {
            get: $util.oneOfGetter($oneOfFields = ["fromMe"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageKey _id.
         * @member {"id"|undefined} _id
         * @memberof Protocol.MessageKey
         * @instance
         */
        Object.defineProperty(MessageKey.prototype, "_id", {
            get: $util.oneOfGetter($oneOfFields = ["id"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MessageKey _participant.
         * @member {"participant"|undefined} _participant
         * @memberof Protocol.MessageKey
         * @instance
         */
        Object.defineProperty(MessageKey.prototype, "_participant", {
            get: $util.oneOfGetter($oneOfFields = ["participant"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new MessageKey instance using the specified properties.
         * @function create
         * @memberof Protocol.MessageKey
         * @static
         * @param {Protocol.IMessageKey=} [properties] Properties to set
         * @returns {Protocol.MessageKey} MessageKey instance
         */
        MessageKey.create = function create(properties) {
            return new MessageKey(properties);
        };

        /**
         * Encodes the specified MessageKey message. Does not implicitly {@link Protocol.MessageKey.verify|verify} messages.
         * @function encode
         * @memberof Protocol.MessageKey
         * @static
         * @param {Protocol.IMessageKey} message MessageKey message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MessageKey.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.remoteJid != null && Object.hasOwnProperty.call(message, "remoteJid"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.remoteJid);
            if (message.fromMe != null && Object.hasOwnProperty.call(message, "fromMe"))
                writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fromMe);
            if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.id);
            if (message.participant != null && Object.hasOwnProperty.call(message, "participant"))
                writer.uint32(/* id 4, wireType 2 =*/34).string(message.participant);
            return writer;
        };

        /**
         * Encodes the specified MessageKey message, length delimited. Does not implicitly {@link Protocol.MessageKey.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Protocol.MessageKey
         * @static
         * @param {Protocol.IMessageKey} message MessageKey message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MessageKey.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a MessageKey message from the specified reader or buffer.
         * @function decode
         * @memberof Protocol.MessageKey
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Protocol.MessageKey} MessageKey
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MessageKey.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.Protocol.MessageKey();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.remoteJid = reader.string();
                        break;
                    }
                case 2: {
                        message.fromMe = reader.bool();
                        break;
                    }
                case 3: {
                        message.id = reader.string();
                        break;
                    }
                case 4: {
                        message.participant = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a MessageKey message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Protocol.MessageKey
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Protocol.MessageKey} MessageKey
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MessageKey.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a MessageKey message.
         * @function verify
         * @memberof Protocol.MessageKey
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        MessageKey.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) {
                properties._remoteJid = 1;
                if (!$util.isString(message.remoteJid))
                    return "remoteJid: string expected";
            }
            if (message.fromMe != null && message.hasOwnProperty("fromMe")) {
                properties._fromMe = 1;
                if (typeof message.fromMe !== "boolean")
                    return "fromMe: boolean expected";
            }
            if (message.id != null && message.hasOwnProperty("id")) {
                properties._id = 1;
                if (!$util.isString(message.id))
                    return "id: string expected";
            }
            if (message.participant != null && message.hasOwnProperty("participant")) {
                properties._participant = 1;
                if (!$util.isString(message.participant))
                    return "participant: string expected";
            }
            return null;
        };

        /**
         * Creates a MessageKey message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Protocol.MessageKey
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Protocol.MessageKey} MessageKey
         */
        MessageKey.fromObject = function fromObject(object) {
            if (object instanceof $root.Protocol.MessageKey)
                return object;
            var message = new $root.Protocol.MessageKey();
            if (object.remoteJid != null)
                message.remoteJid = String(object.remoteJid);
            if (object.fromMe != null)
                message.fromMe = Boolean(object.fromMe);
            if (object.id != null)
                message.id = String(object.id);
            if (object.participant != null)
                message.participant = String(object.participant);
            return message;
        };

        /**
         * Creates a plain object from a MessageKey message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Protocol.MessageKey
         * @static
         * @param {Protocol.MessageKey} message MessageKey
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        MessageKey.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) {
                object.remoteJid = message.remoteJid;
                if (options.oneofs)
                    object._remoteJid = "remoteJid";
            }
            if (message.fromMe != null && message.hasOwnProperty("fromMe")) {
                object.fromMe = message.fromMe;
                if (options.oneofs)
                    object._fromMe = "fromMe";
            }
            if (message.id != null && message.hasOwnProperty("id")) {
                object.id = message.id;
                if (options.oneofs)
                    object._id = "id";
            }
            if (message.participant != null && message.hasOwnProperty("participant")) {
                object.participant = message.participant;
                if (options.oneofs)
                    object._participant = "participant";
            }
            return object;
        };

        /**
         * Converts this MessageKey to JSON.
         * @function toJSON
         * @memberof Protocol.MessageKey
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        MessageKey.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for MessageKey
         * @function getTypeUrl
         * @memberof Protocol.MessageKey
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        MessageKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Protocol.MessageKey";
        };

        return MessageKey;
    })();

    return Protocol;
})();

$root.AICommon = (function() {

    /**
     * Namespace AICommon.
     * @exports AICommon
     * @namespace
     */
    var AICommon = {};

    AICommon.AIHomeState = (function() {

        /**
         * Properties of a AIHomeState.
         * @memberof AICommon
         * @interface IAIHomeState
         * @property {number|Long|null} [lastFetchTime] AIHomeState lastFetchTime
         * @property {Array.<AICommon.AIHomeState.IAIHomeOption>|null} [capabilityOptions] AIHomeState capabilityOptions
         * @property {Array.<AICommon.AIHomeState.IAIHomeOption>|null} [conversationOptions] AIHomeState conversationOptions
         */

        /**
         * Constructs a new AIHomeState.
         * @memberof AICommon
         * @classdesc Represents a AIHomeState.
         * @implements IAIHomeState
         * @constructor
         * @param {AICommon.IAIHomeState=} [properties] Properties to set
         */
        function AIHomeState(properties) {
            this.capabilityOptions = [];
            this.conversationOptions = [];
            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]];
        }

        /**
         * AIHomeState lastFetchTime.
         * @member {number|Long|null|undefined} lastFetchTime
         * @memberof AICommon.AIHomeState
         * @instance
         */
        AIHomeState.prototype.lastFetchTime = null;

        /**
         * AIHomeState capabilityOptions.
         * @member {Array.<AICommon.AIHomeState.IAIHomeOption>} capabilityOptions
         * @memberof AICommon.AIHomeState
         * @instance
         */
        AIHomeState.prototype.capabilityOptions = $util.emptyArray;

        /**
         * AIHomeState conversationOptions.
         * @member {Array.<AICommon.AIHomeState.IAIHomeOption>} conversationOptions
         * @memberof AICommon.AIHomeState
         * @instance
         */
        AIHomeState.prototype.conversationOptions = $util.emptyArray;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * AIHomeState _lastFetchTime.
         * @member {"lastFetchTime"|undefined} _lastFetchTime
         * @memberof AICommon.AIHomeState
         * @instance
         */
        Object.defineProperty(AIHomeState.prototype, "_lastFetchTime", {
            get: $util.oneOfGetter($oneOfFields = ["lastFetchTime"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new AIHomeState instance using the specified properties.
         * @function create
         * @memberof AICommon.AIHomeState
         * @static
         * @param {AICommon.IAIHomeState=} [properties] Properties to set
         * @returns {AICommon.AIHomeState} AIHomeState instance
         */
        AIHomeState.create = function create(properties) {
            return new AIHomeState(properties);
        };

        /**
         * Encodes the specified AIHomeState message. Does not implicitly {@link AICommon.AIHomeState.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIHomeState
         * @static
         * @param {AICommon.IAIHomeState} message AIHomeState message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIHomeState.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.lastFetchTime != null && Object.hasOwnProperty.call(message, "lastFetchTime"))
                writer.uint32(/* id 1, wireType 0 =*/8).int64(message.lastFetchTime);
            if (message.capabilityOptions != null && message.capabilityOptions.length)
                for (var i = 0; i < message.capabilityOptions.length; ++i)
                    $root.AICommon.AIHomeState.AIHomeOption.encode(message.capabilityOptions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.conversationOptions != null && message.conversationOptions.length)
                for (var i = 0; i < message.conversationOptions.length; ++i)
                    $root.AICommon.AIHomeState.AIHomeOption.encode(message.conversationOptions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified AIHomeState message, length delimited. Does not implicitly {@link AICommon.AIHomeState.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.AIHomeState
         * @static
         * @param {AICommon.IAIHomeState} message AIHomeState message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIHomeState.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a AIHomeState message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.AIHomeState
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.AIHomeState} AIHomeState
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIHomeState.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.AICommon.AIHomeState();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.lastFetchTime = reader.int64();
                        break;
                    }
                case 2: {
                        if (!(message.capabilityOptions && message.capabilityOptions.length))
                            message.capabilityOptions = [];
                        message.capabilityOptions.push($root.AICommon.AIHomeState.AIHomeOption.decode(reader, reader.uint32()));
                        break;
                    }
                case 3: {
                        if (!(message.conversationOptions && message.conversationOptions.length))
                            message.conversationOptions = [];
                        message.conversationOptions.push($root.AICommon.AIHomeState.AIHomeOption.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a AIHomeState message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.AIHomeState
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.AIHomeState} AIHomeState
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIHomeState.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a AIHomeState message.
         * @function verify
         * @memberof AICommon.AIHomeState
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIHomeState.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.lastFetchTime != null && message.hasOwnProperty("lastFetchTime")) {
                properties._lastFetchTime = 1;
                if (!$util.isInteger(message.lastFetchTime) && !(message.lastFetchTime && $util.isInteger(message.lastFetchTime.low) && $util.isInteger(message.lastFetchTime.high)))
                    return "lastFetchTime: integer|Long expected";
            }
            if (message.capabilityOptions != null && message.hasOwnProperty("capabilityOptions")) {
                if (!Array.isArray(message.capabilityOptions))
                    return "capabilityOptions: array expected";
                for (var i = 0; i < message.capabilityOptions.length; ++i) {
                    var error = $root.AICommon.AIHomeState.AIHomeOption.verify(message.capabilityOptions[i]);
                    if (error)
                        return "capabilityOptions." + error;
                }
            }
            if (message.conversationOptions != null && message.hasOwnProperty("conversationOptions")) {
                if (!Array.isArray(message.conversationOptions))
                    return "conversationOptions: array expected";
                for (var i = 0; i < message.conversationOptions.length; ++i) {
                    var error = $root.AICommon.AIHomeState.AIHomeOption.verify(message.conversationOptions[i]);
                    if (error)
                        return "conversationOptions." + error;
                }
            }
            return null;
        };

        /**
         * Creates a AIHomeState message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.AIHomeState
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.AIHomeState} AIHomeState
         */
        AIHomeState.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.AIHomeState)
                return object;
            var message = new $root.AICommon.AIHomeState();
            if (object.lastFetchTime != null)
                if ($util.Long)
                    (message.lastFetchTime = $util.Long.fromValue(object.lastFetchTime)).unsigned = false;
                else if (typeof object.lastFetchTime === "string")
                    message.lastFetchTime = parseInt(object.lastFetchTime, 10);
                else if (typeof object.lastFetchTime === "number")
                    message.lastFetchTime = object.lastFetchTime;
                else if (typeof object.lastFetchTime === "object")
                    message.lastFetchTime = new $util.LongBits(object.lastFetchTime.low >>> 0, object.lastFetchTime.high >>> 0).toNumber();
            if (object.capabilityOptions) {
                if (!Array.isArray(object.capabilityOptions))
                    throw TypeError(".AICommon.AIHomeState.capabilityOptions: array expected");
                message.capabilityOptions = [];
                for (var i = 0; i < object.capabilityOptions.length; ++i) {
                    if (typeof object.capabilityOptions[i] !== "object")
                        throw TypeError(".AICommon.AIHomeState.capabilityOptions: object expected");
                    message.capabilityOptions[i] = $root.AICommon.AIHomeState.AIHomeOption.fromObject(object.capabilityOptions[i]);
                }
            }
            if (object.conversationOptions) {
                if (!Array.isArray(object.conversationOptions))
                    throw TypeError(".AICommon.AIHomeState.conversationOptions: array expected");
                message.conversationOptions = [];
                for (var i = 0; i < object.conversationOptions.length; ++i) {
                    if (typeof object.conversationOptions[i] !== "object")
                        throw TypeError(".AICommon.AIHomeState.conversationOptions: object expected");
                    message.conversationOptions[i] = $root.AICommon.AIHomeState.AIHomeOption.fromObject(object.conversationOptions[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a AIHomeState message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIHomeState
         * @static
         * @param {AICommon.AIHomeState} message AIHomeState
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIHomeState.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults) {
                object.capabilityOptions = [];
                object.conversationOptions = [];
            }
            if (message.lastFetchTime != null && message.hasOwnProperty("lastFetchTime")) {
                if (typeof message.lastFetchTime === "number")
                    object.lastFetchTime = options.longs === String ? String(message.lastFetchTime) : message.lastFetchTime;
                else
                    object.lastFetchTime = options.longs === String ? $util.Long.prototype.toString.call(message.lastFetchTime) : options.longs === Number ? new $util.LongBits(message.lastFetchTime.low >>> 0, message.lastFetchTime.high >>> 0).toNumber() : message.lastFetchTime;
                if (options.oneofs)
                    object._lastFetchTime = "lastFetchTime";
            }
            if (message.capabilityOptions && message.capabilityOptions.length) {
                object.capabilityOptions = [];
                for (var j = 0; j < message.capabilityOptions.length; ++j)
                    object.capabilityOptions[j] = $root.AICommon.AIHomeState.AIHomeOption.toObject(message.capabilityOptions[j], options);
            }
            if (message.conversationOptions && message.conversationOptions.length) {
                object.conversationOptions = [];
                for (var j = 0; j < message.conversationOptions.length; ++j)
                    object.conversationOptions[j] = $root.AICommon.AIHomeState.AIHomeOption.toObject(message.conversationOptions[j], options);
            }
            return object;
        };

        /**
         * Converts this AIHomeState to JSON.
         * @function toJSON
         * @memberof AICommon.AIHomeState
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        AIHomeState.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for AIHomeState
         * @function getTypeUrl
         * @memberof AICommon.AIHomeState
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        AIHomeState.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.AIHomeState";
        };

        AIHomeState.AIHomeOption = (function() {

            /**
             * Properties of a AIHomeOption.
             * @memberof AICommon.AIHomeState
             * @interface IAIHomeOption
             * @property {AICommon.AIHomeState.AIHomeOption.AIHomeActionType|null} [type] AIHomeOption type
             * @property {string|null} [title] AIHomeOption title
             * @property {string|null} [promptText] AIHomeOption promptText
             * @property {string|null} [sessionId] AIHomeOption sessionId
             * @property {string|null} [imageWdsIdentifier] AIHomeOption imageWdsIdentifier
             * @property {string|null} [imageTintColor] AIHomeOption imageTintColor
             * @property {string|null} [imageBackgroundColor] AIHomeOption imageBackgroundColor
             */

            /**
             * Constructs a new AIHomeOption.
             * @memberof AICommon.AIHomeState
             * @classdesc Represents a AIHomeOption.
             * @implements IAIHomeOption
             * @constructor
             * @param {AICommon.AIHomeState.IAIHomeOption=} [properties] Properties to set
             */
            function AIHomeOption(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]];
            }

            /**
             * AIHomeOption type.
             * @member {AICommon.AIHomeState.AIHomeOption.AIHomeActionType|null|undefined} type
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @instance
             */
            AIHomeOption.prototype.type = null;

            /**
             * AIHomeOption title.
             * @member {string|null|undefined} title
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @instance
             */
            AIHomeOption.prototype.title = null;

            /**
             * AIHomeOption promptText.
             * @member {string|null|undefined} promptText
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @instance
             */
            AIHomeOption.prototype.promptText = null;

            /**
             * AIHomeOption sessionId.
             * @member {string|null|undefined} sessionId
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @instance
             */
            AIHomeOption.prototype.sessionId = null;

            /**
             * AIHomeOption imageWdsIdentifier.
             * @member {string|null|undefined} imageWdsIdentifier
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @instance
             */
            AIHomeOption.prototype.imageWdsIdentifier = null;

            /**
             * AIHomeOption imageTintColor.
             * @member {string|null|undefined} imageTintColor
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @instance
             */
            AIHomeOption.prototype.imageTintColor = null;

            /**
             * AIHomeOption imageBackgroundColor.
             * @member {string|null|undefined} imageBackgroundColor
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @instance
             */
            AIHomeOption.prototype.imageBackgroundColor = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * AIHomeOption _type.
             * @member {"type"|undefined} _type
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @instance
             */
            Object.defineProperty(AIHomeOption.prototype, "_type", {
                get: $util.oneOfGetter($oneOfFields = ["type"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIHomeOption _title.
             * @member {"title"|undefined} _title
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @instance
             */
            Object.defineProperty(AIHomeOption.prototype, "_title", {
                get: $util.oneOfGetter($oneOfFields = ["title"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIHomeOption _promptText.
             * @member {"promptText"|undefined} _promptText
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @instance
             */
            Object.defineProperty(AIHomeOption.prototype, "_promptText", {
                get: $util.oneOfGetter($oneOfFields = ["promptText"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIHomeOption _sessionId.
             * @member {"sessionId"|undefined} _sessionId
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @instance
             */
            Object.defineProperty(AIHomeOption.prototype, "_sessionId", {
                get: $util.oneOfGetter($oneOfFields = ["sessionId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIHomeOption _imageWdsIdentifier.
             * @member {"imageWdsIdentifier"|undefined} _imageWdsIdentifier
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @instance
             */
            Object.defineProperty(AIHomeOption.prototype, "_imageWdsIdentifier", {
                get: $util.oneOfGetter($oneOfFields = ["imageWdsIdentifier"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIHomeOption _imageTintColor.
             * @member {"imageTintColor"|undefined} _imageTintColor
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @instance
             */
            Object.defineProperty(AIHomeOption.prototype, "_imageTintColor", {
                get: $util.oneOfGetter($oneOfFields = ["imageTintColor"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIHomeOption _imageBackgroundColor.
             * @member {"imageBackgroundColor"|undefined} _imageBackgroundColor
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @instance
             */
            Object.defineProperty(AIHomeOption.prototype, "_imageBackgroundColor", {
                get: $util.oneOfGetter($oneOfFields = ["imageBackgroundColor"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new AIHomeOption instance using the specified properties.
             * @function create
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @static
             * @param {AICommon.AIHomeState.IAIHomeOption=} [properties] Properties to set
             * @returns {AICommon.AIHomeState.AIHomeOption} AIHomeOption instance
             */
            AIHomeOption.create = function create(properties) {
                return new AIHomeOption(properties);
            };

            /**
             * Encodes the specified AIHomeOption message. Does not implicitly {@link AICommon.AIHomeState.AIHomeOption.verify|verify} messages.
             * @function encode
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @static
             * @param {AICommon.AIHomeState.IAIHomeOption} message AIHomeOption message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIHomeOption.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
                if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.title);
                if (message.promptText != null && Object.hasOwnProperty.call(message, "promptText"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.promptText);
                if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.sessionId);
                if (message.imageWdsIdentifier != null && Object.hasOwnProperty.call(message, "imageWdsIdentifier"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.imageWdsIdentifier);
                if (message.imageTintColor != null && Object.hasOwnProperty.call(message, "imageTintColor"))
                    writer.uint32(/* id 6, wireType 2 =*/50).string(message.imageTintColor);
                if (message.imageBackgroundColor != null && Object.hasOwnProperty.call(message, "imageBackgroundColor"))
                    writer.uint32(/* id 7, wireType 2 =*/58).string(message.imageBackgroundColor);
                return writer;
            };

            /**
             * Encodes the specified AIHomeOption message, length delimited. Does not implicitly {@link AICommon.AIHomeState.AIHomeOption.verify|verify} messages.
             * @function encodeDelimited
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @static
             * @param {AICommon.AIHomeState.IAIHomeOption} message AIHomeOption message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIHomeOption.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a AIHomeOption message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.AIHomeState.AIHomeOption} AIHomeOption
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AIHomeOption.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.AICommon.AIHomeState.AIHomeOption();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.type = reader.int32();
                            break;
                        }
                    case 2: {
                            message.title = reader.string();
                            break;
                        }
                    case 3: {
                            message.promptText = reader.string();
                            break;
                        }
                    case 4: {
                            message.sessionId = reader.string();
                            break;
                        }
                    case 5: {
                            message.imageWdsIdentifier = reader.string();
                            break;
                        }
                    case 6: {
                            message.imageTintColor = reader.string();
                            break;
                        }
                    case 7: {
                            message.imageBackgroundColor = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a AIHomeOption message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {AICommon.AIHomeState.AIHomeOption} AIHomeOption
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AIHomeOption.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a AIHomeOption message.
             * @function verify
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AIHomeOption.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.type != null && message.hasOwnProperty("type")) {
                    properties._type = 1;
                    switch (message.type) {
                    default:
                        return "type: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                if (message.title != null && message.hasOwnProperty("title")) {
                    properties._title = 1;
                    if (!$util.isString(message.title))
                        return "title: string expected";
                }
                if (message.promptText != null && message.hasOwnProperty("promptText")) {
                    properties._promptText = 1;
                    if (!$util.isString(message.promptText))
                        return "promptText: string expected";
                }
                if (message.sessionId != null && message.hasOwnProperty("sessionId")) {
                    properties._sessionId = 1;
                    if (!$util.isString(message.sessionId))
                        return "sessionId: string expected";
                }
                if (message.imageWdsIdentifier != null && message.hasOwnProperty("imageWdsIdentifier")) {
                    properties._imageWdsIdentifier = 1;
                    if (!$util.isString(message.imageWdsIdentifier))
                        return "imageWdsIdentifier: string expected";
                }
                if (message.imageTintColor != null && message.hasOwnProperty("imageTintColor")) {
                    properties._imageTintColor = 1;
                    if (!$util.isString(message.imageTintColor))
                        return "imageTintColor: string expected";
                }
                if (message.imageBackgroundColor != null && message.hasOwnProperty("imageBackgroundColor")) {
                    properties._imageBackgroundColor = 1;
                    if (!$util.isString(message.imageBackgroundColor))
                        return "imageBackgroundColor: string expected";
                }
                return null;
            };

            /**
             * Creates a AIHomeOption message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.AIHomeState.AIHomeOption} AIHomeOption
             */
            AIHomeOption.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.AIHomeState.AIHomeOption)
                    return object;
                var message = new $root.AICommon.AIHomeState.AIHomeOption();
                switch (object.type) {
                default:
                    if (typeof object.type === "number") {
                        message.type = object.type;
                        break;
                    }
                    break;
                case "PROMPT":
                case 0:
                    message.type = 0;
                    break;
                case "CREATE_IMAGE":
                case 1:
                    message.type = 1;
                    break;
                case "ANIMATE_PHOTO":
                case 2:
                    message.type = 2;
                    break;
                case "ANALYZE_FILE":
                case 3:
                    message.type = 3;
                    break;
                }
                if (object.title != null)
                    message.title = String(object.title);
                if (object.promptText != null)
                    message.promptText = String(object.promptText);
                if (object.sessionId != null)
                    message.sessionId = String(object.sessionId);
                if (object.imageWdsIdentifier != null)
                    message.imageWdsIdentifier = String(object.imageWdsIdentifier);
                if (object.imageTintColor != null)
                    message.imageTintColor = String(object.imageTintColor);
                if (object.imageBackgroundColor != null)
                    message.imageBackgroundColor = String(object.imageBackgroundColor);
                return message;
            };

            /**
             * Creates a plain object from a AIHomeOption message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @static
             * @param {AICommon.AIHomeState.AIHomeOption} message AIHomeOption
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AIHomeOption.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.type != null && message.hasOwnProperty("type")) {
                    object.type = options.enums === String ? $root.AICommon.AIHomeState.AIHomeOption.AIHomeActionType[message.type] === undefined ? message.type : $root.AICommon.AIHomeState.AIHomeOption.AIHomeActionType[message.type] : message.type;
                    if (options.oneofs)
                        object._type = "type";
                }
                if (message.title != null && message.hasOwnProperty("title")) {
                    object.title = message.title;
                    if (options.oneofs)
                        object._title = "title";
                }
                if (message.promptText != null && message.hasOwnProperty("promptText")) {
                    object.promptText = message.promptText;
                    if (options.oneofs)
                        object._promptText = "promptText";
                }
                if (message.sessionId != null && message.hasOwnProperty("sessionId")) {
                    object.sessionId = message.sessionId;
                    if (options.oneofs)
                        object._sessionId = "sessionId";
                }
                if (message.imageWdsIdentifier != null && message.hasOwnProperty("imageWdsIdentifier")) {
                    object.imageWdsIdentifier = message.imageWdsIdentifier;
                    if (options.oneofs)
                        object._imageWdsIdentifier = "imageWdsIdentifier";
                }
                if (message.imageTintColor != null && message.hasOwnProperty("imageTintColor")) {
                    object.imageTintColor = message.imageTintColor;
                    if (options.oneofs)
                        object._imageTintColor = "imageTintColor";
                }
                if (message.imageBackgroundColor != null && message.hasOwnProperty("imageBackgroundColor")) {
                    object.imageBackgroundColor = message.imageBackgroundColor;
                    if (options.oneofs)
                        object._imageBackgroundColor = "imageBackgroundColor";
                }
                return object;
            };

            /**
             * Converts this AIHomeOption to JSON.
             * @function toJSON
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AIHomeOption.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AIHomeOption
             * @function getTypeUrl
             * @memberof AICommon.AIHomeState.AIHomeOption
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AIHomeOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/AICommon.AIHomeState.AIHomeOption";
            };

            /**
             * AIHomeActionType enum.
             * @name AICommon.AIHomeState.AIHomeOption.AIHomeActionType
             * @enum {number}
             * @property {number} PROMPT=0 PROMPT value
             * @property {number} CREATE_IMAGE=1 CREATE_IMAGE value
             * @property {number} ANIMATE_PHOTO=2 ANIMATE_PHOTO value
             * @property {number} ANALYZE_FILE=3 ANALYZE_FILE value
             */
            AIHomeOption.AIHomeActionType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "PROMPT"] = 0;
                values[valuesById[1] = "CREATE_IMAGE"] = 1;
                values[valuesById[2] = "ANIMATE_PHOTO"] = 2;
                values[valuesById[3] = "ANALYZE_FILE"] = 3;
                return values;
            })();

            return AIHomeOption;
        })();

        return AIHomeState;
    })();

    AICommon.BotDocumentMessageMetadata = (function() {

        /**
         * Properties of a BotDocumentMessageMetadata.
         * @memberof AICommon
         * @interface IBotDocumentMessageMetadata
         * @property {AICommon.BotDocumentMessageMetadata.DocumentPluginType|null} [pluginType] BotDocumentMessageMetadata pluginType
         */

        /**
         * Constructs a new BotDocumentMessageMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotDocumentMessageMetadata.
         * @implements IBotDocumentMessageMetadata
         * @constructor
         * @param {AICommon.IBotDocumentMessageMetadata=} [properties] Properties to set
         */
        function BotDocumentMessageMetadata(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]];
        }

        /**
         * BotDocumentMessageMetadata pluginType.
         * @member {AICommon.BotDocumentMessageMetadata.DocumentPluginType|null|undefined} pluginType
         * @memberof AICommon.BotDocumentMessageMetadata
         * @instance
         */
        BotDocumentMessageMetadata.prototype.pluginType = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotDocumentMessageMetadata _pluginType.
         * @member {"pluginType"|undefined} _pluginType
         * @memberof AICommon.BotDocumentMessageMetadata
         * @instance
         */
        Object.defineProperty(BotDocumentMessageMetadata.prototype, "_pluginType", {
            get: $util.oneOfGetter($oneOfFields = ["pluginType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotDocumentMessageMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotDocumentMessageMetadata
         * @static
         * @param {AICommon.IBotDocumentMessageMetadata=} [properties] Properties to set
         * @returns {AICommon.BotDocumentMessageMetadata} BotDocumentMessageMetadata instance
         */
        BotDocumentMessageMetadata.create = function create(properties) {
            return new BotDocumentMessageMetadata(properties);
        };

        /**
         * Encodes the specified BotDocumentMessageMetadata message. Does not implicitly {@link AICommon.BotDocumentMessageMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotDocumentMessageMetadata
         * @static
         * @param {AICommon.IBotDocumentMessageMetadata} message BotDocumentMessageMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotDocumentMessageMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.pluginType != null && Object.hasOwnProperty.call(message, "pluginType"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pluginType);
            return writer;
        };

        /**
         * Encodes the specified BotDocumentMessageMetadata message, length delimited. Does not implicitly {@link AICommon.BotDocumentMessageMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotDocumentMessageMetadata
         * @static
         * @param {AICommon.IBotDocumentMessageMetadata} message BotDocumentMessageMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotDocumentMessageMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotDocumentMessageMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotDocumentMessageMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotDocumentMessageMetadata} BotDocumentMessageMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotDocumentMessageMetadata.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.AICommon.BotDocumentMessageMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.pluginType = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotDocumentMessageMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotDocumentMessageMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotDocumentMessageMetadata} BotDocumentMessageMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotDocumentMessageMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotDocumentMessageMetadata message.
         * @function verify
         * @memberof AICommon.BotDocumentMessageMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotDocumentMessageMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.pluginType != null && message.hasOwnProperty("pluginType")) {
                properties._pluginType = 1;
                switch (message.pluginType) {
                default:
                    return "pluginType: enum value expected";
                case 0:
                case 1:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a BotDocumentMessageMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotDocumentMessageMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotDocumentMessageMetadata} BotDocumentMessageMetadata
         */
        BotDocumentMessageMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotDocumentMessageMetadata)
                return object;
            var message = new $root.AICommon.BotDocumentMessageMetadata();
            switch (object.pluginType) {
            default:
                if (typeof object.pluginType === "number") {
                    message.pluginType = object.pluginType;
                    break;
                }
                break;
            case "TEXT_EXTRACTION":
            case 0:
                message.pluginType = 0;
                break;
            case "OCR_AND_IMAGES":
            case 1:
                message.pluginType = 1;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a BotDocumentMessageMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotDocumentMessageMetadata
         * @static
         * @param {AICommon.BotDocumentMessageMetadata} message BotDocumentMessageMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotDocumentMessageMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.pluginType != null && message.hasOwnProperty("pluginType")) {
                object.pluginType = options.enums === String ? $root.AICommon.BotDocumentMessageMetadata.DocumentPluginType[message.pluginType] === undefined ? message.pluginType : $root.AICommon.BotDocumentMessageMetadata.DocumentPluginType[message.pluginType] : message.pluginType;
                if (options.oneofs)
                    object._pluginType = "pluginType";
            }
            return object;
        };

        /**
         * Converts this BotDocumentMessageMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotDocumentMessageMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotDocumentMessageMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotDocumentMessageMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotDocumentMessageMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotDocumentMessageMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotDocumentMessageMetadata";
        };

        /**
         * DocumentPluginType enum.
         * @name AICommon.BotDocumentMessageMetadata.DocumentPluginType
         * @enum {number}
         * @property {number} TEXT_EXTRACTION=0 TEXT_EXTRACTION value
         * @property {number} OCR_AND_IMAGES=1 OCR_AND_IMAGES value
         */
        BotDocumentMessageMetadata.DocumentPluginType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "TEXT_EXTRACTION"] = 0;
            values[valuesById[1] = "OCR_AND_IMAGES"] = 1;
            return values;
        })();

        return BotDocumentMessageMetadata;
    })();

    AICommon.SessionTransparencyMetadata = (function() {

        /**
         * Properties of a SessionTransparencyMetadata.
         * @memberof AICommon
         * @interface ISessionTransparencyMetadata
         * @property {string|null} [disclaimerText] SessionTransparencyMetadata disclaimerText
         * @property {string|null} [hcaId] SessionTransparencyMetadata hcaId
         * @property {AICommon.SessionTransparencyType|null} [sessionTransparencyType] SessionTransparencyMetadata sessionTransparencyType
         */

        /**
         * Constructs a new SessionTransparencyMetadata.
         * @memberof AICommon
         * @classdesc Represents a SessionTransparencyMetadata.
         * @implements ISessionTransparencyMetadata
         * @constructor
         * @param {AICommon.ISessionTransparencyMetadata=} [properties] Properties to set
         */
        function SessionTransparencyMetadata(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]];
        }

        /**
         * SessionTransparencyMetadata disclaimerText.
         * @member {string|null|undefined} disclaimerText
         * @memberof AICommon.SessionTransparencyMetadata
         * @instance
         */
        SessionTransparencyMetadata.prototype.disclaimerText = null;

        /**
         * SessionTransparencyMetadata hcaId.
         * @member {string|null|undefined} hcaId
         * @memberof AICommon.SessionTransparencyMetadata
         * @instance
         */
        SessionTransparencyMetadata.prototype.hcaId = null;

        /**
         * SessionTransparencyMetadata sessionTransparencyType.
         * @member {AICommon.SessionTransparencyType|null|undefined} sessionTransparencyType
         * @memberof AICommon.SessionTransparencyMetadata
         * @instance
         */
        SessionTransparencyMetadata.prototype.sessionTransparencyType = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * SessionTransparencyMetadata _disclaimerText.
         * @member {"disclaimerText"|undefined} _disclaimerText
         * @memberof AICommon.SessionTransparencyMetadata
         * @instance
         */
        Object.defineProperty(SessionTransparencyMetadata.prototype, "_disclaimerText", {
            get: $util.oneOfGetter($oneOfFields = ["disclaimerText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * SessionTransparencyMetadata _hcaId.
         * @member {"hcaId"|undefined} _hcaId
         * @memberof AICommon.SessionTransparencyMetadata
         * @instance
         */
        Object.defineProperty(SessionTransparencyMetadata.prototype, "_hcaId", {
            get: $util.oneOfGetter($oneOfFields = ["hcaId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * SessionTransparencyMetadata _sessionTransparencyType.
         * @member {"sessionTransparencyType"|undefined} _sessionTransparencyType
         * @memberof AICommon.SessionTransparencyMetadata
         * @instance
         */
        Object.defineProperty(SessionTransparencyMetadata.prototype, "_sessionTransparencyType", {
            get: $util.oneOfGetter($oneOfFields = ["sessionTransparencyType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new SessionTransparencyMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.SessionTransparencyMetadata
         * @static
         * @param {AICommon.ISessionTransparencyMetadata=} [properties] Properties to set
         * @returns {AICommon.SessionTransparencyMetadata} SessionTransparencyMetadata instance
         */
        SessionTransparencyMetadata.create = function create(properties) {
            return new SessionTransparencyMetadata(properties);
        };

        /**
         * Encodes the specified SessionTransparencyMetadata message. Does not implicitly {@link AICommon.SessionTransparencyMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.SessionTransparencyMetadata
         * @static
         * @param {AICommon.ISessionTransparencyMetadata} message SessionTransparencyMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SessionTransparencyMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.disclaimerText != null && Object.hasOwnProperty.call(message, "disclaimerText"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.disclaimerText);
            if (message.hcaId != null && Object.hasOwnProperty.call(message, "hcaId"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.hcaId);
            if (message.sessionTransparencyType != null && Object.hasOwnProperty.call(message, "sessionTransparencyType"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.sessionTransparencyType);
            return writer;
        };

        /**
         * Encodes the specified SessionTransparencyMetadata message, length delimited. Does not implicitly {@link AICommon.SessionTransparencyMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.SessionTransparencyMetadata
         * @static
         * @param {AICommon.ISessionTransparencyMetadata} message SessionTransparencyMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SessionTransparencyMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a SessionTransparencyMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.SessionTransparencyMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.SessionTransparencyMetadata} SessionTransparencyMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SessionTransparencyMetadata.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.AICommon.SessionTransparencyMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.disclaimerText = reader.string();
                        break;
                    }
                case 2: {
                        message.hcaId = reader.string();
                        break;
                    }
                case 3: {
                        message.sessionTransparencyType = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a SessionTransparencyMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.SessionTransparencyMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.SessionTransparencyMetadata} SessionTransparencyMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SessionTransparencyMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a SessionTransparencyMetadata message.
         * @function verify
         * @memberof AICommon.SessionTransparencyMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        SessionTransparencyMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.disclaimerText != null && message.hasOwnProperty("disclaimerText")) {
                properties._disclaimerText = 1;
                if (!$util.isString(message.disclaimerText))
                    return "disclaimerText: string expected";
            }
            if (message.hcaId != null && message.hasOwnProperty("hcaId")) {
                properties._hcaId = 1;
                if (!$util.isString(message.hcaId))
                    return "hcaId: string expected";
            }
            if (message.sessionTransparencyType != null && message.hasOwnProperty("sessionTransparencyType")) {
                properties._sessionTransparencyType = 1;
                switch (message.sessionTransparencyType) {
                default:
                    return "sessionTransparencyType: enum value expected";
                case 0:
                case 1:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a SessionTransparencyMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.SessionTransparencyMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.SessionTransparencyMetadata} SessionTransparencyMetadata
         */
        SessionTransparencyMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.SessionTransparencyMetadata)
                return object;
            var message = new $root.AICommon.SessionTransparencyMetadata();
            if (object.disclaimerText != null)
                message.disclaimerText = String(object.disclaimerText);
            if (object.hcaId != null)
                message.hcaId = String(object.hcaId);
            switch (object.sessionTransparencyType) {
            default:
                if (typeof object.sessionTransparencyType === "number") {
                    message.sessionTransparencyType = object.sessionTransparencyType;
                    break;
                }
                break;
            case "UNKNOWN_TYPE":
            case 0:
                message.sessionTransparencyType = 0;
                break;
            case "NY_AI_SAFETY_DISCLAIMER":
            case 1:
                message.sessionTransparencyType = 1;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a SessionTransparencyMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.SessionTransparencyMetadata
         * @static
         * @param {AICommon.SessionTransparencyMetadata} message SessionTransparencyMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        SessionTransparencyMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.disclaimerText != null && message.hasOwnProperty("disclaimerText")) {
                object.disclaimerText = message.disclaimerText;
                if (options.oneofs)
                    object._disclaimerText = "disclaimerText";
            }
            if (message.hcaId != null && message.hasOwnProperty("hcaId")) {
                object.hcaId = message.hcaId;
                if (options.oneofs)
                    object._hcaId = "hcaId";
            }
            if (message.sessionTransparencyType != null && message.hasOwnProperty("sessionTransparencyType")) {
                object.sessionTransparencyType = options.enums === String ? $root.AICommon.SessionTransparencyType[message.sessionTransparencyType] === undefined ? message.sessionTransparencyType : $root.AICommon.SessionTransparencyType[message.sessionTransparencyType] : message.sessionTransparencyType;
                if (options.oneofs)
                    object._sessionTransparencyType = "sessionTransparencyType";
            }
            return object;
        };

        /**
         * Converts this SessionTransparencyMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.SessionTransparencyMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        SessionTransparencyMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for SessionTransparencyMetadata
         * @function getTypeUrl
         * @memberof AICommon.SessionTransparencyMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        SessionTransparencyMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.SessionTransparencyMetadata";
        };

        return SessionTransparencyMetadata;
    })();

    AICommon.AIRegenerateMetadata = (function() {

        /**
         * Properties of a AIRegenerateMetadata.
         * @memberof AICommon
         * @interface IAIRegenerateMetadata
         * @property {Protocol.IMessageKey|null} [messageKey] AIRegenerateMetadata messageKey
         * @property {number|Long|null} [responseTimestampMs] AIRegenerateMetadata responseTimestampMs
         */

        /**
         * Constructs a new AIRegenerateMetadata.
         * @memberof AICommon
         * @classdesc Represents a AIRegenerateMetadata.
         * @implements IAIRegenerateMetadata
         * @constructor
         * @param {AICommon.IAIRegenerateMetadata=} [properties] Properties to set
         */
        function AIRegenerateMetadata(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]];
        }

        /**
         * AIRegenerateMetadata messageKey.
         * @member {Protocol.IMessageKey|null|undefined} messageKey
         * @memberof AICommon.AIRegenerateMetadata
         * @instance
         */
        AIRegenerateMetadata.prototype.messageKey = null;

        /**
         * AIRegenerateMetadata responseTimestampMs.
         * @member {number|Long|null|undefined} responseTimestampMs
         * @memberof AICommon.AIRegenerateMetadata
         * @instance
         */
        AIRegenerateMetadata.prototype.responseTimestampMs = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * AIRegenerateMetadata _messageKey.
         * @member {"messageKey"|undefined} _messageKey
         * @memberof AICommon.AIRegenerateMetadata
         * @instance
         */
        Object.defineProperty(AIRegenerateMetadata.prototype, "_messageKey", {
            get: $util.oneOfGetter($oneOfFields = ["messageKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRegenerateMetadata _responseTimestampMs.
         * @member {"responseTimestampMs"|undefined} _responseTimestampMs
         * @memberof AICommon.AIRegenerateMetadata
         * @instance
         */
        Object.defineProperty(AIRegenerateMetadata.prototype, "_responseTimestampMs", {
            get: $util.oneOfGetter($oneOfFields = ["responseTimestampMs"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new AIRegenerateMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.AIRegenerateMetadata
         * @static
         * @param {AICommon.IAIRegenerateMetadata=} [properties] Properties to set
         * @returns {AICommon.AIRegenerateMetadata} AIRegenerateMetadata instance
         */
        AIRegenerateMetadata.create = function create(properties) {
            return new AIRegenerateMetadata(properties);
        };

        /**
         * Encodes the specified AIRegenerateMetadata message. Does not implicitly {@link AICommon.AIRegenerateMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRegenerateMetadata
         * @static
         * @param {AICommon.IAIRegenerateMetadata} message AIRegenerateMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRegenerateMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.messageKey != null && Object.hasOwnProperty.call(message, "messageKey"))
                $root.Protocol.MessageKey.encode(message.messageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.responseTimestampMs != null && Object.hasOwnProperty.call(message, "responseTimestampMs"))
                writer.uint32(/* id 2, wireType 0 =*/16).int64(message.responseTimestampMs);
            return writer;
        };

        /**
         * Encodes the specified AIRegenerateMetadata message, length delimited. Does not implicitly {@link AICommon.AIRegenerateMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.AIRegenerateMetadata
         * @static
         * @param {AICommon.IAIRegenerateMetadata} message AIRegenerateMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRegenerateMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a AIRegenerateMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.AIRegenerateMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.AIRegenerateMetadata} AIRegenerateMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRegenerateMetadata.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.AICommon.AIRegenerateMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.messageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.responseTimestampMs = reader.int64();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a AIRegenerateMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.AIRegenerateMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.AIRegenerateMetadata} AIRegenerateMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRegenerateMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a AIRegenerateMetadata message.
         * @function verify
         * @memberof AICommon.AIRegenerateMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIRegenerateMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.messageKey != null && message.hasOwnProperty("messageKey")) {
                properties._messageKey = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.messageKey);
                    if (error)
                        return "messageKey." + error;
                }
            }
            if (message.responseTimestampMs != null && message.hasOwnProperty("responseTimestampMs")) {
                properties._responseTimestampMs = 1;
                if (!$util.isInteger(message.responseTimestampMs) && !(message.responseTimestampMs && $util.isInteger(message.responseTimestampMs.low) && $util.isInteger(message.responseTimestampMs.high)))
                    return "responseTimestampMs: integer|Long expected";
            }
            return null;
        };

        /**
         * Creates a AIRegenerateMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.AIRegenerateMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.AIRegenerateMetadata} AIRegenerateMetadata
         */
        AIRegenerateMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.AIRegenerateMetadata)
                return object;
            var message = new $root.AICommon.AIRegenerateMetadata();
            if (object.messageKey != null) {
                if (typeof object.messageKey !== "object")
                    throw TypeError(".AICommon.AIRegenerateMetadata.messageKey: object expected");
                message.messageKey = $root.Protocol.MessageKey.fromObject(object.messageKey);
            }
            if (object.responseTimestampMs != null)
                if ($util.Long)
                    (message.responseTimestampMs = $util.Long.fromValue(object.responseTimestampMs)).unsigned = false;
                else if (typeof object.responseTimestampMs === "string")
                    message.responseTimestampMs = parseInt(object.responseTimestampMs, 10);
                else if (typeof object.responseTimestampMs === "number")
                    message.responseTimestampMs = object.responseTimestampMs;
                else if (typeof object.responseTimestampMs === "object")
                    message.responseTimestampMs = new $util.LongBits(object.responseTimestampMs.low >>> 0, object.responseTimestampMs.high >>> 0).toNumber();
            return message;
        };

        /**
         * Creates a plain object from a AIRegenerateMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIRegenerateMetadata
         * @static
         * @param {AICommon.AIRegenerateMetadata} message AIRegenerateMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIRegenerateMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.messageKey != null && message.hasOwnProperty("messageKey")) {
                object.messageKey = $root.Protocol.MessageKey.toObject(message.messageKey, options);
                if (options.oneofs)
                    object._messageKey = "messageKey";
            }
            if (message.responseTimestampMs != null && message.hasOwnProperty("responseTimestampMs")) {
                if (typeof message.responseTimestampMs === "number")
                    object.responseTimestampMs = options.longs === String ? String(message.responseTimestampMs) : message.responseTimestampMs;
                else
                    object.responseTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.responseTimestampMs) : options.longs === Number ? new $util.LongBits(message.responseTimestampMs.low >>> 0, message.responseTimestampMs.high >>> 0).toNumber() : message.responseTimestampMs;
                if (options.oneofs)
                    object._responseTimestampMs = "responseTimestampMs";
            }
            return object;
        };

        /**
         * Converts this AIRegenerateMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.AIRegenerateMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        AIRegenerateMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for AIRegenerateMetadata
         * @function getTypeUrl
         * @memberof AICommon.AIRegenerateMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        AIRegenerateMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.AIRegenerateMetadata";
        };

        return AIRegenerateMetadata;
    })();

    AICommon.AIRichResponseSubMessage = (function() {

        /**
         * Properties of a AIRichResponseSubMessage.
         * @memberof AICommon
         * @interface IAIRichResponseSubMessage
         * @property {AICommon.AIRichResponseSubMessageType|null} [messageType] AIRichResponseSubMessage messageType
         * @property {AICommon.IAIRichResponseGridImageMetadata|null} [gridImageMetadata] AIRichResponseSubMessage gridImageMetadata
         * @property {string|null} [messageText] AIRichResponseSubMessage messageText
         * @property {AICommon.IAIRichResponseInlineImageMetadata|null} [imageMetadata] AIRichResponseSubMessage imageMetadata
         * @property {AICommon.IAIRichResponseCodeMetadata|null} [codeMetadata] AIRichResponseSubMessage codeMetadata
         * @property {AICommon.IAIRichResponseTableMetadata|null} [tableMetadata] AIRichResponseSubMessage tableMetadata
         * @property {AICommon.IAIRichResponseDynamicMetadata|null} [dynamicMetadata] AIRichResponseSubMessage dynamicMetadata
         * @property {AICommon.IAIRichResponseLatexMetadata|null} [latexMetadata] AIRichResponseSubMessage latexMetadata
         * @property {AICommon.IAIRichResponseMapMetadata|null} [mapMetadata] AIRichResponseSubMessage mapMetadata
         * @property {AICommon.IAIRichResponseContentItemsMetadata|null} [contentItemsMetadata] AIRichResponseSubMessage contentItemsMetadata
         */

        /**
         * Constructs a new AIRichResponseSubMessage.
         * @memberof AICommon
         * @classdesc Represents a AIRichResponseSubMessage.
         * @implements IAIRichResponseSubMessage
         * @constructor
         * @param {AICommon.IAIRichResponseSubMessage=} [properties] Properties to set
         */
        function AIRichResponseSubMessage(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]];
        }

        /**
         * AIRichResponseSubMessage messageType.
         * @member {AICommon.AIRichResponseSubMessageType|null|undefined} messageType
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        AIRichResponseSubMessage.prototype.messageType = null;

        /**
         * AIRichResponseSubMessage gridImageMetadata.
         * @member {AICommon.IAIRichResponseGridImageMetadata|null|undefined} gridImageMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        AIRichResponseSubMessage.prototype.gridImageMetadata = null;

        /**
         * AIRichResponseSubMessage messageText.
         * @member {string|null|undefined} messageText
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        AIRichResponseSubMessage.prototype.messageText = null;

        /**
         * AIRichResponseSubMessage imageMetadata.
         * @member {AICommon.IAIRichResponseInlineImageMetadata|null|undefined} imageMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        AIRichResponseSubMessage.prototype.imageMetadata = null;

        /**
         * AIRichResponseSubMessage codeMetadata.
         * @member {AICommon.IAIRichResponseCodeMetadata|null|undefined} codeMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        AIRichResponseSubMessage.prototype.codeMetadata = null;

        /**
         * AIRichResponseSubMessage tableMetadata.
         * @member {AICommon.IAIRichResponseTableMetadata|null|undefined} tableMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        AIRichResponseSubMessage.prototype.tableMetadata = null;

        /**
         * AIRichResponseSubMessage dynamicMetadata.
         * @member {AICommon.IAIRichResponseDynamicMetadata|null|undefined} dynamicMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        AIRichResponseSubMessage.prototype.dynamicMetadata = null;

        /**
         * AIRichResponseSubMessage latexMetadata.
         * @member {AICommon.IAIRichResponseLatexMetadata|null|undefined} latexMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        AIRichResponseSubMessage.prototype.latexMetadata = null;

        /**
         * AIRichResponseSubMessage mapMetadata.
         * @member {AICommon.IAIRichResponseMapMetadata|null|undefined} mapMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        AIRichResponseSubMessage.prototype.mapMetadata = null;

        /**
         * AIRichResponseSubMessage contentItemsMetadata.
         * @member {AICommon.IAIRichResponseContentItemsMetadata|null|undefined} contentItemsMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        AIRichResponseSubMessage.prototype.contentItemsMetadata = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * AIRichResponseSubMessage _messageType.
         * @member {"messageType"|undefined} _messageType
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseSubMessage.prototype, "_messageType", {
            get: $util.oneOfGetter($oneOfFields = ["messageType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseSubMessage _gridImageMetadata.
         * @member {"gridImageMetadata"|undefined} _gridImageMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseSubMessage.prototype, "_gridImageMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["gridImageMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseSubMessage _messageText.
         * @member {"messageText"|undefined} _messageText
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseSubMessage.prototype, "_messageText", {
            get: $util.oneOfGetter($oneOfFields = ["messageText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseSubMessage _imageMetadata.
         * @member {"imageMetadata"|undefined} _imageMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseSubMessage.prototype, "_imageMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["imageMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseSubMessage _codeMetadata.
         * @member {"codeMetadata"|undefined} _codeMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseSubMessage.prototype, "_codeMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["codeMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseSubMessage _tableMetadata.
         * @member {"tableMetadata"|undefined} _tableMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseSubMessage.prototype, "_tableMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["tableMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseSubMessage _dynamicMetadata.
         * @member {"dynamicMetadata"|undefined} _dynamicMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseSubMessage.prototype, "_dynamicMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["dynamicMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseSubMessage _latexMetadata.
         * @member {"latexMetadata"|undefined} _latexMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseSubMessage.prototype, "_latexMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["latexMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseSubMessage _mapMetadata.
         * @member {"mapMetadata"|undefined} _mapMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseSubMessage.prototype, "_mapMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["mapMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseSubMessage _contentItemsMetadata.
         * @member {"contentItemsMetadata"|undefined} _contentItemsMetadata
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         */
        Object.defineProperty(AIRichResponseSubMessage.prototype, "_contentItemsMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["contentItemsMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new AIRichResponseSubMessage instance using the specified properties.
         * @function create
         * @memberof AICommon.AIRichResponseSubMessage
         * @static
         * @param {AICommon.IAIRichResponseSubMessage=} [properties] Properties to set
         * @returns {AICommon.AIRichResponseSubMessage} AIRichResponseSubMessage instance
         */
        AIRichResponseSubMessage.create = function create(properties) {
            return new AIRichResponseSubMessage(properties);
        };

        /**
         * Encodes the specified AIRichResponseSubMessage message. Does not implicitly {@link AICommon.AIRichResponseSubMessage.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseSubMessage
         * @static
         * @param {AICommon.IAIRichResponseSubMessage} message AIRichResponseSubMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseSubMessage.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.messageType);
            if (message.gridImageMetadata != null && Object.hasOwnProperty.call(message, "gridImageMetadata"))
                $root.AICommon.AIRichResponseGridImageMetadata.encode(message.gridImageMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.messageText != null && Object.hasOwnProperty.call(message, "messageText"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.messageText);
            if (message.imageMetadata != null && Object.hasOwnProperty.call(message, "imageMetadata"))
                $root.AICommon.AIRichResponseInlineImageMetadata.encode(message.imageMetadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
            if (message.codeMetadata != null && Object.hasOwnProperty.call(message, "codeMetadata"))
                $root.AICommon.AIRichResponseCodeMetadata.encode(message.codeMetadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
            if (message.tableMetadata != null && Object.hasOwnProperty.call(message, "tableMetadata"))
                $root.AICommon.AIRichResponseTableMetadata.encode(message.tableMetadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
            if (message.dynamicMetadata != null && Object.hasOwnProperty.call(message, "dynamicMetadata"))
                $root.AICommon.AIRichResponseDynamicMetadata.encode(message.dynamicMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
            if (message.latexMetadata != null && Object.hasOwnProperty.call(message, "latexMetadata"))
                $root.AICommon.AIRichResponseLatexMetadata.encode(message.latexMetadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
            if (message.mapMetadata != null && Object.hasOwnProperty.call(message, "mapMetadata"))
                $root.AICommon.AIRichResponseMapMetadata.encode(message.mapMetadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
            if (message.contentItemsMetadata != null && Object.hasOwnProperty.call(message, "contentItemsMetadata"))
                $root.AICommon.AIRichResponseContentItemsMetadata.encode(message.contentItemsMetadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified AIRichResponseSubMessage message, length delimited. Does not implicitly {@link AICommon.AIRichResponseSubMessage.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.AIRichResponseSubMessage
         * @static
         * @param {AICommon.IAIRichResponseSubMessage} message AIRichResponseSubMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseSubMessage.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a AIRichResponseSubMessage message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.AIRichResponseSubMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.AIRichResponseSubMessage} AIRichResponseSubMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseSubMessage.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.AICommon.AIRichResponseSubMessage();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.messageType = reader.int32();
                        break;
                    }
                case 2: {
                        message.gridImageMetadata = $root.AICommon.AIRichResponseGridImageMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 3: {
                        message.messageText = reader.string();
                        break;
                    }
                case 4: {
                        message.imageMetadata = $root.AICommon.AIRichResponseInlineImageMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 5: {
                        message.codeMetadata = $root.AICommon.AIRichResponseCodeMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 6: {
                        message.tableMetadata = $root.AICommon.AIRichResponseTableMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 7: {
                        message.dynamicMetadata = $root.AICommon.AIRichResponseDynamicMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 8: {
                        message.latexMetadata = $root.AICommon.AIRichResponseLatexMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 9: {
                        message.mapMetadata = $root.AICommon.AIRichResponseMapMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 10: {
                        message.contentItemsMetadata = $root.AICommon.AIRichResponseContentItemsMetadata.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a AIRichResponseSubMessage message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.AIRichResponseSubMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.AIRichResponseSubMessage} AIRichResponseSubMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseSubMessage.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a AIRichResponseSubMessage message.
         * @function verify
         * @memberof AICommon.AIRichResponseSubMessage
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIRichResponseSubMessage.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.messageType != null && message.hasOwnProperty("messageType")) {
                properties._messageType = 1;
                switch (message.messageType) {
                default:
                    return "messageType: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                case 6:
                case 7:
                case 8:
                case 9:
                    break;
                }
            }
            if (message.gridImageMetadata != null && message.hasOwnProperty("gridImageMetadata")) {
                properties._gridImageMetadata = 1;
                {
                    var error = $root.AICommon.AIRichResponseGridImageMetadata.verify(message.gridImageMetadata);
                    if (error)
                        return "gridImageMetadata." + error;
                }
            }
            if (message.messageText != null && message.hasOwnProperty("messageText")) {
                properties._messageText = 1;
                if (!$util.isString(message.messageText))
                    return "messageText: string expected";
            }
            if (message.imageMetadata != null && message.hasOwnProperty("imageMetadata")) {
                properties._imageMetadata = 1;
                {
                    var error = $root.AICommon.AIRichResponseInlineImageMetadata.verify(message.imageMetadata);
                    if (error)
                        return "imageMetadata." + error;
                }
            }
            if (message.codeMetadata != null && message.hasOwnProperty("codeMetadata")) {
                properties._codeMetadata = 1;
                {
                    var error = $root.AICommon.AIRichResponseCodeMetadata.verify(message.codeMetadata);
                    if (error)
                        return "codeMetadata." + error;
                }
            }
            if (message.tableMetadata != null && message.hasOwnProperty("tableMetadata")) {
                properties._tableMetadata = 1;
                {
                    var error = $root.AICommon.AIRichResponseTableMetadata.verify(message.tableMetadata);
                    if (error)
                        return "tableMetadata." + error;
                }
            }
            if (message.dynamicMetadata != null && message.hasOwnProperty("dynamicMetadata")) {
                properties._dynamicMetadata = 1;
                {
                    var error = $root.AICommon.AIRichResponseDynamicMetadata.verify(message.dynamicMetadata);
                    if (error)
                        return "dynamicMetadata." + error;
                }
            }
            if (message.latexMetadata != null && message.hasOwnProperty("latexMetadata")) {
                properties._latexMetadata = 1;
                {
                    var error = $root.AICommon.AIRichResponseLatexMetadata.verify(message.latexMetadata);
                    if (error)
                        return "latexMetadata." + error;
                }
            }
            if (message.mapMetadata != null && message.hasOwnProperty("mapMetadata")) {
                properties._mapMetadata = 1;
                {
                    var error = $root.AICommon.AIRichResponseMapMetadata.verify(message.mapMetadata);
                    if (error)
                        return "mapMetadata." + error;
                }
            }
            if (message.contentItemsMetadata != null && message.hasOwnProperty("contentItemsMetadata")) {
                properties._contentItemsMetadata = 1;
                {
                    var error = $root.AICommon.AIRichResponseContentItemsMetadata.verify(message.contentItemsMetadata);
                    if (error)
                        return "contentItemsMetadata." + error;
                }
            }
            return null;
        };

        /**
         * Creates a AIRichResponseSubMessage message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.AIRichResponseSubMessage
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.AIRichResponseSubMessage} AIRichResponseSubMessage
         */
        AIRichResponseSubMessage.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.AIRichResponseSubMessage)
                return object;
            var message = new $root.AICommon.AIRichResponseSubMessage();
            switch (object.messageType) {
            default:
                if (typeof object.messageType === "number") {
                    message.messageType = object.messageType;
                    break;
                }
                break;
            case "AI_RICH_RESPONSE_UNKNOWN":
            case 0:
                message.messageType = 0;
                break;
            case "AI_RICH_RESPONSE_GRID_IMAGE":
            case 1:
                message.messageType = 1;
                break;
            case "AI_RICH_RESPONSE_TEXT":
            case 2:
                message.messageType = 2;
                break;
            case "AI_RICH_RESPONSE_INLINE_IMAGE":
            case 3:
                message.messageType = 3;
                break;
            case "AI_RICH_RESPONSE_TABLE":
            case 4:
                message.messageType = 4;
                break;
            case "AI_RICH_RESPONSE_CODE":
            case 5:
                message.messageType = 5;
                break;
            case "AI_RICH_RESPONSE_DYNAMIC":
            case 6:
                message.messageType = 6;
                break;
            case "AI_RICH_RESPONSE_MAP":
            case 7:
                message.messageType = 7;
                break;
            case "AI_RICH_RESPONSE_LATEX":
            case 8:
                message.messageType = 8;
                break;
            case "AI_RICH_RESPONSE_CONTENT_ITEMS":
            case 9:
                message.messageType = 9;
                break;
            }
            if (object.gridImageMetadata != null) {
                if (typeof object.gridImageMetadata !== "object")
                    throw TypeError(".AICommon.AIRichResponseSubMessage.gridImageMetadata: object expected");
                message.gridImageMetadata = $root.AICommon.AIRichResponseGridImageMetadata.fromObject(object.gridImageMetadata);
            }
            if (object.messageText != null)
                message.messageText = String(object.messageText);
            if (object.imageMetadata != null) {
                if (typeof object.imageMetadata !== "object")
                    throw TypeError(".AICommon.AIRichResponseSubMessage.imageMetadata: object expected");
                message.imageMetadata = $root.AICommon.AIRichResponseInlineImageMetadata.fromObject(object.imageMetadata);
            }
            if (object.codeMetadata != null) {
                if (typeof object.codeMetadata !== "object")
                    throw TypeError(".AICommon.AIRichResponseSubMessage.codeMetadata: object expected");
                message.codeMetadata = $root.AICommon.AIRichResponseCodeMetadata.fromObject(object.codeMetadata);
            }
            if (object.tableMetadata != null) {
                if (typeof object.tableMetadata !== "object")
                    throw TypeError(".AICommon.AIRichResponseSubMessage.tableMetadata: object expected");
                message.tableMetadata = $root.AICommon.AIRichResponseTableMetadata.fromObject(object.tableMetadata);
            }
            if (object.dynamicMetadata != null) {
                if (typeof object.dynamicMetadata !== "object")
                    throw TypeError(".AICommon.AIRichResponseSubMessage.dynamicMetadata: object expected");
                message.dynamicMetadata = $root.AICommon.AIRichResponseDynamicMetadata.fromObject(object.dynamicMetadata);
            }
            if (object.latexMetadata != null) {
                if (typeof object.latexMetadata !== "object")
                    throw TypeError(".AICommon.AIRichResponseSubMessage.latexMetadata: object expected");
                message.latexMetadata = $root.AICommon.AIRichResponseLatexMetadata.fromObject(object.latexMetadata);
            }
            if (object.mapMetadata != null) {
                if (typeof object.mapMetadata !== "object")
                    throw TypeError(".AICommon.AIRichResponseSubMessage.mapMetadata: object expected");
                message.mapMetadata = $root.AICommon.AIRichResponseMapMetadata.fromObject(object.mapMetadata);
            }
            if (object.contentItemsMetadata != null) {
                if (typeof object.contentItemsMetadata !== "object")
                    throw TypeError(".AICommon.AIRichResponseSubMessage.contentItemsMetadata: object expected");
                message.contentItemsMetadata = $root.AICommon.AIRichResponseContentItemsMetadata.fromObject(object.contentItemsMetadata);
            }
            return message;
        };

        /**
         * Creates a plain object from a AIRichResponseSubMessage message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIRichResponseSubMessage
         * @static
         * @param {AICommon.AIRichResponseSubMessage} message AIRichResponseSubMessage
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIRichResponseSubMessage.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.messageType != null && message.hasOwnProperty("messageType")) {
                object.messageType = options.enums === String ? $root.AICommon.AIRichResponseSubMessageType[message.messageType] === undefined ? message.messageType : $root.AICommon.AIRichResponseSubMessageType[message.messageType] : message.messageType;
                if (options.oneofs)
                    object._messageType = "messageType";
            }
            if (message.gridImageMetadata != null && message.hasOwnProperty("gridImageMetadata")) {
                object.gridImageMetadata = $root.AICommon.AIRichResponseGridImageMetadata.toObject(message.gridImageMetadata, options);
                if (options.oneofs)
                    object._gridImageMetadata = "gridImageMetadata";
            }
            if (message.messageText != null && message.hasOwnProperty("messageText")) {
                object.messageText = message.messageText;
                if (options.oneofs)
                    object._messageText = "messageText";
            }
            if (message.imageMetadata != null && message.hasOwnProperty("imageMetadata")) {
                object.imageMetadata = $root.AICommon.AIRichResponseInlineImageMetadata.toObject(message.imageMetadata, options);
                if (options.oneofs)
                    object._imageMetadata = "imageMetadata";
            }
            if (message.codeMetadata != null && message.hasOwnProperty("codeMetadata")) {
                object.codeMetadata = $root.AICommon.AIRichResponseCodeMetadata.toObject(message.codeMetadata, options);
                if (options.oneofs)
                    object._codeMetadata = "codeMetadata";
            }
            if (message.tableMetadata != null && message.hasOwnProperty("tableMetadata")) {
                object.tableMetadata = $root.AICommon.AIRichResponseTableMetadata.toObject(message.tableMetadata, options);
                if (options.oneofs)
                    object._tableMetadata = "tableMetadata";
            }
            if (message.dynamicMetadata != null && message.hasOwnProperty("dynamicMetadata")) {
                object.dynamicMetadata = $root.AICommon.AIRichResponseDynamicMetadata.toObject(message.dynamicMetadata, options);
                if (options.oneofs)
                    object._dynamicMetadata = "dynamicMetadata";
            }
            if (message.latexMetadata != null && message.hasOwnProperty("latexMetadata")) {
                object.latexMetadata = $root.AICommon.AIRichResponseLatexMetadata.toObject(message.latexMetadata, options);
                if (options.oneofs)
                    object._latexMetadata = "latexMetadata";
            }
            if (message.mapMetadata != null && message.hasOwnProperty("mapMetadata")) {
                object.mapMetadata = $root.AICommon.AIRichResponseMapMetadata.toObject(message.mapMetadata, options);
                if (options.oneofs)
                    object._mapMetadata = "mapMetadata";
            }
            if (message.contentItemsMetadata != null && message.hasOwnProperty("contentItemsMetadata")) {
                object.contentItemsMetadata = $root.AICommon.AIRichResponseContentItemsMetadata.toObject(message.contentItemsMetadata, options);
                if (options.oneofs)
                    object._contentItemsMetadata = "contentItemsMetadata";
            }
            return object;
        };

        /**
         * Converts this AIRichResponseSubMessage to JSON.
         * @function toJSON
         * @memberof AICommon.AIRichResponseSubMessage
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        AIRichResponseSubMessage.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for AIRichResponseSubMessage
         * @function getTypeUrl
         * @memberof AICommon.AIRichResponseSubMessage
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        AIRichResponseSubMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.AIRichResponseSubMessage";
        };

        return AIRichResponseSubMessage;
    })();

    AICommon.AIRichResponseContentItemsMetadata = (function() {

        /**
         * Properties of a AIRichResponseContentItemsMetadata.
         * @memberof AICommon
         * @interface IAIRichResponseContentItemsMetadata
         * @property {Array.<AICommon.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata>|null} [itemsMetadata] AIRichResponseContentItemsMetadata itemsMetadata
         * @property {AICommon.AIRichResponseContentItemsMetadata.ContentType|null} [contentType] AIRichResponseContentItemsMetadata contentType
         */

        /**
         * Constructs a new AIRichResponseContentItemsMetadata.
         * @memberof AICommon
         * @classdesc Represents a AIRichResponseContentItemsMetadata.
         * @implements IAIRichResponseContentItemsMetadata
         * @constructor
         * @param {AICommon.IAIRichResponseContentItemsMetadata=} [properties] Properties to set
         */
        function AIRichResponseContentItemsMetadata(properties) {
            this.itemsMetadata = [];
            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]];
        }

        /**
         * AIRichResponseContentItemsMetadata itemsMetadata.
         * @member {Array.<AICommon.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata>} itemsMetadata
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @instance
         */
        AIRichResponseContentItemsMetadata.prototype.itemsMetadata = $util.emptyArray;

        /**
         * AIRichResponseContentItemsMetadata contentType.
         * @member {AICommon.AIRichResponseContentItemsMetadata.ContentType|null|undefined} contentType
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @instance
         */
        AIRichResponseContentItemsMetadata.prototype.contentType = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * AIRichResponseContentItemsMetadata _contentType.
         * @member {"contentType"|undefined} _contentType
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseContentItemsMetadata.prototype, "_contentType", {
            get: $util.oneOfGetter($oneOfFields = ["contentType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new AIRichResponseContentItemsMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @static
         * @param {AICommon.IAIRichResponseContentItemsMetadata=} [properties] Properties to set
         * @returns {AICommon.AIRichResponseContentItemsMetadata} AIRichResponseContentItemsMetadata instance
         */
        AIRichResponseContentItemsMetadata.create = function create(properties) {
            return new AIRichResponseContentItemsMetadata(properties);
        };

        /**
         * Encodes the specified AIRichResponseContentItemsMetadata message. Does not implicitly {@link AICommon.AIRichResponseContentItemsMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @static
         * @param {AICommon.IAIRichResponseContentItemsMetadata} message AIRichResponseContentItemsMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseContentItemsMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.itemsMetadata != null && message.itemsMetadata.length)
                for (var i = 0; i < message.itemsMetadata.length; ++i)
                    $root.AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.encode(message.itemsMetadata[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.contentType != null && Object.hasOwnProperty.call(message, "contentType"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.contentType);
            return writer;
        };

        /**
         * Encodes the specified AIRichResponseContentItemsMetadata message, length delimited. Does not implicitly {@link AICommon.AIRichResponseContentItemsMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @static
         * @param {AICommon.IAIRichResponseContentItemsMetadata} message AIRichResponseContentItemsMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseContentItemsMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a AIRichResponseContentItemsMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.AIRichResponseContentItemsMetadata} AIRichResponseContentItemsMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseContentItemsMetadata.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.AICommon.AIRichResponseContentItemsMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        if (!(message.itemsMetadata && message.itemsMetadata.length))
                            message.itemsMetadata = [];
                        message.itemsMetadata.push($root.AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.decode(reader, reader.uint32()));
                        break;
                    }
                case 2: {
                        message.contentType = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a AIRichResponseContentItemsMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.AIRichResponseContentItemsMetadata} AIRichResponseContentItemsMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseContentItemsMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a AIRichResponseContentItemsMetadata message.
         * @function verify
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIRichResponseContentItemsMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.itemsMetadata != null && message.hasOwnProperty("itemsMetadata")) {
                if (!Array.isArray(message.itemsMetadata))
                    return "itemsMetadata: array expected";
                for (var i = 0; i < message.itemsMetadata.length; ++i) {
                    var error = $root.AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.verify(message.itemsMetadata[i]);
                    if (error)
                        return "itemsMetadata." + error;
                }
            }
            if (message.contentType != null && message.hasOwnProperty("contentType")) {
                properties._contentType = 1;
                switch (message.contentType) {
                default:
                    return "contentType: enum value expected";
                case 0:
                case 1:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a AIRichResponseContentItemsMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.AIRichResponseContentItemsMetadata} AIRichResponseContentItemsMetadata
         */
        AIRichResponseContentItemsMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.AIRichResponseContentItemsMetadata)
                return object;
            var message = new $root.AICommon.AIRichResponseContentItemsMetadata();
            if (object.itemsMetadata) {
                if (!Array.isArray(object.itemsMetadata))
                    throw TypeError(".AICommon.AIRichResponseContentItemsMetadata.itemsMetadata: array expected");
                message.itemsMetadata = [];
                for (var i = 0; i < object.itemsMetadata.length; ++i) {
                    if (typeof object.itemsMetadata[i] !== "object")
                        throw TypeError(".AICommon.AIRichResponseContentItemsMetadata.itemsMetadata: object expected");
                    message.itemsMetadata[i] = $root.AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.fromObject(object.itemsMetadata[i]);
                }
            }
            switch (object.contentType) {
            default:
                if (typeof object.contentType === "number") {
                    message.contentType = object.contentType;
                    break;
                }
                break;
            case "DEFAULT":
            case 0:
                message.contentType = 0;
                break;
            case "CAROUSEL":
            case 1:
                message.contentType = 1;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a AIRichResponseContentItemsMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @static
         * @param {AICommon.AIRichResponseContentItemsMetadata} message AIRichResponseContentItemsMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIRichResponseContentItemsMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.itemsMetadata = [];
            if (message.itemsMetadata && message.itemsMetadata.length) {
                object.itemsMetadata = [];
                for (var j = 0; j < message.itemsMetadata.length; ++j)
                    object.itemsMetadata[j] = $root.AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.toObject(message.itemsMetadata[j], options);
            }
            if (message.contentType != null && message.hasOwnProperty("contentType")) {
                object.contentType = options.enums === String ? $root.AICommon.AIRichResponseContentItemsMetadata.ContentType[message.contentType] === undefined ? message.contentType : $root.AICommon.AIRichResponseContentItemsMetadata.ContentType[message.contentType] : message.contentType;
                if (options.oneofs)
                    object._contentType = "contentType";
            }
            return object;
        };

        /**
         * Converts this AIRichResponseContentItemsMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        AIRichResponseContentItemsMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for AIRichResponseContentItemsMetadata
         * @function getTypeUrl
         * @memberof AICommon.AIRichResponseContentItemsMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        AIRichResponseContentItemsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.AIRichResponseContentItemsMetadata";
        };

        AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata = (function() {

            /**
             * Properties of a AIRichResponseContentItemMetadata.
             * @memberof AICommon.AIRichResponseContentItemsMetadata
             * @interface IAIRichResponseContentItemMetadata
             * @property {AICommon.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem|null} [reelItem] AIRichResponseContentItemMetadata reelItem
             */

            /**
             * Constructs a new AIRichResponseContentItemMetadata.
             * @memberof AICommon.AIRichResponseContentItemsMetadata
             * @classdesc Represents a AIRichResponseContentItemMetadata.
             * @implements IAIRichResponseContentItemMetadata
             * @constructor
             * @param {AICommon.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata=} [properties] Properties to set
             */
            function AIRichResponseContentItemMetadata(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]];
            }

            /**
             * AIRichResponseContentItemMetadata reelItem.
             * @member {AICommon.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem|null|undefined} reelItem
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
             * @instance
             */
            AIRichResponseContentItemMetadata.prototype.reelItem = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * AIRichResponseContentItemMetadata aIRichResponseContentItem.
             * @member {"reelItem"|undefined} aIRichResponseContentItem
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
             * @instance
             */
            Object.defineProperty(AIRichResponseContentItemMetadata.prototype, "aIRichResponseContentItem", {
                get: $util.oneOfGetter($oneOfFields = ["reelItem"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new AIRichResponseContentItemMetadata instance using the specified properties.
             * @function create
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
             * @static
             * @param {AICommon.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata=} [properties] Properties to set
             * @returns {AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata} AIRichResponseContentItemMetadata instance
             */
            AIRichResponseContentItemMetadata.create = function create(properties) {
                return new AIRichResponseContentItemMetadata(properties);
            };

            /**
             * Encodes the specified AIRichResponseContentItemMetadata message. Does not implicitly {@link AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.verify|verify} messages.
             * @function encode
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
             * @static
             * @param {AICommon.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata} message AIRichResponseContentItemMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIRichResponseContentItemMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.reelItem != null && Object.hasOwnProperty.call(message, "reelItem"))
                    $root.AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.encode(message.reelItem, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified AIRichResponseContentItemMetadata message, length delimited. Does not implicitly {@link AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
             * @static
             * @param {AICommon.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata} message AIRichResponseContentItemMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIRichResponseContentItemMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a AIRichResponseContentItemMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata} AIRichResponseContentItemMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AIRichResponseContentItemMetadata.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.AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.reelItem = $root.AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a AIRichResponseContentItemMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata} AIRichResponseContentItemMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AIRichResponseContentItemMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a AIRichResponseContentItemMetadata message.
             * @function verify
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AIRichResponseContentItemMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.reelItem != null && message.hasOwnProperty("reelItem")) {
                    properties.aIRichResponseContentItem = 1;
                    {
                        var error = $root.AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.verify(message.reelItem);
                        if (error)
                            return "reelItem." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a AIRichResponseContentItemMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata} AIRichResponseContentItemMetadata
             */
            AIRichResponseContentItemMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata)
                    return object;
                var message = new $root.AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata();
                if (object.reelItem != null) {
                    if (typeof object.reelItem !== "object")
                        throw TypeError(".AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.reelItem: object expected");
                    message.reelItem = $root.AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.fromObject(object.reelItem);
                }
                return message;
            };

            /**
             * Creates a plain object from a AIRichResponseContentItemMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
             * @static
             * @param {AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata} message AIRichResponseContentItemMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AIRichResponseContentItemMetadata.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.reelItem != null && message.hasOwnProperty("reelItem")) {
                    object.reelItem = $root.AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.toObject(message.reelItem, options);
                    if (options.oneofs)
                        object.aIRichResponseContentItem = "reelItem";
                }
                return object;
            };

            /**
             * Converts this AIRichResponseContentItemMetadata to JSON.
             * @function toJSON
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AIRichResponseContentItemMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AIRichResponseContentItemMetadata
             * @function getTypeUrl
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AIRichResponseContentItemMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/AICommon.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata";
            };

            return AIRichResponseContentItemMetadata;
        })();

        AIRichResponseContentItemsMetadata.AIRichResponseReelItem = (function() {

            /**
             * Properties of a AIRichResponseReelItem.
             * @memberof AICommon.AIRichResponseContentItemsMetadata
             * @interface IAIRichResponseReelItem
             * @property {string|null} [title] AIRichResponseReelItem title
             * @property {string|null} [profileIconUrl] AIRichResponseReelItem profileIconUrl
             * @property {string|null} [thumbnailUrl] AIRichResponseReelItem thumbnailUrl
             * @property {string|null} [videoUrl] AIRichResponseReelItem videoUrl
             */

            /**
             * Constructs a new AIRichResponseReelItem.
             * @memberof AICommon.AIRichResponseContentItemsMetadata
             * @classdesc Represents a AIRichResponseReelItem.
             * @implements IAIRichResponseReelItem
             * @constructor
             * @param {AICommon.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem=} [properties] Properties to set
             */
            function AIRichResponseReelItem(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]];
            }

            /**
             * AIRichResponseReelItem title.
             * @member {string|null|undefined} title
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             */
            AIRichResponseReelItem.prototype.title = null;

            /**
             * AIRichResponseReelItem profileIconUrl.
             * @member {string|null|undefined} profileIconUrl
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             */
            AIRichResponseReelItem.prototype.profileIconUrl = null;

            /**
             * AIRichResponseReelItem thumbnailUrl.
             * @member {string|null|undefined} thumbnailUrl
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             */
            AIRichResponseReelItem.prototype.thumbnailUrl = null;

            /**
             * AIRichResponseReelItem videoUrl.
             * @member {string|null|undefined} videoUrl
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             */
            AIRichResponseReelItem.prototype.videoUrl = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * AIRichResponseReelItem _title.
             * @member {"title"|undefined} _title
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             */
            Object.defineProperty(AIRichResponseReelItem.prototype, "_title", {
                get: $util.oneOfGetter($oneOfFields = ["title"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseReelItem _profileIconUrl.
             * @member {"profileIconUrl"|undefined} _profileIconUrl
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             */
            Object.defineProperty(AIRichResponseReelItem.prototype, "_profileIconUrl", {
                get: $util.oneOfGetter($oneOfFields = ["profileIconUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseReelItem _thumbnailUrl.
             * @member {"thumbnailUrl"|undefined} _thumbnailUrl
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             */
            Object.defineProperty(AIRichResponseReelItem.prototype, "_thumbnailUrl", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseReelItem _videoUrl.
             * @member {"videoUrl"|undefined} _videoUrl
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             */
            Object.defineProperty(AIRichResponseReelItem.prototype, "_videoUrl", {
                get: $util.oneOfGetter($oneOfFields = ["videoUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new AIRichResponseReelItem instance using the specified properties.
             * @function create
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @static
             * @param {AICommon.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem=} [properties] Properties to set
             * @returns {AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem} AIRichResponseReelItem instance
             */
            AIRichResponseReelItem.create = function create(properties) {
                return new AIRichResponseReelItem(properties);
            };

            /**
             * Encodes the specified AIRichResponseReelItem message. Does not implicitly {@link AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.verify|verify} messages.
             * @function encode
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @static
             * @param {AICommon.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem} message AIRichResponseReelItem message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIRichResponseReelItem.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.title);
                if (message.profileIconUrl != null && Object.hasOwnProperty.call(message, "profileIconUrl"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.profileIconUrl);
                if (message.thumbnailUrl != null && Object.hasOwnProperty.call(message, "thumbnailUrl"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.thumbnailUrl);
                if (message.videoUrl != null && Object.hasOwnProperty.call(message, "videoUrl"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.videoUrl);
                return writer;
            };

            /**
             * Encodes the specified AIRichResponseReelItem message, length delimited. Does not implicitly {@link AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.verify|verify} messages.
             * @function encodeDelimited
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @static
             * @param {AICommon.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem} message AIRichResponseReelItem message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIRichResponseReelItem.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a AIRichResponseReelItem message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem} AIRichResponseReelItem
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AIRichResponseReelItem.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.AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.title = reader.string();
                            break;
                        }
                    case 2: {
                            message.profileIconUrl = reader.string();
                            break;
                        }
                    case 3: {
                            message.thumbnailUrl = reader.string();
                            break;
                        }
                    case 4: {
                            message.videoUrl = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a AIRichResponseReelItem message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem} AIRichResponseReelItem
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AIRichResponseReelItem.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a AIRichResponseReelItem message.
             * @function verify
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AIRichResponseReelItem.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.title != null && message.hasOwnProperty("title")) {
                    properties._title = 1;
                    if (!$util.isString(message.title))
                        return "title: string expected";
                }
                if (message.profileIconUrl != null && message.hasOwnProperty("profileIconUrl")) {
                    properties._profileIconUrl = 1;
                    if (!$util.isString(message.profileIconUrl))
                        return "profileIconUrl: string expected";
                }
                if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) {
                    properties._thumbnailUrl = 1;
                    if (!$util.isString(message.thumbnailUrl))
                        return "thumbnailUrl: string expected";
                }
                if (message.videoUrl != null && message.hasOwnProperty("videoUrl")) {
                    properties._videoUrl = 1;
                    if (!$util.isString(message.videoUrl))
                        return "videoUrl: string expected";
                }
                return null;
            };

            /**
             * Creates a AIRichResponseReelItem message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem} AIRichResponseReelItem
             */
            AIRichResponseReelItem.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem)
                    return object;
                var message = new $root.AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem();
                if (object.title != null)
                    message.title = String(object.title);
                if (object.profileIconUrl != null)
                    message.profileIconUrl = String(object.profileIconUrl);
                if (object.thumbnailUrl != null)
                    message.thumbnailUrl = String(object.thumbnailUrl);
                if (object.videoUrl != null)
                    message.videoUrl = String(object.videoUrl);
                return message;
            };

            /**
             * Creates a plain object from a AIRichResponseReelItem message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @static
             * @param {AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem} message AIRichResponseReelItem
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AIRichResponseReelItem.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.title != null && message.hasOwnProperty("title")) {
                    object.title = message.title;
                    if (options.oneofs)
                        object._title = "title";
                }
                if (message.profileIconUrl != null && message.hasOwnProperty("profileIconUrl")) {
                    object.profileIconUrl = message.profileIconUrl;
                    if (options.oneofs)
                        object._profileIconUrl = "profileIconUrl";
                }
                if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) {
                    object.thumbnailUrl = message.thumbnailUrl;
                    if (options.oneofs)
                        object._thumbnailUrl = "thumbnailUrl";
                }
                if (message.videoUrl != null && message.hasOwnProperty("videoUrl")) {
                    object.videoUrl = message.videoUrl;
                    if (options.oneofs)
                        object._videoUrl = "videoUrl";
                }
                return object;
            };

            /**
             * Converts this AIRichResponseReelItem to JSON.
             * @function toJSON
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AIRichResponseReelItem.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AIRichResponseReelItem
             * @function getTypeUrl
             * @memberof AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AIRichResponseReelItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/AICommon.AIRichResponseContentItemsMetadata.AIRichResponseReelItem";
            };

            return AIRichResponseReelItem;
        })();

        /**
         * ContentType enum.
         * @name AICommon.AIRichResponseContentItemsMetadata.ContentType
         * @enum {number}
         * @property {number} DEFAULT=0 DEFAULT value
         * @property {number} CAROUSEL=1 CAROUSEL value
         */
        AIRichResponseContentItemsMetadata.ContentType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "DEFAULT"] = 0;
            values[valuesById[1] = "CAROUSEL"] = 1;
            return values;
        })();

        return AIRichResponseContentItemsMetadata;
    })();

    AICommon.AIRichResponseMapMetadata = (function() {

        /**
         * Properties of a AIRichResponseMapMetadata.
         * @memberof AICommon
         * @interface IAIRichResponseMapMetadata
         * @property {number|null} [centerLatitude] AIRichResponseMapMetadata centerLatitude
         * @property {number|null} [centerLongitude] AIRichResponseMapMetadata centerLongitude
         * @property {number|null} [latitudeDelta] AIRichResponseMapMetadata latitudeDelta
         * @property {number|null} [longitudeDelta] AIRichResponseMapMetadata longitudeDelta
         * @property {Array.<AICommon.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation>|null} [annotations] AIRichResponseMapMetadata annotations
         * @property {boolean|null} [showInfoList] AIRichResponseMapMetadata showInfoList
         */

        /**
         * Constructs a new AIRichResponseMapMetadata.
         * @memberof AICommon
         * @classdesc Represents a AIRichResponseMapMetadata.
         * @implements IAIRichResponseMapMetadata
         * @constructor
         * @param {AICommon.IAIRichResponseMapMetadata=} [properties] Properties to set
         */
        function AIRichResponseMapMetadata(properties) {
            this.annotations = [];
            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]];
        }

        /**
         * AIRichResponseMapMetadata centerLatitude.
         * @member {number|null|undefined} centerLatitude
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        AIRichResponseMapMetadata.prototype.centerLatitude = null;

        /**
         * AIRichResponseMapMetadata centerLongitude.
         * @member {number|null|undefined} centerLongitude
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        AIRichResponseMapMetadata.prototype.centerLongitude = null;

        /**
         * AIRichResponseMapMetadata latitudeDelta.
         * @member {number|null|undefined} latitudeDelta
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        AIRichResponseMapMetadata.prototype.latitudeDelta = null;

        /**
         * AIRichResponseMapMetadata longitudeDelta.
         * @member {number|null|undefined} longitudeDelta
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        AIRichResponseMapMetadata.prototype.longitudeDelta = null;

        /**
         * AIRichResponseMapMetadata annotations.
         * @member {Array.<AICommon.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation>} annotations
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        AIRichResponseMapMetadata.prototype.annotations = $util.emptyArray;

        /**
         * AIRichResponseMapMetadata showInfoList.
         * @member {boolean|null|undefined} showInfoList
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        AIRichResponseMapMetadata.prototype.showInfoList = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * AIRichResponseMapMetadata _centerLatitude.
         * @member {"centerLatitude"|undefined} _centerLatitude
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseMapMetadata.prototype, "_centerLatitude", {
            get: $util.oneOfGetter($oneOfFields = ["centerLatitude"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseMapMetadata _centerLongitude.
         * @member {"centerLongitude"|undefined} _centerLongitude
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseMapMetadata.prototype, "_centerLongitude", {
            get: $util.oneOfGetter($oneOfFields = ["centerLongitude"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseMapMetadata _latitudeDelta.
         * @member {"latitudeDelta"|undefined} _latitudeDelta
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseMapMetadata.prototype, "_latitudeDelta", {
            get: $util.oneOfGetter($oneOfFields = ["latitudeDelta"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseMapMetadata _longitudeDelta.
         * @member {"longitudeDelta"|undefined} _longitudeDelta
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseMapMetadata.prototype, "_longitudeDelta", {
            get: $util.oneOfGetter($oneOfFields = ["longitudeDelta"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseMapMetadata _showInfoList.
         * @member {"showInfoList"|undefined} _showInfoList
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseMapMetadata.prototype, "_showInfoList", {
            get: $util.oneOfGetter($oneOfFields = ["showInfoList"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new AIRichResponseMapMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.AIRichResponseMapMetadata
         * @static
         * @param {AICommon.IAIRichResponseMapMetadata=} [properties] Properties to set
         * @returns {AICommon.AIRichResponseMapMetadata} AIRichResponseMapMetadata instance
         */
        AIRichResponseMapMetadata.create = function create(properties) {
            return new AIRichResponseMapMetadata(properties);
        };

        /**
         * Encodes the specified AIRichResponseMapMetadata message. Does not implicitly {@link AICommon.AIRichResponseMapMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseMapMetadata
         * @static
         * @param {AICommon.IAIRichResponseMapMetadata} message AIRichResponseMapMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseMapMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.centerLatitude != null && Object.hasOwnProperty.call(message, "centerLatitude"))
                writer.uint32(/* id 1, wireType 1 =*/9).double(message.centerLatitude);
            if (message.centerLongitude != null && Object.hasOwnProperty.call(message, "centerLongitude"))
                writer.uint32(/* id 2, wireType 1 =*/17).double(message.centerLongitude);
            if (message.latitudeDelta != null && Object.hasOwnProperty.call(message, "latitudeDelta"))
                writer.uint32(/* id 3, wireType 1 =*/25).double(message.latitudeDelta);
            if (message.longitudeDelta != null && Object.hasOwnProperty.call(message, "longitudeDelta"))
                writer.uint32(/* id 4, wireType 1 =*/33).double(message.longitudeDelta);
            if (message.annotations != null && message.annotations.length)
                for (var i = 0; i < message.annotations.length; ++i)
                    $root.AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.encode(message.annotations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
            if (message.showInfoList != null && Object.hasOwnProperty.call(message, "showInfoList"))
                writer.uint32(/* id 6, wireType 0 =*/48).bool(message.showInfoList);
            return writer;
        };

        /**
         * Encodes the specified AIRichResponseMapMetadata message, length delimited. Does not implicitly {@link AICommon.AIRichResponseMapMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.AIRichResponseMapMetadata
         * @static
         * @param {AICommon.IAIRichResponseMapMetadata} message AIRichResponseMapMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseMapMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a AIRichResponseMapMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.AIRichResponseMapMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.AIRichResponseMapMetadata} AIRichResponseMapMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseMapMetadata.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.AICommon.AIRichResponseMapMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.centerLatitude = reader.double();
                        break;
                    }
                case 2: {
                        message.centerLongitude = reader.double();
                        break;
                    }
                case 3: {
                        message.latitudeDelta = reader.double();
                        break;
                    }
                case 4: {
                        message.longitudeDelta = reader.double();
                        break;
                    }
                case 5: {
                        if (!(message.annotations && message.annotations.length))
                            message.annotations = [];
                        message.annotations.push($root.AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.decode(reader, reader.uint32()));
                        break;
                    }
                case 6: {
                        message.showInfoList = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a AIRichResponseMapMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.AIRichResponseMapMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.AIRichResponseMapMetadata} AIRichResponseMapMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseMapMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a AIRichResponseMapMetadata message.
         * @function verify
         * @memberof AICommon.AIRichResponseMapMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIRichResponseMapMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.centerLatitude != null && message.hasOwnProperty("centerLatitude")) {
                properties._centerLatitude = 1;
                if (typeof message.centerLatitude !== "number")
                    return "centerLatitude: number expected";
            }
            if (message.centerLongitude != null && message.hasOwnProperty("centerLongitude")) {
                properties._centerLongitude = 1;
                if (typeof message.centerLongitude !== "number")
                    return "centerLongitude: number expected";
            }
            if (message.latitudeDelta != null && message.hasOwnProperty("latitudeDelta")) {
                properties._latitudeDelta = 1;
                if (typeof message.latitudeDelta !== "number")
                    return "latitudeDelta: number expected";
            }
            if (message.longitudeDelta != null && message.hasOwnProperty("longitudeDelta")) {
                properties._longitudeDelta = 1;
                if (typeof message.longitudeDelta !== "number")
                    return "longitudeDelta: number expected";
            }
            if (message.annotations != null && message.hasOwnProperty("annotations")) {
                if (!Array.isArray(message.annotations))
                    return "annotations: array expected";
                for (var i = 0; i < message.annotations.length; ++i) {
                    var error = $root.AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.verify(message.annotations[i]);
                    if (error)
                        return "annotations." + error;
                }
            }
            if (message.showInfoList != null && message.hasOwnProperty("showInfoList")) {
                properties._showInfoList = 1;
                if (typeof message.showInfoList !== "boolean")
                    return "showInfoList: boolean expected";
            }
            return null;
        };

        /**
         * Creates a AIRichResponseMapMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.AIRichResponseMapMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.AIRichResponseMapMetadata} AIRichResponseMapMetadata
         */
        AIRichResponseMapMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.AIRichResponseMapMetadata)
                return object;
            var message = new $root.AICommon.AIRichResponseMapMetadata();
            if (object.centerLatitude != null)
                message.centerLatitude = Number(object.centerLatitude);
            if (object.centerLongitude != null)
                message.centerLongitude = Number(object.centerLongitude);
            if (object.latitudeDelta != null)
                message.latitudeDelta = Number(object.latitudeDelta);
            if (object.longitudeDelta != null)
                message.longitudeDelta = Number(object.longitudeDelta);
            if (object.annotations) {
                if (!Array.isArray(object.annotations))
                    throw TypeError(".AICommon.AIRichResponseMapMetadata.annotations: array expected");
                message.annotations = [];
                for (var i = 0; i < object.annotations.length; ++i) {
                    if (typeof object.annotations[i] !== "object")
                        throw TypeError(".AICommon.AIRichResponseMapMetadata.annotations: object expected");
                    message.annotations[i] = $root.AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.fromObject(object.annotations[i]);
                }
            }
            if (object.showInfoList != null)
                message.showInfoList = Boolean(object.showInfoList);
            return message;
        };

        /**
         * Creates a plain object from a AIRichResponseMapMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIRichResponseMapMetadata
         * @static
         * @param {AICommon.AIRichResponseMapMetadata} message AIRichResponseMapMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIRichResponseMapMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.annotations = [];
            if (message.centerLatitude != null && message.hasOwnProperty("centerLatitude")) {
                object.centerLatitude = options.json && !isFinite(message.centerLatitude) ? String(message.centerLatitude) : message.centerLatitude;
                if (options.oneofs)
                    object._centerLatitude = "centerLatitude";
            }
            if (message.centerLongitude != null && message.hasOwnProperty("centerLongitude")) {
                object.centerLongitude = options.json && !isFinite(message.centerLongitude) ? String(message.centerLongitude) : message.centerLongitude;
                if (options.oneofs)
                    object._centerLongitude = "centerLongitude";
            }
            if (message.latitudeDelta != null && message.hasOwnProperty("latitudeDelta")) {
                object.latitudeDelta = options.json && !isFinite(message.latitudeDelta) ? String(message.latitudeDelta) : message.latitudeDelta;
                if (options.oneofs)
                    object._latitudeDelta = "latitudeDelta";
            }
            if (message.longitudeDelta != null && message.hasOwnProperty("longitudeDelta")) {
                object.longitudeDelta = options.json && !isFinite(message.longitudeDelta) ? String(message.longitudeDelta) : message.longitudeDelta;
                if (options.oneofs)
                    object._longitudeDelta = "longitudeDelta";
            }
            if (message.annotations && message.annotations.length) {
                object.annotations = [];
                for (var j = 0; j < message.annotations.length; ++j)
                    object.annotations[j] = $root.AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.toObject(message.annotations[j], options);
            }
            if (message.showInfoList != null && message.hasOwnProperty("showInfoList")) {
                object.showInfoList = message.showInfoList;
                if (options.oneofs)
                    object._showInfoList = "showInfoList";
            }
            return object;
        };

        /**
         * Converts this AIRichResponseMapMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.AIRichResponseMapMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        AIRichResponseMapMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for AIRichResponseMapMetadata
         * @function getTypeUrl
         * @memberof AICommon.AIRichResponseMapMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        AIRichResponseMapMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.AIRichResponseMapMetadata";
        };

        AIRichResponseMapMetadata.AIRichResponseMapAnnotation = (function() {

            /**
             * Properties of a AIRichResponseMapAnnotation.
             * @memberof AICommon.AIRichResponseMapMetadata
             * @interface IAIRichResponseMapAnnotation
             * @property {number|null} [annotationNumber] AIRichResponseMapAnnotation annotationNumber
             * @property {number|null} [latitude] AIRichResponseMapAnnotation latitude
             * @property {number|null} [longitude] AIRichResponseMapAnnotation longitude
             * @property {string|null} [title] AIRichResponseMapAnnotation title
             * @property {string|null} [body] AIRichResponseMapAnnotation body
             */

            /**
             * Constructs a new AIRichResponseMapAnnotation.
             * @memberof AICommon.AIRichResponseMapMetadata
             * @classdesc Represents a AIRichResponseMapAnnotation.
             * @implements IAIRichResponseMapAnnotation
             * @constructor
             * @param {AICommon.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation=} [properties] Properties to set
             */
            function AIRichResponseMapAnnotation(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]];
            }

            /**
             * AIRichResponseMapAnnotation annotationNumber.
             * @member {number|null|undefined} annotationNumber
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            AIRichResponseMapAnnotation.prototype.annotationNumber = null;

            /**
             * AIRichResponseMapAnnotation latitude.
             * @member {number|null|undefined} latitude
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            AIRichResponseMapAnnotation.prototype.latitude = null;

            /**
             * AIRichResponseMapAnnotation longitude.
             * @member {number|null|undefined} longitude
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            AIRichResponseMapAnnotation.prototype.longitude = null;

            /**
             * AIRichResponseMapAnnotation title.
             * @member {string|null|undefined} title
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            AIRichResponseMapAnnotation.prototype.title = null;

            /**
             * AIRichResponseMapAnnotation body.
             * @member {string|null|undefined} body
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            AIRichResponseMapAnnotation.prototype.body = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * AIRichResponseMapAnnotation _annotationNumber.
             * @member {"annotationNumber"|undefined} _annotationNumber
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            Object.defineProperty(AIRichResponseMapAnnotation.prototype, "_annotationNumber", {
                get: $util.oneOfGetter($oneOfFields = ["annotationNumber"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseMapAnnotation _latitude.
             * @member {"latitude"|undefined} _latitude
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            Object.defineProperty(AIRichResponseMapAnnotation.prototype, "_latitude", {
                get: $util.oneOfGetter($oneOfFields = ["latitude"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseMapAnnotation _longitude.
             * @member {"longitude"|undefined} _longitude
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            Object.defineProperty(AIRichResponseMapAnnotation.prototype, "_longitude", {
                get: $util.oneOfGetter($oneOfFields = ["longitude"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseMapAnnotation _title.
             * @member {"title"|undefined} _title
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            Object.defineProperty(AIRichResponseMapAnnotation.prototype, "_title", {
                get: $util.oneOfGetter($oneOfFields = ["title"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseMapAnnotation _body.
             * @member {"body"|undefined} _body
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             */
            Object.defineProperty(AIRichResponseMapAnnotation.prototype, "_body", {
                get: $util.oneOfGetter($oneOfFields = ["body"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new AIRichResponseMapAnnotation instance using the specified properties.
             * @function create
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @static
             * @param {AICommon.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation=} [properties] Properties to set
             * @returns {AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation} AIRichResponseMapAnnotation instance
             */
            AIRichResponseMapAnnotation.create = function create(properties) {
                return new AIRichResponseMapAnnotation(properties);
            };

            /**
             * Encodes the specified AIRichResponseMapAnnotation message. Does not implicitly {@link AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.verify|verify} messages.
             * @function encode
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @static
             * @param {AICommon.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation} message AIRichResponseMapAnnotation message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIRichResponseMapAnnotation.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.annotationNumber != null && Object.hasOwnProperty.call(message, "annotationNumber"))
                    writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.annotationNumber);
                if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude"))
                    writer.uint32(/* id 2, wireType 1 =*/17).double(message.latitude);
                if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude"))
                    writer.uint32(/* id 3, wireType 1 =*/25).double(message.longitude);
                if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.title);
                if (message.body != null && Object.hasOwnProperty.call(message, "body"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.body);
                return writer;
            };

            /**
             * Encodes the specified AIRichResponseMapAnnotation message, length delimited. Does not implicitly {@link AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.verify|verify} messages.
             * @function encodeDelimited
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @static
             * @param {AICommon.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation} message AIRichResponseMapAnnotation message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIRichResponseMapAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a AIRichResponseMapAnnotation message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation} AIRichResponseMapAnnotation
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AIRichResponseMapAnnotation.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.AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.annotationNumber = reader.uint32();
                            break;
                        }
                    case 2: {
                            message.latitude = reader.double();
                            break;
                        }
                    case 3: {
                            message.longitude = reader.double();
                            break;
                        }
                    case 4: {
                            message.title = reader.string();
                            break;
                        }
                    case 5: {
                            message.body = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a AIRichResponseMapAnnotation message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation} AIRichResponseMapAnnotation
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AIRichResponseMapAnnotation.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a AIRichResponseMapAnnotation message.
             * @function verify
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AIRichResponseMapAnnotation.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.annotationNumber != null && message.hasOwnProperty("annotationNumber")) {
                    properties._annotationNumber = 1;
                    if (!$util.isInteger(message.annotationNumber))
                        return "annotationNumber: integer expected";
                }
                if (message.latitude != null && message.hasOwnProperty("latitude")) {
                    properties._latitude = 1;
                    if (typeof message.latitude !== "number")
                        return "latitude: number expected";
                }
                if (message.longitude != null && message.hasOwnProperty("longitude")) {
                    properties._longitude = 1;
                    if (typeof message.longitude !== "number")
                        return "longitude: number expected";
                }
                if (message.title != null && message.hasOwnProperty("title")) {
                    properties._title = 1;
                    if (!$util.isString(message.title))
                        return "title: string expected";
                }
                if (message.body != null && message.hasOwnProperty("body")) {
                    properties._body = 1;
                    if (!$util.isString(message.body))
                        return "body: string expected";
                }
                return null;
            };

            /**
             * Creates a AIRichResponseMapAnnotation message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation} AIRichResponseMapAnnotation
             */
            AIRichResponseMapAnnotation.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation)
                    return object;
                var message = new $root.AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation();
                if (object.annotationNumber != null)
                    message.annotationNumber = object.annotationNumber >>> 0;
                if (object.latitude != null)
                    message.latitude = Number(object.latitude);
                if (object.longitude != null)
                    message.longitude = Number(object.longitude);
                if (object.title != null)
                    message.title = String(object.title);
                if (object.body != null)
                    message.body = String(object.body);
                return message;
            };

            /**
             * Creates a plain object from a AIRichResponseMapAnnotation message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @static
             * @param {AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation} message AIRichResponseMapAnnotation
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AIRichResponseMapAnnotation.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.annotationNumber != null && message.hasOwnProperty("annotationNumber")) {
                    object.annotationNumber = message.annotationNumber;
                    if (options.oneofs)
                        object._annotationNumber = "annotationNumber";
                }
                if (message.latitude != null && message.hasOwnProperty("latitude")) {
                    object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude;
                    if (options.oneofs)
                        object._latitude = "latitude";
                }
                if (message.longitude != null && message.hasOwnProperty("longitude")) {
                    object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude;
                    if (options.oneofs)
                        object._longitude = "longitude";
                }
                if (message.title != null && message.hasOwnProperty("title")) {
                    object.title = message.title;
                    if (options.oneofs)
                        object._title = "title";
                }
                if (message.body != null && message.hasOwnProperty("body")) {
                    object.body = message.body;
                    if (options.oneofs)
                        object._body = "body";
                }
                return object;
            };

            /**
             * Converts this AIRichResponseMapAnnotation to JSON.
             * @function toJSON
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AIRichResponseMapAnnotation.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AIRichResponseMapAnnotation
             * @function getTypeUrl
             * @memberof AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AIRichResponseMapAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/AICommon.AIRichResponseMapMetadata.AIRichResponseMapAnnotation";
            };

            return AIRichResponseMapAnnotation;
        })();

        return AIRichResponseMapMetadata;
    })();

    AICommon.AIRichResponseLatexMetadata = (function() {

        /**
         * Properties of a AIRichResponseLatexMetadata.
         * @memberof AICommon
         * @interface IAIRichResponseLatexMetadata
         * @property {string|null} [text] AIRichResponseLatexMetadata text
         * @property {Array.<AICommon.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression>|null} [expressions] AIRichResponseLatexMetadata expressions
         */

        /**
         * Constructs a new AIRichResponseLatexMetadata.
         * @memberof AICommon
         * @classdesc Represents a AIRichResponseLatexMetadata.
         * @implements IAIRichResponseLatexMetadata
         * @constructor
         * @param {AICommon.IAIRichResponseLatexMetadata=} [properties] Properties to set
         */
        function AIRichResponseLatexMetadata(properties) {
            this.expressions = [];
            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]];
        }

        /**
         * AIRichResponseLatexMetadata text.
         * @member {string|null|undefined} text
         * @memberof AICommon.AIRichResponseLatexMetadata
         * @instance
         */
        AIRichResponseLatexMetadata.prototype.text = null;

        /**
         * AIRichResponseLatexMetadata expressions.
         * @member {Array.<AICommon.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression>} expressions
         * @memberof AICommon.AIRichResponseLatexMetadata
         * @instance
         */
        AIRichResponseLatexMetadata.prototype.expressions = $util.emptyArray;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * AIRichResponseLatexMetadata _text.
         * @member {"text"|undefined} _text
         * @memberof AICommon.AIRichResponseLatexMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseLatexMetadata.prototype, "_text", {
            get: $util.oneOfGetter($oneOfFields = ["text"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new AIRichResponseLatexMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.AIRichResponseLatexMetadata
         * @static
         * @param {AICommon.IAIRichResponseLatexMetadata=} [properties] Properties to set
         * @returns {AICommon.AIRichResponseLatexMetadata} AIRichResponseLatexMetadata instance
         */
        AIRichResponseLatexMetadata.create = function create(properties) {
            return new AIRichResponseLatexMetadata(properties);
        };

        /**
         * Encodes the specified AIRichResponseLatexMetadata message. Does not implicitly {@link AICommon.AIRichResponseLatexMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseLatexMetadata
         * @static
         * @param {AICommon.IAIRichResponseLatexMetadata} message AIRichResponseLatexMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseLatexMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.text);
            if (message.expressions != null && message.expressions.length)
                for (var i = 0; i < message.expressions.length; ++i)
                    $root.AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.encode(message.expressions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified AIRichResponseLatexMetadata message, length delimited. Does not implicitly {@link AICommon.AIRichResponseLatexMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.AIRichResponseLatexMetadata
         * @static
         * @param {AICommon.IAIRichResponseLatexMetadata} message AIRichResponseLatexMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseLatexMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a AIRichResponseLatexMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.AIRichResponseLatexMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.AIRichResponseLatexMetadata} AIRichResponseLatexMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseLatexMetadata.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.AICommon.AIRichResponseLatexMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.text = reader.string();
                        break;
                    }
                case 2: {
                        if (!(message.expressions && message.expressions.length))
                            message.expressions = [];
                        message.expressions.push($root.AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a AIRichResponseLatexMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.AIRichResponseLatexMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.AIRichResponseLatexMetadata} AIRichResponseLatexMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseLatexMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a AIRichResponseLatexMetadata message.
         * @function verify
         * @memberof AICommon.AIRichResponseLatexMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIRichResponseLatexMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.text != null && message.hasOwnProperty("text")) {
                properties._text = 1;
                if (!$util.isString(message.text))
                    return "text: string expected";
            }
            if (message.expressions != null && message.hasOwnProperty("expressions")) {
                if (!Array.isArray(message.expressions))
                    return "expressions: array expected";
                for (var i = 0; i < message.expressions.length; ++i) {
                    var error = $root.AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.verify(message.expressions[i]);
                    if (error)
                        return "expressions." + error;
                }
            }
            return null;
        };

        /**
         * Creates a AIRichResponseLatexMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.AIRichResponseLatexMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.AIRichResponseLatexMetadata} AIRichResponseLatexMetadata
         */
        AIRichResponseLatexMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.AIRichResponseLatexMetadata)
                return object;
            var message = new $root.AICommon.AIRichResponseLatexMetadata();
            if (object.text != null)
                message.text = String(object.text);
            if (object.expressions) {
                if (!Array.isArray(object.expressions))
                    throw TypeError(".AICommon.AIRichResponseLatexMetadata.expressions: array expected");
                message.expressions = [];
                for (var i = 0; i < object.expressions.length; ++i) {
                    if (typeof object.expressions[i] !== "object")
                        throw TypeError(".AICommon.AIRichResponseLatexMetadata.expressions: object expected");
                    message.expressions[i] = $root.AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.fromObject(object.expressions[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a AIRichResponseLatexMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIRichResponseLatexMetadata
         * @static
         * @param {AICommon.AIRichResponseLatexMetadata} message AIRichResponseLatexMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIRichResponseLatexMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.expressions = [];
            if (message.text != null && message.hasOwnProperty("text")) {
                object.text = message.text;
                if (options.oneofs)
                    object._text = "text";
            }
            if (message.expressions && message.expressions.length) {
                object.expressions = [];
                for (var j = 0; j < message.expressions.length; ++j)
                    object.expressions[j] = $root.AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.toObject(message.expressions[j], options);
            }
            return object;
        };

        /**
         * Converts this AIRichResponseLatexMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.AIRichResponseLatexMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        AIRichResponseLatexMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for AIRichResponseLatexMetadata
         * @function getTypeUrl
         * @memberof AICommon.AIRichResponseLatexMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        AIRichResponseLatexMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.AIRichResponseLatexMetadata";
        };

        AIRichResponseLatexMetadata.AIRichResponseLatexExpression = (function() {

            /**
             * Properties of a AIRichResponseLatexExpression.
             * @memberof AICommon.AIRichResponseLatexMetadata
             * @interface IAIRichResponseLatexExpression
             * @property {string|null} [latexExpression] AIRichResponseLatexExpression latexExpression
             * @property {string|null} [url] AIRichResponseLatexExpression url
             * @property {number|null} [width] AIRichResponseLatexExpression width
             * @property {number|null} [height] AIRichResponseLatexExpression height
             * @property {number|null} [fontHeight] AIRichResponseLatexExpression fontHeight
             * @property {number|null} [imageTopPadding] AIRichResponseLatexExpression imageTopPadding
             * @property {number|null} [imageLeadingPadding] AIRichResponseLatexExpression imageLeadingPadding
             * @property {number|null} [imageBottomPadding] AIRichResponseLatexExpression imageBottomPadding
             * @property {number|null} [imageTrailingPadding] AIRichResponseLatexExpression imageTrailingPadding
             */

            /**
             * Constructs a new AIRichResponseLatexExpression.
             * @memberof AICommon.AIRichResponseLatexMetadata
             * @classdesc Represents a AIRichResponseLatexExpression.
             * @implements IAIRichResponseLatexExpression
             * @constructor
             * @param {AICommon.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression=} [properties] Properties to set
             */
            function AIRichResponseLatexExpression(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]];
            }

            /**
             * AIRichResponseLatexExpression latexExpression.
             * @member {string|null|undefined} latexExpression
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.latexExpression = null;

            /**
             * AIRichResponseLatexExpression url.
             * @member {string|null|undefined} url
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.url = null;

            /**
             * AIRichResponseLatexExpression width.
             * @member {number|null|undefined} width
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.width = null;

            /**
             * AIRichResponseLatexExpression height.
             * @member {number|null|undefined} height
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.height = null;

            /**
             * AIRichResponseLatexExpression fontHeight.
             * @member {number|null|undefined} fontHeight
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.fontHeight = null;

            /**
             * AIRichResponseLatexExpression imageTopPadding.
             * @member {number|null|undefined} imageTopPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.imageTopPadding = null;

            /**
             * AIRichResponseLatexExpression imageLeadingPadding.
             * @member {number|null|undefined} imageLeadingPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.imageLeadingPadding = null;

            /**
             * AIRichResponseLatexExpression imageBottomPadding.
             * @member {number|null|undefined} imageBottomPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.imageBottomPadding = null;

            /**
             * AIRichResponseLatexExpression imageTrailingPadding.
             * @member {number|null|undefined} imageTrailingPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            AIRichResponseLatexExpression.prototype.imageTrailingPadding = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * AIRichResponseLatexExpression _latexExpression.
             * @member {"latexExpression"|undefined} _latexExpression
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            Object.defineProperty(AIRichResponseLatexExpression.prototype, "_latexExpression", {
                get: $util.oneOfGetter($oneOfFields = ["latexExpression"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseLatexExpression _url.
             * @member {"url"|undefined} _url
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            Object.defineProperty(AIRichResponseLatexExpression.prototype, "_url", {
                get: $util.oneOfGetter($oneOfFields = ["url"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseLatexExpression _width.
             * @member {"width"|undefined} _width
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            Object.defineProperty(AIRichResponseLatexExpression.prototype, "_width", {
                get: $util.oneOfGetter($oneOfFields = ["width"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseLatexExpression _height.
             * @member {"height"|undefined} _height
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            Object.defineProperty(AIRichResponseLatexExpression.prototype, "_height", {
                get: $util.oneOfGetter($oneOfFields = ["height"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseLatexExpression _fontHeight.
             * @member {"fontHeight"|undefined} _fontHeight
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            Object.defineProperty(AIRichResponseLatexExpression.prototype, "_fontHeight", {
                get: $util.oneOfGetter($oneOfFields = ["fontHeight"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseLatexExpression _imageTopPadding.
             * @member {"imageTopPadding"|undefined} _imageTopPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            Object.defineProperty(AIRichResponseLatexExpression.prototype, "_imageTopPadding", {
                get: $util.oneOfGetter($oneOfFields = ["imageTopPadding"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseLatexExpression _imageLeadingPadding.
             * @member {"imageLeadingPadding"|undefined} _imageLeadingPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            Object.defineProperty(AIRichResponseLatexExpression.prototype, "_imageLeadingPadding", {
                get: $util.oneOfGetter($oneOfFields = ["imageLeadingPadding"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseLatexExpression _imageBottomPadding.
             * @member {"imageBottomPadding"|undefined} _imageBottomPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            Object.defineProperty(AIRichResponseLatexExpression.prototype, "_imageBottomPadding", {
                get: $util.oneOfGetter($oneOfFields = ["imageBottomPadding"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseLatexExpression _imageTrailingPadding.
             * @member {"imageTrailingPadding"|undefined} _imageTrailingPadding
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             */
            Object.defineProperty(AIRichResponseLatexExpression.prototype, "_imageTrailingPadding", {
                get: $util.oneOfGetter($oneOfFields = ["imageTrailingPadding"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new AIRichResponseLatexExpression instance using the specified properties.
             * @function create
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @static
             * @param {AICommon.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression=} [properties] Properties to set
             * @returns {AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression} AIRichResponseLatexExpression instance
             */
            AIRichResponseLatexExpression.create = function create(properties) {
                return new AIRichResponseLatexExpression(properties);
            };

            /**
             * Encodes the specified AIRichResponseLatexExpression message. Does not implicitly {@link AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.verify|verify} messages.
             * @function encode
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @static
             * @param {AICommon.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression} message AIRichResponseLatexExpression message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIRichResponseLatexExpression.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.latexExpression != null && Object.hasOwnProperty.call(message, "latexExpression"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.latexExpression);
                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.url);
                if (message.width != null && Object.hasOwnProperty.call(message, "width"))
                    writer.uint32(/* id 3, wireType 1 =*/25).double(message.width);
                if (message.height != null && Object.hasOwnProperty.call(message, "height"))
                    writer.uint32(/* id 4, wireType 1 =*/33).double(message.height);
                if (message.fontHeight != null && Object.hasOwnProperty.call(message, "fontHeight"))
                    writer.uint32(/* id 5, wireType 1 =*/41).double(message.fontHeight);
                if (message.imageTopPadding != null && Object.hasOwnProperty.call(message, "imageTopPadding"))
                    writer.uint32(/* id 6, wireType 1 =*/49).double(message.imageTopPadding);
                if (message.imageLeadingPadding != null && Object.hasOwnProperty.call(message, "imageLeadingPadding"))
                    writer.uint32(/* id 7, wireType 1 =*/57).double(message.imageLeadingPadding);
                if (message.imageBottomPadding != null && Object.hasOwnProperty.call(message, "imageBottomPadding"))
                    writer.uint32(/* id 8, wireType 1 =*/65).double(message.imageBottomPadding);
                if (message.imageTrailingPadding != null && Object.hasOwnProperty.call(message, "imageTrailingPadding"))
                    writer.uint32(/* id 9, wireType 1 =*/73).double(message.imageTrailingPadding);
                return writer;
            };

            /**
             * Encodes the specified AIRichResponseLatexExpression message, length delimited. Does not implicitly {@link AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.verify|verify} messages.
             * @function encodeDelimited
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @static
             * @param {AICommon.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression} message AIRichResponseLatexExpression message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIRichResponseLatexExpression.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a AIRichResponseLatexExpression message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression} AIRichResponseLatexExpression
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AIRichResponseLatexExpression.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.AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.latexExpression = reader.string();
                            break;
                        }
                    case 2: {
                            message.url = reader.string();
                            break;
                        }
                    case 3: {
                            message.width = reader.double();
                            break;
                        }
                    case 4: {
                            message.height = reader.double();
                            break;
                        }
                    case 5: {
                            message.fontHeight = reader.double();
                            break;
                        }
                    case 6: {
                            message.imageTopPadding = reader.double();
                            break;
                        }
                    case 7: {
                            message.imageLeadingPadding = reader.double();
                            break;
                        }
                    case 8: {
                            message.imageBottomPadding = reader.double();
                            break;
                        }
                    case 9: {
                            message.imageTrailingPadding = reader.double();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a AIRichResponseLatexExpression message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression} AIRichResponseLatexExpression
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AIRichResponseLatexExpression.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a AIRichResponseLatexExpression message.
             * @function verify
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AIRichResponseLatexExpression.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.latexExpression != null && message.hasOwnProperty("latexExpression")) {
                    properties._latexExpression = 1;
                    if (!$util.isString(message.latexExpression))
                        return "latexExpression: string expected";
                }
                if (message.url != null && message.hasOwnProperty("url")) {
                    properties._url = 1;
                    if (!$util.isString(message.url))
                        return "url: string expected";
                }
                if (message.width != null && message.hasOwnProperty("width")) {
                    properties._width = 1;
                    if (typeof message.width !== "number")
                        return "width: number expected";
                }
                if (message.height != null && message.hasOwnProperty("height")) {
                    properties._height = 1;
                    if (typeof message.height !== "number")
                        return "height: number expected";
                }
                if (message.fontHeight != null && message.hasOwnProperty("fontHeight")) {
                    properties._fontHeight = 1;
                    if (typeof message.fontHeight !== "number")
                        return "fontHeight: number expected";
                }
                if (message.imageTopPadding != null && message.hasOwnProperty("imageTopPadding")) {
                    properties._imageTopPadding = 1;
                    if (typeof message.imageTopPadding !== "number")
                        return "imageTopPadding: number expected";
                }
                if (message.imageLeadingPadding != null && message.hasOwnProperty("imageLeadingPadding")) {
                    properties._imageLeadingPadding = 1;
                    if (typeof message.imageLeadingPadding !== "number")
                        return "imageLeadingPadding: number expected";
                }
                if (message.imageBottomPadding != null && message.hasOwnProperty("imageBottomPadding")) {
                    properties._imageBottomPadding = 1;
                    if (typeof message.imageBottomPadding !== "number")
                        return "imageBottomPadding: number expected";
                }
                if (message.imageTrailingPadding != null && message.hasOwnProperty("imageTrailingPadding")) {
                    properties._imageTrailingPadding = 1;
                    if (typeof message.imageTrailingPadding !== "number")
                        return "imageTrailingPadding: number expected";
                }
                return null;
            };

            /**
             * Creates a AIRichResponseLatexExpression message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression} AIRichResponseLatexExpression
             */
            AIRichResponseLatexExpression.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression)
                    return object;
                var message = new $root.AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression();
                if (object.latexExpression != null)
                    message.latexExpression = String(object.latexExpression);
                if (object.url != null)
                    message.url = String(object.url);
                if (object.width != null)
                    message.width = Number(object.width);
                if (object.height != null)
                    message.height = Number(object.height);
                if (object.fontHeight != null)
                    message.fontHeight = Number(object.fontHeight);
                if (object.imageTopPadding != null)
                    message.imageTopPadding = Number(object.imageTopPadding);
                if (object.imageLeadingPadding != null)
                    message.imageLeadingPadding = Number(object.imageLeadingPadding);
                if (object.imageBottomPadding != null)
                    message.imageBottomPadding = Number(object.imageBottomPadding);
                if (object.imageTrailingPadding != null)
                    message.imageTrailingPadding = Number(object.imageTrailingPadding);
                return message;
            };

            /**
             * Creates a plain object from a AIRichResponseLatexExpression message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @static
             * @param {AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression} message AIRichResponseLatexExpression
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AIRichResponseLatexExpression.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.latexExpression != null && message.hasOwnProperty("latexExpression")) {
                    object.latexExpression = message.latexExpression;
                    if (options.oneofs)
                        object._latexExpression = "latexExpression";
                }
                if (message.url != null && message.hasOwnProperty("url")) {
                    object.url = message.url;
                    if (options.oneofs)
                        object._url = "url";
                }
                if (message.width != null && message.hasOwnProperty("width")) {
                    object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width;
                    if (options.oneofs)
                        object._width = "width";
                }
                if (message.height != null && message.hasOwnProperty("height")) {
                    object.height = options.json && !isFinite(message.height) ? String(message.height) : message.height;
                    if (options.oneofs)
                        object._height = "height";
                }
                if (message.fontHeight != null && message.hasOwnProperty("fontHeight")) {
                    object.fontHeight = options.json && !isFinite(message.fontHeight) ? String(message.fontHeight) : message.fontHeight;
                    if (options.oneofs)
                        object._fontHeight = "fontHeight";
                }
                if (message.imageTopPadding != null && message.hasOwnProperty("imageTopPadding")) {
                    object.imageTopPadding = options.json && !isFinite(message.imageTopPadding) ? String(message.imageTopPadding) : message.imageTopPadding;
                    if (options.oneofs)
                        object._imageTopPadding = "imageTopPadding";
                }
                if (message.imageLeadingPadding != null && message.hasOwnProperty("imageLeadingPadding")) {
                    object.imageLeadingPadding = options.json && !isFinite(message.imageLeadingPadding) ? String(message.imageLeadingPadding) : message.imageLeadingPadding;
                    if (options.oneofs)
                        object._imageLeadingPadding = "imageLeadingPadding";
                }
                if (message.imageBottomPadding != null && message.hasOwnProperty("imageBottomPadding")) {
                    object.imageBottomPadding = options.json && !isFinite(message.imageBottomPadding) ? String(message.imageBottomPadding) : message.imageBottomPadding;
                    if (options.oneofs)
                        object._imageBottomPadding = "imageBottomPadding";
                }
                if (message.imageTrailingPadding != null && message.hasOwnProperty("imageTrailingPadding")) {
                    object.imageTrailingPadding = options.json && !isFinite(message.imageTrailingPadding) ? String(message.imageTrailingPadding) : message.imageTrailingPadding;
                    if (options.oneofs)
                        object._imageTrailingPadding = "imageTrailingPadding";
                }
                return object;
            };

            /**
             * Converts this AIRichResponseLatexExpression to JSON.
             * @function toJSON
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AIRichResponseLatexExpression.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AIRichResponseLatexExpression
             * @function getTypeUrl
             * @memberof AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AIRichResponseLatexExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/AICommon.AIRichResponseLatexMetadata.AIRichResponseLatexExpression";
            };

            return AIRichResponseLatexExpression;
        })();

        return AIRichResponseLatexMetadata;
    })();

    AICommon.AIRichResponseUnifiedResponse = (function() {

        /**
         * Properties of a AIRichResponseUnifiedResponse.
         * @memberof AICommon
         * @interface IAIRichResponseUnifiedResponse
         * @property {Uint8Array|null} [data] AIRichResponseUnifiedResponse data
         */

        /**
         * Constructs a new AIRichResponseUnifiedResponse.
         * @memberof AICommon
         * @classdesc Represents a AIRichResponseUnifiedResponse.
         * @implements IAIRichResponseUnifiedResponse
         * @constructor
         * @param {AICommon.IAIRichResponseUnifiedResponse=} [properties] Properties to set
         */
        function AIRichResponseUnifiedResponse(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]];
        }

        /**
         * AIRichResponseUnifiedResponse data.
         * @member {Uint8Array|null|undefined} data
         * @memberof AICommon.AIRichResponseUnifiedResponse
         * @instance
         */
        AIRichResponseUnifiedResponse.prototype.data = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * AIRichResponseUnifiedResponse _data.
         * @member {"data"|undefined} _data
         * @memberof AICommon.AIRichResponseUnifiedResponse
         * @instance
         */
        Object.defineProperty(AIRichResponseUnifiedResponse.prototype, "_data", {
            get: $util.oneOfGetter($oneOfFields = ["data"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new AIRichResponseUnifiedResponse instance using the specified properties.
         * @function create
         * @memberof AICommon.AIRichResponseUnifiedResponse
         * @static
         * @param {AICommon.IAIRichResponseUnifiedResponse=} [properties] Properties to set
         * @returns {AICommon.AIRichResponseUnifiedResponse} AIRichResponseUnifiedResponse instance
         */
        AIRichResponseUnifiedResponse.create = function create(properties) {
            return new AIRichResponseUnifiedResponse(properties);
        };

        /**
         * Encodes the specified AIRichResponseUnifiedResponse message. Does not implicitly {@link AICommon.AIRichResponseUnifiedResponse.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseUnifiedResponse
         * @static
         * @param {AICommon.IAIRichResponseUnifiedResponse} message AIRichResponseUnifiedResponse message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseUnifiedResponse.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.data != null && Object.hasOwnProperty.call(message, "data"))
                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data);
            return writer;
        };

        /**
         * Encodes the specified AIRichResponseUnifiedResponse message, length delimited. Does not implicitly {@link AICommon.AIRichResponseUnifiedResponse.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.AIRichResponseUnifiedResponse
         * @static
         * @param {AICommon.IAIRichResponseUnifiedResponse} message AIRichResponseUnifiedResponse message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseUnifiedResponse.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a AIRichResponseUnifiedResponse message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.AIRichResponseUnifiedResponse
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.AIRichResponseUnifiedResponse} AIRichResponseUnifiedResponse
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseUnifiedResponse.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.AICommon.AIRichResponseUnifiedResponse();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.data = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a AIRichResponseUnifiedResponse message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.AIRichResponseUnifiedResponse
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.AIRichResponseUnifiedResponse} AIRichResponseUnifiedResponse
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseUnifiedResponse.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a AIRichResponseUnifiedResponse message.
         * @function verify
         * @memberof AICommon.AIRichResponseUnifiedResponse
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIRichResponseUnifiedResponse.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.data != null && message.hasOwnProperty("data")) {
                properties._data = 1;
                if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data)))
                    return "data: buffer expected";
            }
            return null;
        };

        /**
         * Creates a AIRichResponseUnifiedResponse message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.AIRichResponseUnifiedResponse
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.AIRichResponseUnifiedResponse} AIRichResponseUnifiedResponse
         */
        AIRichResponseUnifiedResponse.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.AIRichResponseUnifiedResponse)
                return object;
            var message = new $root.AICommon.AIRichResponseUnifiedResponse();
            if (object.data != null)
                if (typeof object.data === "string")
                    $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0);
                else if (object.data.length >= 0)
                    message.data = object.data;
            return message;
        };

        /**
         * Creates a plain object from a AIRichResponseUnifiedResponse message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIRichResponseUnifiedResponse
         * @static
         * @param {AICommon.AIRichResponseUnifiedResponse} message AIRichResponseUnifiedResponse
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIRichResponseUnifiedResponse.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.data != null && message.hasOwnProperty("data")) {
                object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data;
                if (options.oneofs)
                    object._data = "data";
            }
            return object;
        };

        /**
         * Converts this AIRichResponseUnifiedResponse to JSON.
         * @function toJSON
         * @memberof AICommon.AIRichResponseUnifiedResponse
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        AIRichResponseUnifiedResponse.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for AIRichResponseUnifiedResponse
         * @function getTypeUrl
         * @memberof AICommon.AIRichResponseUnifiedResponse
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        AIRichResponseUnifiedResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.AIRichResponseUnifiedResponse";
        };

        return AIRichResponseUnifiedResponse;
    })();

    AICommon.AIRichResponseDynamicMetadata = (function() {

        /**
         * Properties of a AIRichResponseDynamicMetadata.
         * @memberof AICommon
         * @interface IAIRichResponseDynamicMetadata
         * @property {AICommon.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType|null} [type] AIRichResponseDynamicMetadata type
         * @property {number|Long|null} [version] AIRichResponseDynamicMetadata version
         * @property {string|null} [url] AIRichResponseDynamicMetadata url
         * @property {number|null} [loopCount] AIRichResponseDynamicMetadata loopCount
         */

        /**
         * Constructs a new AIRichResponseDynamicMetadata.
         * @memberof AICommon
         * @classdesc Represents a AIRichResponseDynamicMetadata.
         * @implements IAIRichResponseDynamicMetadata
         * @constructor
         * @param {AICommon.IAIRichResponseDynamicMetadata=} [properties] Properties to set
         */
        function AIRichResponseDynamicMetadata(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]];
        }

        /**
         * AIRichResponseDynamicMetadata type.
         * @member {AICommon.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType|null|undefined} type
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         */
        AIRichResponseDynamicMetadata.prototype.type = null;

        /**
         * AIRichResponseDynamicMetadata version.
         * @member {number|Long|null|undefined} version
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         */
        AIRichResponseDynamicMetadata.prototype.version = null;

        /**
         * AIRichResponseDynamicMetadata url.
         * @member {string|null|undefined} url
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         */
        AIRichResponseDynamicMetadata.prototype.url = null;

        /**
         * AIRichResponseDynamicMetadata loopCount.
         * @member {number|null|undefined} loopCount
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         */
        AIRichResponseDynamicMetadata.prototype.loopCount = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * AIRichResponseDynamicMetadata _type.
         * @member {"type"|undefined} _type
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseDynamicMetadata.prototype, "_type", {
            get: $util.oneOfGetter($oneOfFields = ["type"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseDynamicMetadata _version.
         * @member {"version"|undefined} _version
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseDynamicMetadata.prototype, "_version", {
            get: $util.oneOfGetter($oneOfFields = ["version"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseDynamicMetadata _url.
         * @member {"url"|undefined} _url
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseDynamicMetadata.prototype, "_url", {
            get: $util.oneOfGetter($oneOfFields = ["url"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseDynamicMetadata _loopCount.
         * @member {"loopCount"|undefined} _loopCount
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseDynamicMetadata.prototype, "_loopCount", {
            get: $util.oneOfGetter($oneOfFields = ["loopCount"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new AIRichResponseDynamicMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @static
         * @param {AICommon.IAIRichResponseDynamicMetadata=} [properties] Properties to set
         * @returns {AICommon.AIRichResponseDynamicMetadata} AIRichResponseDynamicMetadata instance
         */
        AIRichResponseDynamicMetadata.create = function create(properties) {
            return new AIRichResponseDynamicMetadata(properties);
        };

        /**
         * Encodes the specified AIRichResponseDynamicMetadata message. Does not implicitly {@link AICommon.AIRichResponseDynamicMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @static
         * @param {AICommon.IAIRichResponseDynamicMetadata} message AIRichResponseDynamicMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseDynamicMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
            if (message.version != null && Object.hasOwnProperty.call(message, "version"))
                writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.version);
            if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.url);
            if (message.loopCount != null && Object.hasOwnProperty.call(message, "loopCount"))
                writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.loopCount);
            return writer;
        };

        /**
         * Encodes the specified AIRichResponseDynamicMetadata message, length delimited. Does not implicitly {@link AICommon.AIRichResponseDynamicMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @static
         * @param {AICommon.IAIRichResponseDynamicMetadata} message AIRichResponseDynamicMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseDynamicMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a AIRichResponseDynamicMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.AIRichResponseDynamicMetadata} AIRichResponseDynamicMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseDynamicMetadata.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.AICommon.AIRichResponseDynamicMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.type = reader.int32();
                        break;
                    }
                case 2: {
                        message.version = reader.uint64();
                        break;
                    }
                case 3: {
                        message.url = reader.string();
                        break;
                    }
                case 4: {
                        message.loopCount = reader.uint32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a AIRichResponseDynamicMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.AIRichResponseDynamicMetadata} AIRichResponseDynamicMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseDynamicMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a AIRichResponseDynamicMetadata message.
         * @function verify
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIRichResponseDynamicMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.type != null && message.hasOwnProperty("type")) {
                properties._type = 1;
                switch (message.type) {
                default:
                    return "type: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            }
            if (message.version != null && message.hasOwnProperty("version")) {
                properties._version = 1;
                if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high)))
                    return "version: integer|Long expected";
            }
            if (message.url != null && message.hasOwnProperty("url")) {
                properties._url = 1;
                if (!$util.isString(message.url))
                    return "url: string expected";
            }
            if (message.loopCount != null && message.hasOwnProperty("loopCount")) {
                properties._loopCount = 1;
                if (!$util.isInteger(message.loopCount))
                    return "loopCount: integer expected";
            }
            return null;
        };

        /**
         * Creates a AIRichResponseDynamicMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.AIRichResponseDynamicMetadata} AIRichResponseDynamicMetadata
         */
        AIRichResponseDynamicMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.AIRichResponseDynamicMetadata)
                return object;
            var message = new $root.AICommon.AIRichResponseDynamicMetadata();
            switch (object.type) {
            default:
                if (typeof object.type === "number") {
                    message.type = object.type;
                    break;
                }
                break;
            case "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN":
            case 0:
                message.type = 0;
                break;
            case "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE":
            case 1:
                message.type = 1;
                break;
            case "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF":
            case 2:
                message.type = 2;
                break;
            }
            if (object.version != null)
                if ($util.Long)
                    (message.version = $util.Long.fromValue(object.version)).unsigned = true;
                else if (typeof object.version === "string")
                    message.version = parseInt(object.version, 10);
                else if (typeof object.version === "number")
                    message.version = object.version;
                else if (typeof object.version === "object")
                    message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(true);
            if (object.url != null)
                message.url = String(object.url);
            if (object.loopCount != null)
                message.loopCount = object.loopCount >>> 0;
            return message;
        };

        /**
         * Creates a plain object from a AIRichResponseDynamicMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @static
         * @param {AICommon.AIRichResponseDynamicMetadata} message AIRichResponseDynamicMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIRichResponseDynamicMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.type != null && message.hasOwnProperty("type")) {
                object.type = options.enums === String ? $root.AICommon.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType[message.type] === undefined ? message.type : $root.AICommon.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType[message.type] : message.type;
                if (options.oneofs)
                    object._type = "type";
            }
            if (message.version != null && message.hasOwnProperty("version")) {
                if (typeof message.version === "number")
                    object.version = options.longs === String ? String(message.version) : message.version;
                else
                    object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber(true) : message.version;
                if (options.oneofs)
                    object._version = "version";
            }
            if (message.url != null && message.hasOwnProperty("url")) {
                object.url = message.url;
                if (options.oneofs)
                    object._url = "url";
            }
            if (message.loopCount != null && message.hasOwnProperty("loopCount")) {
                object.loopCount = message.loopCount;
                if (options.oneofs)
                    object._loopCount = "loopCount";
            }
            return object;
        };

        /**
         * Converts this AIRichResponseDynamicMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        AIRichResponseDynamicMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for AIRichResponseDynamicMetadata
         * @function getTypeUrl
         * @memberof AICommon.AIRichResponseDynamicMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        AIRichResponseDynamicMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.AIRichResponseDynamicMetadata";
        };

        /**
         * AIRichResponseDynamicMetadataType enum.
         * @name AICommon.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType
         * @enum {number}
         * @property {number} AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN=0 AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN value
         * @property {number} AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE=1 AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE value
         * @property {number} AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF=2 AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF value
         */
        AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN"] = 0;
            values[valuesById[1] = "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE"] = 1;
            values[valuesById[2] = "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF"] = 2;
            return values;
        })();

        return AIRichResponseDynamicMetadata;
    })();

    AICommon.AIRichResponseTableMetadata = (function() {

        /**
         * Properties of a AIRichResponseTableMetadata.
         * @memberof AICommon
         * @interface IAIRichResponseTableMetadata
         * @property {Array.<AICommon.AIRichResponseTableMetadata.IAIRichResponseTableRow>|null} [rows] AIRichResponseTableMetadata rows
         * @property {string|null} [title] AIRichResponseTableMetadata title
         */

        /**
         * Constructs a new AIRichResponseTableMetadata.
         * @memberof AICommon
         * @classdesc Represents a AIRichResponseTableMetadata.
         * @implements IAIRichResponseTableMetadata
         * @constructor
         * @param {AICommon.IAIRichResponseTableMetadata=} [properties] Properties to set
         */
        function AIRichResponseTableMetadata(properties) {
            this.rows = [];
            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]];
        }

        /**
         * AIRichResponseTableMetadata rows.
         * @member {Array.<AICommon.AIRichResponseTableMetadata.IAIRichResponseTableRow>} rows
         * @memberof AICommon.AIRichResponseTableMetadata
         * @instance
         */
        AIRichResponseTableMetadata.prototype.rows = $util.emptyArray;

        /**
         * AIRichResponseTableMetadata title.
         * @member {string|null|undefined} title
         * @memberof AICommon.AIRichResponseTableMetadata
         * @instance
         */
        AIRichResponseTableMetadata.prototype.title = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * AIRichResponseTableMetadata _title.
         * @member {"title"|undefined} _title
         * @memberof AICommon.AIRichResponseTableMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseTableMetadata.prototype, "_title", {
            get: $util.oneOfGetter($oneOfFields = ["title"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new AIRichResponseTableMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.AIRichResponseTableMetadata
         * @static
         * @param {AICommon.IAIRichResponseTableMetadata=} [properties] Properties to set
         * @returns {AICommon.AIRichResponseTableMetadata} AIRichResponseTableMetadata instance
         */
        AIRichResponseTableMetadata.create = function create(properties) {
            return new AIRichResponseTableMetadata(properties);
        };

        /**
         * Encodes the specified AIRichResponseTableMetadata message. Does not implicitly {@link AICommon.AIRichResponseTableMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseTableMetadata
         * @static
         * @param {AICommon.IAIRichResponseTableMetadata} message AIRichResponseTableMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseTableMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.rows != null && message.rows.length)
                for (var i = 0; i < message.rows.length; ++i)
                    $root.AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow.encode(message.rows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.title);
            return writer;
        };

        /**
         * Encodes the specified AIRichResponseTableMetadata message, length delimited. Does not implicitly {@link AICommon.AIRichResponseTableMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.AIRichResponseTableMetadata
         * @static
         * @param {AICommon.IAIRichResponseTableMetadata} message AIRichResponseTableMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseTableMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a AIRichResponseTableMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.AIRichResponseTableMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.AIRichResponseTableMetadata} AIRichResponseTableMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseTableMetadata.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.AICommon.AIRichResponseTableMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        if (!(message.rows && message.rows.length))
                            message.rows = [];
                        message.rows.push($root.AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow.decode(reader, reader.uint32()));
                        break;
                    }
                case 2: {
                        message.title = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a AIRichResponseTableMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.AIRichResponseTableMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.AIRichResponseTableMetadata} AIRichResponseTableMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseTableMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a AIRichResponseTableMetadata message.
         * @function verify
         * @memberof AICommon.AIRichResponseTableMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIRichResponseTableMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.rows != null && message.hasOwnProperty("rows")) {
                if (!Array.isArray(message.rows))
                    return "rows: array expected";
                for (var i = 0; i < message.rows.length; ++i) {
                    var error = $root.AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow.verify(message.rows[i]);
                    if (error)
                        return "rows." + error;
                }
            }
            if (message.title != null && message.hasOwnProperty("title")) {
                properties._title = 1;
                if (!$util.isString(message.title))
                    return "title: string expected";
            }
            return null;
        };

        /**
         * Creates a AIRichResponseTableMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.AIRichResponseTableMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.AIRichResponseTableMetadata} AIRichResponseTableMetadata
         */
        AIRichResponseTableMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.AIRichResponseTableMetadata)
                return object;
            var message = new $root.AICommon.AIRichResponseTableMetadata();
            if (object.rows) {
                if (!Array.isArray(object.rows))
                    throw TypeError(".AICommon.AIRichResponseTableMetadata.rows: array expected");
                message.rows = [];
                for (var i = 0; i < object.rows.length; ++i) {
                    if (typeof object.rows[i] !== "object")
                        throw TypeError(".AICommon.AIRichResponseTableMetadata.rows: object expected");
                    message.rows[i] = $root.AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow.fromObject(object.rows[i]);
                }
            }
            if (object.title != null)
                message.title = String(object.title);
            return message;
        };

        /**
         * Creates a plain object from a AIRichResponseTableMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIRichResponseTableMetadata
         * @static
         * @param {AICommon.AIRichResponseTableMetadata} message AIRichResponseTableMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIRichResponseTableMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.rows = [];
            if (message.rows && message.rows.length) {
                object.rows = [];
                for (var j = 0; j < message.rows.length; ++j)
                    object.rows[j] = $root.AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow.toObject(message.rows[j], options);
            }
            if (message.title != null && message.hasOwnProperty("title")) {
                object.title = message.title;
                if (options.oneofs)
                    object._title = "title";
            }
            return object;
        };

        /**
         * Converts this AIRichResponseTableMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.AIRichResponseTableMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        AIRichResponseTableMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for AIRichResponseTableMetadata
         * @function getTypeUrl
         * @memberof AICommon.AIRichResponseTableMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        AIRichResponseTableMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.AIRichResponseTableMetadata";
        };

        AIRichResponseTableMetadata.AIRichResponseTableRow = (function() {

            /**
             * Properties of a AIRichResponseTableRow.
             * @memberof AICommon.AIRichResponseTableMetadata
             * @interface IAIRichResponseTableRow
             * @property {Array.<string>|null} [items] AIRichResponseTableRow items
             * @property {boolean|null} [isHeading] AIRichResponseTableRow isHeading
             */

            /**
             * Constructs a new AIRichResponseTableRow.
             * @memberof AICommon.AIRichResponseTableMetadata
             * @classdesc Represents a AIRichResponseTableRow.
             * @implements IAIRichResponseTableRow
             * @constructor
             * @param {AICommon.AIRichResponseTableMetadata.IAIRichResponseTableRow=} [properties] Properties to set
             */
            function AIRichResponseTableRow(properties) {
                this.items = [];
                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]];
            }

            /**
             * AIRichResponseTableRow items.
             * @member {Array.<string>} items
             * @memberof AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow
             * @instance
             */
            AIRichResponseTableRow.prototype.items = $util.emptyArray;

            /**
             * AIRichResponseTableRow isHeading.
             * @member {boolean|null|undefined} isHeading
             * @memberof AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow
             * @instance
             */
            AIRichResponseTableRow.prototype.isHeading = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * AIRichResponseTableRow _isHeading.
             * @member {"isHeading"|undefined} _isHeading
             * @memberof AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow
             * @instance
             */
            Object.defineProperty(AIRichResponseTableRow.prototype, "_isHeading", {
                get: $util.oneOfGetter($oneOfFields = ["isHeading"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new AIRichResponseTableRow instance using the specified properties.
             * @function create
             * @memberof AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow
             * @static
             * @param {AICommon.AIRichResponseTableMetadata.IAIRichResponseTableRow=} [properties] Properties to set
             * @returns {AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow} AIRichResponseTableRow instance
             */
            AIRichResponseTableRow.create = function create(properties) {
                return new AIRichResponseTableRow(properties);
            };

            /**
             * Encodes the specified AIRichResponseTableRow message. Does not implicitly {@link AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow.verify|verify} messages.
             * @function encode
             * @memberof AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow
             * @static
             * @param {AICommon.AIRichResponseTableMetadata.IAIRichResponseTableRow} message AIRichResponseTableRow message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIRichResponseTableRow.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.items != null && message.items.length)
                    for (var i = 0; i < message.items.length; ++i)
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.items[i]);
                if (message.isHeading != null && Object.hasOwnProperty.call(message, "isHeading"))
                    writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isHeading);
                return writer;
            };

            /**
             * Encodes the specified AIRichResponseTableRow message, length delimited. Does not implicitly {@link AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow.verify|verify} messages.
             * @function encodeDelimited
             * @memberof AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow
             * @static
             * @param {AICommon.AIRichResponseTableMetadata.IAIRichResponseTableRow} message AIRichResponseTableRow message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIRichResponseTableRow.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a AIRichResponseTableRow message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow} AIRichResponseTableRow
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AIRichResponseTableRow.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.AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            if (!(message.items && message.items.length))
                                message.items = [];
                            message.items.push(reader.string());
                            break;
                        }
                    case 2: {
                            message.isHeading = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a AIRichResponseTableRow message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow} AIRichResponseTableRow
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AIRichResponseTableRow.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a AIRichResponseTableRow message.
             * @function verify
             * @memberof AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AIRichResponseTableRow.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.items != null && message.hasOwnProperty("items")) {
                    if (!Array.isArray(message.items))
                        return "items: array expected";
                    for (var i = 0; i < message.items.length; ++i)
                        if (!$util.isString(message.items[i]))
                            return "items: string[] expected";
                }
                if (message.isHeading != null && message.hasOwnProperty("isHeading")) {
                    properties._isHeading = 1;
                    if (typeof message.isHeading !== "boolean")
                        return "isHeading: boolean expected";
                }
                return null;
            };

            /**
             * Creates a AIRichResponseTableRow message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow} AIRichResponseTableRow
             */
            AIRichResponseTableRow.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow)
                    return object;
                var message = new $root.AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow();
                if (object.items) {
                    if (!Array.isArray(object.items))
                        throw TypeError(".AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow.items: array expected");
                    message.items = [];
                    for (var i = 0; i < object.items.length; ++i)
                        message.items[i] = String(object.items[i]);
                }
                if (object.isHeading != null)
                    message.isHeading = Boolean(object.isHeading);
                return message;
            };

            /**
             * Creates a plain object from a AIRichResponseTableRow message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow
             * @static
             * @param {AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow} message AIRichResponseTableRow
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AIRichResponseTableRow.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.items = [];
                if (message.items && message.items.length) {
                    object.items = [];
                    for (var j = 0; j < message.items.length; ++j)
                        object.items[j] = message.items[j];
                }
                if (message.isHeading != null && message.hasOwnProperty("isHeading")) {
                    object.isHeading = message.isHeading;
                    if (options.oneofs)
                        object._isHeading = "isHeading";
                }
                return object;
            };

            /**
             * Converts this AIRichResponseTableRow to JSON.
             * @function toJSON
             * @memberof AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AIRichResponseTableRow.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AIRichResponseTableRow
             * @function getTypeUrl
             * @memberof AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AIRichResponseTableRow.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/AICommon.AIRichResponseTableMetadata.AIRichResponseTableRow";
            };

            return AIRichResponseTableRow;
        })();

        return AIRichResponseTableMetadata;
    })();

    AICommon.AIRichResponseCodeMetadata = (function() {

        /**
         * Properties of a AIRichResponseCodeMetadata.
         * @memberof AICommon
         * @interface IAIRichResponseCodeMetadata
         * @property {string|null} [codeLanguage] AIRichResponseCodeMetadata codeLanguage
         * @property {Array.<AICommon.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock>|null} [codeBlocks] AIRichResponseCodeMetadata codeBlocks
         */

        /**
         * Constructs a new AIRichResponseCodeMetadata.
         * @memberof AICommon
         * @classdesc Represents a AIRichResponseCodeMetadata.
         * @implements IAIRichResponseCodeMetadata
         * @constructor
         * @param {AICommon.IAIRichResponseCodeMetadata=} [properties] Properties to set
         */
        function AIRichResponseCodeMetadata(properties) {
            this.codeBlocks = [];
            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]];
        }

        /**
         * AIRichResponseCodeMetadata codeLanguage.
         * @member {string|null|undefined} codeLanguage
         * @memberof AICommon.AIRichResponseCodeMetadata
         * @instance
         */
        AIRichResponseCodeMetadata.prototype.codeLanguage = null;

        /**
         * AIRichResponseCodeMetadata codeBlocks.
         * @member {Array.<AICommon.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock>} codeBlocks
         * @memberof AICommon.AIRichResponseCodeMetadata
         * @instance
         */
        AIRichResponseCodeMetadata.prototype.codeBlocks = $util.emptyArray;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * AIRichResponseCodeMetadata _codeLanguage.
         * @member {"codeLanguage"|undefined} _codeLanguage
         * @memberof AICommon.AIRichResponseCodeMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseCodeMetadata.prototype, "_codeLanguage", {
            get: $util.oneOfGetter($oneOfFields = ["codeLanguage"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new AIRichResponseCodeMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.AIRichResponseCodeMetadata
         * @static
         * @param {AICommon.IAIRichResponseCodeMetadata=} [properties] Properties to set
         * @returns {AICommon.AIRichResponseCodeMetadata} AIRichResponseCodeMetadata instance
         */
        AIRichResponseCodeMetadata.create = function create(properties) {
            return new AIRichResponseCodeMetadata(properties);
        };

        /**
         * Encodes the specified AIRichResponseCodeMetadata message. Does not implicitly {@link AICommon.AIRichResponseCodeMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseCodeMetadata
         * @static
         * @param {AICommon.IAIRichResponseCodeMetadata} message AIRichResponseCodeMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseCodeMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.codeLanguage != null && Object.hasOwnProperty.call(message, "codeLanguage"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.codeLanguage);
            if (message.codeBlocks != null && message.codeBlocks.length)
                for (var i = 0; i < message.codeBlocks.length; ++i)
                    $root.AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.encode(message.codeBlocks[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified AIRichResponseCodeMetadata message, length delimited. Does not implicitly {@link AICommon.AIRichResponseCodeMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.AIRichResponseCodeMetadata
         * @static
         * @param {AICommon.IAIRichResponseCodeMetadata} message AIRichResponseCodeMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseCodeMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a AIRichResponseCodeMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.AIRichResponseCodeMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.AIRichResponseCodeMetadata} AIRichResponseCodeMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseCodeMetadata.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.AICommon.AIRichResponseCodeMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.codeLanguage = reader.string();
                        break;
                    }
                case 2: {
                        if (!(message.codeBlocks && message.codeBlocks.length))
                            message.codeBlocks = [];
                        message.codeBlocks.push($root.AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a AIRichResponseCodeMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.AIRichResponseCodeMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.AIRichResponseCodeMetadata} AIRichResponseCodeMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseCodeMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a AIRichResponseCodeMetadata message.
         * @function verify
         * @memberof AICommon.AIRichResponseCodeMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIRichResponseCodeMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.codeLanguage != null && message.hasOwnProperty("codeLanguage")) {
                properties._codeLanguage = 1;
                if (!$util.isString(message.codeLanguage))
                    return "codeLanguage: string expected";
            }
            if (message.codeBlocks != null && message.hasOwnProperty("codeBlocks")) {
                if (!Array.isArray(message.codeBlocks))
                    return "codeBlocks: array expected";
                for (var i = 0; i < message.codeBlocks.length; ++i) {
                    var error = $root.AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.verify(message.codeBlocks[i]);
                    if (error)
                        return "codeBlocks." + error;
                }
            }
            return null;
        };

        /**
         * Creates a AIRichResponseCodeMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.AIRichResponseCodeMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.AIRichResponseCodeMetadata} AIRichResponseCodeMetadata
         */
        AIRichResponseCodeMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.AIRichResponseCodeMetadata)
                return object;
            var message = new $root.AICommon.AIRichResponseCodeMetadata();
            if (object.codeLanguage != null)
                message.codeLanguage = String(object.codeLanguage);
            if (object.codeBlocks) {
                if (!Array.isArray(object.codeBlocks))
                    throw TypeError(".AICommon.AIRichResponseCodeMetadata.codeBlocks: array expected");
                message.codeBlocks = [];
                for (var i = 0; i < object.codeBlocks.length; ++i) {
                    if (typeof object.codeBlocks[i] !== "object")
                        throw TypeError(".AICommon.AIRichResponseCodeMetadata.codeBlocks: object expected");
                    message.codeBlocks[i] = $root.AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.fromObject(object.codeBlocks[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a AIRichResponseCodeMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIRichResponseCodeMetadata
         * @static
         * @param {AICommon.AIRichResponseCodeMetadata} message AIRichResponseCodeMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIRichResponseCodeMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.codeBlocks = [];
            if (message.codeLanguage != null && message.hasOwnProperty("codeLanguage")) {
                object.codeLanguage = message.codeLanguage;
                if (options.oneofs)
                    object._codeLanguage = "codeLanguage";
            }
            if (message.codeBlocks && message.codeBlocks.length) {
                object.codeBlocks = [];
                for (var j = 0; j < message.codeBlocks.length; ++j)
                    object.codeBlocks[j] = $root.AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.toObject(message.codeBlocks[j], options);
            }
            return object;
        };

        /**
         * Converts this AIRichResponseCodeMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.AIRichResponseCodeMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        AIRichResponseCodeMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for AIRichResponseCodeMetadata
         * @function getTypeUrl
         * @memberof AICommon.AIRichResponseCodeMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        AIRichResponseCodeMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.AIRichResponseCodeMetadata";
        };

        AIRichResponseCodeMetadata.AIRichResponseCodeBlock = (function() {

            /**
             * Properties of a AIRichResponseCodeBlock.
             * @memberof AICommon.AIRichResponseCodeMetadata
             * @interface IAIRichResponseCodeBlock
             * @property {AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType|null} [highlightType] AIRichResponseCodeBlock highlightType
             * @property {string|null} [codeContent] AIRichResponseCodeBlock codeContent
             */

            /**
             * Constructs a new AIRichResponseCodeBlock.
             * @memberof AICommon.AIRichResponseCodeMetadata
             * @classdesc Represents a AIRichResponseCodeBlock.
             * @implements IAIRichResponseCodeBlock
             * @constructor
             * @param {AICommon.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock=} [properties] Properties to set
             */
            function AIRichResponseCodeBlock(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]];
            }

            /**
             * AIRichResponseCodeBlock highlightType.
             * @member {AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType|null|undefined} highlightType
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @instance
             */
            AIRichResponseCodeBlock.prototype.highlightType = null;

            /**
             * AIRichResponseCodeBlock codeContent.
             * @member {string|null|undefined} codeContent
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @instance
             */
            AIRichResponseCodeBlock.prototype.codeContent = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * AIRichResponseCodeBlock _highlightType.
             * @member {"highlightType"|undefined} _highlightType
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @instance
             */
            Object.defineProperty(AIRichResponseCodeBlock.prototype, "_highlightType", {
                get: $util.oneOfGetter($oneOfFields = ["highlightType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AIRichResponseCodeBlock _codeContent.
             * @member {"codeContent"|undefined} _codeContent
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @instance
             */
            Object.defineProperty(AIRichResponseCodeBlock.prototype, "_codeContent", {
                get: $util.oneOfGetter($oneOfFields = ["codeContent"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new AIRichResponseCodeBlock instance using the specified properties.
             * @function create
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @static
             * @param {AICommon.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock=} [properties] Properties to set
             * @returns {AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock} AIRichResponseCodeBlock instance
             */
            AIRichResponseCodeBlock.create = function create(properties) {
                return new AIRichResponseCodeBlock(properties);
            };

            /**
             * Encodes the specified AIRichResponseCodeBlock message. Does not implicitly {@link AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.verify|verify} messages.
             * @function encode
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @static
             * @param {AICommon.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock} message AIRichResponseCodeBlock message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIRichResponseCodeBlock.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.highlightType != null && Object.hasOwnProperty.call(message, "highlightType"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.highlightType);
                if (message.codeContent != null && Object.hasOwnProperty.call(message, "codeContent"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.codeContent);
                return writer;
            };

            /**
             * Encodes the specified AIRichResponseCodeBlock message, length delimited. Does not implicitly {@link AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.verify|verify} messages.
             * @function encodeDelimited
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @static
             * @param {AICommon.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock} message AIRichResponseCodeBlock message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIRichResponseCodeBlock.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a AIRichResponseCodeBlock message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock} AIRichResponseCodeBlock
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AIRichResponseCodeBlock.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.AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.highlightType = reader.int32();
                            break;
                        }
                    case 2: {
                            message.codeContent = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a AIRichResponseCodeBlock message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock} AIRichResponseCodeBlock
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AIRichResponseCodeBlock.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a AIRichResponseCodeBlock message.
             * @function verify
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AIRichResponseCodeBlock.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.highlightType != null && message.hasOwnProperty("highlightType")) {
                    properties._highlightType = 1;
                    switch (message.highlightType) {
                    default:
                        return "highlightType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                        break;
                    }
                }
                if (message.codeContent != null && message.hasOwnProperty("codeContent")) {
                    properties._codeContent = 1;
                    if (!$util.isString(message.codeContent))
                        return "codeContent: string expected";
                }
                return null;
            };

            /**
             * Creates a AIRichResponseCodeBlock message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock} AIRichResponseCodeBlock
             */
            AIRichResponseCodeBlock.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock)
                    return object;
                var message = new $root.AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock();
                switch (object.highlightType) {
                default:
                    if (typeof object.highlightType === "number") {
                        message.highlightType = object.highlightType;
                        break;
                    }
                    break;
                case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT":
                case 0:
                    message.highlightType = 0;
                    break;
                case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD":
                case 1:
                    message.highlightType = 1;
                    break;
                case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD":
                case 2:
                    message.highlightType = 2;
                    break;
                case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING":
                case 3:
                    message.highlightType = 3;
                    break;
                case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER":
                case 4:
                    message.highlightType = 4;
                    break;
                case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT":
                case 5:
                    message.highlightType = 5;
                    break;
                }
                if (object.codeContent != null)
                    message.codeContent = String(object.codeContent);
                return message;
            };

            /**
             * Creates a plain object from a AIRichResponseCodeBlock message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @static
             * @param {AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock} message AIRichResponseCodeBlock
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AIRichResponseCodeBlock.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.highlightType != null && message.hasOwnProperty("highlightType")) {
                    object.highlightType = options.enums === String ? $root.AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType[message.highlightType] === undefined ? message.highlightType : $root.AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType[message.highlightType] : message.highlightType;
                    if (options.oneofs)
                        object._highlightType = "highlightType";
                }
                if (message.codeContent != null && message.hasOwnProperty("codeContent")) {
                    object.codeContent = message.codeContent;
                    if (options.oneofs)
                        object._codeContent = "codeContent";
                }
                return object;
            };

            /**
             * Converts this AIRichResponseCodeBlock to JSON.
             * @function toJSON
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AIRichResponseCodeBlock.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AIRichResponseCodeBlock
             * @function getTypeUrl
             * @memberof AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AIRichResponseCodeBlock.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeBlock";
            };

            return AIRichResponseCodeBlock;
        })();

        /**
         * AIRichResponseCodeHighlightType enum.
         * @name AICommon.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType
         * @enum {number}
         * @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT=0 AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT value
         * @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD=1 AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD value
         * @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD=2 AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD value
         * @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING=3 AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING value
         * @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER=4 AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER value
         * @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT=5 AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT value
         */
        AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT"] = 0;
            values[valuesById[1] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD"] = 1;
            values[valuesById[2] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD"] = 2;
            values[valuesById[3] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING"] = 3;
            values[valuesById[4] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER"] = 4;
            values[valuesById[5] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT"] = 5;
            return values;
        })();

        return AIRichResponseCodeMetadata;
    })();

    AICommon.AIRichResponseInlineImageMetadata = (function() {

        /**
         * Properties of a AIRichResponseInlineImageMetadata.
         * @memberof AICommon
         * @interface IAIRichResponseInlineImageMetadata
         * @property {AICommon.IAIRichResponseImageURL|null} [imageUrl] AIRichResponseInlineImageMetadata imageUrl
         * @property {string|null} [imageText] AIRichResponseInlineImageMetadata imageText
         * @property {AICommon.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment|null} [alignment] AIRichResponseInlineImageMetadata alignment
         * @property {string|null} [tapLinkUrl] AIRichResponseInlineImageMetadata tapLinkUrl
         */

        /**
         * Constructs a new AIRichResponseInlineImageMetadata.
         * @memberof AICommon
         * @classdesc Represents a AIRichResponseInlineImageMetadata.
         * @implements IAIRichResponseInlineImageMetadata
         * @constructor
         * @param {AICommon.IAIRichResponseInlineImageMetadata=} [properties] Properties to set
         */
        function AIRichResponseInlineImageMetadata(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]];
        }

        /**
         * AIRichResponseInlineImageMetadata imageUrl.
         * @member {AICommon.IAIRichResponseImageURL|null|undefined} imageUrl
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @instance
         */
        AIRichResponseInlineImageMetadata.prototype.imageUrl = null;

        /**
         * AIRichResponseInlineImageMetadata imageText.
         * @member {string|null|undefined} imageText
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @instance
         */
        AIRichResponseInlineImageMetadata.prototype.imageText = null;

        /**
         * AIRichResponseInlineImageMetadata alignment.
         * @member {AICommon.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment|null|undefined} alignment
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @instance
         */
        AIRichResponseInlineImageMetadata.prototype.alignment = null;

        /**
         * AIRichResponseInlineImageMetadata tapLinkUrl.
         * @member {string|null|undefined} tapLinkUrl
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @instance
         */
        AIRichResponseInlineImageMetadata.prototype.tapLinkUrl = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * AIRichResponseInlineImageMetadata _imageUrl.
         * @member {"imageUrl"|undefined} _imageUrl
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseInlineImageMetadata.prototype, "_imageUrl", {
            get: $util.oneOfGetter($oneOfFields = ["imageUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseInlineImageMetadata _imageText.
         * @member {"imageText"|undefined} _imageText
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseInlineImageMetadata.prototype, "_imageText", {
            get: $util.oneOfGetter($oneOfFields = ["imageText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseInlineImageMetadata _alignment.
         * @member {"alignment"|undefined} _alignment
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseInlineImageMetadata.prototype, "_alignment", {
            get: $util.oneOfGetter($oneOfFields = ["alignment"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseInlineImageMetadata _tapLinkUrl.
         * @member {"tapLinkUrl"|undefined} _tapLinkUrl
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseInlineImageMetadata.prototype, "_tapLinkUrl", {
            get: $util.oneOfGetter($oneOfFields = ["tapLinkUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new AIRichResponseInlineImageMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @static
         * @param {AICommon.IAIRichResponseInlineImageMetadata=} [properties] Properties to set
         * @returns {AICommon.AIRichResponseInlineImageMetadata} AIRichResponseInlineImageMetadata instance
         */
        AIRichResponseInlineImageMetadata.create = function create(properties) {
            return new AIRichResponseInlineImageMetadata(properties);
        };

        /**
         * Encodes the specified AIRichResponseInlineImageMetadata message. Does not implicitly {@link AICommon.AIRichResponseInlineImageMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @static
         * @param {AICommon.IAIRichResponseInlineImageMetadata} message AIRichResponseInlineImageMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseInlineImageMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.imageUrl != null && Object.hasOwnProperty.call(message, "imageUrl"))
                $root.AICommon.AIRichResponseImageURL.encode(message.imageUrl, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.imageText != null && Object.hasOwnProperty.call(message, "imageText"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.imageText);
            if (message.alignment != null && Object.hasOwnProperty.call(message, "alignment"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.alignment);
            if (message.tapLinkUrl != null && Object.hasOwnProperty.call(message, "tapLinkUrl"))
                writer.uint32(/* id 4, wireType 2 =*/34).string(message.tapLinkUrl);
            return writer;
        };

        /**
         * Encodes the specified AIRichResponseInlineImageMetadata message, length delimited. Does not implicitly {@link AICommon.AIRichResponseInlineImageMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @static
         * @param {AICommon.IAIRichResponseInlineImageMetadata} message AIRichResponseInlineImageMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseInlineImageMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a AIRichResponseInlineImageMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.AIRichResponseInlineImageMetadata} AIRichResponseInlineImageMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseInlineImageMetadata.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.AICommon.AIRichResponseInlineImageMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.imageUrl = $root.AICommon.AIRichResponseImageURL.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.imageText = reader.string();
                        break;
                    }
                case 3: {
                        message.alignment = reader.int32();
                        break;
                    }
                case 4: {
                        message.tapLinkUrl = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a AIRichResponseInlineImageMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.AIRichResponseInlineImageMetadata} AIRichResponseInlineImageMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseInlineImageMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a AIRichResponseInlineImageMetadata message.
         * @function verify
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIRichResponseInlineImageMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.imageUrl != null && message.hasOwnProperty("imageUrl")) {
                properties._imageUrl = 1;
                {
                    var error = $root.AICommon.AIRichResponseImageURL.verify(message.imageUrl);
                    if (error)
                        return "imageUrl." + error;
                }
            }
            if (message.imageText != null && message.hasOwnProperty("imageText")) {
                properties._imageText = 1;
                if (!$util.isString(message.imageText))
                    return "imageText: string expected";
            }
            if (message.alignment != null && message.hasOwnProperty("alignment")) {
                properties._alignment = 1;
                switch (message.alignment) {
                default:
                    return "alignment: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            }
            if (message.tapLinkUrl != null && message.hasOwnProperty("tapLinkUrl")) {
                properties._tapLinkUrl = 1;
                if (!$util.isString(message.tapLinkUrl))
                    return "tapLinkUrl: string expected";
            }
            return null;
        };

        /**
         * Creates a AIRichResponseInlineImageMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.AIRichResponseInlineImageMetadata} AIRichResponseInlineImageMetadata
         */
        AIRichResponseInlineImageMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.AIRichResponseInlineImageMetadata)
                return object;
            var message = new $root.AICommon.AIRichResponseInlineImageMetadata();
            if (object.imageUrl != null) {
                if (typeof object.imageUrl !== "object")
                    throw TypeError(".AICommon.AIRichResponseInlineImageMetadata.imageUrl: object expected");
                message.imageUrl = $root.AICommon.AIRichResponseImageURL.fromObject(object.imageUrl);
            }
            if (object.imageText != null)
                message.imageText = String(object.imageText);
            switch (object.alignment) {
            default:
                if (typeof object.alignment === "number") {
                    message.alignment = object.alignment;
                    break;
                }
                break;
            case "AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED":
            case 0:
                message.alignment = 0;
                break;
            case "AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED":
            case 1:
                message.alignment = 1;
                break;
            case "AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED":
            case 2:
                message.alignment = 2;
                break;
            }
            if (object.tapLinkUrl != null)
                message.tapLinkUrl = String(object.tapLinkUrl);
            return message;
        };

        /**
         * Creates a plain object from a AIRichResponseInlineImageMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @static
         * @param {AICommon.AIRichResponseInlineImageMetadata} message AIRichResponseInlineImageMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIRichResponseInlineImageMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.imageUrl != null && message.hasOwnProperty("imageUrl")) {
                object.imageUrl = $root.AICommon.AIRichResponseImageURL.toObject(message.imageUrl, options);
                if (options.oneofs)
                    object._imageUrl = "imageUrl";
            }
            if (message.imageText != null && message.hasOwnProperty("imageText")) {
                object.imageText = message.imageText;
                if (options.oneofs)
                    object._imageText = "imageText";
            }
            if (message.alignment != null && message.hasOwnProperty("alignment")) {
                object.alignment = options.enums === String ? $root.AICommon.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment[message.alignment] === undefined ? message.alignment : $root.AICommon.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment[message.alignment] : message.alignment;
                if (options.oneofs)
                    object._alignment = "alignment";
            }
            if (message.tapLinkUrl != null && message.hasOwnProperty("tapLinkUrl")) {
                object.tapLinkUrl = message.tapLinkUrl;
                if (options.oneofs)
                    object._tapLinkUrl = "tapLinkUrl";
            }
            return object;
        };

        /**
         * Converts this AIRichResponseInlineImageMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        AIRichResponseInlineImageMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for AIRichResponseInlineImageMetadata
         * @function getTypeUrl
         * @memberof AICommon.AIRichResponseInlineImageMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        AIRichResponseInlineImageMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.AIRichResponseInlineImageMetadata";
        };

        /**
         * AIRichResponseImageAlignment enum.
         * @name AICommon.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment
         * @enum {number}
         * @property {number} AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED=0 AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED value
         * @property {number} AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED=1 AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED value
         * @property {number} AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED=2 AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED value
         */
        AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED"] = 0;
            values[valuesById[1] = "AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED"] = 1;
            values[valuesById[2] = "AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED"] = 2;
            return values;
        })();

        return AIRichResponseInlineImageMetadata;
    })();

    AICommon.AIRichResponseGridImageMetadata = (function() {

        /**
         * Properties of a AIRichResponseGridImageMetadata.
         * @memberof AICommon
         * @interface IAIRichResponseGridImageMetadata
         * @property {AICommon.IAIRichResponseImageURL|null} [gridImageUrl] AIRichResponseGridImageMetadata gridImageUrl
         * @property {Array.<AICommon.IAIRichResponseImageURL>|null} [imageUrls] AIRichResponseGridImageMetadata imageUrls
         */

        /**
         * Constructs a new AIRichResponseGridImageMetadata.
         * @memberof AICommon
         * @classdesc Represents a AIRichResponseGridImageMetadata.
         * @implements IAIRichResponseGridImageMetadata
         * @constructor
         * @param {AICommon.IAIRichResponseGridImageMetadata=} [properties] Properties to set
         */
        function AIRichResponseGridImageMetadata(properties) {
            this.imageUrls = [];
            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]];
        }

        /**
         * AIRichResponseGridImageMetadata gridImageUrl.
         * @member {AICommon.IAIRichResponseImageURL|null|undefined} gridImageUrl
         * @memberof AICommon.AIRichResponseGridImageMetadata
         * @instance
         */
        AIRichResponseGridImageMetadata.prototype.gridImageUrl = null;

        /**
         * AIRichResponseGridImageMetadata imageUrls.
         * @member {Array.<AICommon.IAIRichResponseImageURL>} imageUrls
         * @memberof AICommon.AIRichResponseGridImageMetadata
         * @instance
         */
        AIRichResponseGridImageMetadata.prototype.imageUrls = $util.emptyArray;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * AIRichResponseGridImageMetadata _gridImageUrl.
         * @member {"gridImageUrl"|undefined} _gridImageUrl
         * @memberof AICommon.AIRichResponseGridImageMetadata
         * @instance
         */
        Object.defineProperty(AIRichResponseGridImageMetadata.prototype, "_gridImageUrl", {
            get: $util.oneOfGetter($oneOfFields = ["gridImageUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new AIRichResponseGridImageMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.AIRichResponseGridImageMetadata
         * @static
         * @param {AICommon.IAIRichResponseGridImageMetadata=} [properties] Properties to set
         * @returns {AICommon.AIRichResponseGridImageMetadata} AIRichResponseGridImageMetadata instance
         */
        AIRichResponseGridImageMetadata.create = function create(properties) {
            return new AIRichResponseGridImageMetadata(properties);
        };

        /**
         * Encodes the specified AIRichResponseGridImageMetadata message. Does not implicitly {@link AICommon.AIRichResponseGridImageMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseGridImageMetadata
         * @static
         * @param {AICommon.IAIRichResponseGridImageMetadata} message AIRichResponseGridImageMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseGridImageMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.gridImageUrl != null && Object.hasOwnProperty.call(message, "gridImageUrl"))
                $root.AICommon.AIRichResponseImageURL.encode(message.gridImageUrl, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.imageUrls != null && message.imageUrls.length)
                for (var i = 0; i < message.imageUrls.length; ++i)
                    $root.AICommon.AIRichResponseImageURL.encode(message.imageUrls[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified AIRichResponseGridImageMetadata message, length delimited. Does not implicitly {@link AICommon.AIRichResponseGridImageMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.AIRichResponseGridImageMetadata
         * @static
         * @param {AICommon.IAIRichResponseGridImageMetadata} message AIRichResponseGridImageMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseGridImageMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a AIRichResponseGridImageMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.AIRichResponseGridImageMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.AIRichResponseGridImageMetadata} AIRichResponseGridImageMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseGridImageMetadata.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.AICommon.AIRichResponseGridImageMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.gridImageUrl = $root.AICommon.AIRichResponseImageURL.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        if (!(message.imageUrls && message.imageUrls.length))
                            message.imageUrls = [];
                        message.imageUrls.push($root.AICommon.AIRichResponseImageURL.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a AIRichResponseGridImageMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.AIRichResponseGridImageMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.AIRichResponseGridImageMetadata} AIRichResponseGridImageMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseGridImageMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a AIRichResponseGridImageMetadata message.
         * @function verify
         * @memberof AICommon.AIRichResponseGridImageMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIRichResponseGridImageMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.gridImageUrl != null && message.hasOwnProperty("gridImageUrl")) {
                properties._gridImageUrl = 1;
                {
                    var error = $root.AICommon.AIRichResponseImageURL.verify(message.gridImageUrl);
                    if (error)
                        return "gridImageUrl." + error;
                }
            }
            if (message.imageUrls != null && message.hasOwnProperty("imageUrls")) {
                if (!Array.isArray(message.imageUrls))
                    return "imageUrls: array expected";
                for (var i = 0; i < message.imageUrls.length; ++i) {
                    var error = $root.AICommon.AIRichResponseImageURL.verify(message.imageUrls[i]);
                    if (error)
                        return "imageUrls." + error;
                }
            }
            return null;
        };

        /**
         * Creates a AIRichResponseGridImageMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.AIRichResponseGridImageMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.AIRichResponseGridImageMetadata} AIRichResponseGridImageMetadata
         */
        AIRichResponseGridImageMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.AIRichResponseGridImageMetadata)
                return object;
            var message = new $root.AICommon.AIRichResponseGridImageMetadata();
            if (object.gridImageUrl != null) {
                if (typeof object.gridImageUrl !== "object")
                    throw TypeError(".AICommon.AIRichResponseGridImageMetadata.gridImageUrl: object expected");
                message.gridImageUrl = $root.AICommon.AIRichResponseImageURL.fromObject(object.gridImageUrl);
            }
            if (object.imageUrls) {
                if (!Array.isArray(object.imageUrls))
                    throw TypeError(".AICommon.AIRichResponseGridImageMetadata.imageUrls: array expected");
                message.imageUrls = [];
                for (var i = 0; i < object.imageUrls.length; ++i) {
                    if (typeof object.imageUrls[i] !== "object")
                        throw TypeError(".AICommon.AIRichResponseGridImageMetadata.imageUrls: object expected");
                    message.imageUrls[i] = $root.AICommon.AIRichResponseImageURL.fromObject(object.imageUrls[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a AIRichResponseGridImageMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIRichResponseGridImageMetadata
         * @static
         * @param {AICommon.AIRichResponseGridImageMetadata} message AIRichResponseGridImageMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIRichResponseGridImageMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.imageUrls = [];
            if (message.gridImageUrl != null && message.hasOwnProperty("gridImageUrl")) {
                object.gridImageUrl = $root.AICommon.AIRichResponseImageURL.toObject(message.gridImageUrl, options);
                if (options.oneofs)
                    object._gridImageUrl = "gridImageUrl";
            }
            if (message.imageUrls && message.imageUrls.length) {
                object.imageUrls = [];
                for (var j = 0; j < message.imageUrls.length; ++j)
                    object.imageUrls[j] = $root.AICommon.AIRichResponseImageURL.toObject(message.imageUrls[j], options);
            }
            return object;
        };

        /**
         * Converts this AIRichResponseGridImageMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.AIRichResponseGridImageMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        AIRichResponseGridImageMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for AIRichResponseGridImageMetadata
         * @function getTypeUrl
         * @memberof AICommon.AIRichResponseGridImageMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        AIRichResponseGridImageMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.AIRichResponseGridImageMetadata";
        };

        return AIRichResponseGridImageMetadata;
    })();

    AICommon.AIRichResponseImageURL = (function() {

        /**
         * Properties of a AIRichResponseImageURL.
         * @memberof AICommon
         * @interface IAIRichResponseImageURL
         * @property {string|null} [imagePreviewUrl] AIRichResponseImageURL imagePreviewUrl
         * @property {string|null} [imageHighResUrl] AIRichResponseImageURL imageHighResUrl
         * @property {string|null} [sourceUrl] AIRichResponseImageURL sourceUrl
         */

        /**
         * Constructs a new AIRichResponseImageURL.
         * @memberof AICommon
         * @classdesc Represents a AIRichResponseImageURL.
         * @implements IAIRichResponseImageURL
         * @constructor
         * @param {AICommon.IAIRichResponseImageURL=} [properties] Properties to set
         */
        function AIRichResponseImageURL(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]];
        }

        /**
         * AIRichResponseImageURL imagePreviewUrl.
         * @member {string|null|undefined} imagePreviewUrl
         * @memberof AICommon.AIRichResponseImageURL
         * @instance
         */
        AIRichResponseImageURL.prototype.imagePreviewUrl = null;

        /**
         * AIRichResponseImageURL imageHighResUrl.
         * @member {string|null|undefined} imageHighResUrl
         * @memberof AICommon.AIRichResponseImageURL
         * @instance
         */
        AIRichResponseImageURL.prototype.imageHighResUrl = null;

        /**
         * AIRichResponseImageURL sourceUrl.
         * @member {string|null|undefined} sourceUrl
         * @memberof AICommon.AIRichResponseImageURL
         * @instance
         */
        AIRichResponseImageURL.prototype.sourceUrl = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * AIRichResponseImageURL _imagePreviewUrl.
         * @member {"imagePreviewUrl"|undefined} _imagePreviewUrl
         * @memberof AICommon.AIRichResponseImageURL
         * @instance
         */
        Object.defineProperty(AIRichResponseImageURL.prototype, "_imagePreviewUrl", {
            get: $util.oneOfGetter($oneOfFields = ["imagePreviewUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseImageURL _imageHighResUrl.
         * @member {"imageHighResUrl"|undefined} _imageHighResUrl
         * @memberof AICommon.AIRichResponseImageURL
         * @instance
         */
        Object.defineProperty(AIRichResponseImageURL.prototype, "_imageHighResUrl", {
            get: $util.oneOfGetter($oneOfFields = ["imageHighResUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIRichResponseImageURL _sourceUrl.
         * @member {"sourceUrl"|undefined} _sourceUrl
         * @memberof AICommon.AIRichResponseImageURL
         * @instance
         */
        Object.defineProperty(AIRichResponseImageURL.prototype, "_sourceUrl", {
            get: $util.oneOfGetter($oneOfFields = ["sourceUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new AIRichResponseImageURL instance using the specified properties.
         * @function create
         * @memberof AICommon.AIRichResponseImageURL
         * @static
         * @param {AICommon.IAIRichResponseImageURL=} [properties] Properties to set
         * @returns {AICommon.AIRichResponseImageURL} AIRichResponseImageURL instance
         */
        AIRichResponseImageURL.create = function create(properties) {
            return new AIRichResponseImageURL(properties);
        };

        /**
         * Encodes the specified AIRichResponseImageURL message. Does not implicitly {@link AICommon.AIRichResponseImageURL.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIRichResponseImageURL
         * @static
         * @param {AICommon.IAIRichResponseImageURL} message AIRichResponseImageURL message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseImageURL.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.imagePreviewUrl != null && Object.hasOwnProperty.call(message, "imagePreviewUrl"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.imagePreviewUrl);
            if (message.imageHighResUrl != null && Object.hasOwnProperty.call(message, "imageHighResUrl"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.imageHighResUrl);
            if (message.sourceUrl != null && Object.hasOwnProperty.call(message, "sourceUrl"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceUrl);
            return writer;
        };

        /**
         * Encodes the specified AIRichResponseImageURL message, length delimited. Does not implicitly {@link AICommon.AIRichResponseImageURL.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.AIRichResponseImageURL
         * @static
         * @param {AICommon.IAIRichResponseImageURL} message AIRichResponseImageURL message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIRichResponseImageURL.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a AIRichResponseImageURL message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.AIRichResponseImageURL
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.AIRichResponseImageURL} AIRichResponseImageURL
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseImageURL.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.AICommon.AIRichResponseImageURL();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.imagePreviewUrl = reader.string();
                        break;
                    }
                case 2: {
                        message.imageHighResUrl = reader.string();
                        break;
                    }
                case 3: {
                        message.sourceUrl = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a AIRichResponseImageURL message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.AIRichResponseImageURL
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.AIRichResponseImageURL} AIRichResponseImageURL
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIRichResponseImageURL.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a AIRichResponseImageURL message.
         * @function verify
         * @memberof AICommon.AIRichResponseImageURL
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIRichResponseImageURL.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.imagePreviewUrl != null && message.hasOwnProperty("imagePreviewUrl")) {
                properties._imagePreviewUrl = 1;
                if (!$util.isString(message.imagePreviewUrl))
                    return "imagePreviewUrl: string expected";
            }
            if (message.imageHighResUrl != null && message.hasOwnProperty("imageHighResUrl")) {
                properties._imageHighResUrl = 1;
                if (!$util.isString(message.imageHighResUrl))
                    return "imageHighResUrl: string expected";
            }
            if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) {
                properties._sourceUrl = 1;
                if (!$util.isString(message.sourceUrl))
                    return "sourceUrl: string expected";
            }
            return null;
        };

        /**
         * Creates a AIRichResponseImageURL message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.AIRichResponseImageURL
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.AIRichResponseImageURL} AIRichResponseImageURL
         */
        AIRichResponseImageURL.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.AIRichResponseImageURL)
                return object;
            var message = new $root.AICommon.AIRichResponseImageURL();
            if (object.imagePreviewUrl != null)
                message.imagePreviewUrl = String(object.imagePreviewUrl);
            if (object.imageHighResUrl != null)
                message.imageHighResUrl = String(object.imageHighResUrl);
            if (object.sourceUrl != null)
                message.sourceUrl = String(object.sourceUrl);
            return message;
        };

        /**
         * Creates a plain object from a AIRichResponseImageURL message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIRichResponseImageURL
         * @static
         * @param {AICommon.AIRichResponseImageURL} message AIRichResponseImageURL
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIRichResponseImageURL.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.imagePreviewUrl != null && message.hasOwnProperty("imagePreviewUrl")) {
                object.imagePreviewUrl = message.imagePreviewUrl;
                if (options.oneofs)
                    object._imagePreviewUrl = "imagePreviewUrl";
            }
            if (message.imageHighResUrl != null && message.hasOwnProperty("imageHighResUrl")) {
                object.imageHighResUrl = message.imageHighResUrl;
                if (options.oneofs)
                    object._imageHighResUrl = "imageHighResUrl";
            }
            if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) {
                object.sourceUrl = message.sourceUrl;
                if (options.oneofs)
                    object._sourceUrl = "sourceUrl";
            }
            return object;
        };

        /**
         * Converts this AIRichResponseImageURL to JSON.
         * @function toJSON
         * @memberof AICommon.AIRichResponseImageURL
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        AIRichResponseImageURL.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for AIRichResponseImageURL
         * @function getTypeUrl
         * @memberof AICommon.AIRichResponseImageURL
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        AIRichResponseImageURL.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.AIRichResponseImageURL";
        };

        return AIRichResponseImageURL;
    })();

    AICommon.BotMessageSharingInfo = (function() {

        /**
         * Properties of a BotMessageSharingInfo.
         * @memberof AICommon
         * @interface IBotMessageSharingInfo
         * @property {AICommon.BotMetricsEntryPoint|null} [botEntryPointOrigin] BotMessageSharingInfo botEntryPointOrigin
         * @property {number|null} [forwardScore] BotMessageSharingInfo forwardScore
         */

        /**
         * Constructs a new BotMessageSharingInfo.
         * @memberof AICommon
         * @classdesc Represents a BotMessageSharingInfo.
         * @implements IBotMessageSharingInfo
         * @constructor
         * @param {AICommon.IBotMessageSharingInfo=} [properties] Properties to set
         */
        function BotMessageSharingInfo(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]];
        }

        /**
         * BotMessageSharingInfo botEntryPointOrigin.
         * @member {AICommon.BotMetricsEntryPoint|null|undefined} botEntryPointOrigin
         * @memberof AICommon.BotMessageSharingInfo
         * @instance
         */
        BotMessageSharingInfo.prototype.botEntryPointOrigin = null;

        /**
         * BotMessageSharingInfo forwardScore.
         * @member {number|null|undefined} forwardScore
         * @memberof AICommon.BotMessageSharingInfo
         * @instance
         */
        BotMessageSharingInfo.prototype.forwardScore = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotMessageSharingInfo _botEntryPointOrigin.
         * @member {"botEntryPointOrigin"|undefined} _botEntryPointOrigin
         * @memberof AICommon.BotMessageSharingInfo
         * @instance
         */
        Object.defineProperty(BotMessageSharingInfo.prototype, "_botEntryPointOrigin", {
            get: $util.oneOfGetter($oneOfFields = ["botEntryPointOrigin"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMessageSharingInfo _forwardScore.
         * @member {"forwardScore"|undefined} _forwardScore
         * @memberof AICommon.BotMessageSharingInfo
         * @instance
         */
        Object.defineProperty(BotMessageSharingInfo.prototype, "_forwardScore", {
            get: $util.oneOfGetter($oneOfFields = ["forwardScore"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotMessageSharingInfo instance using the specified properties.
         * @function create
         * @memberof AICommon.BotMessageSharingInfo
         * @static
         * @param {AICommon.IBotMessageSharingInfo=} [properties] Properties to set
         * @returns {AICommon.BotMessageSharingInfo} BotMessageSharingInfo instance
         */
        BotMessageSharingInfo.create = function create(properties) {
            return new BotMessageSharingInfo(properties);
        };

        /**
         * Encodes the specified BotMessageSharingInfo message. Does not implicitly {@link AICommon.BotMessageSharingInfo.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotMessageSharingInfo
         * @static
         * @param {AICommon.IBotMessageSharingInfo} message BotMessageSharingInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMessageSharingInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.botEntryPointOrigin != null && Object.hasOwnProperty.call(message, "botEntryPointOrigin"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.botEntryPointOrigin);
            if (message.forwardScore != null && Object.hasOwnProperty.call(message, "forwardScore"))
                writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.forwardScore);
            return writer;
        };

        /**
         * Encodes the specified BotMessageSharingInfo message, length delimited. Does not implicitly {@link AICommon.BotMessageSharingInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotMessageSharingInfo
         * @static
         * @param {AICommon.IBotMessageSharingInfo} message BotMessageSharingInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMessageSharingInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotMessageSharingInfo message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotMessageSharingInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotMessageSharingInfo} BotMessageSharingInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotMessageSharingInfo.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.AICommon.BotMessageSharingInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.botEntryPointOrigin = reader.int32();
                        break;
                    }
                case 2: {
                        message.forwardScore = reader.uint32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotMessageSharingInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotMessageSharingInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotMessageSharingInfo} BotMessageSharingInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotMessageSharingInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotMessageSharingInfo message.
         * @function verify
         * @memberof AICommon.BotMessageSharingInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotMessageSharingInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.botEntryPointOrigin != null && message.hasOwnProperty("botEntryPointOrigin")) {
                properties._botEntryPointOrigin = 1;
                switch (message.botEntryPointOrigin) {
                default:
                    return "botEntryPointOrigin: 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:
                case 11:
                case 12:
                case 13:
                case 14:
                case 15:
                case 16:
                case 17:
                case 18:
                case 19:
                case 20:
                case 21:
                case 22:
                case 23:
                case 24:
                case 25:
                case 26:
                case 27:
                case 28:
                case 29:
                case 30:
                case 31:
                case 32:
                case 33:
                case 34:
                case 35:
                case 36:
                case 37:
                case 38:
                    break;
                }
            }
            if (message.forwardScore != null && message.hasOwnProperty("forwardScore")) {
                properties._forwardScore = 1;
                if (!$util.isInteger(message.forwardScore))
                    return "forwardScore: integer expected";
            }
            return null;
        };

        /**
         * Creates a BotMessageSharingInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotMessageSharingInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotMessageSharingInfo} BotMessageSharingInfo
         */
        BotMessageSharingInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotMessageSharingInfo)
                return object;
            var message = new $root.AICommon.BotMessageSharingInfo();
            switch (object.botEntryPointOrigin) {
            default:
                if (typeof object.botEntryPointOrigin === "number") {
                    message.botEntryPointOrigin = object.botEntryPointOrigin;
                    break;
                }
                break;
            case "UNDEFINED_ENTRY_POINT":
            case 0:
                message.botEntryPointOrigin = 0;
                break;
            case "FAVICON":
            case 1:
                message.botEntryPointOrigin = 1;
                break;
            case "CHATLIST":
            case 2:
                message.botEntryPointOrigin = 2;
                break;
            case "AISEARCH_NULL_STATE_PAPER_PLANE":
            case 3:
                message.botEntryPointOrigin = 3;
                break;
            case "AISEARCH_NULL_STATE_SUGGESTION":
            case 4:
                message.botEntryPointOrigin = 4;
                break;
            case "AISEARCH_TYPE_AHEAD_SUGGESTION":
            case 5:
                message.botEntryPointOrigin = 5;
                break;
            case "AISEARCH_TYPE_AHEAD_PAPER_PLANE":
            case 6:
                message.botEntryPointOrigin = 6;
                break;
            case "AISEARCH_TYPE_AHEAD_RESULT_CHATLIST":
            case 7:
                message.botEntryPointOrigin = 7;
                break;
            case "AISEARCH_TYPE_AHEAD_RESULT_MESSAGES":
            case 8:
                message.botEntryPointOrigin = 8;
                break;
            case "AIVOICE_SEARCH_BAR":
            case 9:
                message.botEntryPointOrigin = 9;
                break;
            case "AIVOICE_FAVICON":
            case 10:
                message.botEntryPointOrigin = 10;
                break;
            case "AISTUDIO":
            case 11:
                message.botEntryPointOrigin = 11;
                break;
            case "DEEPLINK":
            case 12:
                message.botEntryPointOrigin = 12;
                break;
            case "NOTIFICATION":
            case 13:
                message.botEntryPointOrigin = 13;
                break;
            case "PROFILE_MESSAGE_BUTTON":
            case 14:
                message.botEntryPointOrigin = 14;
                break;
            case "FORWARD":
            case 15:
                message.botEntryPointOrigin = 15;
                break;
            case "APP_SHORTCUT":
            case 16:
                message.botEntryPointOrigin = 16;
                break;
            case "FF_FAMILY":
            case 17:
                message.botEntryPointOrigin = 17;
                break;
            case "AI_TAB":
            case 18:
                message.botEntryPointOrigin = 18;
                break;
            case "AI_HOME":
            case 19:
                message.botEntryPointOrigin = 19;
                break;
            case "AI_DEEPLINK_IMMERSIVE":
            case 20:
                message.botEntryPointOrigin = 20;
                break;
            case "AI_DEEPLINK":
            case 21:
                message.botEntryPointOrigin = 21;
                break;
            case "META_AI_CHAT_SHORTCUT_AI_STUDIO":
            case 22:
                message.botEntryPointOrigin = 22;
                break;
            case "UGC_CHAT_SHORTCUT_AI_STUDIO":
            case 23:
                message.botEntryPointOrigin = 23;
                break;
            case "NEW_CHAT_AI_STUDIO":
            case 24:
                message.botEntryPointOrigin = 24;
                break;
            case "AIVOICE_FAVICON_CALL_HISTORY":
            case 25:
                message.botEntryPointOrigin = 25;
                break;
            case "ASK_META_AI_CONTEXT_MENU":
            case 26:
                message.botEntryPointOrigin = 26;
                break;
            case "ASK_META_AI_CONTEXT_MENU_1ON1":
            case 27:
                message.botEntryPointOrigin = 27;
                break;
            case "ASK_META_AI_CONTEXT_MENU_GROUP":
            case 28:
                message.botEntryPointOrigin = 28;
                break;
            case "INVOKE_META_AI_1ON1":
            case 29:
                message.botEntryPointOrigin = 29;
                break;
            case "INVOKE_META_AI_GROUP":
            case 30:
                message.botEntryPointOrigin = 30;
                break;
            case "META_AI_FORWARD":
            case 31:
                message.botEntryPointOrigin = 31;
                break;
            case "NEW_CHAT_AI_CONTACT":
            case 32:
                message.botEntryPointOrigin = 32;
                break;
            case "MESSAGE_QUICK_ACTION_1_ON_1_CHAT":
            case 33:
                message.botEntryPointOrigin = 33;
                break;
            case "MESSAGE_QUICK_ACTION_GROUP_CHAT":
            case 34:
                message.botEntryPointOrigin = 34;
                break;
            case "ATTACHMENT_TRAY_1_ON_1_CHAT":
            case 35:
                message.botEntryPointOrigin = 35;
                break;
            case "ATTACHMENT_TRAY_GROUP_CHAT":
            case 36:
                message.botEntryPointOrigin = 36;
                break;
            case "ASK_META_AI_MEDIA_VIEWER_1ON1":
            case 37:
                message.botEntryPointOrigin = 37;
                break;
            case "ASK_META_AI_MEDIA_VIEWER_GROUP":
            case 38:
                message.botEntryPointOrigin = 38;
                break;
            }
            if (object.forwardScore != null)
                message.forwardScore = object.forwardScore >>> 0;
            return message;
        };

        /**
         * Creates a plain object from a BotMessageSharingInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotMessageSharingInfo
         * @static
         * @param {AICommon.BotMessageSharingInfo} message BotMessageSharingInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotMessageSharingInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.botEntryPointOrigin != null && message.hasOwnProperty("botEntryPointOrigin")) {
                object.botEntryPointOrigin = options.enums === String ? $root.AICommon.BotMetricsEntryPoint[message.botEntryPointOrigin] === undefined ? message.botEntryPointOrigin : $root.AICommon.BotMetricsEntryPoint[message.botEntryPointOrigin] : message.botEntryPointOrigin;
                if (options.oneofs)
                    object._botEntryPointOrigin = "botEntryPointOrigin";
            }
            if (message.forwardScore != null && message.hasOwnProperty("forwardScore")) {
                object.forwardScore = message.forwardScore;
                if (options.oneofs)
                    object._forwardScore = "forwardScore";
            }
            return object;
        };

        /**
         * Converts this BotMessageSharingInfo to JSON.
         * @function toJSON
         * @memberof AICommon.BotMessageSharingInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotMessageSharingInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotMessageSharingInfo
         * @function getTypeUrl
         * @memberof AICommon.BotMessageSharingInfo
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotMessageSharingInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotMessageSharingInfo";
        };

        return BotMessageSharingInfo;
    })();

    AICommon.ForwardedAIBotMessageInfo = (function() {

        /**
         * Properties of a ForwardedAIBotMessageInfo.
         * @memberof AICommon
         * @interface IForwardedAIBotMessageInfo
         * @property {string|null} [botName] ForwardedAIBotMessageInfo botName
         * @property {string|null} [botJid] ForwardedAIBotMessageInfo botJid
         * @property {string|null} [creatorName] ForwardedAIBotMessageInfo creatorName
         */

        /**
         * Constructs a new ForwardedAIBotMessageInfo.
         * @memberof AICommon
         * @classdesc Represents a ForwardedAIBotMessageInfo.
         * @implements IForwardedAIBotMessageInfo
         * @constructor
         * @param {AICommon.IForwardedAIBotMessageInfo=} [properties] Properties to set
         */
        function ForwardedAIBotMessageInfo(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]];
        }

        /**
         * ForwardedAIBotMessageInfo botName.
         * @member {string|null|undefined} botName
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @instance
         */
        ForwardedAIBotMessageInfo.prototype.botName = null;

        /**
         * ForwardedAIBotMessageInfo botJid.
         * @member {string|null|undefined} botJid
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @instance
         */
        ForwardedAIBotMessageInfo.prototype.botJid = null;

        /**
         * ForwardedAIBotMessageInfo creatorName.
         * @member {string|null|undefined} creatorName
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @instance
         */
        ForwardedAIBotMessageInfo.prototype.creatorName = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * ForwardedAIBotMessageInfo _botName.
         * @member {"botName"|undefined} _botName
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @instance
         */
        Object.defineProperty(ForwardedAIBotMessageInfo.prototype, "_botName", {
            get: $util.oneOfGetter($oneOfFields = ["botName"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ForwardedAIBotMessageInfo _botJid.
         * @member {"botJid"|undefined} _botJid
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @instance
         */
        Object.defineProperty(ForwardedAIBotMessageInfo.prototype, "_botJid", {
            get: $util.oneOfGetter($oneOfFields = ["botJid"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ForwardedAIBotMessageInfo _creatorName.
         * @member {"creatorName"|undefined} _creatorName
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @instance
         */
        Object.defineProperty(ForwardedAIBotMessageInfo.prototype, "_creatorName", {
            get: $util.oneOfGetter($oneOfFields = ["creatorName"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new ForwardedAIBotMessageInfo instance using the specified properties.
         * @function create
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @static
         * @param {AICommon.IForwardedAIBotMessageInfo=} [properties] Properties to set
         * @returns {AICommon.ForwardedAIBotMessageInfo} ForwardedAIBotMessageInfo instance
         */
        ForwardedAIBotMessageInfo.create = function create(properties) {
            return new ForwardedAIBotMessageInfo(properties);
        };

        /**
         * Encodes the specified ForwardedAIBotMessageInfo message. Does not implicitly {@link AICommon.ForwardedAIBotMessageInfo.verify|verify} messages.
         * @function encode
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @static
         * @param {AICommon.IForwardedAIBotMessageInfo} message ForwardedAIBotMessageInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ForwardedAIBotMessageInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.botName != null && Object.hasOwnProperty.call(message, "botName"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.botName);
            if (message.botJid != null && Object.hasOwnProperty.call(message, "botJid"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.botJid);
            if (message.creatorName != null && Object.hasOwnProperty.call(message, "creatorName"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.creatorName);
            return writer;
        };

        /**
         * Encodes the specified ForwardedAIBotMessageInfo message, length delimited. Does not implicitly {@link AICommon.ForwardedAIBotMessageInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @static
         * @param {AICommon.IForwardedAIBotMessageInfo} message ForwardedAIBotMessageInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ForwardedAIBotMessageInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ForwardedAIBotMessageInfo message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.ForwardedAIBotMessageInfo} ForwardedAIBotMessageInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ForwardedAIBotMessageInfo.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.AICommon.ForwardedAIBotMessageInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.botName = reader.string();
                        break;
                    }
                case 2: {
                        message.botJid = reader.string();
                        break;
                    }
                case 3: {
                        message.creatorName = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ForwardedAIBotMessageInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.ForwardedAIBotMessageInfo} ForwardedAIBotMessageInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ForwardedAIBotMessageInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ForwardedAIBotMessageInfo message.
         * @function verify
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ForwardedAIBotMessageInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.botName != null && message.hasOwnProperty("botName")) {
                properties._botName = 1;
                if (!$util.isString(message.botName))
                    return "botName: string expected";
            }
            if (message.botJid != null && message.hasOwnProperty("botJid")) {
                properties._botJid = 1;
                if (!$util.isString(message.botJid))
                    return "botJid: string expected";
            }
            if (message.creatorName != null && message.hasOwnProperty("creatorName")) {
                properties._creatorName = 1;
                if (!$util.isString(message.creatorName))
                    return "creatorName: string expected";
            }
            return null;
        };

        /**
         * Creates a ForwardedAIBotMessageInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.ForwardedAIBotMessageInfo} ForwardedAIBotMessageInfo
         */
        ForwardedAIBotMessageInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.ForwardedAIBotMessageInfo)
                return object;
            var message = new $root.AICommon.ForwardedAIBotMessageInfo();
            if (object.botName != null)
                message.botName = String(object.botName);
            if (object.botJid != null)
                message.botJid = String(object.botJid);
            if (object.creatorName != null)
                message.creatorName = String(object.creatorName);
            return message;
        };

        /**
         * Creates a plain object from a ForwardedAIBotMessageInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @static
         * @param {AICommon.ForwardedAIBotMessageInfo} message ForwardedAIBotMessageInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        ForwardedAIBotMessageInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.botName != null && message.hasOwnProperty("botName")) {
                object.botName = message.botName;
                if (options.oneofs)
                    object._botName = "botName";
            }
            if (message.botJid != null && message.hasOwnProperty("botJid")) {
                object.botJid = message.botJid;
                if (options.oneofs)
                    object._botJid = "botJid";
            }
            if (message.creatorName != null && message.hasOwnProperty("creatorName")) {
                object.creatorName = message.creatorName;
                if (options.oneofs)
                    object._creatorName = "creatorName";
            }
            return object;
        };

        /**
         * Converts this ForwardedAIBotMessageInfo to JSON.
         * @function toJSON
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        ForwardedAIBotMessageInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for ForwardedAIBotMessageInfo
         * @function getTypeUrl
         * @memberof AICommon.ForwardedAIBotMessageInfo
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        ForwardedAIBotMessageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.ForwardedAIBotMessageInfo";
        };

        return ForwardedAIBotMessageInfo;
    })();

    AICommon.BotFeedbackMessage = (function() {

        /**
         * Properties of a BotFeedbackMessage.
         * @memberof AICommon
         * @interface IBotFeedbackMessage
         * @property {Protocol.IMessageKey|null} [messageKey] BotFeedbackMessage messageKey
         * @property {AICommon.BotFeedbackMessage.BotFeedbackKind|null} [kind] BotFeedbackMessage kind
         * @property {string|null} [text] BotFeedbackMessage text
         * @property {number|Long|null} [kindNegative] BotFeedbackMessage kindNegative
         * @property {number|Long|null} [kindPositive] BotFeedbackMessage kindPositive
         * @property {AICommon.BotFeedbackMessage.ReportKind|null} [kindReport] BotFeedbackMessage kindReport
         * @property {AICommon.BotFeedbackMessage.ISideBySideSurveyMetadata|null} [sideBySideSurveyMetadata] BotFeedbackMessage sideBySideSurveyMetadata
         */

        /**
         * Constructs a new BotFeedbackMessage.
         * @memberof AICommon
         * @classdesc Represents a BotFeedbackMessage.
         * @implements IBotFeedbackMessage
         * @constructor
         * @param {AICommon.IBotFeedbackMessage=} [properties] Properties to set
         */
        function BotFeedbackMessage(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]];
        }

        /**
         * BotFeedbackMessage messageKey.
         * @member {Protocol.IMessageKey|null|undefined} messageKey
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        BotFeedbackMessage.prototype.messageKey = null;

        /**
         * BotFeedbackMessage kind.
         * @member {AICommon.BotFeedbackMessage.BotFeedbackKind|null|undefined} kind
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        BotFeedbackMessage.prototype.kind = null;

        /**
         * BotFeedbackMessage text.
         * @member {string|null|undefined} text
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        BotFeedbackMessage.prototype.text = null;

        /**
         * BotFeedbackMessage kindNegative.
         * @member {number|Long|null|undefined} kindNegative
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        BotFeedbackMessage.prototype.kindNegative = null;

        /**
         * BotFeedbackMessage kindPositive.
         * @member {number|Long|null|undefined} kindPositive
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        BotFeedbackMessage.prototype.kindPositive = null;

        /**
         * BotFeedbackMessage kindReport.
         * @member {AICommon.BotFeedbackMessage.ReportKind|null|undefined} kindReport
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        BotFeedbackMessage.prototype.kindReport = null;

        /**
         * BotFeedbackMessage sideBySideSurveyMetadata.
         * @member {AICommon.BotFeedbackMessage.ISideBySideSurveyMetadata|null|undefined} sideBySideSurveyMetadata
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        BotFeedbackMessage.prototype.sideBySideSurveyMetadata = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotFeedbackMessage _messageKey.
         * @member {"messageKey"|undefined} _messageKey
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        Object.defineProperty(BotFeedbackMessage.prototype, "_messageKey", {
            get: $util.oneOfGetter($oneOfFields = ["messageKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotFeedbackMessage _kind.
         * @member {"kind"|undefined} _kind
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        Object.defineProperty(BotFeedbackMessage.prototype, "_kind", {
            get: $util.oneOfGetter($oneOfFields = ["kind"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotFeedbackMessage _text.
         * @member {"text"|undefined} _text
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        Object.defineProperty(BotFeedbackMessage.prototype, "_text", {
            get: $util.oneOfGetter($oneOfFields = ["text"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotFeedbackMessage _kindNegative.
         * @member {"kindNegative"|undefined} _kindNegative
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        Object.defineProperty(BotFeedbackMessage.prototype, "_kindNegative", {
            get: $util.oneOfGetter($oneOfFields = ["kindNegative"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotFeedbackMessage _kindPositive.
         * @member {"kindPositive"|undefined} _kindPositive
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        Object.defineProperty(BotFeedbackMessage.prototype, "_kindPositive", {
            get: $util.oneOfGetter($oneOfFields = ["kindPositive"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotFeedbackMessage _kindReport.
         * @member {"kindReport"|undefined} _kindReport
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        Object.defineProperty(BotFeedbackMessage.prototype, "_kindReport", {
            get: $util.oneOfGetter($oneOfFields = ["kindReport"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotFeedbackMessage _sideBySideSurveyMetadata.
         * @member {"sideBySideSurveyMetadata"|undefined} _sideBySideSurveyMetadata
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         */
        Object.defineProperty(BotFeedbackMessage.prototype, "_sideBySideSurveyMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["sideBySideSurveyMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotFeedbackMessage instance using the specified properties.
         * @function create
         * @memberof AICommon.BotFeedbackMessage
         * @static
         * @param {AICommon.IBotFeedbackMessage=} [properties] Properties to set
         * @returns {AICommon.BotFeedbackMessage} BotFeedbackMessage instance
         */
        BotFeedbackMessage.create = function create(properties) {
            return new BotFeedbackMessage(properties);
        };

        /**
         * Encodes the specified BotFeedbackMessage message. Does not implicitly {@link AICommon.BotFeedbackMessage.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotFeedbackMessage
         * @static
         * @param {AICommon.IBotFeedbackMessage} message BotFeedbackMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotFeedbackMessage.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.messageKey != null && Object.hasOwnProperty.call(message, "messageKey"))
                $root.Protocol.MessageKey.encode(message.messageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.kind != null && Object.hasOwnProperty.call(message, "kind"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.kind);
            if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.text);
            if (message.kindNegative != null && Object.hasOwnProperty.call(message, "kindNegative"))
                writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.kindNegative);
            if (message.kindPositive != null && Object.hasOwnProperty.call(message, "kindPositive"))
                writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.kindPositive);
            if (message.kindReport != null && Object.hasOwnProperty.call(message, "kindReport"))
                writer.uint32(/* id 6, wireType 0 =*/48).int32(message.kindReport);
            if (message.sideBySideSurveyMetadata != null && Object.hasOwnProperty.call(message, "sideBySideSurveyMetadata"))
                $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.encode(message.sideBySideSurveyMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified BotFeedbackMessage message, length delimited. Does not implicitly {@link AICommon.BotFeedbackMessage.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotFeedbackMessage
         * @static
         * @param {AICommon.IBotFeedbackMessage} message BotFeedbackMessage message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotFeedbackMessage.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotFeedbackMessage message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotFeedbackMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotFeedbackMessage} BotFeedbackMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotFeedbackMessage.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.AICommon.BotFeedbackMessage();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.messageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.kind = reader.int32();
                        break;
                    }
                case 3: {
                        message.text = reader.string();
                        break;
                    }
                case 4: {
                        message.kindNegative = reader.uint64();
                        break;
                    }
                case 5: {
                        message.kindPositive = reader.uint64();
                        break;
                    }
                case 6: {
                        message.kindReport = reader.int32();
                        break;
                    }
                case 7: {
                        message.sideBySideSurveyMetadata = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotFeedbackMessage message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotFeedbackMessage
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotFeedbackMessage} BotFeedbackMessage
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotFeedbackMessage.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotFeedbackMessage message.
         * @function verify
         * @memberof AICommon.BotFeedbackMessage
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotFeedbackMessage.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.messageKey != null && message.hasOwnProperty("messageKey")) {
                properties._messageKey = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.messageKey);
                    if (error)
                        return "messageKey." + error;
                }
            }
            if (message.kind != null && message.hasOwnProperty("kind")) {
                properties._kind = 1;
                switch (message.kind) {
                default:
                    return "kind: 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:
                case 11:
                case 12:
                case 13:
                case 14:
                    break;
                }
            }
            if (message.text != null && message.hasOwnProperty("text")) {
                properties._text = 1;
                if (!$util.isString(message.text))
                    return "text: string expected";
            }
            if (message.kindNegative != null && message.hasOwnProperty("kindNegative")) {
                properties._kindNegative = 1;
                if (!$util.isInteger(message.kindNegative) && !(message.kindNegative && $util.isInteger(message.kindNegative.low) && $util.isInteger(message.kindNegative.high)))
                    return "kindNegative: integer|Long expected";
            }
            if (message.kindPositive != null && message.hasOwnProperty("kindPositive")) {
                properties._kindPositive = 1;
                if (!$util.isInteger(message.kindPositive) && !(message.kindPositive && $util.isInteger(message.kindPositive.low) && $util.isInteger(message.kindPositive.high)))
                    return "kindPositive: integer|Long expected";
            }
            if (message.kindReport != null && message.hasOwnProperty("kindReport")) {
                properties._kindReport = 1;
                switch (message.kindReport) {
                default:
                    return "kindReport: enum value expected";
                case 0:
                case 1:
                    break;
                }
            }
            if (message.sideBySideSurveyMetadata != null && message.hasOwnProperty("sideBySideSurveyMetadata")) {
                properties._sideBySideSurveyMetadata = 1;
                {
                    var error = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.verify(message.sideBySideSurveyMetadata);
                    if (error)
                        return "sideBySideSurveyMetadata." + error;
                }
            }
            return null;
        };

        /**
         * Creates a BotFeedbackMessage message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotFeedbackMessage
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotFeedbackMessage} BotFeedbackMessage
         */
        BotFeedbackMessage.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotFeedbackMessage)
                return object;
            var message = new $root.AICommon.BotFeedbackMessage();
            if (object.messageKey != null) {
                if (typeof object.messageKey !== "object")
                    throw TypeError(".AICommon.BotFeedbackMessage.messageKey: object expected");
                message.messageKey = $root.Protocol.MessageKey.fromObject(object.messageKey);
            }
            switch (object.kind) {
            default:
                if (typeof object.kind === "number") {
                    message.kind = object.kind;
                    break;
                }
                break;
            case "BOT_FEEDBACK_POSITIVE":
            case 0:
                message.kind = 0;
                break;
            case "BOT_FEEDBACK_NEGATIVE_GENERIC":
            case 1:
                message.kind = 1;
                break;
            case "BOT_FEEDBACK_NEGATIVE_HELPFUL":
            case 2:
                message.kind = 2;
                break;
            case "BOT_FEEDBACK_NEGATIVE_INTERESTING":
            case 3:
                message.kind = 3;
                break;
            case "BOT_FEEDBACK_NEGATIVE_ACCURATE":
            case 4:
                message.kind = 4;
                break;
            case "BOT_FEEDBACK_NEGATIVE_SAFE":
            case 5:
                message.kind = 5;
                break;
            case "BOT_FEEDBACK_NEGATIVE_OTHER":
            case 6:
                message.kind = 6;
                break;
            case "BOT_FEEDBACK_NEGATIVE_REFUSED":
            case 7:
                message.kind = 7;
                break;
            case "BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING":
            case 8:
                message.kind = 8;
                break;
            case "BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT":
            case 9:
                message.kind = 9;
                break;
            case "BOT_FEEDBACK_NEGATIVE_PERSONALIZED":
            case 10:
                message.kind = 10;
                break;
            case "BOT_FEEDBACK_NEGATIVE_CLARITY":
            case 11:
                message.kind = 11;
                break;
            case "BOT_FEEDBACK_NEGATIVE_DOESNT_LOOK_LIKE_THE_PERSON":
            case 12:
                message.kind = 12;
                break;
            case "BOT_FEEDBACK_NEGATIVE_HALLUCINATION_INTERNAL_ONLY":
            case 13:
                message.kind = 13;
                break;
            case "BOT_FEEDBACK_NEGATIVE":
            case 14:
                message.kind = 14;
                break;
            }
            if (object.text != null)
                message.text = String(object.text);
            if (object.kindNegative != null)
                if ($util.Long)
                    (message.kindNegative = $util.Long.fromValue(object.kindNegative)).unsigned = true;
                else if (typeof object.kindNegative === "string")
                    message.kindNegative = parseInt(object.kindNegative, 10);
                else if (typeof object.kindNegative === "number")
                    message.kindNegative = object.kindNegative;
                else if (typeof object.kindNegative === "object")
                    message.kindNegative = new $util.LongBits(object.kindNegative.low >>> 0, object.kindNegative.high >>> 0).toNumber(true);
            if (object.kindPositive != null)
                if ($util.Long)
                    (message.kindPositive = $util.Long.fromValue(object.kindPositive)).unsigned = true;
                else if (typeof object.kindPositive === "string")
                    message.kindPositive = parseInt(object.kindPositive, 10);
                else if (typeof object.kindPositive === "number")
                    message.kindPositive = object.kindPositive;
                else if (typeof object.kindPositive === "object")
                    message.kindPositive = new $util.LongBits(object.kindPositive.low >>> 0, object.kindPositive.high >>> 0).toNumber(true);
            switch (object.kindReport) {
            default:
                if (typeof object.kindReport === "number") {
                    message.kindReport = object.kindReport;
                    break;
                }
                break;
            case "NONE":
            case 0:
                message.kindReport = 0;
                break;
            case "GENERIC":
            case 1:
                message.kindReport = 1;
                break;
            }
            if (object.sideBySideSurveyMetadata != null) {
                if (typeof object.sideBySideSurveyMetadata !== "object")
                    throw TypeError(".AICommon.BotFeedbackMessage.sideBySideSurveyMetadata: object expected");
                message.sideBySideSurveyMetadata = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.fromObject(object.sideBySideSurveyMetadata);
            }
            return message;
        };

        /**
         * Creates a plain object from a BotFeedbackMessage message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotFeedbackMessage
         * @static
         * @param {AICommon.BotFeedbackMessage} message BotFeedbackMessage
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotFeedbackMessage.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.messageKey != null && message.hasOwnProperty("messageKey")) {
                object.messageKey = $root.Protocol.MessageKey.toObject(message.messageKey, options);
                if (options.oneofs)
                    object._messageKey = "messageKey";
            }
            if (message.kind != null && message.hasOwnProperty("kind")) {
                object.kind = options.enums === String ? $root.AICommon.BotFeedbackMessage.BotFeedbackKind[message.kind] === undefined ? message.kind : $root.AICommon.BotFeedbackMessage.BotFeedbackKind[message.kind] : message.kind;
                if (options.oneofs)
                    object._kind = "kind";
            }
            if (message.text != null && message.hasOwnProperty("text")) {
                object.text = message.text;
                if (options.oneofs)
                    object._text = "text";
            }
            if (message.kindNegative != null && message.hasOwnProperty("kindNegative")) {
                if (typeof message.kindNegative === "number")
                    object.kindNegative = options.longs === String ? String(message.kindNegative) : message.kindNegative;
                else
                    object.kindNegative = options.longs === String ? $util.Long.prototype.toString.call(message.kindNegative) : options.longs === Number ? new $util.LongBits(message.kindNegative.low >>> 0, message.kindNegative.high >>> 0).toNumber(true) : message.kindNegative;
                if (options.oneofs)
                    object._kindNegative = "kindNegative";
            }
            if (message.kindPositive != null && message.hasOwnProperty("kindPositive")) {
                if (typeof message.kindPositive === "number")
                    object.kindPositive = options.longs === String ? String(message.kindPositive) : message.kindPositive;
                else
                    object.kindPositive = options.longs === String ? $util.Long.prototype.toString.call(message.kindPositive) : options.longs === Number ? new $util.LongBits(message.kindPositive.low >>> 0, message.kindPositive.high >>> 0).toNumber(true) : message.kindPositive;
                if (options.oneofs)
                    object._kindPositive = "kindPositive";
            }
            if (message.kindReport != null && message.hasOwnProperty("kindReport")) {
                object.kindReport = options.enums === String ? $root.AICommon.BotFeedbackMessage.ReportKind[message.kindReport] === undefined ? message.kindReport : $root.AICommon.BotFeedbackMessage.ReportKind[message.kindReport] : message.kindReport;
                if (options.oneofs)
                    object._kindReport = "kindReport";
            }
            if (message.sideBySideSurveyMetadata != null && message.hasOwnProperty("sideBySideSurveyMetadata")) {
                object.sideBySideSurveyMetadata = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.toObject(message.sideBySideSurveyMetadata, options);
                if (options.oneofs)
                    object._sideBySideSurveyMetadata = "sideBySideSurveyMetadata";
            }
            return object;
        };

        /**
         * Converts this BotFeedbackMessage to JSON.
         * @function toJSON
         * @memberof AICommon.BotFeedbackMessage
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotFeedbackMessage.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotFeedbackMessage
         * @function getTypeUrl
         * @memberof AICommon.BotFeedbackMessage
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotFeedbackMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotFeedbackMessage";
        };

        /**
         * BotFeedbackKind enum.
         * @name AICommon.BotFeedbackMessage.BotFeedbackKind
         * @enum {number}
         * @property {number} BOT_FEEDBACK_POSITIVE=0 BOT_FEEDBACK_POSITIVE value
         * @property {number} BOT_FEEDBACK_NEGATIVE_GENERIC=1 BOT_FEEDBACK_NEGATIVE_GENERIC value
         * @property {number} BOT_FEEDBACK_NEGATIVE_HELPFUL=2 BOT_FEEDBACK_NEGATIVE_HELPFUL value
         * @property {number} BOT_FEEDBACK_NEGATIVE_INTERESTING=3 BOT_FEEDBACK_NEGATIVE_INTERESTING value
         * @property {number} BOT_FEEDBACK_NEGATIVE_ACCURATE=4 BOT_FEEDBACK_NEGATIVE_ACCURATE value
         * @property {number} BOT_FEEDBACK_NEGATIVE_SAFE=5 BOT_FEEDBACK_NEGATIVE_SAFE value
         * @property {number} BOT_FEEDBACK_NEGATIVE_OTHER=6 BOT_FEEDBACK_NEGATIVE_OTHER value
         * @property {number} BOT_FEEDBACK_NEGATIVE_REFUSED=7 BOT_FEEDBACK_NEGATIVE_REFUSED value
         * @property {number} BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING=8 BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING value
         * @property {number} BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT=9 BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT value
         * @property {number} BOT_FEEDBACK_NEGATIVE_PERSONALIZED=10 BOT_FEEDBACK_NEGATIVE_PERSONALIZED value
         * @property {number} BOT_FEEDBACK_NEGATIVE_CLARITY=11 BOT_FEEDBACK_NEGATIVE_CLARITY value
         * @property {number} BOT_FEEDBACK_NEGATIVE_DOESNT_LOOK_LIKE_THE_PERSON=12 BOT_FEEDBACK_NEGATIVE_DOESNT_LOOK_LIKE_THE_PERSON value
         * @property {number} BOT_FEEDBACK_NEGATIVE_HALLUCINATION_INTERNAL_ONLY=13 BOT_FEEDBACK_NEGATIVE_HALLUCINATION_INTERNAL_ONLY value
         * @property {number} BOT_FEEDBACK_NEGATIVE=14 BOT_FEEDBACK_NEGATIVE value
         */
        BotFeedbackMessage.BotFeedbackKind = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "BOT_FEEDBACK_POSITIVE"] = 0;
            values[valuesById[1] = "BOT_FEEDBACK_NEGATIVE_GENERIC"] = 1;
            values[valuesById[2] = "BOT_FEEDBACK_NEGATIVE_HELPFUL"] = 2;
            values[valuesById[3] = "BOT_FEEDBACK_NEGATIVE_INTERESTING"] = 3;
            values[valuesById[4] = "BOT_FEEDBACK_NEGATIVE_ACCURATE"] = 4;
            values[valuesById[5] = "BOT_FEEDBACK_NEGATIVE_SAFE"] = 5;
            values[valuesById[6] = "BOT_FEEDBACK_NEGATIVE_OTHER"] = 6;
            values[valuesById[7] = "BOT_FEEDBACK_NEGATIVE_REFUSED"] = 7;
            values[valuesById[8] = "BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING"] = 8;
            values[valuesById[9] = "BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT"] = 9;
            values[valuesById[10] = "BOT_FEEDBACK_NEGATIVE_PERSONALIZED"] = 10;
            values[valuesById[11] = "BOT_FEEDBACK_NEGATIVE_CLARITY"] = 11;
            values[valuesById[12] = "BOT_FEEDBACK_NEGATIVE_DOESNT_LOOK_LIKE_THE_PERSON"] = 12;
            values[valuesById[13] = "BOT_FEEDBACK_NEGATIVE_HALLUCINATION_INTERNAL_ONLY"] = 13;
            values[valuesById[14] = "BOT_FEEDBACK_NEGATIVE"] = 14;
            return values;
        })();

        /**
         * BotFeedbackKindMultipleNegative enum.
         * @name AICommon.BotFeedbackMessage.BotFeedbackKindMultipleNegative
         * @enum {number}
         * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_GENERIC=1 BOT_FEEDBACK_MULTIPLE_NEGATIVE_GENERIC value
         * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_HELPFUL=2 BOT_FEEDBACK_MULTIPLE_NEGATIVE_HELPFUL value
         * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_INTERESTING=4 BOT_FEEDBACK_MULTIPLE_NEGATIVE_INTERESTING value
         * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_ACCURATE=8 BOT_FEEDBACK_MULTIPLE_NEGATIVE_ACCURATE value
         * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_SAFE=16 BOT_FEEDBACK_MULTIPLE_NEGATIVE_SAFE value
         * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_OTHER=32 BOT_FEEDBACK_MULTIPLE_NEGATIVE_OTHER value
         * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_REFUSED=64 BOT_FEEDBACK_MULTIPLE_NEGATIVE_REFUSED value
         * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_VISUALLY_APPEALING=128 BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_VISUALLY_APPEALING value
         * @property {number} BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_RELEVANT_TO_TEXT=256 BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_RELEVANT_TO_TEXT value
         */
        BotFeedbackMessage.BotFeedbackKindMultipleNegative = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[1] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_GENERIC"] = 1;
            values[valuesById[2] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_HELPFUL"] = 2;
            values[valuesById[4] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_INTERESTING"] = 4;
            values[valuesById[8] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_ACCURATE"] = 8;
            values[valuesById[16] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_SAFE"] = 16;
            values[valuesById[32] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_OTHER"] = 32;
            values[valuesById[64] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_REFUSED"] = 64;
            values[valuesById[128] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_VISUALLY_APPEALING"] = 128;
            values[valuesById[256] = "BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_RELEVANT_TO_TEXT"] = 256;
            return values;
        })();

        /**
         * BotFeedbackKindMultiplePositive enum.
         * @name AICommon.BotFeedbackMessage.BotFeedbackKindMultiplePositive
         * @enum {number}
         * @property {number} BOT_FEEDBACK_MULTIPLE_POSITIVE_GENERIC=1 BOT_FEEDBACK_MULTIPLE_POSITIVE_GENERIC value
         */
        BotFeedbackMessage.BotFeedbackKindMultiplePositive = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[1] = "BOT_FEEDBACK_MULTIPLE_POSITIVE_GENERIC"] = 1;
            return values;
        })();

        /**
         * ReportKind enum.
         * @name AICommon.BotFeedbackMessage.ReportKind
         * @enum {number}
         * @property {number} NONE=0 NONE value
         * @property {number} GENERIC=1 GENERIC value
         */
        BotFeedbackMessage.ReportKind = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "NONE"] = 0;
            values[valuesById[1] = "GENERIC"] = 1;
            return values;
        })();

        BotFeedbackMessage.SideBySideSurveyMetadata = (function() {

            /**
             * Properties of a SideBySideSurveyMetadata.
             * @memberof AICommon.BotFeedbackMessage
             * @interface ISideBySideSurveyMetadata
             * @property {string|null} [selectedRequestId] SideBySideSurveyMetadata selectedRequestId
             * @property {number|null} [surveyId] SideBySideSurveyMetadata surveyId
             * @property {string|null} [simonSessionFbid] SideBySideSurveyMetadata simonSessionFbid
             * @property {string|null} [responseOtid] SideBySideSurveyMetadata responseOtid
             * @property {string|null} [responseTimestampMsString] SideBySideSurveyMetadata responseTimestampMsString
             * @property {boolean|null} [isSelectedResponsePrimary] SideBySideSurveyMetadata isSelectedResponsePrimary
             * @property {string|null} [messageIdToEdit] SideBySideSurveyMetadata messageIdToEdit
             * @property {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.ISideBySideSurveyAnalyticsData|null} [analyticsData] SideBySideSurveyMetadata analyticsData
             * @property {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.ISidebySideSurveyMetaAiAnalyticsData|null} [metaAiAnalyticsData] SideBySideSurveyMetadata metaAiAnalyticsData
             */

            /**
             * Constructs a new SideBySideSurveyMetadata.
             * @memberof AICommon.BotFeedbackMessage
             * @classdesc Represents a SideBySideSurveyMetadata.
             * @implements ISideBySideSurveyMetadata
             * @constructor
             * @param {AICommon.BotFeedbackMessage.ISideBySideSurveyMetadata=} [properties] Properties to set
             */
            function SideBySideSurveyMetadata(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]];
            }

            /**
             * SideBySideSurveyMetadata selectedRequestId.
             * @member {string|null|undefined} selectedRequestId
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.selectedRequestId = null;

            /**
             * SideBySideSurveyMetadata surveyId.
             * @member {number|null|undefined} surveyId
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.surveyId = null;

            /**
             * SideBySideSurveyMetadata simonSessionFbid.
             * @member {string|null|undefined} simonSessionFbid
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.simonSessionFbid = null;

            /**
             * SideBySideSurveyMetadata responseOtid.
             * @member {string|null|undefined} responseOtid
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.responseOtid = null;

            /**
             * SideBySideSurveyMetadata responseTimestampMsString.
             * @member {string|null|undefined} responseTimestampMsString
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.responseTimestampMsString = null;

            /**
             * SideBySideSurveyMetadata isSelectedResponsePrimary.
             * @member {boolean|null|undefined} isSelectedResponsePrimary
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.isSelectedResponsePrimary = null;

            /**
             * SideBySideSurveyMetadata messageIdToEdit.
             * @member {string|null|undefined} messageIdToEdit
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.messageIdToEdit = null;

            /**
             * SideBySideSurveyMetadata analyticsData.
             * @member {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.ISideBySideSurveyAnalyticsData|null|undefined} analyticsData
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.analyticsData = null;

            /**
             * SideBySideSurveyMetadata metaAiAnalyticsData.
             * @member {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.ISidebySideSurveyMetaAiAnalyticsData|null|undefined} metaAiAnalyticsData
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            SideBySideSurveyMetadata.prototype.metaAiAnalyticsData = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * SideBySideSurveyMetadata _selectedRequestId.
             * @member {"selectedRequestId"|undefined} _selectedRequestId
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            Object.defineProperty(SideBySideSurveyMetadata.prototype, "_selectedRequestId", {
                get: $util.oneOfGetter($oneOfFields = ["selectedRequestId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SideBySideSurveyMetadata _surveyId.
             * @member {"surveyId"|undefined} _surveyId
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            Object.defineProperty(SideBySideSurveyMetadata.prototype, "_surveyId", {
                get: $util.oneOfGetter($oneOfFields = ["surveyId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SideBySideSurveyMetadata _simonSessionFbid.
             * @member {"simonSessionFbid"|undefined} _simonSessionFbid
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            Object.defineProperty(SideBySideSurveyMetadata.prototype, "_simonSessionFbid", {
                get: $util.oneOfGetter($oneOfFields = ["simonSessionFbid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SideBySideSurveyMetadata _responseOtid.
             * @member {"responseOtid"|undefined} _responseOtid
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            Object.defineProperty(SideBySideSurveyMetadata.prototype, "_responseOtid", {
                get: $util.oneOfGetter($oneOfFields = ["responseOtid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SideBySideSurveyMetadata _responseTimestampMsString.
             * @member {"responseTimestampMsString"|undefined} _responseTimestampMsString
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            Object.defineProperty(SideBySideSurveyMetadata.prototype, "_responseTimestampMsString", {
                get: $util.oneOfGetter($oneOfFields = ["responseTimestampMsString"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SideBySideSurveyMetadata _isSelectedResponsePrimary.
             * @member {"isSelectedResponsePrimary"|undefined} _isSelectedResponsePrimary
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            Object.defineProperty(SideBySideSurveyMetadata.prototype, "_isSelectedResponsePrimary", {
                get: $util.oneOfGetter($oneOfFields = ["isSelectedResponsePrimary"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SideBySideSurveyMetadata _messageIdToEdit.
             * @member {"messageIdToEdit"|undefined} _messageIdToEdit
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            Object.defineProperty(SideBySideSurveyMetadata.prototype, "_messageIdToEdit", {
                get: $util.oneOfGetter($oneOfFields = ["messageIdToEdit"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SideBySideSurveyMetadata _analyticsData.
             * @member {"analyticsData"|undefined} _analyticsData
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            Object.defineProperty(SideBySideSurveyMetadata.prototype, "_analyticsData", {
                get: $util.oneOfGetter($oneOfFields = ["analyticsData"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SideBySideSurveyMetadata _metaAiAnalyticsData.
             * @member {"metaAiAnalyticsData"|undefined} _metaAiAnalyticsData
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             */
            Object.defineProperty(SideBySideSurveyMetadata.prototype, "_metaAiAnalyticsData", {
                get: $util.oneOfGetter($oneOfFields = ["metaAiAnalyticsData"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new SideBySideSurveyMetadata instance using the specified properties.
             * @function create
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @static
             * @param {AICommon.BotFeedbackMessage.ISideBySideSurveyMetadata=} [properties] Properties to set
             * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata} SideBySideSurveyMetadata instance
             */
            SideBySideSurveyMetadata.create = function create(properties) {
                return new SideBySideSurveyMetadata(properties);
            };

            /**
             * Encodes the specified SideBySideSurveyMetadata message. Does not implicitly {@link AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.verify|verify} messages.
             * @function encode
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @static
             * @param {AICommon.BotFeedbackMessage.ISideBySideSurveyMetadata} message SideBySideSurveyMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SideBySideSurveyMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.selectedRequestId != null && Object.hasOwnProperty.call(message, "selectedRequestId"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedRequestId);
                if (message.surveyId != null && Object.hasOwnProperty.call(message, "surveyId"))
                    writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.surveyId);
                if (message.simonSessionFbid != null && Object.hasOwnProperty.call(message, "simonSessionFbid"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.simonSessionFbid);
                if (message.responseOtid != null && Object.hasOwnProperty.call(message, "responseOtid"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.responseOtid);
                if (message.responseTimestampMsString != null && Object.hasOwnProperty.call(message, "responseTimestampMsString"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.responseTimestampMsString);
                if (message.isSelectedResponsePrimary != null && Object.hasOwnProperty.call(message, "isSelectedResponsePrimary"))
                    writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isSelectedResponsePrimary);
                if (message.messageIdToEdit != null && Object.hasOwnProperty.call(message, "messageIdToEdit"))
                    writer.uint32(/* id 7, wireType 2 =*/58).string(message.messageIdToEdit);
                if (message.analyticsData != null && Object.hasOwnProperty.call(message, "analyticsData"))
                    $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData.encode(message.analyticsData, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                if (message.metaAiAnalyticsData != null && Object.hasOwnProperty.call(message, "metaAiAnalyticsData"))
                    $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.encode(message.metaAiAnalyticsData, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified SideBySideSurveyMetadata message, length delimited. Does not implicitly {@link AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @static
             * @param {AICommon.BotFeedbackMessage.ISideBySideSurveyMetadata} message SideBySideSurveyMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SideBySideSurveyMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SideBySideSurveyMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata} SideBySideSurveyMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SideBySideSurveyMetadata.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.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.selectedRequestId = reader.string();
                            break;
                        }
                    case 2: {
                            message.surveyId = reader.uint32();
                            break;
                        }
                    case 3: {
                            message.simonSessionFbid = reader.string();
                            break;
                        }
                    case 4: {
                            message.responseOtid = reader.string();
                            break;
                        }
                    case 5: {
                            message.responseTimestampMsString = reader.string();
                            break;
                        }
                    case 6: {
                            message.isSelectedResponsePrimary = reader.bool();
                            break;
                        }
                    case 7: {
                            message.messageIdToEdit = reader.string();
                            break;
                        }
                    case 8: {
                            message.analyticsData = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData.decode(reader, reader.uint32());
                            break;
                        }
                    case 9: {
                            message.metaAiAnalyticsData = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a SideBySideSurveyMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata} SideBySideSurveyMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SideBySideSurveyMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SideBySideSurveyMetadata message.
             * @function verify
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SideBySideSurveyMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.selectedRequestId != null && message.hasOwnProperty("selectedRequestId")) {
                    properties._selectedRequestId = 1;
                    if (!$util.isString(message.selectedRequestId))
                        return "selectedRequestId: string expected";
                }
                if (message.surveyId != null && message.hasOwnProperty("surveyId")) {
                    properties._surveyId = 1;
                    if (!$util.isInteger(message.surveyId))
                        return "surveyId: integer expected";
                }
                if (message.simonSessionFbid != null && message.hasOwnProperty("simonSessionFbid")) {
                    properties._simonSessionFbid = 1;
                    if (!$util.isString(message.simonSessionFbid))
                        return "simonSessionFbid: string expected";
                }
                if (message.responseOtid != null && message.hasOwnProperty("responseOtid")) {
                    properties._responseOtid = 1;
                    if (!$util.isString(message.responseOtid))
                        return "responseOtid: string expected";
                }
                if (message.responseTimestampMsString != null && message.hasOwnProperty("responseTimestampMsString")) {
                    properties._responseTimestampMsString = 1;
                    if (!$util.isString(message.responseTimestampMsString))
                        return "responseTimestampMsString: string expected";
                }
                if (message.isSelectedResponsePrimary != null && message.hasOwnProperty("isSelectedResponsePrimary")) {
                    properties._isSelectedResponsePrimary = 1;
                    if (typeof message.isSelectedResponsePrimary !== "boolean")
                        return "isSelectedResponsePrimary: boolean expected";
                }
                if (message.messageIdToEdit != null && message.hasOwnProperty("messageIdToEdit")) {
                    properties._messageIdToEdit = 1;
                    if (!$util.isString(message.messageIdToEdit))
                        return "messageIdToEdit: string expected";
                }
                if (message.analyticsData != null && message.hasOwnProperty("analyticsData")) {
                    properties._analyticsData = 1;
                    {
                        var error = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData.verify(message.analyticsData);
                        if (error)
                            return "analyticsData." + error;
                    }
                }
                if (message.metaAiAnalyticsData != null && message.hasOwnProperty("metaAiAnalyticsData")) {
                    properties._metaAiAnalyticsData = 1;
                    {
                        var error = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.verify(message.metaAiAnalyticsData);
                        if (error)
                            return "metaAiAnalyticsData." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a SideBySideSurveyMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata} SideBySideSurveyMetadata
             */
            SideBySideSurveyMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata)
                    return object;
                var message = new $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata();
                if (object.selectedRequestId != null)
                    message.selectedRequestId = String(object.selectedRequestId);
                if (object.surveyId != null)
                    message.surveyId = object.surveyId >>> 0;
                if (object.simonSessionFbid != null)
                    message.simonSessionFbid = String(object.simonSessionFbid);
                if (object.responseOtid != null)
                    message.responseOtid = String(object.responseOtid);
                if (object.responseTimestampMsString != null)
                    message.responseTimestampMsString = String(object.responseTimestampMsString);
                if (object.isSelectedResponsePrimary != null)
                    message.isSelectedResponsePrimary = Boolean(object.isSelectedResponsePrimary);
                if (object.messageIdToEdit != null)
                    message.messageIdToEdit = String(object.messageIdToEdit);
                if (object.analyticsData != null) {
                    if (typeof object.analyticsData !== "object")
                        throw TypeError(".AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.analyticsData: object expected");
                    message.analyticsData = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData.fromObject(object.analyticsData);
                }
                if (object.metaAiAnalyticsData != null) {
                    if (typeof object.metaAiAnalyticsData !== "object")
                        throw TypeError(".AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.metaAiAnalyticsData: object expected");
                    message.metaAiAnalyticsData = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.fromObject(object.metaAiAnalyticsData);
                }
                return message;
            };

            /**
             * Creates a plain object from a SideBySideSurveyMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @static
             * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata} message SideBySideSurveyMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SideBySideSurveyMetadata.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.selectedRequestId != null && message.hasOwnProperty("selectedRequestId")) {
                    object.selectedRequestId = message.selectedRequestId;
                    if (options.oneofs)
                        object._selectedRequestId = "selectedRequestId";
                }
                if (message.surveyId != null && message.hasOwnProperty("surveyId")) {
                    object.surveyId = message.surveyId;
                    if (options.oneofs)
                        object._surveyId = "surveyId";
                }
                if (message.simonSessionFbid != null && message.hasOwnProperty("simonSessionFbid")) {
                    object.simonSessionFbid = message.simonSessionFbid;
                    if (options.oneofs)
                        object._simonSessionFbid = "simonSessionFbid";
                }
                if (message.responseOtid != null && message.hasOwnProperty("responseOtid")) {
                    object.responseOtid = message.responseOtid;
                    if (options.oneofs)
                        object._responseOtid = "responseOtid";
                }
                if (message.responseTimestampMsString != null && message.hasOwnProperty("responseTimestampMsString")) {
                    object.responseTimestampMsString = message.responseTimestampMsString;
                    if (options.oneofs)
                        object._responseTimestampMsString = "responseTimestampMsString";
                }
                if (message.isSelectedResponsePrimary != null && message.hasOwnProperty("isSelectedResponsePrimary")) {
                    object.isSelectedResponsePrimary = message.isSelectedResponsePrimary;
                    if (options.oneofs)
                        object._isSelectedResponsePrimary = "isSelectedResponsePrimary";
                }
                if (message.messageIdToEdit != null && message.hasOwnProperty("messageIdToEdit")) {
                    object.messageIdToEdit = message.messageIdToEdit;
                    if (options.oneofs)
                        object._messageIdToEdit = "messageIdToEdit";
                }
                if (message.analyticsData != null && message.hasOwnProperty("analyticsData")) {
                    object.analyticsData = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData.toObject(message.analyticsData, options);
                    if (options.oneofs)
                        object._analyticsData = "analyticsData";
                }
                if (message.metaAiAnalyticsData != null && message.hasOwnProperty("metaAiAnalyticsData")) {
                    object.metaAiAnalyticsData = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.toObject(message.metaAiAnalyticsData, options);
                    if (options.oneofs)
                        object._metaAiAnalyticsData = "metaAiAnalyticsData";
                }
                return object;
            };

            /**
             * Converts this SideBySideSurveyMetadata to JSON.
             * @function toJSON
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SideBySideSurveyMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for SideBySideSurveyMetadata
             * @function getTypeUrl
             * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            SideBySideSurveyMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/AICommon.BotFeedbackMessage.SideBySideSurveyMetadata";
            };

            SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData = (function() {

                /**
                 * Properties of a SideBySideSurveyAnalyticsData.
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
                 * @interface ISideBySideSurveyAnalyticsData
                 * @property {string|null} [tessaEvent] SideBySideSurveyAnalyticsData tessaEvent
                 * @property {string|null} [tessaSessionFbid] SideBySideSurveyAnalyticsData tessaSessionFbid
                 * @property {string|null} [simonSessionFbid] SideBySideSurveyAnalyticsData simonSessionFbid
                 */

                /**
                 * Constructs a new SideBySideSurveyAnalyticsData.
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
                 * @classdesc Represents a SideBySideSurveyAnalyticsData.
                 * @implements ISideBySideSurveyAnalyticsData
                 * @constructor
                 * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.ISideBySideSurveyAnalyticsData=} [properties] Properties to set
                 */
                function SideBySideSurveyAnalyticsData(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]];
                }

                /**
                 * SideBySideSurveyAnalyticsData tessaEvent.
                 * @member {string|null|undefined} tessaEvent
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @instance
                 */
                SideBySideSurveyAnalyticsData.prototype.tessaEvent = null;

                /**
                 * SideBySideSurveyAnalyticsData tessaSessionFbid.
                 * @member {string|null|undefined} tessaSessionFbid
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @instance
                 */
                SideBySideSurveyAnalyticsData.prototype.tessaSessionFbid = null;

                /**
                 * SideBySideSurveyAnalyticsData simonSessionFbid.
                 * @member {string|null|undefined} simonSessionFbid
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @instance
                 */
                SideBySideSurveyAnalyticsData.prototype.simonSessionFbid = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * SideBySideSurveyAnalyticsData _tessaEvent.
                 * @member {"tessaEvent"|undefined} _tessaEvent
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @instance
                 */
                Object.defineProperty(SideBySideSurveyAnalyticsData.prototype, "_tessaEvent", {
                    get: $util.oneOfGetter($oneOfFields = ["tessaEvent"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * SideBySideSurveyAnalyticsData _tessaSessionFbid.
                 * @member {"tessaSessionFbid"|undefined} _tessaSessionFbid
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @instance
                 */
                Object.defineProperty(SideBySideSurveyAnalyticsData.prototype, "_tessaSessionFbid", {
                    get: $util.oneOfGetter($oneOfFields = ["tessaSessionFbid"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * SideBySideSurveyAnalyticsData _simonSessionFbid.
                 * @member {"simonSessionFbid"|undefined} _simonSessionFbid
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @instance
                 */
                Object.defineProperty(SideBySideSurveyAnalyticsData.prototype, "_simonSessionFbid", {
                    get: $util.oneOfGetter($oneOfFields = ["simonSessionFbid"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new SideBySideSurveyAnalyticsData instance using the specified properties.
                 * @function create
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @static
                 * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.ISideBySideSurveyAnalyticsData=} [properties] Properties to set
                 * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData} SideBySideSurveyAnalyticsData instance
                 */
                SideBySideSurveyAnalyticsData.create = function create(properties) {
                    return new SideBySideSurveyAnalyticsData(properties);
                };

                /**
                 * Encodes the specified SideBySideSurveyAnalyticsData message. Does not implicitly {@link AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData.verify|verify} messages.
                 * @function encode
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @static
                 * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.ISideBySideSurveyAnalyticsData} message SideBySideSurveyAnalyticsData message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                SideBySideSurveyAnalyticsData.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.tessaEvent != null && Object.hasOwnProperty.call(message, "tessaEvent"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.tessaEvent);
                    if (message.tessaSessionFbid != null && Object.hasOwnProperty.call(message, "tessaSessionFbid"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.tessaSessionFbid);
                    if (message.simonSessionFbid != null && Object.hasOwnProperty.call(message, "simonSessionFbid"))
                        writer.uint32(/* id 3, wireType 2 =*/26).string(message.simonSessionFbid);
                    return writer;
                };

                /**
                 * Encodes the specified SideBySideSurveyAnalyticsData message, length delimited. Does not implicitly {@link AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @static
                 * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.ISideBySideSurveyAnalyticsData} message SideBySideSurveyAnalyticsData message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                SideBySideSurveyAnalyticsData.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a SideBySideSurveyAnalyticsData message from the specified reader or buffer.
                 * @function decode
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData} SideBySideSurveyAnalyticsData
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                SideBySideSurveyAnalyticsData.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.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.tessaEvent = reader.string();
                                break;
                            }
                        case 2: {
                                message.tessaSessionFbid = reader.string();
                                break;
                            }
                        case 3: {
                                message.simonSessionFbid = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a SideBySideSurveyAnalyticsData message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData} SideBySideSurveyAnalyticsData
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                SideBySideSurveyAnalyticsData.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a SideBySideSurveyAnalyticsData message.
                 * @function verify
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                SideBySideSurveyAnalyticsData.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.tessaEvent != null && message.hasOwnProperty("tessaEvent")) {
                        properties._tessaEvent = 1;
                        if (!$util.isString(message.tessaEvent))
                            return "tessaEvent: string expected";
                    }
                    if (message.tessaSessionFbid != null && message.hasOwnProperty("tessaSessionFbid")) {
                        properties._tessaSessionFbid = 1;
                        if (!$util.isString(message.tessaSessionFbid))
                            return "tessaSessionFbid: string expected";
                    }
                    if (message.simonSessionFbid != null && message.hasOwnProperty("simonSessionFbid")) {
                        properties._simonSessionFbid = 1;
                        if (!$util.isString(message.simonSessionFbid))
                            return "simonSessionFbid: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a SideBySideSurveyAnalyticsData message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData} SideBySideSurveyAnalyticsData
                 */
                SideBySideSurveyAnalyticsData.fromObject = function fromObject(object) {
                    if (object instanceof $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData)
                        return object;
                    var message = new $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData();
                    if (object.tessaEvent != null)
                        message.tessaEvent = String(object.tessaEvent);
                    if (object.tessaSessionFbid != null)
                        message.tessaSessionFbid = String(object.tessaSessionFbid);
                    if (object.simonSessionFbid != null)
                        message.simonSessionFbid = String(object.simonSessionFbid);
                    return message;
                };

                /**
                 * Creates a plain object from a SideBySideSurveyAnalyticsData message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @static
                 * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData} message SideBySideSurveyAnalyticsData
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                SideBySideSurveyAnalyticsData.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.tessaEvent != null && message.hasOwnProperty("tessaEvent")) {
                        object.tessaEvent = message.tessaEvent;
                        if (options.oneofs)
                            object._tessaEvent = "tessaEvent";
                    }
                    if (message.tessaSessionFbid != null && message.hasOwnProperty("tessaSessionFbid")) {
                        object.tessaSessionFbid = message.tessaSessionFbid;
                        if (options.oneofs)
                            object._tessaSessionFbid = "tessaSessionFbid";
                    }
                    if (message.simonSessionFbid != null && message.hasOwnProperty("simonSessionFbid")) {
                        object.simonSessionFbid = message.simonSessionFbid;
                        if (options.oneofs)
                            object._simonSessionFbid = "simonSessionFbid";
                    }
                    return object;
                };

                /**
                 * Converts this SideBySideSurveyAnalyticsData to JSON.
                 * @function toJSON
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                SideBySideSurveyAnalyticsData.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for SideBySideSurveyAnalyticsData
                 * @function getTypeUrl
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                SideBySideSurveyAnalyticsData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData";
                };

                return SideBySideSurveyAnalyticsData;
            })();

            SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData = (function() {

                /**
                 * Properties of a SidebySideSurveyMetaAiAnalyticsData.
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
                 * @interface ISidebySideSurveyMetaAiAnalyticsData
                 * @property {number|null} [surveyId] SidebySideSurveyMetaAiAnalyticsData surveyId
                 * @property {string|null} [primaryResponseId] SidebySideSurveyMetaAiAnalyticsData primaryResponseId
                 * @property {string|null} [testArmName] SidebySideSurveyMetaAiAnalyticsData testArmName
                 * @property {string|null} [timestampMsString] SidebySideSurveyMetaAiAnalyticsData timestampMsString
                 * @property {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAImpressionEventData|null} [ctaImpressionEvent] SidebySideSurveyMetaAiAnalyticsData ctaImpressionEvent
                 * @property {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAClickEventData|null} [ctaClickEvent] SidebySideSurveyMetaAiAnalyticsData ctaClickEvent
                 * @property {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCardImpressionEventData|null} [cardImpressionEvent] SidebySideSurveyMetaAiAnalyticsData cardImpressionEvent
                 * @property {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyResponseEventData|null} [responseEvent] SidebySideSurveyMetaAiAnalyticsData responseEvent
                 * @property {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyAbandonEventData|null} [abandonEvent] SidebySideSurveyMetaAiAnalyticsData abandonEvent
                 */

                /**
                 * Constructs a new SidebySideSurveyMetaAiAnalyticsData.
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata
                 * @classdesc Represents a SidebySideSurveyMetaAiAnalyticsData.
                 * @implements ISidebySideSurveyMetaAiAnalyticsData
                 * @constructor
                 * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.ISidebySideSurveyMetaAiAnalyticsData=} [properties] Properties to set
                 */
                function SidebySideSurveyMetaAiAnalyticsData(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]];
                }

                /**
                 * SidebySideSurveyMetaAiAnalyticsData surveyId.
                 * @member {number|null|undefined} surveyId
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @instance
                 */
                SidebySideSurveyMetaAiAnalyticsData.prototype.surveyId = null;

                /**
                 * SidebySideSurveyMetaAiAnalyticsData primaryResponseId.
                 * @member {string|null|undefined} primaryResponseId
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @instance
                 */
                SidebySideSurveyMetaAiAnalyticsData.prototype.primaryResponseId = null;

                /**
                 * SidebySideSurveyMetaAiAnalyticsData testArmName.
                 * @member {string|null|undefined} testArmName
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @instance
                 */
                SidebySideSurveyMetaAiAnalyticsData.prototype.testArmName = null;

                /**
                 * SidebySideSurveyMetaAiAnalyticsData timestampMsString.
                 * @member {string|null|undefined} timestampMsString
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @instance
                 */
                SidebySideSurveyMetaAiAnalyticsData.prototype.timestampMsString = null;

                /**
                 * SidebySideSurveyMetaAiAnalyticsData ctaImpressionEvent.
                 * @member {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAImpressionEventData|null|undefined} ctaImpressionEvent
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @instance
                 */
                SidebySideSurveyMetaAiAnalyticsData.prototype.ctaImpressionEvent = null;

                /**
                 * SidebySideSurveyMetaAiAnalyticsData ctaClickEvent.
                 * @member {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAClickEventData|null|undefined} ctaClickEvent
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @instance
                 */
                SidebySideSurveyMetaAiAnalyticsData.prototype.ctaClickEvent = null;

                /**
                 * SidebySideSurveyMetaAiAnalyticsData cardImpressionEvent.
                 * @member {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCardImpressionEventData|null|undefined} cardImpressionEvent
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @instance
                 */
                SidebySideSurveyMetaAiAnalyticsData.prototype.cardImpressionEvent = null;

                /**
                 * SidebySideSurveyMetaAiAnalyticsData responseEvent.
                 * @member {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyResponseEventData|null|undefined} responseEvent
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @instance
                 */
                SidebySideSurveyMetaAiAnalyticsData.prototype.responseEvent = null;

                /**
                 * SidebySideSurveyMetaAiAnalyticsData abandonEvent.
                 * @member {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyAbandonEventData|null|undefined} abandonEvent
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @instance
                 */
                SidebySideSurveyMetaAiAnalyticsData.prototype.abandonEvent = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * SidebySideSurveyMetaAiAnalyticsData _surveyId.
                 * @member {"surveyId"|undefined} _surveyId
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @instance
                 */
                Object.defineProperty(SidebySideSurveyMetaAiAnalyticsData.prototype, "_surveyId", {
                    get: $util.oneOfGetter($oneOfFields = ["surveyId"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * SidebySideSurveyMetaAiAnalyticsData _primaryResponseId.
                 * @member {"primaryResponseId"|undefined} _primaryResponseId
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @instance
                 */
                Object.defineProperty(SidebySideSurveyMetaAiAnalyticsData.prototype, "_primaryResponseId", {
                    get: $util.oneOfGetter($oneOfFields = ["primaryResponseId"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * SidebySideSurveyMetaAiAnalyticsData _testArmName.
                 * @member {"testArmName"|undefined} _testArmName
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @instance
                 */
                Object.defineProperty(SidebySideSurveyMetaAiAnalyticsData.prototype, "_testArmName", {
                    get: $util.oneOfGetter($oneOfFields = ["testArmName"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * SidebySideSurveyMetaAiAnalyticsData _timestampMsString.
                 * @member {"timestampMsString"|undefined} _timestampMsString
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @instance
                 */
                Object.defineProperty(SidebySideSurveyMetaAiAnalyticsData.prototype, "_timestampMsString", {
                    get: $util.oneOfGetter($oneOfFields = ["timestampMsString"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * SidebySideSurveyMetaAiAnalyticsData _ctaImpressionEvent.
                 * @member {"ctaImpressionEvent"|undefined} _ctaImpressionEvent
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @instance
                 */
                Object.defineProperty(SidebySideSurveyMetaAiAnalyticsData.prototype, "_ctaImpressionEvent", {
                    get: $util.oneOfGetter($oneOfFields = ["ctaImpressionEvent"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * SidebySideSurveyMetaAiAnalyticsData _ctaClickEvent.
                 * @member {"ctaClickEvent"|undefined} _ctaClickEvent
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @instance
                 */
                Object.defineProperty(SidebySideSurveyMetaAiAnalyticsData.prototype, "_ctaClickEvent", {
                    get: $util.oneOfGetter($oneOfFields = ["ctaClickEvent"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * SidebySideSurveyMetaAiAnalyticsData _cardImpressionEvent.
                 * @member {"cardImpressionEvent"|undefined} _cardImpressionEvent
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @instance
                 */
                Object.defineProperty(SidebySideSurveyMetaAiAnalyticsData.prototype, "_cardImpressionEvent", {
                    get: $util.oneOfGetter($oneOfFields = ["cardImpressionEvent"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * SidebySideSurveyMetaAiAnalyticsData _responseEvent.
                 * @member {"responseEvent"|undefined} _responseEvent
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @instance
                 */
                Object.defineProperty(SidebySideSurveyMetaAiAnalyticsData.prototype, "_responseEvent", {
                    get: $util.oneOfGetter($oneOfFields = ["responseEvent"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * SidebySideSurveyMetaAiAnalyticsData _abandonEvent.
                 * @member {"abandonEvent"|undefined} _abandonEvent
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @instance
                 */
                Object.defineProperty(SidebySideSurveyMetaAiAnalyticsData.prototype, "_abandonEvent", {
                    get: $util.oneOfGetter($oneOfFields = ["abandonEvent"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new SidebySideSurveyMetaAiAnalyticsData instance using the specified properties.
                 * @function create
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @static
                 * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.ISidebySideSurveyMetaAiAnalyticsData=} [properties] Properties to set
                 * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData} SidebySideSurveyMetaAiAnalyticsData instance
                 */
                SidebySideSurveyMetaAiAnalyticsData.create = function create(properties) {
                    return new SidebySideSurveyMetaAiAnalyticsData(properties);
                };

                /**
                 * Encodes the specified SidebySideSurveyMetaAiAnalyticsData message. Does not implicitly {@link AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.verify|verify} messages.
                 * @function encode
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @static
                 * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.ISidebySideSurveyMetaAiAnalyticsData} message SidebySideSurveyMetaAiAnalyticsData message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                SidebySideSurveyMetaAiAnalyticsData.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.surveyId != null && Object.hasOwnProperty.call(message, "surveyId"))
                        writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.surveyId);
                    if (message.primaryResponseId != null && Object.hasOwnProperty.call(message, "primaryResponseId"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.primaryResponseId);
                    if (message.testArmName != null && Object.hasOwnProperty.call(message, "testArmName"))
                        writer.uint32(/* id 3, wireType 2 =*/26).string(message.testArmName);
                    if (message.timestampMsString != null && Object.hasOwnProperty.call(message, "timestampMsString"))
                        writer.uint32(/* id 4, wireType 2 =*/34).string(message.timestampMsString);
                    if (message.ctaImpressionEvent != null && Object.hasOwnProperty.call(message, "ctaImpressionEvent"))
                        $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData.encode(message.ctaImpressionEvent, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                    if (message.ctaClickEvent != null && Object.hasOwnProperty.call(message, "ctaClickEvent"))
                        $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData.encode(message.ctaClickEvent, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                    if (message.cardImpressionEvent != null && Object.hasOwnProperty.call(message, "cardImpressionEvent"))
                        $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData.encode(message.cardImpressionEvent, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                    if (message.responseEvent != null && Object.hasOwnProperty.call(message, "responseEvent"))
                        $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData.encode(message.responseEvent, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                    if (message.abandonEvent != null && Object.hasOwnProperty.call(message, "abandonEvent"))
                        $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData.encode(message.abandonEvent, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                    return writer;
                };

                /**
                 * Encodes the specified SidebySideSurveyMetaAiAnalyticsData message, length delimited. Does not implicitly {@link AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @static
                 * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.ISidebySideSurveyMetaAiAnalyticsData} message SidebySideSurveyMetaAiAnalyticsData message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                SidebySideSurveyMetaAiAnalyticsData.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a SidebySideSurveyMetaAiAnalyticsData message from the specified reader or buffer.
                 * @function decode
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData} SidebySideSurveyMetaAiAnalyticsData
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                SidebySideSurveyMetaAiAnalyticsData.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.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.surveyId = reader.uint32();
                                break;
                            }
                        case 2: {
                                message.primaryResponseId = reader.string();
                                break;
                            }
                        case 3: {
                                message.testArmName = reader.string();
                                break;
                            }
                        case 4: {
                                message.timestampMsString = reader.string();
                                break;
                            }
                        case 5: {
                                message.ctaImpressionEvent = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData.decode(reader, reader.uint32());
                                break;
                            }
                        case 6: {
                                message.ctaClickEvent = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData.decode(reader, reader.uint32());
                                break;
                            }
                        case 7: {
                                message.cardImpressionEvent = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData.decode(reader, reader.uint32());
                                break;
                            }
                        case 8: {
                                message.responseEvent = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData.decode(reader, reader.uint32());
                                break;
                            }
                        case 9: {
                                message.abandonEvent = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a SidebySideSurveyMetaAiAnalyticsData message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData} SidebySideSurveyMetaAiAnalyticsData
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                SidebySideSurveyMetaAiAnalyticsData.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a SidebySideSurveyMetaAiAnalyticsData message.
                 * @function verify
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                SidebySideSurveyMetaAiAnalyticsData.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.surveyId != null && message.hasOwnProperty("surveyId")) {
                        properties._surveyId = 1;
                        if (!$util.isInteger(message.surveyId))
                            return "surveyId: integer expected";
                    }
                    if (message.primaryResponseId != null && message.hasOwnProperty("primaryResponseId")) {
                        properties._primaryResponseId = 1;
                        if (!$util.isString(message.primaryResponseId))
                            return "primaryResponseId: string expected";
                    }
                    if (message.testArmName != null && message.hasOwnProperty("testArmName")) {
                        properties._testArmName = 1;
                        if (!$util.isString(message.testArmName))
                            return "testArmName: string expected";
                    }
                    if (message.timestampMsString != null && message.hasOwnProperty("timestampMsString")) {
                        properties._timestampMsString = 1;
                        if (!$util.isString(message.timestampMsString))
                            return "timestampMsString: string expected";
                    }
                    if (message.ctaImpressionEvent != null && message.hasOwnProperty("ctaImpressionEvent")) {
                        properties._ctaImpressionEvent = 1;
                        {
                            var error = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData.verify(message.ctaImpressionEvent);
                            if (error)
                                return "ctaImpressionEvent." + error;
                        }
                    }
                    if (message.ctaClickEvent != null && message.hasOwnProperty("ctaClickEvent")) {
                        properties._ctaClickEvent = 1;
                        {
                            var error = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData.verify(message.ctaClickEvent);
                            if (error)
                                return "ctaClickEvent." + error;
                        }
                    }
                    if (message.cardImpressionEvent != null && message.hasOwnProperty("cardImpressionEvent")) {
                        properties._cardImpressionEvent = 1;
                        {
                            var error = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData.verify(message.cardImpressionEvent);
                            if (error)
                                return "cardImpressionEvent." + error;
                        }
                    }
                    if (message.responseEvent != null && message.hasOwnProperty("responseEvent")) {
                        properties._responseEvent = 1;
                        {
                            var error = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData.verify(message.responseEvent);
                            if (error)
                                return "responseEvent." + error;
                        }
                    }
                    if (message.abandonEvent != null && message.hasOwnProperty("abandonEvent")) {
                        properties._abandonEvent = 1;
                        {
                            var error = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData.verify(message.abandonEvent);
                            if (error)
                                return "abandonEvent." + error;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a SidebySideSurveyMetaAiAnalyticsData message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData} SidebySideSurveyMetaAiAnalyticsData
                 */
                SidebySideSurveyMetaAiAnalyticsData.fromObject = function fromObject(object) {
                    if (object instanceof $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData)
                        return object;
                    var message = new $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData();
                    if (object.surveyId != null)
                        message.surveyId = object.surveyId >>> 0;
                    if (object.primaryResponseId != null)
                        message.primaryResponseId = String(object.primaryResponseId);
                    if (object.testArmName != null)
                        message.testArmName = String(object.testArmName);
                    if (object.timestampMsString != null)
                        message.timestampMsString = String(object.timestampMsString);
                    if (object.ctaImpressionEvent != null) {
                        if (typeof object.ctaImpressionEvent !== "object")
                            throw TypeError(".AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ctaImpressionEvent: object expected");
                        message.ctaImpressionEvent = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData.fromObject(object.ctaImpressionEvent);
                    }
                    if (object.ctaClickEvent != null) {
                        if (typeof object.ctaClickEvent !== "object")
                            throw TypeError(".AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ctaClickEvent: object expected");
                        message.ctaClickEvent = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData.fromObject(object.ctaClickEvent);
                    }
                    if (object.cardImpressionEvent != null) {
                        if (typeof object.cardImpressionEvent !== "object")
                            throw TypeError(".AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.cardImpressionEvent: object expected");
                        message.cardImpressionEvent = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData.fromObject(object.cardImpressionEvent);
                    }
                    if (object.responseEvent != null) {
                        if (typeof object.responseEvent !== "object")
                            throw TypeError(".AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.responseEvent: object expected");
                        message.responseEvent = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData.fromObject(object.responseEvent);
                    }
                    if (object.abandonEvent != null) {
                        if (typeof object.abandonEvent !== "object")
                            throw TypeError(".AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.abandonEvent: object expected");
                        message.abandonEvent = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData.fromObject(object.abandonEvent);
                    }
                    return message;
                };

                /**
                 * Creates a plain object from a SidebySideSurveyMetaAiAnalyticsData message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @static
                 * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData} message SidebySideSurveyMetaAiAnalyticsData
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                SidebySideSurveyMetaAiAnalyticsData.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.surveyId != null && message.hasOwnProperty("surveyId")) {
                        object.surveyId = message.surveyId;
                        if (options.oneofs)
                            object._surveyId = "surveyId";
                    }
                    if (message.primaryResponseId != null && message.hasOwnProperty("primaryResponseId")) {
                        object.primaryResponseId = message.primaryResponseId;
                        if (options.oneofs)
                            object._primaryResponseId = "primaryResponseId";
                    }
                    if (message.testArmName != null && message.hasOwnProperty("testArmName")) {
                        object.testArmName = message.testArmName;
                        if (options.oneofs)
                            object._testArmName = "testArmName";
                    }
                    if (message.timestampMsString != null && message.hasOwnProperty("timestampMsString")) {
                        object.timestampMsString = message.timestampMsString;
                        if (options.oneofs)
                            object._timestampMsString = "timestampMsString";
                    }
                    if (message.ctaImpressionEvent != null && message.hasOwnProperty("ctaImpressionEvent")) {
                        object.ctaImpressionEvent = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData.toObject(message.ctaImpressionEvent, options);
                        if (options.oneofs)
                            object._ctaImpressionEvent = "ctaImpressionEvent";
                    }
                    if (message.ctaClickEvent != null && message.hasOwnProperty("ctaClickEvent")) {
                        object.ctaClickEvent = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData.toObject(message.ctaClickEvent, options);
                        if (options.oneofs)
                            object._ctaClickEvent = "ctaClickEvent";
                    }
                    if (message.cardImpressionEvent != null && message.hasOwnProperty("cardImpressionEvent")) {
                        object.cardImpressionEvent = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData.toObject(message.cardImpressionEvent, options);
                        if (options.oneofs)
                            object._cardImpressionEvent = "cardImpressionEvent";
                    }
                    if (message.responseEvent != null && message.hasOwnProperty("responseEvent")) {
                        object.responseEvent = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData.toObject(message.responseEvent, options);
                        if (options.oneofs)
                            object._responseEvent = "responseEvent";
                    }
                    if (message.abandonEvent != null && message.hasOwnProperty("abandonEvent")) {
                        object.abandonEvent = $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData.toObject(message.abandonEvent, options);
                        if (options.oneofs)
                            object._abandonEvent = "abandonEvent";
                    }
                    return object;
                };

                /**
                 * Converts this SidebySideSurveyMetaAiAnalyticsData to JSON.
                 * @function toJSON
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                SidebySideSurveyMetaAiAnalyticsData.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for SidebySideSurveyMetaAiAnalyticsData
                 * @function getTypeUrl
                 * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                SidebySideSurveyMetaAiAnalyticsData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData";
                };

                SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData = (function() {

                    /**
                     * Properties of a SideBySideSurveyAbandonEventData.
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                     * @interface ISideBySideSurveyAbandonEventData
                     * @property {string|null} [abandonDwellTimeMsString] SideBySideSurveyAbandonEventData abandonDwellTimeMsString
                     */

                    /**
                     * Constructs a new SideBySideSurveyAbandonEventData.
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                     * @classdesc Represents a SideBySideSurveyAbandonEventData.
                     * @implements ISideBySideSurveyAbandonEventData
                     * @constructor
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyAbandonEventData=} [properties] Properties to set
                     */
                    function SideBySideSurveyAbandonEventData(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]];
                    }

                    /**
                     * SideBySideSurveyAbandonEventData abandonDwellTimeMsString.
                     * @member {string|null|undefined} abandonDwellTimeMsString
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData
                     * @instance
                     */
                    SideBySideSurveyAbandonEventData.prototype.abandonDwellTimeMsString = null;

                    // OneOf field names bound to virtual getters and setters
                    var $oneOfFields;

                    /**
                     * SideBySideSurveyAbandonEventData _abandonDwellTimeMsString.
                     * @member {"abandonDwellTimeMsString"|undefined} _abandonDwellTimeMsString
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData
                     * @instance
                     */
                    Object.defineProperty(SideBySideSurveyAbandonEventData.prototype, "_abandonDwellTimeMsString", {
                        get: $util.oneOfGetter($oneOfFields = ["abandonDwellTimeMsString"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * Creates a new SideBySideSurveyAbandonEventData instance using the specified properties.
                     * @function create
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyAbandonEventData=} [properties] Properties to set
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData} SideBySideSurveyAbandonEventData instance
                     */
                    SideBySideSurveyAbandonEventData.create = function create(properties) {
                        return new SideBySideSurveyAbandonEventData(properties);
                    };

                    /**
                     * Encodes the specified SideBySideSurveyAbandonEventData message. Does not implicitly {@link AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData.verify|verify} messages.
                     * @function encode
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyAbandonEventData} message SideBySideSurveyAbandonEventData message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    SideBySideSurveyAbandonEventData.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.abandonDwellTimeMsString != null && Object.hasOwnProperty.call(message, "abandonDwellTimeMsString"))
                            writer.uint32(/* id 1, wireType 2 =*/10).string(message.abandonDwellTimeMsString);
                        return writer;
                    };

                    /**
                     * Encodes the specified SideBySideSurveyAbandonEventData message, length delimited. Does not implicitly {@link AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyAbandonEventData} message SideBySideSurveyAbandonEventData message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    SideBySideSurveyAbandonEventData.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a SideBySideSurveyAbandonEventData message from the specified reader or buffer.
                     * @function decode
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData} SideBySideSurveyAbandonEventData
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    SideBySideSurveyAbandonEventData.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.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            if (tag === error)
                                break;
                            switch (tag >>> 3) {
                            case 1: {
                                    message.abandonDwellTimeMsString = reader.string();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a SideBySideSurveyAbandonEventData message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData} SideBySideSurveyAbandonEventData
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    SideBySideSurveyAbandonEventData.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a SideBySideSurveyAbandonEventData message.
                     * @function verify
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    SideBySideSurveyAbandonEventData.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        var properties = {};
                        if (message.abandonDwellTimeMsString != null && message.hasOwnProperty("abandonDwellTimeMsString")) {
                            properties._abandonDwellTimeMsString = 1;
                            if (!$util.isString(message.abandonDwellTimeMsString))
                                return "abandonDwellTimeMsString: string expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a SideBySideSurveyAbandonEventData message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData} SideBySideSurveyAbandonEventData
                     */
                    SideBySideSurveyAbandonEventData.fromObject = function fromObject(object) {
                        if (object instanceof $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData)
                            return object;
                        var message = new $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData();
                        if (object.abandonDwellTimeMsString != null)
                            message.abandonDwellTimeMsString = String(object.abandonDwellTimeMsString);
                        return message;
                    };

                    /**
                     * Creates a plain object from a SideBySideSurveyAbandonEventData message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData} message SideBySideSurveyAbandonEventData
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    SideBySideSurveyAbandonEventData.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (message.abandonDwellTimeMsString != null && message.hasOwnProperty("abandonDwellTimeMsString")) {
                            object.abandonDwellTimeMsString = message.abandonDwellTimeMsString;
                            if (options.oneofs)
                                object._abandonDwellTimeMsString = "abandonDwellTimeMsString";
                        }
                        return object;
                    };

                    /**
                     * Converts this SideBySideSurveyAbandonEventData to JSON.
                     * @function toJSON
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    SideBySideSurveyAbandonEventData.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for SideBySideSurveyAbandonEventData
                     * @function getTypeUrl
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    SideBySideSurveyAbandonEventData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData";
                    };

                    return SideBySideSurveyAbandonEventData;
                })();

                SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData = (function() {

                    /**
                     * Properties of a SideBySideSurveyCTAClickEventData.
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                     * @interface ISideBySideSurveyCTAClickEventData
                     * @property {boolean|null} [isSurveyExpired] SideBySideSurveyCTAClickEventData isSurveyExpired
                     * @property {string|null} [clickDwellTimeMsString] SideBySideSurveyCTAClickEventData clickDwellTimeMsString
                     */

                    /**
                     * Constructs a new SideBySideSurveyCTAClickEventData.
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                     * @classdesc Represents a SideBySideSurveyCTAClickEventData.
                     * @implements ISideBySideSurveyCTAClickEventData
                     * @constructor
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAClickEventData=} [properties] Properties to set
                     */
                    function SideBySideSurveyCTAClickEventData(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]];
                    }

                    /**
                     * SideBySideSurveyCTAClickEventData isSurveyExpired.
                     * @member {boolean|null|undefined} isSurveyExpired
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData
                     * @instance
                     */
                    SideBySideSurveyCTAClickEventData.prototype.isSurveyExpired = null;

                    /**
                     * SideBySideSurveyCTAClickEventData clickDwellTimeMsString.
                     * @member {string|null|undefined} clickDwellTimeMsString
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData
                     * @instance
                     */
                    SideBySideSurveyCTAClickEventData.prototype.clickDwellTimeMsString = null;

                    // OneOf field names bound to virtual getters and setters
                    var $oneOfFields;

                    /**
                     * SideBySideSurveyCTAClickEventData _isSurveyExpired.
                     * @member {"isSurveyExpired"|undefined} _isSurveyExpired
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData
                     * @instance
                     */
                    Object.defineProperty(SideBySideSurveyCTAClickEventData.prototype, "_isSurveyExpired", {
                        get: $util.oneOfGetter($oneOfFields = ["isSurveyExpired"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * SideBySideSurveyCTAClickEventData _clickDwellTimeMsString.
                     * @member {"clickDwellTimeMsString"|undefined} _clickDwellTimeMsString
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData
                     * @instance
                     */
                    Object.defineProperty(SideBySideSurveyCTAClickEventData.prototype, "_clickDwellTimeMsString", {
                        get: $util.oneOfGetter($oneOfFields = ["clickDwellTimeMsString"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * Creates a new SideBySideSurveyCTAClickEventData instance using the specified properties.
                     * @function create
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAClickEventData=} [properties] Properties to set
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData} SideBySideSurveyCTAClickEventData instance
                     */
                    SideBySideSurveyCTAClickEventData.create = function create(properties) {
                        return new SideBySideSurveyCTAClickEventData(properties);
                    };

                    /**
                     * Encodes the specified SideBySideSurveyCTAClickEventData message. Does not implicitly {@link AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData.verify|verify} messages.
                     * @function encode
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAClickEventData} message SideBySideSurveyCTAClickEventData message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    SideBySideSurveyCTAClickEventData.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.isSurveyExpired != null && Object.hasOwnProperty.call(message, "isSurveyExpired"))
                            writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isSurveyExpired);
                        if (message.clickDwellTimeMsString != null && Object.hasOwnProperty.call(message, "clickDwellTimeMsString"))
                            writer.uint32(/* id 2, wireType 2 =*/18).string(message.clickDwellTimeMsString);
                        return writer;
                    };

                    /**
                     * Encodes the specified SideBySideSurveyCTAClickEventData message, length delimited. Does not implicitly {@link AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAClickEventData} message SideBySideSurveyCTAClickEventData message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    SideBySideSurveyCTAClickEventData.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a SideBySideSurveyCTAClickEventData message from the specified reader or buffer.
                     * @function decode
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData} SideBySideSurveyCTAClickEventData
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    SideBySideSurveyCTAClickEventData.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.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            if (tag === error)
                                break;
                            switch (tag >>> 3) {
                            case 1: {
                                    message.isSurveyExpired = reader.bool();
                                    break;
                                }
                            case 2: {
                                    message.clickDwellTimeMsString = reader.string();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a SideBySideSurveyCTAClickEventData message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData} SideBySideSurveyCTAClickEventData
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    SideBySideSurveyCTAClickEventData.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a SideBySideSurveyCTAClickEventData message.
                     * @function verify
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    SideBySideSurveyCTAClickEventData.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        var properties = {};
                        if (message.isSurveyExpired != null && message.hasOwnProperty("isSurveyExpired")) {
                            properties._isSurveyExpired = 1;
                            if (typeof message.isSurveyExpired !== "boolean")
                                return "isSurveyExpired: boolean expected";
                        }
                        if (message.clickDwellTimeMsString != null && message.hasOwnProperty("clickDwellTimeMsString")) {
                            properties._clickDwellTimeMsString = 1;
                            if (!$util.isString(message.clickDwellTimeMsString))
                                return "clickDwellTimeMsString: string expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a SideBySideSurveyCTAClickEventData message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData} SideBySideSurveyCTAClickEventData
                     */
                    SideBySideSurveyCTAClickEventData.fromObject = function fromObject(object) {
                        if (object instanceof $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData)
                            return object;
                        var message = new $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData();
                        if (object.isSurveyExpired != null)
                            message.isSurveyExpired = Boolean(object.isSurveyExpired);
                        if (object.clickDwellTimeMsString != null)
                            message.clickDwellTimeMsString = String(object.clickDwellTimeMsString);
                        return message;
                    };

                    /**
                     * Creates a plain object from a SideBySideSurveyCTAClickEventData message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData} message SideBySideSurveyCTAClickEventData
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    SideBySideSurveyCTAClickEventData.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (message.isSurveyExpired != null && message.hasOwnProperty("isSurveyExpired")) {
                            object.isSurveyExpired = message.isSurveyExpired;
                            if (options.oneofs)
                                object._isSurveyExpired = "isSurveyExpired";
                        }
                        if (message.clickDwellTimeMsString != null && message.hasOwnProperty("clickDwellTimeMsString")) {
                            object.clickDwellTimeMsString = message.clickDwellTimeMsString;
                            if (options.oneofs)
                                object._clickDwellTimeMsString = "clickDwellTimeMsString";
                        }
                        return object;
                    };

                    /**
                     * Converts this SideBySideSurveyCTAClickEventData to JSON.
                     * @function toJSON
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    SideBySideSurveyCTAClickEventData.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for SideBySideSurveyCTAClickEventData
                     * @function getTypeUrl
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    SideBySideSurveyCTAClickEventData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData";
                    };

                    return SideBySideSurveyCTAClickEventData;
                })();

                SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData = (function() {

                    /**
                     * Properties of a SideBySideSurveyCTAImpressionEventData.
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                     * @interface ISideBySideSurveyCTAImpressionEventData
                     * @property {boolean|null} [isSurveyExpired] SideBySideSurveyCTAImpressionEventData isSurveyExpired
                     */

                    /**
                     * Constructs a new SideBySideSurveyCTAImpressionEventData.
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                     * @classdesc Represents a SideBySideSurveyCTAImpressionEventData.
                     * @implements ISideBySideSurveyCTAImpressionEventData
                     * @constructor
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAImpressionEventData=} [properties] Properties to set
                     */
                    function SideBySideSurveyCTAImpressionEventData(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]];
                    }

                    /**
                     * SideBySideSurveyCTAImpressionEventData isSurveyExpired.
                     * @member {boolean|null|undefined} isSurveyExpired
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData
                     * @instance
                     */
                    SideBySideSurveyCTAImpressionEventData.prototype.isSurveyExpired = null;

                    // OneOf field names bound to virtual getters and setters
                    var $oneOfFields;

                    /**
                     * SideBySideSurveyCTAImpressionEventData _isSurveyExpired.
                     * @member {"isSurveyExpired"|undefined} _isSurveyExpired
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData
                     * @instance
                     */
                    Object.defineProperty(SideBySideSurveyCTAImpressionEventData.prototype, "_isSurveyExpired", {
                        get: $util.oneOfGetter($oneOfFields = ["isSurveyExpired"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * Creates a new SideBySideSurveyCTAImpressionEventData instance using the specified properties.
                     * @function create
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAImpressionEventData=} [properties] Properties to set
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData} SideBySideSurveyCTAImpressionEventData instance
                     */
                    SideBySideSurveyCTAImpressionEventData.create = function create(properties) {
                        return new SideBySideSurveyCTAImpressionEventData(properties);
                    };

                    /**
                     * Encodes the specified SideBySideSurveyCTAImpressionEventData message. Does not implicitly {@link AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData.verify|verify} messages.
                     * @function encode
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAImpressionEventData} message SideBySideSurveyCTAImpressionEventData message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    SideBySideSurveyCTAImpressionEventData.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.isSurveyExpired != null && Object.hasOwnProperty.call(message, "isSurveyExpired"))
                            writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isSurveyExpired);
                        return writer;
                    };

                    /**
                     * Encodes the specified SideBySideSurveyCTAImpressionEventData message, length delimited. Does not implicitly {@link AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAImpressionEventData} message SideBySideSurveyCTAImpressionEventData message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    SideBySideSurveyCTAImpressionEventData.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a SideBySideSurveyCTAImpressionEventData message from the specified reader or buffer.
                     * @function decode
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData} SideBySideSurveyCTAImpressionEventData
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    SideBySideSurveyCTAImpressionEventData.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.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            if (tag === error)
                                break;
                            switch (tag >>> 3) {
                            case 1: {
                                    message.isSurveyExpired = reader.bool();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a SideBySideSurveyCTAImpressionEventData message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData} SideBySideSurveyCTAImpressionEventData
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    SideBySideSurveyCTAImpressionEventData.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a SideBySideSurveyCTAImpressionEventData message.
                     * @function verify
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    SideBySideSurveyCTAImpressionEventData.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        var properties = {};
                        if (message.isSurveyExpired != null && message.hasOwnProperty("isSurveyExpired")) {
                            properties._isSurveyExpired = 1;
                            if (typeof message.isSurveyExpired !== "boolean")
                                return "isSurveyExpired: boolean expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a SideBySideSurveyCTAImpressionEventData message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData} SideBySideSurveyCTAImpressionEventData
                     */
                    SideBySideSurveyCTAImpressionEventData.fromObject = function fromObject(object) {
                        if (object instanceof $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData)
                            return object;
                        var message = new $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData();
                        if (object.isSurveyExpired != null)
                            message.isSurveyExpired = Boolean(object.isSurveyExpired);
                        return message;
                    };

                    /**
                     * Creates a plain object from a SideBySideSurveyCTAImpressionEventData message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData} message SideBySideSurveyCTAImpressionEventData
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    SideBySideSurveyCTAImpressionEventData.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (message.isSurveyExpired != null && message.hasOwnProperty("isSurveyExpired")) {
                            object.isSurveyExpired = message.isSurveyExpired;
                            if (options.oneofs)
                                object._isSurveyExpired = "isSurveyExpired";
                        }
                        return object;
                    };

                    /**
                     * Converts this SideBySideSurveyCTAImpressionEventData to JSON.
                     * @function toJSON
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    SideBySideSurveyCTAImpressionEventData.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for SideBySideSurveyCTAImpressionEventData
                     * @function getTypeUrl
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    SideBySideSurveyCTAImpressionEventData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData";
                    };

                    return SideBySideSurveyCTAImpressionEventData;
                })();

                SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData = (function() {

                    /**
                     * Properties of a SideBySideSurveyCardImpressionEventData.
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                     * @interface ISideBySideSurveyCardImpressionEventData
                     */

                    /**
                     * Constructs a new SideBySideSurveyCardImpressionEventData.
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                     * @classdesc Represents a SideBySideSurveyCardImpressionEventData.
                     * @implements ISideBySideSurveyCardImpressionEventData
                     * @constructor
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCardImpressionEventData=} [properties] Properties to set
                     */
                    function SideBySideSurveyCardImpressionEventData(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]];
                    }

                    /**
                     * Creates a new SideBySideSurveyCardImpressionEventData instance using the specified properties.
                     * @function create
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCardImpressionEventData=} [properties] Properties to set
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData} SideBySideSurveyCardImpressionEventData instance
                     */
                    SideBySideSurveyCardImpressionEventData.create = function create(properties) {
                        return new SideBySideSurveyCardImpressionEventData(properties);
                    };

                    /**
                     * Encodes the specified SideBySideSurveyCardImpressionEventData message. Does not implicitly {@link AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData.verify|verify} messages.
                     * @function encode
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCardImpressionEventData} message SideBySideSurveyCardImpressionEventData message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    SideBySideSurveyCardImpressionEventData.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        return writer;
                    };

                    /**
                     * Encodes the specified SideBySideSurveyCardImpressionEventData message, length delimited. Does not implicitly {@link AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCardImpressionEventData} message SideBySideSurveyCardImpressionEventData message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    SideBySideSurveyCardImpressionEventData.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a SideBySideSurveyCardImpressionEventData message from the specified reader or buffer.
                     * @function decode
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData} SideBySideSurveyCardImpressionEventData
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    SideBySideSurveyCardImpressionEventData.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.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            if (tag === error)
                                break;
                            switch (tag >>> 3) {
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a SideBySideSurveyCardImpressionEventData message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData} SideBySideSurveyCardImpressionEventData
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    SideBySideSurveyCardImpressionEventData.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a SideBySideSurveyCardImpressionEventData message.
                     * @function verify
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    SideBySideSurveyCardImpressionEventData.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        return null;
                    };

                    /**
                     * Creates a SideBySideSurveyCardImpressionEventData message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData} SideBySideSurveyCardImpressionEventData
                     */
                    SideBySideSurveyCardImpressionEventData.fromObject = function fromObject(object) {
                        if (object instanceof $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData)
                            return object;
                        return new $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData();
                    };

                    /**
                     * Creates a plain object from a SideBySideSurveyCardImpressionEventData message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData} message SideBySideSurveyCardImpressionEventData
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    SideBySideSurveyCardImpressionEventData.toObject = function toObject() {
                        return {};
                    };

                    /**
                     * Converts this SideBySideSurveyCardImpressionEventData to JSON.
                     * @function toJSON
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    SideBySideSurveyCardImpressionEventData.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for SideBySideSurveyCardImpressionEventData
                     * @function getTypeUrl
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    SideBySideSurveyCardImpressionEventData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData";
                    };

                    return SideBySideSurveyCardImpressionEventData;
                })();

                SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData = (function() {

                    /**
                     * Properties of a SideBySideSurveyResponseEventData.
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                     * @interface ISideBySideSurveyResponseEventData
                     * @property {string|null} [responseDwellTimeMsString] SideBySideSurveyResponseEventData responseDwellTimeMsString
                     * @property {string|null} [selectedResponseId] SideBySideSurveyResponseEventData selectedResponseId
                     */

                    /**
                     * Constructs a new SideBySideSurveyResponseEventData.
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData
                     * @classdesc Represents a SideBySideSurveyResponseEventData.
                     * @implements ISideBySideSurveyResponseEventData
                     * @constructor
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyResponseEventData=} [properties] Properties to set
                     */
                    function SideBySideSurveyResponseEventData(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]];
                    }

                    /**
                     * SideBySideSurveyResponseEventData responseDwellTimeMsString.
                     * @member {string|null|undefined} responseDwellTimeMsString
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData
                     * @instance
                     */
                    SideBySideSurveyResponseEventData.prototype.responseDwellTimeMsString = null;

                    /**
                     * SideBySideSurveyResponseEventData selectedResponseId.
                     * @member {string|null|undefined} selectedResponseId
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData
                     * @instance
                     */
                    SideBySideSurveyResponseEventData.prototype.selectedResponseId = null;

                    // OneOf field names bound to virtual getters and setters
                    var $oneOfFields;

                    /**
                     * SideBySideSurveyResponseEventData _responseDwellTimeMsString.
                     * @member {"responseDwellTimeMsString"|undefined} _responseDwellTimeMsString
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData
                     * @instance
                     */
                    Object.defineProperty(SideBySideSurveyResponseEventData.prototype, "_responseDwellTimeMsString", {
                        get: $util.oneOfGetter($oneOfFields = ["responseDwellTimeMsString"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * SideBySideSurveyResponseEventData _selectedResponseId.
                     * @member {"selectedResponseId"|undefined} _selectedResponseId
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData
                     * @instance
                     */
                    Object.defineProperty(SideBySideSurveyResponseEventData.prototype, "_selectedResponseId", {
                        get: $util.oneOfGetter($oneOfFields = ["selectedResponseId"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * Creates a new SideBySideSurveyResponseEventData instance using the specified properties.
                     * @function create
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyResponseEventData=} [properties] Properties to set
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData} SideBySideSurveyResponseEventData instance
                     */
                    SideBySideSurveyResponseEventData.create = function create(properties) {
                        return new SideBySideSurveyResponseEventData(properties);
                    };

                    /**
                     * Encodes the specified SideBySideSurveyResponseEventData message. Does not implicitly {@link AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData.verify|verify} messages.
                     * @function encode
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyResponseEventData} message SideBySideSurveyResponseEventData message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    SideBySideSurveyResponseEventData.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.responseDwellTimeMsString != null && Object.hasOwnProperty.call(message, "responseDwellTimeMsString"))
                            writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseDwellTimeMsString);
                        if (message.selectedResponseId != null && Object.hasOwnProperty.call(message, "selectedResponseId"))
                            writer.uint32(/* id 2, wireType 2 =*/18).string(message.selectedResponseId);
                        return writer;
                    };

                    /**
                     * Encodes the specified SideBySideSurveyResponseEventData message, length delimited. Does not implicitly {@link AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyResponseEventData} message SideBySideSurveyResponseEventData message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    SideBySideSurveyResponseEventData.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a SideBySideSurveyResponseEventData message from the specified reader or buffer.
                     * @function decode
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData} SideBySideSurveyResponseEventData
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    SideBySideSurveyResponseEventData.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.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            if (tag === error)
                                break;
                            switch (tag >>> 3) {
                            case 1: {
                                    message.responseDwellTimeMsString = reader.string();
                                    break;
                                }
                            case 2: {
                                    message.selectedResponseId = reader.string();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };

                    /**
                     * Decodes a SideBySideSurveyResponseEventData message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData} SideBySideSurveyResponseEventData
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    SideBySideSurveyResponseEventData.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a SideBySideSurveyResponseEventData message.
                     * @function verify
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    SideBySideSurveyResponseEventData.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        var properties = {};
                        if (message.responseDwellTimeMsString != null && message.hasOwnProperty("responseDwellTimeMsString")) {
                            properties._responseDwellTimeMsString = 1;
                            if (!$util.isString(message.responseDwellTimeMsString))
                                return "responseDwellTimeMsString: string expected";
                        }
                        if (message.selectedResponseId != null && message.hasOwnProperty("selectedResponseId")) {
                            properties._selectedResponseId = 1;
                            if (!$util.isString(message.selectedResponseId))
                                return "selectedResponseId: string expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a SideBySideSurveyResponseEventData message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData} SideBySideSurveyResponseEventData
                     */
                    SideBySideSurveyResponseEventData.fromObject = function fromObject(object) {
                        if (object instanceof $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData)
                            return object;
                        var message = new $root.AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData();
                        if (object.responseDwellTimeMsString != null)
                            message.responseDwellTimeMsString = String(object.responseDwellTimeMsString);
                        if (object.selectedResponseId != null)
                            message.selectedResponseId = String(object.selectedResponseId);
                        return message;
                    };

                    /**
                     * Creates a plain object from a SideBySideSurveyResponseEventData message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData
                     * @static
                     * @param {AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData} message SideBySideSurveyResponseEventData
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    SideBySideSurveyResponseEventData.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (message.responseDwellTimeMsString != null && message.hasOwnProperty("responseDwellTimeMsString")) {
                            object.responseDwellTimeMsString = message.responseDwellTimeMsString;
                            if (options.oneofs)
                                object._responseDwellTimeMsString = "responseDwellTimeMsString";
                        }
                        if (message.selectedResponseId != null && message.hasOwnProperty("selectedResponseId")) {
                            object.selectedResponseId = message.selectedResponseId;
                            if (options.oneofs)
                                object._selectedResponseId = "selectedResponseId";
                        }
                        return object;
                    };

                    /**
                     * Converts this SideBySideSurveyResponseEventData to JSON.
                     * @function toJSON
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    SideBySideSurveyResponseEventData.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };

                    /**
                     * Gets the default type url for SideBySideSurveyResponseEventData
                     * @function getTypeUrl
                     * @memberof AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    SideBySideSurveyResponseEventData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/AICommon.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData";
                    };

                    return SideBySideSurveyResponseEventData;
                })();

                return SidebySideSurveyMetaAiAnalyticsData;
            })();

            return SideBySideSurveyMetadata;
        })();

        return BotFeedbackMessage;
    })();

    AICommon.BotGroupParticipantMetadata = (function() {

        /**
         * Properties of a BotGroupParticipantMetadata.
         * @memberof AICommon
         * @interface IBotGroupParticipantMetadata
         * @property {string|null} [botFbid] BotGroupParticipantMetadata botFbid
         */

        /**
         * Constructs a new BotGroupParticipantMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotGroupParticipantMetadata.
         * @implements IBotGroupParticipantMetadata
         * @constructor
         * @param {AICommon.IBotGroupParticipantMetadata=} [properties] Properties to set
         */
        function BotGroupParticipantMetadata(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]];
        }

        /**
         * BotGroupParticipantMetadata botFbid.
         * @member {string|null|undefined} botFbid
         * @memberof AICommon.BotGroupParticipantMetadata
         * @instance
         */
        BotGroupParticipantMetadata.prototype.botFbid = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotGroupParticipantMetadata _botFbid.
         * @member {"botFbid"|undefined} _botFbid
         * @memberof AICommon.BotGroupParticipantMetadata
         * @instance
         */
        Object.defineProperty(BotGroupParticipantMetadata.prototype, "_botFbid", {
            get: $util.oneOfGetter($oneOfFields = ["botFbid"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotGroupParticipantMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotGroupParticipantMetadata
         * @static
         * @param {AICommon.IBotGroupParticipantMetadata=} [properties] Properties to set
         * @returns {AICommon.BotGroupParticipantMetadata} BotGroupParticipantMetadata instance
         */
        BotGroupParticipantMetadata.create = function create(properties) {
            return new BotGroupParticipantMetadata(properties);
        };

        /**
         * Encodes the specified BotGroupParticipantMetadata message. Does not implicitly {@link AICommon.BotGroupParticipantMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotGroupParticipantMetadata
         * @static
         * @param {AICommon.IBotGroupParticipantMetadata} message BotGroupParticipantMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotGroupParticipantMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.botFbid != null && Object.hasOwnProperty.call(message, "botFbid"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.botFbid);
            return writer;
        };

        /**
         * Encodes the specified BotGroupParticipantMetadata message, length delimited. Does not implicitly {@link AICommon.BotGroupParticipantMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotGroupParticipantMetadata
         * @static
         * @param {AICommon.IBotGroupParticipantMetadata} message BotGroupParticipantMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotGroupParticipantMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotGroupParticipantMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotGroupParticipantMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotGroupParticipantMetadata} BotGroupParticipantMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotGroupParticipantMetadata.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.AICommon.BotGroupParticipantMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.botFbid = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotGroupParticipantMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotGroupParticipantMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotGroupParticipantMetadata} BotGroupParticipantMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotGroupParticipantMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotGroupParticipantMetadata message.
         * @function verify
         * @memberof AICommon.BotGroupParticipantMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotGroupParticipantMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.botFbid != null && message.hasOwnProperty("botFbid")) {
                properties._botFbid = 1;
                if (!$util.isString(message.botFbid))
                    return "botFbid: string expected";
            }
            return null;
        };

        /**
         * Creates a BotGroupParticipantMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotGroupParticipantMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotGroupParticipantMetadata} BotGroupParticipantMetadata
         */
        BotGroupParticipantMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotGroupParticipantMetadata)
                return object;
            var message = new $root.AICommon.BotGroupParticipantMetadata();
            if (object.botFbid != null)
                message.botFbid = String(object.botFbid);
            return message;
        };

        /**
         * Creates a plain object from a BotGroupParticipantMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotGroupParticipantMetadata
         * @static
         * @param {AICommon.BotGroupParticipantMetadata} message BotGroupParticipantMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotGroupParticipantMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.botFbid != null && message.hasOwnProperty("botFbid")) {
                object.botFbid = message.botFbid;
                if (options.oneofs)
                    object._botFbid = "botFbid";
            }
            return object;
        };

        /**
         * Converts this BotGroupParticipantMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotGroupParticipantMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotGroupParticipantMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotGroupParticipantMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotGroupParticipantMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotGroupParticipantMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotGroupParticipantMetadata";
        };

        return BotGroupParticipantMetadata;
    })();

    AICommon.BotGroupMetadata = (function() {

        /**
         * Properties of a BotGroupMetadata.
         * @memberof AICommon
         * @interface IBotGroupMetadata
         * @property {Array.<AICommon.IBotGroupParticipantMetadata>|null} [participantsMetadata] BotGroupMetadata participantsMetadata
         */

        /**
         * Constructs a new BotGroupMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotGroupMetadata.
         * @implements IBotGroupMetadata
         * @constructor
         * @param {AICommon.IBotGroupMetadata=} [properties] Properties to set
         */
        function BotGroupMetadata(properties) {
            this.participantsMetadata = [];
            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]];
        }

        /**
         * BotGroupMetadata participantsMetadata.
         * @member {Array.<AICommon.IBotGroupParticipantMetadata>} participantsMetadata
         * @memberof AICommon.BotGroupMetadata
         * @instance
         */
        BotGroupMetadata.prototype.participantsMetadata = $util.emptyArray;

        /**
         * Creates a new BotGroupMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotGroupMetadata
         * @static
         * @param {AICommon.IBotGroupMetadata=} [properties] Properties to set
         * @returns {AICommon.BotGroupMetadata} BotGroupMetadata instance
         */
        BotGroupMetadata.create = function create(properties) {
            return new BotGroupMetadata(properties);
        };

        /**
         * Encodes the specified BotGroupMetadata message. Does not implicitly {@link AICommon.BotGroupMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotGroupMetadata
         * @static
         * @param {AICommon.IBotGroupMetadata} message BotGroupMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotGroupMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.participantsMetadata != null && message.participantsMetadata.length)
                for (var i = 0; i < message.participantsMetadata.length; ++i)
                    $root.AICommon.BotGroupParticipantMetadata.encode(message.participantsMetadata[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified BotGroupMetadata message, length delimited. Does not implicitly {@link AICommon.BotGroupMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotGroupMetadata
         * @static
         * @param {AICommon.IBotGroupMetadata} message BotGroupMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotGroupMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotGroupMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotGroupMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotGroupMetadata} BotGroupMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotGroupMetadata.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.AICommon.BotGroupMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        if (!(message.participantsMetadata && message.participantsMetadata.length))
                            message.participantsMetadata = [];
                        message.participantsMetadata.push($root.AICommon.BotGroupParticipantMetadata.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotGroupMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotGroupMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotGroupMetadata} BotGroupMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotGroupMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotGroupMetadata message.
         * @function verify
         * @memberof AICommon.BotGroupMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotGroupMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.participantsMetadata != null && message.hasOwnProperty("participantsMetadata")) {
                if (!Array.isArray(message.participantsMetadata))
                    return "participantsMetadata: array expected";
                for (var i = 0; i < message.participantsMetadata.length; ++i) {
                    var error = $root.AICommon.BotGroupParticipantMetadata.verify(message.participantsMetadata[i]);
                    if (error)
                        return "participantsMetadata." + error;
                }
            }
            return null;
        };

        /**
         * Creates a BotGroupMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotGroupMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotGroupMetadata} BotGroupMetadata
         */
        BotGroupMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotGroupMetadata)
                return object;
            var message = new $root.AICommon.BotGroupMetadata();
            if (object.participantsMetadata) {
                if (!Array.isArray(object.participantsMetadata))
                    throw TypeError(".AICommon.BotGroupMetadata.participantsMetadata: array expected");
                message.participantsMetadata = [];
                for (var i = 0; i < object.participantsMetadata.length; ++i) {
                    if (typeof object.participantsMetadata[i] !== "object")
                        throw TypeError(".AICommon.BotGroupMetadata.participantsMetadata: object expected");
                    message.participantsMetadata[i] = $root.AICommon.BotGroupParticipantMetadata.fromObject(object.participantsMetadata[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a BotGroupMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotGroupMetadata
         * @static
         * @param {AICommon.BotGroupMetadata} message BotGroupMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotGroupMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.participantsMetadata = [];
            if (message.participantsMetadata && message.participantsMetadata.length) {
                object.participantsMetadata = [];
                for (var j = 0; j < message.participantsMetadata.length; ++j)
                    object.participantsMetadata[j] = $root.AICommon.BotGroupParticipantMetadata.toObject(message.participantsMetadata[j], options);
            }
            return object;
        };

        /**
         * Converts this BotGroupMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotGroupMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotGroupMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotGroupMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotGroupMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotGroupMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotGroupMetadata";
        };

        return BotGroupMetadata;
    })();

    AICommon.BotMetadata = (function() {

        /**
         * Properties of a BotMetadata.
         * @memberof AICommon
         * @interface IBotMetadata
         * @property {AICommon.IBotAvatarMetadata|null} [avatarMetadata] BotMetadata avatarMetadata
         * @property {string|null} [personaId] BotMetadata personaId
         * @property {AICommon.IBotPluginMetadata|null} [pluginMetadata] BotMetadata pluginMetadata
         * @property {AICommon.IBotSuggestedPromptMetadata|null} [suggestedPromptMetadata] BotMetadata suggestedPromptMetadata
         * @property {string|null} [invokerJid] BotMetadata invokerJid
         * @property {AICommon.IBotSessionMetadata|null} [sessionMetadata] BotMetadata sessionMetadata
         * @property {AICommon.IBotMemuMetadata|null} [memuMetadata] BotMetadata memuMetadata
         * @property {string|null} [timezone] BotMetadata timezone
         * @property {AICommon.IBotReminderMetadata|null} [reminderMetadata] BotMetadata reminderMetadata
         * @property {AICommon.IBotModelMetadata|null} [modelMetadata] BotMetadata modelMetadata
         * @property {string|null} [messageDisclaimerText] BotMetadata messageDisclaimerText
         * @property {AICommon.IBotProgressIndicatorMetadata|null} [progressIndicatorMetadata] BotMetadata progressIndicatorMetadata
         * @property {AICommon.IBotCapabilityMetadata|null} [capabilityMetadata] BotMetadata capabilityMetadata
         * @property {AICommon.IBotImagineMetadata|null} [imagineMetadata] BotMetadata imagineMetadata
         * @property {AICommon.IBotMemoryMetadata|null} [memoryMetadata] BotMetadata memoryMetadata
         * @property {AICommon.IBotRenderingMetadata|null} [renderingMetadata] BotMetadata renderingMetadata
         * @property {AICommon.IBotMetricsMetadata|null} [botMetricsMetadata] BotMetadata botMetricsMetadata
         * @property {AICommon.IBotLinkedAccountsMetadata|null} [botLinkedAccountsMetadata] BotMetadata botLinkedAccountsMetadata
         * @property {AICommon.IBotSourcesMetadata|null} [richResponseSourcesMetadata] BotMetadata richResponseSourcesMetadata
         * @property {Uint8Array|null} [aiConversationContext] BotMetadata aiConversationContext
         * @property {AICommon.IBotPromotionMessageMetadata|null} [botPromotionMessageMetadata] BotMetadata botPromotionMessageMetadata
         * @property {AICommon.IBotModeSelectionMetadata|null} [botModeSelectionMetadata] BotMetadata botModeSelectionMetadata
         * @property {AICommon.IBotQuotaMetadata|null} [botQuotaMetadata] BotMetadata botQuotaMetadata
         * @property {AICommon.IBotAgeCollectionMetadata|null} [botAgeCollectionMetadata] BotMetadata botAgeCollectionMetadata
         * @property {string|null} [conversationStarterPromptId] BotMetadata conversationStarterPromptId
         * @property {string|null} [botResponseId] BotMetadata botResponseId
         * @property {AICommon.IBotSignatureVerificationMetadata|null} [verificationMetadata] BotMetadata verificationMetadata
         * @property {AICommon.IBotUnifiedResponseMutation|null} [unifiedResponseMutation] BotMetadata unifiedResponseMutation
         * @property {AICommon.IBotMessageOriginMetadata|null} [botMessageOriginMetadata] BotMetadata botMessageOriginMetadata
         * @property {AICommon.IInThreadSurveyMetadata|null} [inThreadSurveyMetadata] BotMetadata inThreadSurveyMetadata
         * @property {AICommon.IAIThreadInfo|null} [botThreadInfo] BotMetadata botThreadInfo
         * @property {AICommon.IAIRegenerateMetadata|null} [regenerateMetadata] BotMetadata regenerateMetadata
         * @property {AICommon.ISessionTransparencyMetadata|null} [sessionTransparencyMetadata] BotMetadata sessionTransparencyMetadata
         * @property {AICommon.IBotDocumentMessageMetadata|null} [botDocumentMessageMetadata] BotMetadata botDocumentMessageMetadata
         * @property {AICommon.IBotGroupMetadata|null} [botGroupMetadata] BotMetadata botGroupMetadata
         * @property {Uint8Array|null} [internalMetadata] BotMetadata internalMetadata
         */

        /**
         * Constructs a new BotMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotMetadata.
         * @implements IBotMetadata
         * @constructor
         * @param {AICommon.IBotMetadata=} [properties] Properties to set
         */
        function BotMetadata(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]];
        }

        /**
         * BotMetadata avatarMetadata.
         * @member {AICommon.IBotAvatarMetadata|null|undefined} avatarMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.avatarMetadata = null;

        /**
         * BotMetadata personaId.
         * @member {string|null|undefined} personaId
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.personaId = null;

        /**
         * BotMetadata pluginMetadata.
         * @member {AICommon.IBotPluginMetadata|null|undefined} pluginMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.pluginMetadata = null;

        /**
         * BotMetadata suggestedPromptMetadata.
         * @member {AICommon.IBotSuggestedPromptMetadata|null|undefined} suggestedPromptMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.suggestedPromptMetadata = null;

        /**
         * BotMetadata invokerJid.
         * @member {string|null|undefined} invokerJid
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.invokerJid = null;

        /**
         * BotMetadata sessionMetadata.
         * @member {AICommon.IBotSessionMetadata|null|undefined} sessionMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.sessionMetadata = null;

        /**
         * BotMetadata memuMetadata.
         * @member {AICommon.IBotMemuMetadata|null|undefined} memuMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.memuMetadata = null;

        /**
         * BotMetadata timezone.
         * @member {string|null|undefined} timezone
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.timezone = null;

        /**
         * BotMetadata reminderMetadata.
         * @member {AICommon.IBotReminderMetadata|null|undefined} reminderMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.reminderMetadata = null;

        /**
         * BotMetadata modelMetadata.
         * @member {AICommon.IBotModelMetadata|null|undefined} modelMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.modelMetadata = null;

        /**
         * BotMetadata messageDisclaimerText.
         * @member {string|null|undefined} messageDisclaimerText
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.messageDisclaimerText = null;

        /**
         * BotMetadata progressIndicatorMetadata.
         * @member {AICommon.IBotProgressIndicatorMetadata|null|undefined} progressIndicatorMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.progressIndicatorMetadata = null;

        /**
         * BotMetadata capabilityMetadata.
         * @member {AICommon.IBotCapabilityMetadata|null|undefined} capabilityMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.capabilityMetadata = null;

        /**
         * BotMetadata imagineMetadata.
         * @member {AICommon.IBotImagineMetadata|null|undefined} imagineMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.imagineMetadata = null;

        /**
         * BotMetadata memoryMetadata.
         * @member {AICommon.IBotMemoryMetadata|null|undefined} memoryMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.memoryMetadata = null;

        /**
         * BotMetadata renderingMetadata.
         * @member {AICommon.IBotRenderingMetadata|null|undefined} renderingMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.renderingMetadata = null;

        /**
         * BotMetadata botMetricsMetadata.
         * @member {AICommon.IBotMetricsMetadata|null|undefined} botMetricsMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botMetricsMetadata = null;

        /**
         * BotMetadata botLinkedAccountsMetadata.
         * @member {AICommon.IBotLinkedAccountsMetadata|null|undefined} botLinkedAccountsMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botLinkedAccountsMetadata = null;

        /**
         * BotMetadata richResponseSourcesMetadata.
         * @member {AICommon.IBotSourcesMetadata|null|undefined} richResponseSourcesMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.richResponseSourcesMetadata = null;

        /**
         * BotMetadata aiConversationContext.
         * @member {Uint8Array|null|undefined} aiConversationContext
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.aiConversationContext = null;

        /**
         * BotMetadata botPromotionMessageMetadata.
         * @member {AICommon.IBotPromotionMessageMetadata|null|undefined} botPromotionMessageMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botPromotionMessageMetadata = null;

        /**
         * BotMetadata botModeSelectionMetadata.
         * @member {AICommon.IBotModeSelectionMetadata|null|undefined} botModeSelectionMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botModeSelectionMetadata = null;

        /**
         * BotMetadata botQuotaMetadata.
         * @member {AICommon.IBotQuotaMetadata|null|undefined} botQuotaMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botQuotaMetadata = null;

        /**
         * BotMetadata botAgeCollectionMetadata.
         * @member {AICommon.IBotAgeCollectionMetadata|null|undefined} botAgeCollectionMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botAgeCollectionMetadata = null;

        /**
         * BotMetadata conversationStarterPromptId.
         * @member {string|null|undefined} conversationStarterPromptId
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.conversationStarterPromptId = null;

        /**
         * BotMetadata botResponseId.
         * @member {string|null|undefined} botResponseId
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botResponseId = null;

        /**
         * BotMetadata verificationMetadata.
         * @member {AICommon.IBotSignatureVerificationMetadata|null|undefined} verificationMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.verificationMetadata = null;

        /**
         * BotMetadata unifiedResponseMutation.
         * @member {AICommon.IBotUnifiedResponseMutation|null|undefined} unifiedResponseMutation
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.unifiedResponseMutation = null;

        /**
         * BotMetadata botMessageOriginMetadata.
         * @member {AICommon.IBotMessageOriginMetadata|null|undefined} botMessageOriginMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botMessageOriginMetadata = null;

        /**
         * BotMetadata inThreadSurveyMetadata.
         * @member {AICommon.IInThreadSurveyMetadata|null|undefined} inThreadSurveyMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.inThreadSurveyMetadata = null;

        /**
         * BotMetadata botThreadInfo.
         * @member {AICommon.IAIThreadInfo|null|undefined} botThreadInfo
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botThreadInfo = null;

        /**
         * BotMetadata regenerateMetadata.
         * @member {AICommon.IAIRegenerateMetadata|null|undefined} regenerateMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.regenerateMetadata = null;

        /**
         * BotMetadata sessionTransparencyMetadata.
         * @member {AICommon.ISessionTransparencyMetadata|null|undefined} sessionTransparencyMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.sessionTransparencyMetadata = null;

        /**
         * BotMetadata botDocumentMessageMetadata.
         * @member {AICommon.IBotDocumentMessageMetadata|null|undefined} botDocumentMessageMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botDocumentMessageMetadata = null;

        /**
         * BotMetadata botGroupMetadata.
         * @member {AICommon.IBotGroupMetadata|null|undefined} botGroupMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.botGroupMetadata = null;

        /**
         * BotMetadata internalMetadata.
         * @member {Uint8Array|null|undefined} internalMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        BotMetadata.prototype.internalMetadata = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotMetadata _avatarMetadata.
         * @member {"avatarMetadata"|undefined} _avatarMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_avatarMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["avatarMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _personaId.
         * @member {"personaId"|undefined} _personaId
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_personaId", {
            get: $util.oneOfGetter($oneOfFields = ["personaId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _pluginMetadata.
         * @member {"pluginMetadata"|undefined} _pluginMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_pluginMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["pluginMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _suggestedPromptMetadata.
         * @member {"suggestedPromptMetadata"|undefined} _suggestedPromptMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_suggestedPromptMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["suggestedPromptMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _invokerJid.
         * @member {"invokerJid"|undefined} _invokerJid
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_invokerJid", {
            get: $util.oneOfGetter($oneOfFields = ["invokerJid"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _sessionMetadata.
         * @member {"sessionMetadata"|undefined} _sessionMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_sessionMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["sessionMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _memuMetadata.
         * @member {"memuMetadata"|undefined} _memuMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_memuMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["memuMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _timezone.
         * @member {"timezone"|undefined} _timezone
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_timezone", {
            get: $util.oneOfGetter($oneOfFields = ["timezone"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _reminderMetadata.
         * @member {"reminderMetadata"|undefined} _reminderMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_reminderMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["reminderMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _modelMetadata.
         * @member {"modelMetadata"|undefined} _modelMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_modelMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["modelMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _messageDisclaimerText.
         * @member {"messageDisclaimerText"|undefined} _messageDisclaimerText
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_messageDisclaimerText", {
            get: $util.oneOfGetter($oneOfFields = ["messageDisclaimerText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _progressIndicatorMetadata.
         * @member {"progressIndicatorMetadata"|undefined} _progressIndicatorMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_progressIndicatorMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["progressIndicatorMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _capabilityMetadata.
         * @member {"capabilityMetadata"|undefined} _capabilityMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_capabilityMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["capabilityMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _imagineMetadata.
         * @member {"imagineMetadata"|undefined} _imagineMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_imagineMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["imagineMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _memoryMetadata.
         * @member {"memoryMetadata"|undefined} _memoryMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_memoryMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["memoryMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _renderingMetadata.
         * @member {"renderingMetadata"|undefined} _renderingMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_renderingMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["renderingMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botMetricsMetadata.
         * @member {"botMetricsMetadata"|undefined} _botMetricsMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botMetricsMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["botMetricsMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botLinkedAccountsMetadata.
         * @member {"botLinkedAccountsMetadata"|undefined} _botLinkedAccountsMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botLinkedAccountsMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["botLinkedAccountsMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _richResponseSourcesMetadata.
         * @member {"richResponseSourcesMetadata"|undefined} _richResponseSourcesMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_richResponseSourcesMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["richResponseSourcesMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _aiConversationContext.
         * @member {"aiConversationContext"|undefined} _aiConversationContext
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_aiConversationContext", {
            get: $util.oneOfGetter($oneOfFields = ["aiConversationContext"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botPromotionMessageMetadata.
         * @member {"botPromotionMessageMetadata"|undefined} _botPromotionMessageMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botPromotionMessageMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["botPromotionMessageMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botModeSelectionMetadata.
         * @member {"botModeSelectionMetadata"|undefined} _botModeSelectionMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botModeSelectionMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["botModeSelectionMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botQuotaMetadata.
         * @member {"botQuotaMetadata"|undefined} _botQuotaMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botQuotaMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["botQuotaMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botAgeCollectionMetadata.
         * @member {"botAgeCollectionMetadata"|undefined} _botAgeCollectionMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botAgeCollectionMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["botAgeCollectionMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _conversationStarterPromptId.
         * @member {"conversationStarterPromptId"|undefined} _conversationStarterPromptId
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_conversationStarterPromptId", {
            get: $util.oneOfGetter($oneOfFields = ["conversationStarterPromptId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botResponseId.
         * @member {"botResponseId"|undefined} _botResponseId
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botResponseId", {
            get: $util.oneOfGetter($oneOfFields = ["botResponseId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _verificationMetadata.
         * @member {"verificationMetadata"|undefined} _verificationMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_verificationMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["verificationMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _unifiedResponseMutation.
         * @member {"unifiedResponseMutation"|undefined} _unifiedResponseMutation
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_unifiedResponseMutation", {
            get: $util.oneOfGetter($oneOfFields = ["unifiedResponseMutation"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botMessageOriginMetadata.
         * @member {"botMessageOriginMetadata"|undefined} _botMessageOriginMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botMessageOriginMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["botMessageOriginMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _inThreadSurveyMetadata.
         * @member {"inThreadSurveyMetadata"|undefined} _inThreadSurveyMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_inThreadSurveyMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["inThreadSurveyMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botThreadInfo.
         * @member {"botThreadInfo"|undefined} _botThreadInfo
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botThreadInfo", {
            get: $util.oneOfGetter($oneOfFields = ["botThreadInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _regenerateMetadata.
         * @member {"regenerateMetadata"|undefined} _regenerateMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_regenerateMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["regenerateMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _sessionTransparencyMetadata.
         * @member {"sessionTransparencyMetadata"|undefined} _sessionTransparencyMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_sessionTransparencyMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["sessionTransparencyMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botDocumentMessageMetadata.
         * @member {"botDocumentMessageMetadata"|undefined} _botDocumentMessageMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botDocumentMessageMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["botDocumentMessageMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _botGroupMetadata.
         * @member {"botGroupMetadata"|undefined} _botGroupMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_botGroupMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["botGroupMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetadata _internalMetadata.
         * @member {"internalMetadata"|undefined} _internalMetadata
         * @memberof AICommon.BotMetadata
         * @instance
         */
        Object.defineProperty(BotMetadata.prototype, "_internalMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["internalMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotMetadata
         * @static
         * @param {AICommon.IBotMetadata=} [properties] Properties to set
         * @returns {AICommon.BotMetadata} BotMetadata instance
         */
        BotMetadata.create = function create(properties) {
            return new BotMetadata(properties);
        };

        /**
         * Encodes the specified BotMetadata message. Does not implicitly {@link AICommon.BotMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotMetadata
         * @static
         * @param {AICommon.IBotMetadata} message BotMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.avatarMetadata != null && Object.hasOwnProperty.call(message, "avatarMetadata"))
                $root.AICommon.BotAvatarMetadata.encode(message.avatarMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.personaId != null && Object.hasOwnProperty.call(message, "personaId"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.personaId);
            if (message.pluginMetadata != null && Object.hasOwnProperty.call(message, "pluginMetadata"))
                $root.AICommon.BotPluginMetadata.encode(message.pluginMetadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.suggestedPromptMetadata != null && Object.hasOwnProperty.call(message, "suggestedPromptMetadata"))
                $root.AICommon.BotSuggestedPromptMetadata.encode(message.suggestedPromptMetadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
            if (message.invokerJid != null && Object.hasOwnProperty.call(message, "invokerJid"))
                writer.uint32(/* id 5, wireType 2 =*/42).string(message.invokerJid);
            if (message.sessionMetadata != null && Object.hasOwnProperty.call(message, "sessionMetadata"))
                $root.AICommon.BotSessionMetadata.encode(message.sessionMetadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
            if (message.memuMetadata != null && Object.hasOwnProperty.call(message, "memuMetadata"))
                $root.AICommon.BotMemuMetadata.encode(message.memuMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
            if (message.timezone != null && Object.hasOwnProperty.call(message, "timezone"))
                writer.uint32(/* id 8, wireType 2 =*/66).string(message.timezone);
            if (message.reminderMetadata != null && Object.hasOwnProperty.call(message, "reminderMetadata"))
                $root.AICommon.BotReminderMetadata.encode(message.reminderMetadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
            if (message.modelMetadata != null && Object.hasOwnProperty.call(message, "modelMetadata"))
                $root.AICommon.BotModelMetadata.encode(message.modelMetadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
            if (message.messageDisclaimerText != null && Object.hasOwnProperty.call(message, "messageDisclaimerText"))
                writer.uint32(/* id 11, wireType 2 =*/90).string(message.messageDisclaimerText);
            if (message.progressIndicatorMetadata != null && Object.hasOwnProperty.call(message, "progressIndicatorMetadata"))
                $root.AICommon.BotProgressIndicatorMetadata.encode(message.progressIndicatorMetadata, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
            if (message.capabilityMetadata != null && Object.hasOwnProperty.call(message, "capabilityMetadata"))
                $root.AICommon.BotCapabilityMetadata.encode(message.capabilityMetadata, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
            if (message.imagineMetadata != null && Object.hasOwnProperty.call(message, "imagineMetadata"))
                $root.AICommon.BotImagineMetadata.encode(message.imagineMetadata, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
            if (message.memoryMetadata != null && Object.hasOwnProperty.call(message, "memoryMetadata"))
                $root.AICommon.BotMemoryMetadata.encode(message.memoryMetadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
            if (message.renderingMetadata != null && Object.hasOwnProperty.call(message, "renderingMetadata"))
                $root.AICommon.BotRenderingMetadata.encode(message.renderingMetadata, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
            if (message.botMetricsMetadata != null && Object.hasOwnProperty.call(message, "botMetricsMetadata"))
                $root.AICommon.BotMetricsMetadata.encode(message.botMetricsMetadata, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
            if (message.botLinkedAccountsMetadata != null && Object.hasOwnProperty.call(message, "botLinkedAccountsMetadata"))
                $root.AICommon.BotLinkedAccountsMetadata.encode(message.botLinkedAccountsMetadata, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
            if (message.richResponseSourcesMetadata != null && Object.hasOwnProperty.call(message, "richResponseSourcesMetadata"))
                $root.AICommon.BotSourcesMetadata.encode(message.richResponseSourcesMetadata, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim();
            if (message.aiConversationContext != null && Object.hasOwnProperty.call(message, "aiConversationContext"))
                writer.uint32(/* id 20, wireType 2 =*/162).bytes(message.aiConversationContext);
            if (message.botPromotionMessageMetadata != null && Object.hasOwnProperty.call(message, "botPromotionMessageMetadata"))
                $root.AICommon.BotPromotionMessageMetadata.encode(message.botPromotionMessageMetadata, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim();
            if (message.botModeSelectionMetadata != null && Object.hasOwnProperty.call(message, "botModeSelectionMetadata"))
                $root.AICommon.BotModeSelectionMetadata.encode(message.botModeSelectionMetadata, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim();
            if (message.botQuotaMetadata != null && Object.hasOwnProperty.call(message, "botQuotaMetadata"))
                $root.AICommon.BotQuotaMetadata.encode(message.botQuotaMetadata, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
            if (message.botAgeCollectionMetadata != null && Object.hasOwnProperty.call(message, "botAgeCollectionMetadata"))
                $root.AICommon.BotAgeCollectionMetadata.encode(message.botAgeCollectionMetadata, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim();
            if (message.conversationStarterPromptId != null && Object.hasOwnProperty.call(message, "conversationStarterPromptId"))
                writer.uint32(/* id 25, wireType 2 =*/202).string(message.conversationStarterPromptId);
            if (message.botResponseId != null && Object.hasOwnProperty.call(message, "botResponseId"))
                writer.uint32(/* id 26, wireType 2 =*/210).string(message.botResponseId);
            if (message.verificationMetadata != null && Object.hasOwnProperty.call(message, "verificationMetadata"))
                $root.AICommon.BotSignatureVerificationMetadata.encode(message.verificationMetadata, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim();
            if (message.unifiedResponseMutation != null && Object.hasOwnProperty.call(message, "unifiedResponseMutation"))
                $root.AICommon.BotUnifiedResponseMutation.encode(message.unifiedResponseMutation, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim();
            if (message.botMessageOriginMetadata != null && Object.hasOwnProperty.call(message, "botMessageOriginMetadata"))
                $root.AICommon.BotMessageOriginMetadata.encode(message.botMessageOriginMetadata, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim();
            if (message.inThreadSurveyMetadata != null && Object.hasOwnProperty.call(message, "inThreadSurveyMetadata"))
                $root.AICommon.InThreadSurveyMetadata.encode(message.inThreadSurveyMetadata, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim();
            if (message.botThreadInfo != null && Object.hasOwnProperty.call(message, "botThreadInfo"))
                $root.AICommon.AIThreadInfo.encode(message.botThreadInfo, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim();
            if (message.regenerateMetadata != null && Object.hasOwnProperty.call(message, "regenerateMetadata"))
                $root.AICommon.AIRegenerateMetadata.encode(message.regenerateMetadata, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim();
            if (message.sessionTransparencyMetadata != null && Object.hasOwnProperty.call(message, "sessionTransparencyMetadata"))
                $root.AICommon.SessionTransparencyMetadata.encode(message.sessionTransparencyMetadata, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim();
            if (message.botDocumentMessageMetadata != null && Object.hasOwnProperty.call(message, "botDocumentMessageMetadata"))
                $root.AICommon.BotDocumentMessageMetadata.encode(message.botDocumentMessageMetadata, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim();
            if (message.botGroupMetadata != null && Object.hasOwnProperty.call(message, "botGroupMetadata"))
                $root.AICommon.BotGroupMetadata.encode(message.botGroupMetadata, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim();
            if (message.internalMetadata != null && Object.hasOwnProperty.call(message, "internalMetadata"))
                writer.uint32(/* id 999, wireType 2 =*/7994).bytes(message.internalMetadata);
            return writer;
        };

        /**
         * Encodes the specified BotMetadata message, length delimited. Does not implicitly {@link AICommon.BotMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotMetadata
         * @static
         * @param {AICommon.IBotMetadata} message BotMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotMetadata} BotMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotMetadata.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.AICommon.BotMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.avatarMetadata = $root.AICommon.BotAvatarMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.personaId = reader.string();
                        break;
                    }
                case 3: {
                        message.pluginMetadata = $root.AICommon.BotPluginMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 4: {
                        message.suggestedPromptMetadata = $root.AICommon.BotSuggestedPromptMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 5: {
                        message.invokerJid = reader.string();
                        break;
                    }
                case 6: {
                        message.sessionMetadata = $root.AICommon.BotSessionMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 7: {
                        message.memuMetadata = $root.AICommon.BotMemuMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 8: {
                        message.timezone = reader.string();
                        break;
                    }
                case 9: {
                        message.reminderMetadata = $root.AICommon.BotReminderMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 10: {
                        message.modelMetadata = $root.AICommon.BotModelMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 11: {
                        message.messageDisclaimerText = reader.string();
                        break;
                    }
                case 12: {
                        message.progressIndicatorMetadata = $root.AICommon.BotProgressIndicatorMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 13: {
                        message.capabilityMetadata = $root.AICommon.BotCapabilityMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 14: {
                        message.imagineMetadata = $root.AICommon.BotImagineMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 15: {
                        message.memoryMetadata = $root.AICommon.BotMemoryMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 16: {
                        message.renderingMetadata = $root.AICommon.BotRenderingMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 17: {
                        message.botMetricsMetadata = $root.AICommon.BotMetricsMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 18: {
                        message.botLinkedAccountsMetadata = $root.AICommon.BotLinkedAccountsMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 19: {
                        message.richResponseSourcesMetadata = $root.AICommon.BotSourcesMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 20: {
                        message.aiConversationContext = reader.bytes();
                        break;
                    }
                case 21: {
                        message.botPromotionMessageMetadata = $root.AICommon.BotPromotionMessageMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 22: {
                        message.botModeSelectionMetadata = $root.AICommon.BotModeSelectionMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 23: {
                        message.botQuotaMetadata = $root.AICommon.BotQuotaMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 24: {
                        message.botAgeCollectionMetadata = $root.AICommon.BotAgeCollectionMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 25: {
                        message.conversationStarterPromptId = reader.string();
                        break;
                    }
                case 26: {
                        message.botResponseId = reader.string();
                        break;
                    }
                case 27: {
                        message.verificationMetadata = $root.AICommon.BotSignatureVerificationMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 28: {
                        message.unifiedResponseMutation = $root.AICommon.BotUnifiedResponseMutation.decode(reader, reader.uint32());
                        break;
                    }
                case 29: {
                        message.botMessageOriginMetadata = $root.AICommon.BotMessageOriginMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 30: {
                        message.inThreadSurveyMetadata = $root.AICommon.InThreadSurveyMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 31: {
                        message.botThreadInfo = $root.AICommon.AIThreadInfo.decode(reader, reader.uint32());
                        break;
                    }
                case 32: {
                        message.regenerateMetadata = $root.AICommon.AIRegenerateMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 33: {
                        message.sessionTransparencyMetadata = $root.AICommon.SessionTransparencyMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 34: {
                        message.botDocumentMessageMetadata = $root.AICommon.BotDocumentMessageMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 35: {
                        message.botGroupMetadata = $root.AICommon.BotGroupMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 999: {
                        message.internalMetadata = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotMetadata} BotMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotMetadata message.
         * @function verify
         * @memberof AICommon.BotMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.avatarMetadata != null && message.hasOwnProperty("avatarMetadata")) {
                properties._avatarMetadata = 1;
                {
                    var error = $root.AICommon.BotAvatarMetadata.verify(message.avatarMetadata);
                    if (error)
                        return "avatarMetadata." + error;
                }
            }
            if (message.personaId != null && message.hasOwnProperty("personaId")) {
                properties._personaId = 1;
                if (!$util.isString(message.personaId))
                    return "personaId: string expected";
            }
            if (message.pluginMetadata != null && message.hasOwnProperty("pluginMetadata")) {
                properties._pluginMetadata = 1;
                {
                    var error = $root.AICommon.BotPluginMetadata.verify(message.pluginMetadata);
                    if (error)
                        return "pluginMetadata." + error;
                }
            }
            if (message.suggestedPromptMetadata != null && message.hasOwnProperty("suggestedPromptMetadata")) {
                properties._suggestedPromptMetadata = 1;
                {
                    var error = $root.AICommon.BotSuggestedPromptMetadata.verify(message.suggestedPromptMetadata);
                    if (error)
                        return "suggestedPromptMetadata." + error;
                }
            }
            if (message.invokerJid != null && message.hasOwnProperty("invokerJid")) {
                properties._invokerJid = 1;
                if (!$util.isString(message.invokerJid))
                    return "invokerJid: string expected";
            }
            if (message.sessionMetadata != null && message.hasOwnProperty("sessionMetadata")) {
                properties._sessionMetadata = 1;
                {
                    var error = $root.AICommon.BotSessionMetadata.verify(message.sessionMetadata);
                    if (error)
                        return "sessionMetadata." + error;
                }
            }
            if (message.memuMetadata != null && message.hasOwnProperty("memuMetadata")) {
                properties._memuMetadata = 1;
                {
                    var error = $root.AICommon.BotMemuMetadata.verify(message.memuMetadata);
                    if (error)
                        return "memuMetadata." + error;
                }
            }
            if (message.timezone != null && message.hasOwnProperty("timezone")) {
                properties._timezone = 1;
                if (!$util.isString(message.timezone))
                    return "timezone: string expected";
            }
            if (message.reminderMetadata != null && message.hasOwnProperty("reminderMetadata")) {
                properties._reminderMetadata = 1;
                {
                    var error = $root.AICommon.BotReminderMetadata.verify(message.reminderMetadata);
                    if (error)
                        return "reminderMetadata." + error;
                }
            }
            if (message.modelMetadata != null && message.hasOwnProperty("modelMetadata")) {
                properties._modelMetadata = 1;
                {
                    var error = $root.AICommon.BotModelMetadata.verify(message.modelMetadata);
                    if (error)
                        return "modelMetadata." + error;
                }
            }
            if (message.messageDisclaimerText != null && message.hasOwnProperty("messageDisclaimerText")) {
                properties._messageDisclaimerText = 1;
                if (!$util.isString(message.messageDisclaimerText))
                    return "messageDisclaimerText: string expected";
            }
            if (message.progressIndicatorMetadata != null && message.hasOwnProperty("progressIndicatorMetadata")) {
                properties._progressIndicatorMetadata = 1;
                {
                    var error = $root.AICommon.BotProgressIndicatorMetadata.verify(message.progressIndicatorMetadata);
                    if (error)
                        return "progressIndicatorMetadata." + error;
                }
            }
            if (message.capabilityMetadata != null && message.hasOwnProperty("capabilityMetadata")) {
                properties._capabilityMetadata = 1;
                {
                    var error = $root.AICommon.BotCapabilityMetadata.verify(message.capabilityMetadata);
                    if (error)
                        return "capabilityMetadata." + error;
                }
            }
            if (message.imagineMetadata != null && message.hasOwnProperty("imagineMetadata")) {
                properties._imagineMetadata = 1;
                {
                    var error = $root.AICommon.BotImagineMetadata.verify(message.imagineMetadata);
                    if (error)
                        return "imagineMetadata." + error;
                }
            }
            if (message.memoryMetadata != null && message.hasOwnProperty("memoryMetadata")) {
                properties._memoryMetadata = 1;
                {
                    var error = $root.AICommon.BotMemoryMetadata.verify(message.memoryMetadata);
                    if (error)
                        return "memoryMetadata." + error;
                }
            }
            if (message.renderingMetadata != null && message.hasOwnProperty("renderingMetadata")) {
                properties._renderingMetadata = 1;
                {
                    var error = $root.AICommon.BotRenderingMetadata.verify(message.renderingMetadata);
                    if (error)
                        return "renderingMetadata." + error;
                }
            }
            if (message.botMetricsMetadata != null && message.hasOwnProperty("botMetricsMetadata")) {
                properties._botMetricsMetadata = 1;
                {
                    var error = $root.AICommon.BotMetricsMetadata.verify(message.botMetricsMetadata);
                    if (error)
                        return "botMetricsMetadata." + error;
                }
            }
            if (message.botLinkedAccountsMetadata != null && message.hasOwnProperty("botLinkedAccountsMetadata")) {
                properties._botLinkedAccountsMetadata = 1;
                {
                    var error = $root.AICommon.BotLinkedAccountsMetadata.verify(message.botLinkedAccountsMetadata);
                    if (error)
                        return "botLinkedAccountsMetadata." + error;
                }
            }
            if (message.richResponseSourcesMetadata != null && message.hasOwnProperty("richResponseSourcesMetadata")) {
                properties._richResponseSourcesMetadata = 1;
                {
                    var error = $root.AICommon.BotSourcesMetadata.verify(message.richResponseSourcesMetadata);
                    if (error)
                        return "richResponseSourcesMetadata." + error;
                }
            }
            if (message.aiConversationContext != null && message.hasOwnProperty("aiConversationContext")) {
                properties._aiConversationContext = 1;
                if (!(message.aiConversationContext && typeof message.aiConversationContext.length === "number" || $util.isString(message.aiConversationContext)))
                    return "aiConversationContext: buffer expected";
            }
            if (message.botPromotionMessageMetadata != null && message.hasOwnProperty("botPromotionMessageMetadata")) {
                properties._botPromotionMessageMetadata = 1;
                {
                    var error = $root.AICommon.BotPromotionMessageMetadata.verify(message.botPromotionMessageMetadata);
                    if (error)
                        return "botPromotionMessageMetadata." + error;
                }
            }
            if (message.botModeSelectionMetadata != null && message.hasOwnProperty("botModeSelectionMetadata")) {
                properties._botModeSelectionMetadata = 1;
                {
                    var error = $root.AICommon.BotModeSelectionMetadata.verify(message.botModeSelectionMetadata);
                    if (error)
                        return "botModeSelectionMetadata." + error;
                }
            }
            if (message.botQuotaMetadata != null && message.hasOwnProperty("botQuotaMetadata")) {
                properties._botQuotaMetadata = 1;
                {
                    var error = $root.AICommon.BotQuotaMetadata.verify(message.botQuotaMetadata);
                    if (error)
                        return "botQuotaMetadata." + error;
                }
            }
            if (message.botAgeCollectionMetadata != null && message.hasOwnProperty("botAgeCollectionMetadata")) {
                properties._botAgeCollectionMetadata = 1;
                {
                    var error = $root.AICommon.BotAgeCollectionMetadata.verify(message.botAgeCollectionMetadata);
                    if (error)
                        return "botAgeCollectionMetadata." + error;
                }
            }
            if (message.conversationStarterPromptId != null && message.hasOwnProperty("conversationStarterPromptId")) {
                properties._conversationStarterPromptId = 1;
                if (!$util.isString(message.conversationStarterPromptId))
                    return "conversationStarterPromptId: string expected";
            }
            if (message.botResponseId != null && message.hasOwnProperty("botResponseId")) {
                properties._botResponseId = 1;
                if (!$util.isString(message.botResponseId))
                    return "botResponseId: string expected";
            }
            if (message.verificationMetadata != null && message.hasOwnProperty("verificationMetadata")) {
                properties._verificationMetadata = 1;
                {
                    var error = $root.AICommon.BotSignatureVerificationMetadata.verify(message.verificationMetadata);
                    if (error)
                        return "verificationMetadata." + error;
                }
            }
            if (message.unifiedResponseMutation != null && message.hasOwnProperty("unifiedResponseMutation")) {
                properties._unifiedResponseMutation = 1;
                {
                    var error = $root.AICommon.BotUnifiedResponseMutation.verify(message.unifiedResponseMutation);
                    if (error)
                        return "unifiedResponseMutation." + error;
                }
            }
            if (message.botMessageOriginMetadata != null && message.hasOwnProperty("botMessageOriginMetadata")) {
                properties._botMessageOriginMetadata = 1;
                {
                    var error = $root.AICommon.BotMessageOriginMetadata.verify(message.botMessageOriginMetadata);
                    if (error)
                        return "botMessageOriginMetadata." + error;
                }
            }
            if (message.inThreadSurveyMetadata != null && message.hasOwnProperty("inThreadSurveyMetadata")) {
                properties._inThreadSurveyMetadata = 1;
                {
                    var error = $root.AICommon.InThreadSurveyMetadata.verify(message.inThreadSurveyMetadata);
                    if (error)
                        return "inThreadSurveyMetadata." + error;
                }
            }
            if (message.botThreadInfo != null && message.hasOwnProperty("botThreadInfo")) {
                properties._botThreadInfo = 1;
                {
                    var error = $root.AICommon.AIThreadInfo.verify(message.botThreadInfo);
                    if (error)
                        return "botThreadInfo." + error;
                }
            }
            if (message.regenerateMetadata != null && message.hasOwnProperty("regenerateMetadata")) {
                properties._regenerateMetadata = 1;
                {
                    var error = $root.AICommon.AIRegenerateMetadata.verify(message.regenerateMetadata);
                    if (error)
                        return "regenerateMetadata." + error;
                }
            }
            if (message.sessionTransparencyMetadata != null && message.hasOwnProperty("sessionTransparencyMetadata")) {
                properties._sessionTransparencyMetadata = 1;
                {
                    var error = $root.AICommon.SessionTransparencyMetadata.verify(message.sessionTransparencyMetadata);
                    if (error)
                        return "sessionTransparencyMetadata." + error;
                }
            }
            if (message.botDocumentMessageMetadata != null && message.hasOwnProperty("botDocumentMessageMetadata")) {
                properties._botDocumentMessageMetadata = 1;
                {
                    var error = $root.AICommon.BotDocumentMessageMetadata.verify(message.botDocumentMessageMetadata);
                    if (error)
                        return "botDocumentMessageMetadata." + error;
                }
            }
            if (message.botGroupMetadata != null && message.hasOwnProperty("botGroupMetadata")) {
                properties._botGroupMetadata = 1;
                {
                    var error = $root.AICommon.BotGroupMetadata.verify(message.botGroupMetadata);
                    if (error)
                        return "botGroupMetadata." + error;
                }
            }
            if (message.internalMetadata != null && message.hasOwnProperty("internalMetadata")) {
                properties._internalMetadata = 1;
                if (!(message.internalMetadata && typeof message.internalMetadata.length === "number" || $util.isString(message.internalMetadata)))
                    return "internalMetadata: buffer expected";
            }
            return null;
        };

        /**
         * Creates a BotMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotMetadata} BotMetadata
         */
        BotMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotMetadata)
                return object;
            var message = new $root.AICommon.BotMetadata();
            if (object.avatarMetadata != null) {
                if (typeof object.avatarMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.avatarMetadata: object expected");
                message.avatarMetadata = $root.AICommon.BotAvatarMetadata.fromObject(object.avatarMetadata);
            }
            if (object.personaId != null)
                message.personaId = String(object.personaId);
            if (object.pluginMetadata != null) {
                if (typeof object.pluginMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.pluginMetadata: object expected");
                message.pluginMetadata = $root.AICommon.BotPluginMetadata.fromObject(object.pluginMetadata);
            }
            if (object.suggestedPromptMetadata != null) {
                if (typeof object.suggestedPromptMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.suggestedPromptMetadata: object expected");
                message.suggestedPromptMetadata = $root.AICommon.BotSuggestedPromptMetadata.fromObject(object.suggestedPromptMetadata);
            }
            if (object.invokerJid != null)
                message.invokerJid = String(object.invokerJid);
            if (object.sessionMetadata != null) {
                if (typeof object.sessionMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.sessionMetadata: object expected");
                message.sessionMetadata = $root.AICommon.BotSessionMetadata.fromObject(object.sessionMetadata);
            }
            if (object.memuMetadata != null) {
                if (typeof object.memuMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.memuMetadata: object expected");
                message.memuMetadata = $root.AICommon.BotMemuMetadata.fromObject(object.memuMetadata);
            }
            if (object.timezone != null)
                message.timezone = String(object.timezone);
            if (object.reminderMetadata != null) {
                if (typeof object.reminderMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.reminderMetadata: object expected");
                message.reminderMetadata = $root.AICommon.BotReminderMetadata.fromObject(object.reminderMetadata);
            }
            if (object.modelMetadata != null) {
                if (typeof object.modelMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.modelMetadata: object expected");
                message.modelMetadata = $root.AICommon.BotModelMetadata.fromObject(object.modelMetadata);
            }
            if (object.messageDisclaimerText != null)
                message.messageDisclaimerText = String(object.messageDisclaimerText);
            if (object.progressIndicatorMetadata != null) {
                if (typeof object.progressIndicatorMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.progressIndicatorMetadata: object expected");
                message.progressIndicatorMetadata = $root.AICommon.BotProgressIndicatorMetadata.fromObject(object.progressIndicatorMetadata);
            }
            if (object.capabilityMetadata != null) {
                if (typeof object.capabilityMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.capabilityMetadata: object expected");
                message.capabilityMetadata = $root.AICommon.BotCapabilityMetadata.fromObject(object.capabilityMetadata);
            }
            if (object.imagineMetadata != null) {
                if (typeof object.imagineMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.imagineMetadata: object expected");
                message.imagineMetadata = $root.AICommon.BotImagineMetadata.fromObject(object.imagineMetadata);
            }
            if (object.memoryMetadata != null) {
                if (typeof object.memoryMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.memoryMetadata: object expected");
                message.memoryMetadata = $root.AICommon.BotMemoryMetadata.fromObject(object.memoryMetadata);
            }
            if (object.renderingMetadata != null) {
                if (typeof object.renderingMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.renderingMetadata: object expected");
                message.renderingMetadata = $root.AICommon.BotRenderingMetadata.fromObject(object.renderingMetadata);
            }
            if (object.botMetricsMetadata != null) {
                if (typeof object.botMetricsMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.botMetricsMetadata: object expected");
                message.botMetricsMetadata = $root.AICommon.BotMetricsMetadata.fromObject(object.botMetricsMetadata);
            }
            if (object.botLinkedAccountsMetadata != null) {
                if (typeof object.botLinkedAccountsMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.botLinkedAccountsMetadata: object expected");
                message.botLinkedAccountsMetadata = $root.AICommon.BotLinkedAccountsMetadata.fromObject(object.botLinkedAccountsMetadata);
            }
            if (object.richResponseSourcesMetadata != null) {
                if (typeof object.richResponseSourcesMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.richResponseSourcesMetadata: object expected");
                message.richResponseSourcesMetadata = $root.AICommon.BotSourcesMetadata.fromObject(object.richResponseSourcesMetadata);
            }
            if (object.aiConversationContext != null)
                if (typeof object.aiConversationContext === "string")
                    $util.base64.decode(object.aiConversationContext, message.aiConversationContext = $util.newBuffer($util.base64.length(object.aiConversationContext)), 0);
                else if (object.aiConversationContext.length >= 0)
                    message.aiConversationContext = object.aiConversationContext;
            if (object.botPromotionMessageMetadata != null) {
                if (typeof object.botPromotionMessageMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.botPromotionMessageMetadata: object expected");
                message.botPromotionMessageMetadata = $root.AICommon.BotPromotionMessageMetadata.fromObject(object.botPromotionMessageMetadata);
            }
            if (object.botModeSelectionMetadata != null) {
                if (typeof object.botModeSelectionMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.botModeSelectionMetadata: object expected");
                message.botModeSelectionMetadata = $root.AICommon.BotModeSelectionMetadata.fromObject(object.botModeSelectionMetadata);
            }
            if (object.botQuotaMetadata != null) {
                if (typeof object.botQuotaMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.botQuotaMetadata: object expected");
                message.botQuotaMetadata = $root.AICommon.BotQuotaMetadata.fromObject(object.botQuotaMetadata);
            }
            if (object.botAgeCollectionMetadata != null) {
                if (typeof object.botAgeCollectionMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.botAgeCollectionMetadata: object expected");
                message.botAgeCollectionMetadata = $root.AICommon.BotAgeCollectionMetadata.fromObject(object.botAgeCollectionMetadata);
            }
            if (object.conversationStarterPromptId != null)
                message.conversationStarterPromptId = String(object.conversationStarterPromptId);
            if (object.botResponseId != null)
                message.botResponseId = String(object.botResponseId);
            if (object.verificationMetadata != null) {
                if (typeof object.verificationMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.verificationMetadata: object expected");
                message.verificationMetadata = $root.AICommon.BotSignatureVerificationMetadata.fromObject(object.verificationMetadata);
            }
            if (object.unifiedResponseMutation != null) {
                if (typeof object.unifiedResponseMutation !== "object")
                    throw TypeError(".AICommon.BotMetadata.unifiedResponseMutation: object expected");
                message.unifiedResponseMutation = $root.AICommon.BotUnifiedResponseMutation.fromObject(object.unifiedResponseMutation);
            }
            if (object.botMessageOriginMetadata != null) {
                if (typeof object.botMessageOriginMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.botMessageOriginMetadata: object expected");
                message.botMessageOriginMetadata = $root.AICommon.BotMessageOriginMetadata.fromObject(object.botMessageOriginMetadata);
            }
            if (object.inThreadSurveyMetadata != null) {
                if (typeof object.inThreadSurveyMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.inThreadSurveyMetadata: object expected");
                message.inThreadSurveyMetadata = $root.AICommon.InThreadSurveyMetadata.fromObject(object.inThreadSurveyMetadata);
            }
            if (object.botThreadInfo != null) {
                if (typeof object.botThreadInfo !== "object")
                    throw TypeError(".AICommon.BotMetadata.botThreadInfo: object expected");
                message.botThreadInfo = $root.AICommon.AIThreadInfo.fromObject(object.botThreadInfo);
            }
            if (object.regenerateMetadata != null) {
                if (typeof object.regenerateMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.regenerateMetadata: object expected");
                message.regenerateMetadata = $root.AICommon.AIRegenerateMetadata.fromObject(object.regenerateMetadata);
            }
            if (object.sessionTransparencyMetadata != null) {
                if (typeof object.sessionTransparencyMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.sessionTransparencyMetadata: object expected");
                message.sessionTransparencyMetadata = $root.AICommon.SessionTransparencyMetadata.fromObject(object.sessionTransparencyMetadata);
            }
            if (object.botDocumentMessageMetadata != null) {
                if (typeof object.botDocumentMessageMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.botDocumentMessageMetadata: object expected");
                message.botDocumentMessageMetadata = $root.AICommon.BotDocumentMessageMetadata.fromObject(object.botDocumentMessageMetadata);
            }
            if (object.botGroupMetadata != null) {
                if (typeof object.botGroupMetadata !== "object")
                    throw TypeError(".AICommon.BotMetadata.botGroupMetadata: object expected");
                message.botGroupMetadata = $root.AICommon.BotGroupMetadata.fromObject(object.botGroupMetadata);
            }
            if (object.internalMetadata != null)
                if (typeof object.internalMetadata === "string")
                    $util.base64.decode(object.internalMetadata, message.internalMetadata = $util.newBuffer($util.base64.length(object.internalMetadata)), 0);
                else if (object.internalMetadata.length >= 0)
                    message.internalMetadata = object.internalMetadata;
            return message;
        };

        /**
         * Creates a plain object from a BotMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotMetadata
         * @static
         * @param {AICommon.BotMetadata} message BotMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.avatarMetadata != null && message.hasOwnProperty("avatarMetadata")) {
                object.avatarMetadata = $root.AICommon.BotAvatarMetadata.toObject(message.avatarMetadata, options);
                if (options.oneofs)
                    object._avatarMetadata = "avatarMetadata";
            }
            if (message.personaId != null && message.hasOwnProperty("personaId")) {
                object.personaId = message.personaId;
                if (options.oneofs)
                    object._personaId = "personaId";
            }
            if (message.pluginMetadata != null && message.hasOwnProperty("pluginMetadata")) {
                object.pluginMetadata = $root.AICommon.BotPluginMetadata.toObject(message.pluginMetadata, options);
                if (options.oneofs)
                    object._pluginMetadata = "pluginMetadata";
            }
            if (message.suggestedPromptMetadata != null && message.hasOwnProperty("suggestedPromptMetadata")) {
                object.suggestedPromptMetadata = $root.AICommon.BotSuggestedPromptMetadata.toObject(message.suggestedPromptMetadata, options);
                if (options.oneofs)
                    object._suggestedPromptMetadata = "suggestedPromptMetadata";
            }
            if (message.invokerJid != null && message.hasOwnProperty("invokerJid")) {
                object.invokerJid = message.invokerJid;
                if (options.oneofs)
                    object._invokerJid = "invokerJid";
            }
            if (message.sessionMetadata != null && message.hasOwnProperty("sessionMetadata")) {
                object.sessionMetadata = $root.AICommon.BotSessionMetadata.toObject(message.sessionMetadata, options);
                if (options.oneofs)
                    object._sessionMetadata = "sessionMetadata";
            }
            if (message.memuMetadata != null && message.hasOwnProperty("memuMetadata")) {
                object.memuMetadata = $root.AICommon.BotMemuMetadata.toObject(message.memuMetadata, options);
                if (options.oneofs)
                    object._memuMetadata = "memuMetadata";
            }
            if (message.timezone != null && message.hasOwnProperty("timezone")) {
                object.timezone = message.timezone;
                if (options.oneofs)
                    object._timezone = "timezone";
            }
            if (message.reminderMetadata != null && message.hasOwnProperty("reminderMetadata")) {
                object.reminderMetadata = $root.AICommon.BotReminderMetadata.toObject(message.reminderMetadata, options);
                if (options.oneofs)
                    object._reminderMetadata = "reminderMetadata";
            }
            if (message.modelMetadata != null && message.hasOwnProperty("modelMetadata")) {
                object.modelMetadata = $root.AICommon.BotModelMetadata.toObject(message.modelMetadata, options);
                if (options.oneofs)
                    object._modelMetadata = "modelMetadata";
            }
            if (message.messageDisclaimerText != null && message.hasOwnProperty("messageDisclaimerText")) {
                object.messageDisclaimerText = message.messageDisclaimerText;
                if (options.oneofs)
                    object._messageDisclaimerText = "messageDisclaimerText";
            }
            if (message.progressIndicatorMetadata != null && message.hasOwnProperty("progressIndicatorMetadata")) {
                object.progressIndicatorMetadata = $root.AICommon.BotProgressIndicatorMetadata.toObject(message.progressIndicatorMetadata, options);
                if (options.oneofs)
                    object._progressIndicatorMetadata = "progressIndicatorMetadata";
            }
            if (message.capabilityMetadata != null && message.hasOwnProperty("capabilityMetadata")) {
                object.capabilityMetadata = $root.AICommon.BotCapabilityMetadata.toObject(message.capabilityMetadata, options);
                if (options.oneofs)
                    object._capabilityMetadata = "capabilityMetadata";
            }
            if (message.imagineMetadata != null && message.hasOwnProperty("imagineMetadata")) {
                object.imagineMetadata = $root.AICommon.BotImagineMetadata.toObject(message.imagineMetadata, options);
                if (options.oneofs)
                    object._imagineMetadata = "imagineMetadata";
            }
            if (message.memoryMetadata != null && message.hasOwnProperty("memoryMetadata")) {
                object.memoryMetadata = $root.AICommon.BotMemoryMetadata.toObject(message.memoryMetadata, options);
                if (options.oneofs)
                    object._memoryMetadata = "memoryMetadata";
            }
            if (message.renderingMetadata != null && message.hasOwnProperty("renderingMetadata")) {
                object.renderingMetadata = $root.AICommon.BotRenderingMetadata.toObject(message.renderingMetadata, options);
                if (options.oneofs)
                    object._renderingMetadata = "renderingMetadata";
            }
            if (message.botMetricsMetadata != null && message.hasOwnProperty("botMetricsMetadata")) {
                object.botMetricsMetadata = $root.AICommon.BotMetricsMetadata.toObject(message.botMetricsMetadata, options);
                if (options.oneofs)
                    object._botMetricsMetadata = "botMetricsMetadata";
            }
            if (message.botLinkedAccountsMetadata != null && message.hasOwnProperty("botLinkedAccountsMetadata")) {
                object.botLinkedAccountsMetadata = $root.AICommon.BotLinkedAccountsMetadata.toObject(message.botLinkedAccountsMetadata, options);
                if (options.oneofs)
                    object._botLinkedAccountsMetadata = "botLinkedAccountsMetadata";
            }
            if (message.richResponseSourcesMetadata != null && message.hasOwnProperty("richResponseSourcesMetadata")) {
                object.richResponseSourcesMetadata = $root.AICommon.BotSourcesMetadata.toObject(message.richResponseSourcesMetadata, options);
                if (options.oneofs)
                    object._richResponseSourcesMetadata = "richResponseSourcesMetadata";
            }
            if (message.aiConversationContext != null && message.hasOwnProperty("aiConversationContext")) {
                object.aiConversationContext = options.bytes === String ? $util.base64.encode(message.aiConversationContext, 0, message.aiConversationContext.length) : options.bytes === Array ? Array.prototype.slice.call(message.aiConversationContext) : message.aiConversationContext;
                if (options.oneofs)
                    object._aiConversationContext = "aiConversationContext";
            }
            if (message.botPromotionMessageMetadata != null && message.hasOwnProperty("botPromotionMessageMetadata")) {
                object.botPromotionMessageMetadata = $root.AICommon.BotPromotionMessageMetadata.toObject(message.botPromotionMessageMetadata, options);
                if (options.oneofs)
                    object._botPromotionMessageMetadata = "botPromotionMessageMetadata";
            }
            if (message.botModeSelectionMetadata != null && message.hasOwnProperty("botModeSelectionMetadata")) {
                object.botModeSelectionMetadata = $root.AICommon.BotModeSelectionMetadata.toObject(message.botModeSelectionMetadata, options);
                if (options.oneofs)
                    object._botModeSelectionMetadata = "botModeSelectionMetadata";
            }
            if (message.botQuotaMetadata != null && message.hasOwnProperty("botQuotaMetadata")) {
                object.botQuotaMetadata = $root.AICommon.BotQuotaMetadata.toObject(message.botQuotaMetadata, options);
                if (options.oneofs)
                    object._botQuotaMetadata = "botQuotaMetadata";
            }
            if (message.botAgeCollectionMetadata != null && message.hasOwnProperty("botAgeCollectionMetadata")) {
                object.botAgeCollectionMetadata = $root.AICommon.BotAgeCollectionMetadata.toObject(message.botAgeCollectionMetadata, options);
                if (options.oneofs)
                    object._botAgeCollectionMetadata = "botAgeCollectionMetadata";
            }
            if (message.conversationStarterPromptId != null && message.hasOwnProperty("conversationStarterPromptId")) {
                object.conversationStarterPromptId = message.conversationStarterPromptId;
                if (options.oneofs)
                    object._conversationStarterPromptId = "conversationStarterPromptId";
            }
            if (message.botResponseId != null && message.hasOwnProperty("botResponseId")) {
                object.botResponseId = message.botResponseId;
                if (options.oneofs)
                    object._botResponseId = "botResponseId";
            }
            if (message.verificationMetadata != null && message.hasOwnProperty("verificationMetadata")) {
                object.verificationMetadata = $root.AICommon.BotSignatureVerificationMetadata.toObject(message.verificationMetadata, options);
                if (options.oneofs)
                    object._verificationMetadata = "verificationMetadata";
            }
            if (message.unifiedResponseMutation != null && message.hasOwnProperty("unifiedResponseMutation")) {
                object.unifiedResponseMutation = $root.AICommon.BotUnifiedResponseMutation.toObject(message.unifiedResponseMutation, options);
                if (options.oneofs)
                    object._unifiedResponseMutation = "unifiedResponseMutation";
            }
            if (message.botMessageOriginMetadata != null && message.hasOwnProperty("botMessageOriginMetadata")) {
                object.botMessageOriginMetadata = $root.AICommon.BotMessageOriginMetadata.toObject(message.botMessageOriginMetadata, options);
                if (options.oneofs)
                    object._botMessageOriginMetadata = "botMessageOriginMetadata";
            }
            if (message.inThreadSurveyMetadata != null && message.hasOwnProperty("inThreadSurveyMetadata")) {
                object.inThreadSurveyMetadata = $root.AICommon.InThreadSurveyMetadata.toObject(message.inThreadSurveyMetadata, options);
                if (options.oneofs)
                    object._inThreadSurveyMetadata = "inThreadSurveyMetadata";
            }
            if (message.botThreadInfo != null && message.hasOwnProperty("botThreadInfo")) {
                object.botThreadInfo = $root.AICommon.AIThreadInfo.toObject(message.botThreadInfo, options);
                if (options.oneofs)
                    object._botThreadInfo = "botThreadInfo";
            }
            if (message.regenerateMetadata != null && message.hasOwnProperty("regenerateMetadata")) {
                object.regenerateMetadata = $root.AICommon.AIRegenerateMetadata.toObject(message.regenerateMetadata, options);
                if (options.oneofs)
                    object._regenerateMetadata = "regenerateMetadata";
            }
            if (message.sessionTransparencyMetadata != null && message.hasOwnProperty("sessionTransparencyMetadata")) {
                object.sessionTransparencyMetadata = $root.AICommon.SessionTransparencyMetadata.toObject(message.sessionTransparencyMetadata, options);
                if (options.oneofs)
                    object._sessionTransparencyMetadata = "sessionTransparencyMetadata";
            }
            if (message.botDocumentMessageMetadata != null && message.hasOwnProperty("botDocumentMessageMetadata")) {
                object.botDocumentMessageMetadata = $root.AICommon.BotDocumentMessageMetadata.toObject(message.botDocumentMessageMetadata, options);
                if (options.oneofs)
                    object._botDocumentMessageMetadata = "botDocumentMessageMetadata";
            }
            if (message.botGroupMetadata != null && message.hasOwnProperty("botGroupMetadata")) {
                object.botGroupMetadata = $root.AICommon.BotGroupMetadata.toObject(message.botGroupMetadata, options);
                if (options.oneofs)
                    object._botGroupMetadata = "botGroupMetadata";
            }
            if (message.internalMetadata != null && message.hasOwnProperty("internalMetadata")) {
                object.internalMetadata = options.bytes === String ? $util.base64.encode(message.internalMetadata, 0, message.internalMetadata.length) : options.bytes === Array ? Array.prototype.slice.call(message.internalMetadata) : message.internalMetadata;
                if (options.oneofs)
                    object._internalMetadata = "internalMetadata";
            }
            return object;
        };

        /**
         * Converts this BotMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotMetadata";
        };

        return BotMetadata;
    })();

    AICommon.AIThreadInfo = (function() {

        /**
         * Properties of a AIThreadInfo.
         * @memberof AICommon
         * @interface IAIThreadInfo
         * @property {AICommon.AIThreadInfo.IAIThreadServerInfo|null} [serverInfo] AIThreadInfo serverInfo
         * @property {AICommon.AIThreadInfo.IAIThreadClientInfo|null} [clientInfo] AIThreadInfo clientInfo
         */

        /**
         * Constructs a new AIThreadInfo.
         * @memberof AICommon
         * @classdesc Represents a AIThreadInfo.
         * @implements IAIThreadInfo
         * @constructor
         * @param {AICommon.IAIThreadInfo=} [properties] Properties to set
         */
        function AIThreadInfo(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]];
        }

        /**
         * AIThreadInfo serverInfo.
         * @member {AICommon.AIThreadInfo.IAIThreadServerInfo|null|undefined} serverInfo
         * @memberof AICommon.AIThreadInfo
         * @instance
         */
        AIThreadInfo.prototype.serverInfo = null;

        /**
         * AIThreadInfo clientInfo.
         * @member {AICommon.AIThreadInfo.IAIThreadClientInfo|null|undefined} clientInfo
         * @memberof AICommon.AIThreadInfo
         * @instance
         */
        AIThreadInfo.prototype.clientInfo = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * AIThreadInfo _serverInfo.
         * @member {"serverInfo"|undefined} _serverInfo
         * @memberof AICommon.AIThreadInfo
         * @instance
         */
        Object.defineProperty(AIThreadInfo.prototype, "_serverInfo", {
            get: $util.oneOfGetter($oneOfFields = ["serverInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * AIThreadInfo _clientInfo.
         * @member {"clientInfo"|undefined} _clientInfo
         * @memberof AICommon.AIThreadInfo
         * @instance
         */
        Object.defineProperty(AIThreadInfo.prototype, "_clientInfo", {
            get: $util.oneOfGetter($oneOfFields = ["clientInfo"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new AIThreadInfo instance using the specified properties.
         * @function create
         * @memberof AICommon.AIThreadInfo
         * @static
         * @param {AICommon.IAIThreadInfo=} [properties] Properties to set
         * @returns {AICommon.AIThreadInfo} AIThreadInfo instance
         */
        AIThreadInfo.create = function create(properties) {
            return new AIThreadInfo(properties);
        };

        /**
         * Encodes the specified AIThreadInfo message. Does not implicitly {@link AICommon.AIThreadInfo.verify|verify} messages.
         * @function encode
         * @memberof AICommon.AIThreadInfo
         * @static
         * @param {AICommon.IAIThreadInfo} message AIThreadInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIThreadInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.serverInfo != null && Object.hasOwnProperty.call(message, "serverInfo"))
                $root.AICommon.AIThreadInfo.AIThreadServerInfo.encode(message.serverInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.clientInfo != null && Object.hasOwnProperty.call(message, "clientInfo"))
                $root.AICommon.AIThreadInfo.AIThreadClientInfo.encode(message.clientInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified AIThreadInfo message, length delimited. Does not implicitly {@link AICommon.AIThreadInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.AIThreadInfo
         * @static
         * @param {AICommon.IAIThreadInfo} message AIThreadInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AIThreadInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a AIThreadInfo message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.AIThreadInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.AIThreadInfo} AIThreadInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIThreadInfo.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.AICommon.AIThreadInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.serverInfo = $root.AICommon.AIThreadInfo.AIThreadServerInfo.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.clientInfo = $root.AICommon.AIThreadInfo.AIThreadClientInfo.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a AIThreadInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.AIThreadInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.AIThreadInfo} AIThreadInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AIThreadInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a AIThreadInfo message.
         * @function verify
         * @memberof AICommon.AIThreadInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AIThreadInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.serverInfo != null && message.hasOwnProperty("serverInfo")) {
                properties._serverInfo = 1;
                {
                    var error = $root.AICommon.AIThreadInfo.AIThreadServerInfo.verify(message.serverInfo);
                    if (error)
                        return "serverInfo." + error;
                }
            }
            if (message.clientInfo != null && message.hasOwnProperty("clientInfo")) {
                properties._clientInfo = 1;
                {
                    var error = $root.AICommon.AIThreadInfo.AIThreadClientInfo.verify(message.clientInfo);
                    if (error)
                        return "clientInfo." + error;
                }
            }
            return null;
        };

        /**
         * Creates a AIThreadInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.AIThreadInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.AIThreadInfo} AIThreadInfo
         */
        AIThreadInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.AIThreadInfo)
                return object;
            var message = new $root.AICommon.AIThreadInfo();
            if (object.serverInfo != null) {
                if (typeof object.serverInfo !== "object")
                    throw TypeError(".AICommon.AIThreadInfo.serverInfo: object expected");
                message.serverInfo = $root.AICommon.AIThreadInfo.AIThreadServerInfo.fromObject(object.serverInfo);
            }
            if (object.clientInfo != null) {
                if (typeof object.clientInfo !== "object")
                    throw TypeError(".AICommon.AIThreadInfo.clientInfo: object expected");
                message.clientInfo = $root.AICommon.AIThreadInfo.AIThreadClientInfo.fromObject(object.clientInfo);
            }
            return message;
        };

        /**
         * Creates a plain object from a AIThreadInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.AIThreadInfo
         * @static
         * @param {AICommon.AIThreadInfo} message AIThreadInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AIThreadInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.serverInfo != null && message.hasOwnProperty("serverInfo")) {
                object.serverInfo = $root.AICommon.AIThreadInfo.AIThreadServerInfo.toObject(message.serverInfo, options);
                if (options.oneofs)
                    object._serverInfo = "serverInfo";
            }
            if (message.clientInfo != null && message.hasOwnProperty("clientInfo")) {
                object.clientInfo = $root.AICommon.AIThreadInfo.AIThreadClientInfo.toObject(message.clientInfo, options);
                if (options.oneofs)
                    object._clientInfo = "clientInfo";
            }
            return object;
        };

        /**
         * Converts this AIThreadInfo to JSON.
         * @function toJSON
         * @memberof AICommon.AIThreadInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        AIThreadInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for AIThreadInfo
         * @function getTypeUrl
         * @memberof AICommon.AIThreadInfo
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        AIThreadInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.AIThreadInfo";
        };

        AIThreadInfo.AIThreadClientInfo = (function() {

            /**
             * Properties of a AIThreadClientInfo.
             * @memberof AICommon.AIThreadInfo
             * @interface IAIThreadClientInfo
             * @property {AICommon.AIThreadInfo.AIThreadClientInfo.AIThreadType|null} [type] AIThreadClientInfo type
             */

            /**
             * Constructs a new AIThreadClientInfo.
             * @memberof AICommon.AIThreadInfo
             * @classdesc Represents a AIThreadClientInfo.
             * @implements IAIThreadClientInfo
             * @constructor
             * @param {AICommon.AIThreadInfo.IAIThreadClientInfo=} [properties] Properties to set
             */
            function AIThreadClientInfo(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]];
            }

            /**
             * AIThreadClientInfo type.
             * @member {AICommon.AIThreadInfo.AIThreadClientInfo.AIThreadType|null|undefined} type
             * @memberof AICommon.AIThreadInfo.AIThreadClientInfo
             * @instance
             */
            AIThreadClientInfo.prototype.type = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * AIThreadClientInfo _type.
             * @member {"type"|undefined} _type
             * @memberof AICommon.AIThreadInfo.AIThreadClientInfo
             * @instance
             */
            Object.defineProperty(AIThreadClientInfo.prototype, "_type", {
                get: $util.oneOfGetter($oneOfFields = ["type"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new AIThreadClientInfo instance using the specified properties.
             * @function create
             * @memberof AICommon.AIThreadInfo.AIThreadClientInfo
             * @static
             * @param {AICommon.AIThreadInfo.IAIThreadClientInfo=} [properties] Properties to set
             * @returns {AICommon.AIThreadInfo.AIThreadClientInfo} AIThreadClientInfo instance
             */
            AIThreadClientInfo.create = function create(properties) {
                return new AIThreadClientInfo(properties);
            };

            /**
             * Encodes the specified AIThreadClientInfo message. Does not implicitly {@link AICommon.AIThreadInfo.AIThreadClientInfo.verify|verify} messages.
             * @function encode
             * @memberof AICommon.AIThreadInfo.AIThreadClientInfo
             * @static
             * @param {AICommon.AIThreadInfo.IAIThreadClientInfo} message AIThreadClientInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIThreadClientInfo.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
                return writer;
            };

            /**
             * Encodes the specified AIThreadClientInfo message, length delimited. Does not implicitly {@link AICommon.AIThreadInfo.AIThreadClientInfo.verify|verify} messages.
             * @function encodeDelimited
             * @memberof AICommon.AIThreadInfo.AIThreadClientInfo
             * @static
             * @param {AICommon.AIThreadInfo.IAIThreadClientInfo} message AIThreadClientInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIThreadClientInfo.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a AIThreadClientInfo message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.AIThreadInfo.AIThreadClientInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.AIThreadInfo.AIThreadClientInfo} AIThreadClientInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AIThreadClientInfo.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.AICommon.AIThreadInfo.AIThreadClientInfo();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.type = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a AIThreadClientInfo message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof AICommon.AIThreadInfo.AIThreadClientInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {AICommon.AIThreadInfo.AIThreadClientInfo} AIThreadClientInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AIThreadClientInfo.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a AIThreadClientInfo message.
             * @function verify
             * @memberof AICommon.AIThreadInfo.AIThreadClientInfo
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AIThreadClientInfo.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.type != null && message.hasOwnProperty("type")) {
                    properties._type = 1;
                    switch (message.type) {
                    default:
                        return "type: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a AIThreadClientInfo message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.AIThreadInfo.AIThreadClientInfo
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.AIThreadInfo.AIThreadClientInfo} AIThreadClientInfo
             */
            AIThreadClientInfo.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.AIThreadInfo.AIThreadClientInfo)
                    return object;
                var message = new $root.AICommon.AIThreadInfo.AIThreadClientInfo();
                switch (object.type) {
                default:
                    if (typeof object.type === "number") {
                        message.type = object.type;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.type = 0;
                    break;
                case "DEFAULT":
                case 1:
                    message.type = 1;
                    break;
                case "INCOGNITO":
                case 2:
                    message.type = 2;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a AIThreadClientInfo message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.AIThreadInfo.AIThreadClientInfo
             * @static
             * @param {AICommon.AIThreadInfo.AIThreadClientInfo} message AIThreadClientInfo
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AIThreadClientInfo.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.type != null && message.hasOwnProperty("type")) {
                    object.type = options.enums === String ? $root.AICommon.AIThreadInfo.AIThreadClientInfo.AIThreadType[message.type] === undefined ? message.type : $root.AICommon.AIThreadInfo.AIThreadClientInfo.AIThreadType[message.type] : message.type;
                    if (options.oneofs)
                        object._type = "type";
                }
                return object;
            };

            /**
             * Converts this AIThreadClientInfo to JSON.
             * @function toJSON
             * @memberof AICommon.AIThreadInfo.AIThreadClientInfo
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AIThreadClientInfo.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AIThreadClientInfo
             * @function getTypeUrl
             * @memberof AICommon.AIThreadInfo.AIThreadClientInfo
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AIThreadClientInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/AICommon.AIThreadInfo.AIThreadClientInfo";
            };

            /**
             * AIThreadType enum.
             * @name AICommon.AIThreadInfo.AIThreadClientInfo.AIThreadType
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} DEFAULT=1 DEFAULT value
             * @property {number} INCOGNITO=2 INCOGNITO value
             */
            AIThreadClientInfo.AIThreadType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "DEFAULT"] = 1;
                values[valuesById[2] = "INCOGNITO"] = 2;
                return values;
            })();

            return AIThreadClientInfo;
        })();

        AIThreadInfo.AIThreadServerInfo = (function() {

            /**
             * Properties of a AIThreadServerInfo.
             * @memberof AICommon.AIThreadInfo
             * @interface IAIThreadServerInfo
             * @property {string|null} [title] AIThreadServerInfo title
             */

            /**
             * Constructs a new AIThreadServerInfo.
             * @memberof AICommon.AIThreadInfo
             * @classdesc Represents a AIThreadServerInfo.
             * @implements IAIThreadServerInfo
             * @constructor
             * @param {AICommon.AIThreadInfo.IAIThreadServerInfo=} [properties] Properties to set
             */
            function AIThreadServerInfo(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]];
            }

            /**
             * AIThreadServerInfo title.
             * @member {string|null|undefined} title
             * @memberof AICommon.AIThreadInfo.AIThreadServerInfo
             * @instance
             */
            AIThreadServerInfo.prototype.title = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * AIThreadServerInfo _title.
             * @member {"title"|undefined} _title
             * @memberof AICommon.AIThreadInfo.AIThreadServerInfo
             * @instance
             */
            Object.defineProperty(AIThreadServerInfo.prototype, "_title", {
                get: $util.oneOfGetter($oneOfFields = ["title"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new AIThreadServerInfo instance using the specified properties.
             * @function create
             * @memberof AICommon.AIThreadInfo.AIThreadServerInfo
             * @static
             * @param {AICommon.AIThreadInfo.IAIThreadServerInfo=} [properties] Properties to set
             * @returns {AICommon.AIThreadInfo.AIThreadServerInfo} AIThreadServerInfo instance
             */
            AIThreadServerInfo.create = function create(properties) {
                return new AIThreadServerInfo(properties);
            };

            /**
             * Encodes the specified AIThreadServerInfo message. Does not implicitly {@link AICommon.AIThreadInfo.AIThreadServerInfo.verify|verify} messages.
             * @function encode
             * @memberof AICommon.AIThreadInfo.AIThreadServerInfo
             * @static
             * @param {AICommon.AIThreadInfo.IAIThreadServerInfo} message AIThreadServerInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIThreadServerInfo.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.title);
                return writer;
            };

            /**
             * Encodes the specified AIThreadServerInfo message, length delimited. Does not implicitly {@link AICommon.AIThreadInfo.AIThreadServerInfo.verify|verify} messages.
             * @function encodeDelimited
             * @memberof AICommon.AIThreadInfo.AIThreadServerInfo
             * @static
             * @param {AICommon.AIThreadInfo.IAIThreadServerInfo} message AIThreadServerInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AIThreadServerInfo.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a AIThreadServerInfo message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.AIThreadInfo.AIThreadServerInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.AIThreadInfo.AIThreadServerInfo} AIThreadServerInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AIThreadServerInfo.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.AICommon.AIThreadInfo.AIThreadServerInfo();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.title = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a AIThreadServerInfo message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof AICommon.AIThreadInfo.AIThreadServerInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {AICommon.AIThreadInfo.AIThreadServerInfo} AIThreadServerInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AIThreadServerInfo.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a AIThreadServerInfo message.
             * @function verify
             * @memberof AICommon.AIThreadInfo.AIThreadServerInfo
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AIThreadServerInfo.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.title != null && message.hasOwnProperty("title")) {
                    properties._title = 1;
                    if (!$util.isString(message.title))
                        return "title: string expected";
                }
                return null;
            };

            /**
             * Creates a AIThreadServerInfo message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.AIThreadInfo.AIThreadServerInfo
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.AIThreadInfo.AIThreadServerInfo} AIThreadServerInfo
             */
            AIThreadServerInfo.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.AIThreadInfo.AIThreadServerInfo)
                    return object;
                var message = new $root.AICommon.AIThreadInfo.AIThreadServerInfo();
                if (object.title != null)
                    message.title = String(object.title);
                return message;
            };

            /**
             * Creates a plain object from a AIThreadServerInfo message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.AIThreadInfo.AIThreadServerInfo
             * @static
             * @param {AICommon.AIThreadInfo.AIThreadServerInfo} message AIThreadServerInfo
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AIThreadServerInfo.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.title != null && message.hasOwnProperty("title")) {
                    object.title = message.title;
                    if (options.oneofs)
                        object._title = "title";
                }
                return object;
            };

            /**
             * Converts this AIThreadServerInfo to JSON.
             * @function toJSON
             * @memberof AICommon.AIThreadInfo.AIThreadServerInfo
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AIThreadServerInfo.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AIThreadServerInfo
             * @function getTypeUrl
             * @memberof AICommon.AIThreadInfo.AIThreadServerInfo
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AIThreadServerInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/AICommon.AIThreadInfo.AIThreadServerInfo";
            };

            return AIThreadServerInfo;
        })();

        return AIThreadInfo;
    })();

    AICommon.BotUnifiedResponseMutation = (function() {

        /**
         * Properties of a BotUnifiedResponseMutation.
         * @memberof AICommon
         * @interface IBotUnifiedResponseMutation
         * @property {AICommon.BotUnifiedResponseMutation.ISideBySideMetadata|null} [sbsMetadata] BotUnifiedResponseMutation sbsMetadata
         * @property {Array.<AICommon.BotUnifiedResponseMutation.IMediaDetailsMetadata>|null} [mediaDetailsMetadataList] BotUnifiedResponseMutation mediaDetailsMetadataList
         */

        /**
         * Constructs a new BotUnifiedResponseMutation.
         * @memberof AICommon
         * @classdesc Represents a BotUnifiedResponseMutation.
         * @implements IBotUnifiedResponseMutation
         * @constructor
         * @param {AICommon.IBotUnifiedResponseMutation=} [properties] Properties to set
         */
        function BotUnifiedResponseMutation(properties) {
            this.mediaDetailsMetadataList = [];
            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]];
        }

        /**
         * BotUnifiedResponseMutation sbsMetadata.
         * @member {AICommon.BotUnifiedResponseMutation.ISideBySideMetadata|null|undefined} sbsMetadata
         * @memberof AICommon.BotUnifiedResponseMutation
         * @instance
         */
        BotUnifiedResponseMutation.prototype.sbsMetadata = null;

        /**
         * BotUnifiedResponseMutation mediaDetailsMetadataList.
         * @member {Array.<AICommon.BotUnifiedResponseMutation.IMediaDetailsMetadata>} mediaDetailsMetadataList
         * @memberof AICommon.BotUnifiedResponseMutation
         * @instance
         */
        BotUnifiedResponseMutation.prototype.mediaDetailsMetadataList = $util.emptyArray;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotUnifiedResponseMutation _sbsMetadata.
         * @member {"sbsMetadata"|undefined} _sbsMetadata
         * @memberof AICommon.BotUnifiedResponseMutation
         * @instance
         */
        Object.defineProperty(BotUnifiedResponseMutation.prototype, "_sbsMetadata", {
            get: $util.oneOfGetter($oneOfFields = ["sbsMetadata"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotUnifiedResponseMutation instance using the specified properties.
         * @function create
         * @memberof AICommon.BotUnifiedResponseMutation
         * @static
         * @param {AICommon.IBotUnifiedResponseMutation=} [properties] Properties to set
         * @returns {AICommon.BotUnifiedResponseMutation} BotUnifiedResponseMutation instance
         */
        BotUnifiedResponseMutation.create = function create(properties) {
            return new BotUnifiedResponseMutation(properties);
        };

        /**
         * Encodes the specified BotUnifiedResponseMutation message. Does not implicitly {@link AICommon.BotUnifiedResponseMutation.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotUnifiedResponseMutation
         * @static
         * @param {AICommon.IBotUnifiedResponseMutation} message BotUnifiedResponseMutation message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotUnifiedResponseMutation.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.sbsMetadata != null && Object.hasOwnProperty.call(message, "sbsMetadata"))
                $root.AICommon.BotUnifiedResponseMutation.SideBySideMetadata.encode(message.sbsMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.mediaDetailsMetadataList != null && message.mediaDetailsMetadataList.length)
                for (var i = 0; i < message.mediaDetailsMetadataList.length; ++i)
                    $root.AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata.encode(message.mediaDetailsMetadataList[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified BotUnifiedResponseMutation message, length delimited. Does not implicitly {@link AICommon.BotUnifiedResponseMutation.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotUnifiedResponseMutation
         * @static
         * @param {AICommon.IBotUnifiedResponseMutation} message BotUnifiedResponseMutation message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotUnifiedResponseMutation.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotUnifiedResponseMutation message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotUnifiedResponseMutation
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotUnifiedResponseMutation} BotUnifiedResponseMutation
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotUnifiedResponseMutation.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.AICommon.BotUnifiedResponseMutation();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.sbsMetadata = $root.AICommon.BotUnifiedResponseMutation.SideBySideMetadata.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        if (!(message.mediaDetailsMetadataList && message.mediaDetailsMetadataList.length))
                            message.mediaDetailsMetadataList = [];
                        message.mediaDetailsMetadataList.push($root.AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotUnifiedResponseMutation message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotUnifiedResponseMutation
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotUnifiedResponseMutation} BotUnifiedResponseMutation
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotUnifiedResponseMutation.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotUnifiedResponseMutation message.
         * @function verify
         * @memberof AICommon.BotUnifiedResponseMutation
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotUnifiedResponseMutation.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.sbsMetadata != null && message.hasOwnProperty("sbsMetadata")) {
                properties._sbsMetadata = 1;
                {
                    var error = $root.AICommon.BotUnifiedResponseMutation.SideBySideMetadata.verify(message.sbsMetadata);
                    if (error)
                        return "sbsMetadata." + error;
                }
            }
            if (message.mediaDetailsMetadataList != null && message.hasOwnProperty("mediaDetailsMetadataList")) {
                if (!Array.isArray(message.mediaDetailsMetadataList))
                    return "mediaDetailsMetadataList: array expected";
                for (var i = 0; i < message.mediaDetailsMetadataList.length; ++i) {
                    var error = $root.AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata.verify(message.mediaDetailsMetadataList[i]);
                    if (error)
                        return "mediaDetailsMetadataList." + error;
                }
            }
            return null;
        };

        /**
         * Creates a BotUnifiedResponseMutation message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotUnifiedResponseMutation
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotUnifiedResponseMutation} BotUnifiedResponseMutation
         */
        BotUnifiedResponseMutation.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotUnifiedResponseMutation)
                return object;
            var message = new $root.AICommon.BotUnifiedResponseMutation();
            if (object.sbsMetadata != null) {
                if (typeof object.sbsMetadata !== "object")
                    throw TypeError(".AICommon.BotUnifiedResponseMutation.sbsMetadata: object expected");
                message.sbsMetadata = $root.AICommon.BotUnifiedResponseMutation.SideBySideMetadata.fromObject(object.sbsMetadata);
            }
            if (object.mediaDetailsMetadataList) {
                if (!Array.isArray(object.mediaDetailsMetadataList))
                    throw TypeError(".AICommon.BotUnifiedResponseMutation.mediaDetailsMetadataList: array expected");
                message.mediaDetailsMetadataList = [];
                for (var i = 0; i < object.mediaDetailsMetadataList.length; ++i) {
                    if (typeof object.mediaDetailsMetadataList[i] !== "object")
                        throw TypeError(".AICommon.BotUnifiedResponseMutation.mediaDetailsMetadataList: object expected");
                    message.mediaDetailsMetadataList[i] = $root.AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata.fromObject(object.mediaDetailsMetadataList[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a BotUnifiedResponseMutation message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotUnifiedResponseMutation
         * @static
         * @param {AICommon.BotUnifiedResponseMutation} message BotUnifiedResponseMutation
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotUnifiedResponseMutation.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.mediaDetailsMetadataList = [];
            if (message.sbsMetadata != null && message.hasOwnProperty("sbsMetadata")) {
                object.sbsMetadata = $root.AICommon.BotUnifiedResponseMutation.SideBySideMetadata.toObject(message.sbsMetadata, options);
                if (options.oneofs)
                    object._sbsMetadata = "sbsMetadata";
            }
            if (message.mediaDetailsMetadataList && message.mediaDetailsMetadataList.length) {
                object.mediaDetailsMetadataList = [];
                for (var j = 0; j < message.mediaDetailsMetadataList.length; ++j)
                    object.mediaDetailsMetadataList[j] = $root.AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata.toObject(message.mediaDetailsMetadataList[j], options);
            }
            return object;
        };

        /**
         * Converts this BotUnifiedResponseMutation to JSON.
         * @function toJSON
         * @memberof AICommon.BotUnifiedResponseMutation
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotUnifiedResponseMutation.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotUnifiedResponseMutation
         * @function getTypeUrl
         * @memberof AICommon.BotUnifiedResponseMutation
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotUnifiedResponseMutation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotUnifiedResponseMutation";
        };

        BotUnifiedResponseMutation.MediaDetailsMetadata = (function() {

            /**
             * Properties of a MediaDetailsMetadata.
             * @memberof AICommon.BotUnifiedResponseMutation
             * @interface IMediaDetailsMetadata
             * @property {string|null} [id] MediaDetailsMetadata id
             * @property {AICommon.IBotMediaMetadata|null} [highResMedia] MediaDetailsMetadata highResMedia
             * @property {AICommon.IBotMediaMetadata|null} [previewMedia] MediaDetailsMetadata previewMedia
             */

            /**
             * Constructs a new MediaDetailsMetadata.
             * @memberof AICommon.BotUnifiedResponseMutation
             * @classdesc Represents a MediaDetailsMetadata.
             * @implements IMediaDetailsMetadata
             * @constructor
             * @param {AICommon.BotUnifiedResponseMutation.IMediaDetailsMetadata=} [properties] Properties to set
             */
            function MediaDetailsMetadata(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]];
            }

            /**
             * MediaDetailsMetadata id.
             * @member {string|null|undefined} id
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @instance
             */
            MediaDetailsMetadata.prototype.id = null;

            /**
             * MediaDetailsMetadata highResMedia.
             * @member {AICommon.IBotMediaMetadata|null|undefined} highResMedia
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @instance
             */
            MediaDetailsMetadata.prototype.highResMedia = null;

            /**
             * MediaDetailsMetadata previewMedia.
             * @member {AICommon.IBotMediaMetadata|null|undefined} previewMedia
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @instance
             */
            MediaDetailsMetadata.prototype.previewMedia = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * MediaDetailsMetadata _id.
             * @member {"id"|undefined} _id
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @instance
             */
            Object.defineProperty(MediaDetailsMetadata.prototype, "_id", {
                get: $util.oneOfGetter($oneOfFields = ["id"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MediaDetailsMetadata _highResMedia.
             * @member {"highResMedia"|undefined} _highResMedia
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @instance
             */
            Object.defineProperty(MediaDetailsMetadata.prototype, "_highResMedia", {
                get: $util.oneOfGetter($oneOfFields = ["highResMedia"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * MediaDetailsMetadata _previewMedia.
             * @member {"previewMedia"|undefined} _previewMedia
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @instance
             */
            Object.defineProperty(MediaDetailsMetadata.prototype, "_previewMedia", {
                get: $util.oneOfGetter($oneOfFields = ["previewMedia"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new MediaDetailsMetadata instance using the specified properties.
             * @function create
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @static
             * @param {AICommon.BotUnifiedResponseMutation.IMediaDetailsMetadata=} [properties] Properties to set
             * @returns {AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata} MediaDetailsMetadata instance
             */
            MediaDetailsMetadata.create = function create(properties) {
                return new MediaDetailsMetadata(properties);
            };

            /**
             * Encodes the specified MediaDetailsMetadata message. Does not implicitly {@link AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata.verify|verify} messages.
             * @function encode
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @static
             * @param {AICommon.BotUnifiedResponseMutation.IMediaDetailsMetadata} message MediaDetailsMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MediaDetailsMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.id);
                if (message.highResMedia != null && Object.hasOwnProperty.call(message, "highResMedia"))
                    $root.AICommon.BotMediaMetadata.encode(message.highResMedia, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                if (message.previewMedia != null && Object.hasOwnProperty.call(message, "previewMedia"))
                    $root.AICommon.BotMediaMetadata.encode(message.previewMedia, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified MediaDetailsMetadata message, length delimited. Does not implicitly {@link AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @static
             * @param {AICommon.BotUnifiedResponseMutation.IMediaDetailsMetadata} message MediaDetailsMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MediaDetailsMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MediaDetailsMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata} MediaDetailsMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MediaDetailsMetadata.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.AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.id = reader.string();
                            break;
                        }
                    case 2: {
                            message.highResMedia = $root.AICommon.BotMediaMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    case 3: {
                            message.previewMedia = $root.AICommon.BotMediaMetadata.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a MediaDetailsMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata} MediaDetailsMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MediaDetailsMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MediaDetailsMetadata message.
             * @function verify
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MediaDetailsMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.id != null && message.hasOwnProperty("id")) {
                    properties._id = 1;
                    if (!$util.isString(message.id))
                        return "id: string expected";
                }
                if (message.highResMedia != null && message.hasOwnProperty("highResMedia")) {
                    properties._highResMedia = 1;
                    {
                        var error = $root.AICommon.BotMediaMetadata.verify(message.highResMedia);
                        if (error)
                            return "highResMedia." + error;
                    }
                }
                if (message.previewMedia != null && message.hasOwnProperty("previewMedia")) {
                    properties._previewMedia = 1;
                    {
                        var error = $root.AICommon.BotMediaMetadata.verify(message.previewMedia);
                        if (error)
                            return "previewMedia." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a MediaDetailsMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata} MediaDetailsMetadata
             */
            MediaDetailsMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata)
                    return object;
                var message = new $root.AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata();
                if (object.id != null)
                    message.id = String(object.id);
                if (object.highResMedia != null) {
                    if (typeof object.highResMedia !== "object")
                        throw TypeError(".AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata.highResMedia: object expected");
                    message.highResMedia = $root.AICommon.BotMediaMetadata.fromObject(object.highResMedia);
                }
                if (object.previewMedia != null) {
                    if (typeof object.previewMedia !== "object")
                        throw TypeError(".AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata.previewMedia: object expected");
                    message.previewMedia = $root.AICommon.BotMediaMetadata.fromObject(object.previewMedia);
                }
                return message;
            };

            /**
             * Creates a plain object from a MediaDetailsMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @static
             * @param {AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata} message MediaDetailsMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MediaDetailsMetadata.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.id != null && message.hasOwnProperty("id")) {
                    object.id = message.id;
                    if (options.oneofs)
                        object._id = "id";
                }
                if (message.highResMedia != null && message.hasOwnProperty("highResMedia")) {
                    object.highResMedia = $root.AICommon.BotMediaMetadata.toObject(message.highResMedia, options);
                    if (options.oneofs)
                        object._highResMedia = "highResMedia";
                }
                if (message.previewMedia != null && message.hasOwnProperty("previewMedia")) {
                    object.previewMedia = $root.AICommon.BotMediaMetadata.toObject(message.previewMedia, options);
                    if (options.oneofs)
                        object._previewMedia = "previewMedia";
                }
                return object;
            };

            /**
             * Converts this MediaDetailsMetadata to JSON.
             * @function toJSON
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MediaDetailsMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for MediaDetailsMetadata
             * @function getTypeUrl
             * @memberof AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            MediaDetailsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/AICommon.BotUnifiedResponseMutation.MediaDetailsMetadata";
            };

            return MediaDetailsMetadata;
        })();

        BotUnifiedResponseMutation.SideBySideMetadata = (function() {

            /**
             * Properties of a SideBySideMetadata.
             * @memberof AICommon.BotUnifiedResponseMutation
             * @interface ISideBySideMetadata
             * @property {string|null} [primaryResponseId] SideBySideMetadata primaryResponseId
             * @property {boolean|null} [surveyCtaHasRendered] SideBySideMetadata surveyCtaHasRendered
             */

            /**
             * Constructs a new SideBySideMetadata.
             * @memberof AICommon.BotUnifiedResponseMutation
             * @classdesc Represents a SideBySideMetadata.
             * @implements ISideBySideMetadata
             * @constructor
             * @param {AICommon.BotUnifiedResponseMutation.ISideBySideMetadata=} [properties] Properties to set
             */
            function SideBySideMetadata(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]];
            }

            /**
             * SideBySideMetadata primaryResponseId.
             * @member {string|null|undefined} primaryResponseId
             * @memberof AICommon.BotUnifiedResponseMutation.SideBySideMetadata
             * @instance
             */
            SideBySideMetadata.prototype.primaryResponseId = null;

            /**
             * SideBySideMetadata surveyCtaHasRendered.
             * @member {boolean|null|undefined} surveyCtaHasRendered
             * @memberof AICommon.BotUnifiedResponseMutation.SideBySideMetadata
             * @instance
             */
            SideBySideMetadata.prototype.surveyCtaHasRendered = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * SideBySideMetadata _primaryResponseId.
             * @member {"primaryResponseId"|undefined} _primaryResponseId
             * @memberof AICommon.BotUnifiedResponseMutation.SideBySideMetadata
             * @instance
             */
            Object.defineProperty(SideBySideMetadata.prototype, "_primaryResponseId", {
                get: $util.oneOfGetter($oneOfFields = ["primaryResponseId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * SideBySideMetadata _surveyCtaHasRendered.
             * @member {"surveyCtaHasRendered"|undefined} _surveyCtaHasRendered
             * @memberof AICommon.BotUnifiedResponseMutation.SideBySideMetadata
             * @instance
             */
            Object.defineProperty(SideBySideMetadata.prototype, "_surveyCtaHasRendered", {
                get: $util.oneOfGetter($oneOfFields = ["surveyCtaHasRendered"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new SideBySideMetadata instance using the specified properties.
             * @function create
             * @memberof AICommon.BotUnifiedResponseMutation.SideBySideMetadata
             * @static
             * @param {AICommon.BotUnifiedResponseMutation.ISideBySideMetadata=} [properties] Properties to set
             * @returns {AICommon.BotUnifiedResponseMutation.SideBySideMetadata} SideBySideMetadata instance
             */
            SideBySideMetadata.create = function create(properties) {
                return new SideBySideMetadata(properties);
            };

            /**
             * Encodes the specified SideBySideMetadata message. Does not implicitly {@link AICommon.BotUnifiedResponseMutation.SideBySideMetadata.verify|verify} messages.
             * @function encode
             * @memberof AICommon.BotUnifiedResponseMutation.SideBySideMetadata
             * @static
             * @param {AICommon.BotUnifiedResponseMutation.ISideBySideMetadata} message SideBySideMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SideBySideMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.primaryResponseId != null && Object.hasOwnProperty.call(message, "primaryResponseId"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.primaryResponseId);
                if (message.surveyCtaHasRendered != null && Object.hasOwnProperty.call(message, "surveyCtaHasRendered"))
                    writer.uint32(/* id 2, wireType 0 =*/16).bool(message.surveyCtaHasRendered);
                return writer;
            };

            /**
             * Encodes the specified SideBySideMetadata message, length delimited. Does not implicitly {@link AICommon.BotUnifiedResponseMutation.SideBySideMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof AICommon.BotUnifiedResponseMutation.SideBySideMetadata
             * @static
             * @param {AICommon.BotUnifiedResponseMutation.ISideBySideMetadata} message SideBySideMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SideBySideMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SideBySideMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.BotUnifiedResponseMutation.SideBySideMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.BotUnifiedResponseMutation.SideBySideMetadata} SideBySideMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SideBySideMetadata.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.AICommon.BotUnifiedResponseMutation.SideBySideMetadata();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.primaryResponseId = reader.string();
                            break;
                        }
                    case 2: {
                            message.surveyCtaHasRendered = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a SideBySideMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof AICommon.BotUnifiedResponseMutation.SideBySideMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {AICommon.BotUnifiedResponseMutation.SideBySideMetadata} SideBySideMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SideBySideMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SideBySideMetadata message.
             * @function verify
             * @memberof AICommon.BotUnifiedResponseMutation.SideBySideMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SideBySideMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.primaryResponseId != null && message.hasOwnProperty("primaryResponseId")) {
                    properties._primaryResponseId = 1;
                    if (!$util.isString(message.primaryResponseId))
                        return "primaryResponseId: string expected";
                }
                if (message.surveyCtaHasRendered != null && message.hasOwnProperty("surveyCtaHasRendered")) {
                    properties._surveyCtaHasRendered = 1;
                    if (typeof message.surveyCtaHasRendered !== "boolean")
                        return "surveyCtaHasRendered: boolean expected";
                }
                return null;
            };

            /**
             * Creates a SideBySideMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.BotUnifiedResponseMutation.SideBySideMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.BotUnifiedResponseMutation.SideBySideMetadata} SideBySideMetadata
             */
            SideBySideMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.BotUnifiedResponseMutation.SideBySideMetadata)
                    return object;
                var message = new $root.AICommon.BotUnifiedResponseMutation.SideBySideMetadata();
                if (object.primaryResponseId != null)
                    message.primaryResponseId = String(object.primaryResponseId);
                if (object.surveyCtaHasRendered != null)
                    message.surveyCtaHasRendered = Boolean(object.surveyCtaHasRendered);
                return message;
            };

            /**
             * Creates a plain object from a SideBySideMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.BotUnifiedResponseMutation.SideBySideMetadata
             * @static
             * @param {AICommon.BotUnifiedResponseMutation.SideBySideMetadata} message SideBySideMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SideBySideMetadata.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.primaryResponseId != null && message.hasOwnProperty("primaryResponseId")) {
                    object.primaryResponseId = message.primaryResponseId;
                    if (options.oneofs)
                        object._primaryResponseId = "primaryResponseId";
                }
                if (message.surveyCtaHasRendered != null && message.hasOwnProperty("surveyCtaHasRendered")) {
                    object.surveyCtaHasRendered = message.surveyCtaHasRendered;
                    if (options.oneofs)
                        object._surveyCtaHasRendered = "surveyCtaHasRendered";
                }
                return object;
            };

            /**
             * Converts this SideBySideMetadata to JSON.
             * @function toJSON
             * @memberof AICommon.BotUnifiedResponseMutation.SideBySideMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SideBySideMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for SideBySideMetadata
             * @function getTypeUrl
             * @memberof AICommon.BotUnifiedResponseMutation.SideBySideMetadata
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            SideBySideMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/AICommon.BotUnifiedResponseMutation.SideBySideMetadata";
            };

            return SideBySideMetadata;
        })();

        return BotUnifiedResponseMutation;
    })();

    AICommon.BotMessageOrigin = (function() {

        /**
         * Properties of a BotMessageOrigin.
         * @memberof AICommon
         * @interface IBotMessageOrigin
         * @property {AICommon.BotMessageOrigin.BotMessageOriginType|null} [type] BotMessageOrigin type
         */

        /**
         * Constructs a new BotMessageOrigin.
         * @memberof AICommon
         * @classdesc Represents a BotMessageOrigin.
         * @implements IBotMessageOrigin
         * @constructor
         * @param {AICommon.IBotMessageOrigin=} [properties] Properties to set
         */
        function BotMessageOrigin(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]];
        }

        /**
         * BotMessageOrigin type.
         * @member {AICommon.BotMessageOrigin.BotMessageOriginType|null|undefined} type
         * @memberof AICommon.BotMessageOrigin
         * @instance
         */
        BotMessageOrigin.prototype.type = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotMessageOrigin _type.
         * @member {"type"|undefined} _type
         * @memberof AICommon.BotMessageOrigin
         * @instance
         */
        Object.defineProperty(BotMessageOrigin.prototype, "_type", {
            get: $util.oneOfGetter($oneOfFields = ["type"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotMessageOrigin instance using the specified properties.
         * @function create
         * @memberof AICommon.BotMessageOrigin
         * @static
         * @param {AICommon.IBotMessageOrigin=} [properties] Properties to set
         * @returns {AICommon.BotMessageOrigin} BotMessageOrigin instance
         */
        BotMessageOrigin.create = function create(properties) {
            return new BotMessageOrigin(properties);
        };

        /**
         * Encodes the specified BotMessageOrigin message. Does not implicitly {@link AICommon.BotMessageOrigin.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotMessageOrigin
         * @static
         * @param {AICommon.IBotMessageOrigin} message BotMessageOrigin message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMessageOrigin.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
            return writer;
        };

        /**
         * Encodes the specified BotMessageOrigin message, length delimited. Does not implicitly {@link AICommon.BotMessageOrigin.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotMessageOrigin
         * @static
         * @param {AICommon.IBotMessageOrigin} message BotMessageOrigin message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMessageOrigin.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotMessageOrigin message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotMessageOrigin
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotMessageOrigin} BotMessageOrigin
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotMessageOrigin.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.AICommon.BotMessageOrigin();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.type = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotMessageOrigin message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotMessageOrigin
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotMessageOrigin} BotMessageOrigin
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotMessageOrigin.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotMessageOrigin message.
         * @function verify
         * @memberof AICommon.BotMessageOrigin
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotMessageOrigin.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.type != null && message.hasOwnProperty("type")) {
                properties._type = 1;
                switch (message.type) {
                default:
                    return "type: enum value expected";
                case 0:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a BotMessageOrigin message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotMessageOrigin
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotMessageOrigin} BotMessageOrigin
         */
        BotMessageOrigin.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotMessageOrigin)
                return object;
            var message = new $root.AICommon.BotMessageOrigin();
            switch (object.type) {
            default:
                if (typeof object.type === "number") {
                    message.type = object.type;
                    break;
                }
                break;
            case "BOT_MESSAGE_ORIGIN_TYPE_AI_INITIATED":
            case 0:
                message.type = 0;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a BotMessageOrigin message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotMessageOrigin
         * @static
         * @param {AICommon.BotMessageOrigin} message BotMessageOrigin
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotMessageOrigin.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.type != null && message.hasOwnProperty("type")) {
                object.type = options.enums === String ? $root.AICommon.BotMessageOrigin.BotMessageOriginType[message.type] === undefined ? message.type : $root.AICommon.BotMessageOrigin.BotMessageOriginType[message.type] : message.type;
                if (options.oneofs)
                    object._type = "type";
            }
            return object;
        };

        /**
         * Converts this BotMessageOrigin to JSON.
         * @function toJSON
         * @memberof AICommon.BotMessageOrigin
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotMessageOrigin.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotMessageOrigin
         * @function getTypeUrl
         * @memberof AICommon.BotMessageOrigin
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotMessageOrigin.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotMessageOrigin";
        };

        /**
         * BotMessageOriginType enum.
         * @name AICommon.BotMessageOrigin.BotMessageOriginType
         * @enum {number}
         * @property {number} BOT_MESSAGE_ORIGIN_TYPE_AI_INITIATED=0 BOT_MESSAGE_ORIGIN_TYPE_AI_INITIATED value
         */
        BotMessageOrigin.BotMessageOriginType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "BOT_MESSAGE_ORIGIN_TYPE_AI_INITIATED"] = 0;
            return values;
        })();

        return BotMessageOrigin;
    })();

    AICommon.BotMessageOriginMetadata = (function() {

        /**
         * Properties of a BotMessageOriginMetadata.
         * @memberof AICommon
         * @interface IBotMessageOriginMetadata
         * @property {Array.<AICommon.IBotMessageOrigin>|null} [origins] BotMessageOriginMetadata origins
         */

        /**
         * Constructs a new BotMessageOriginMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotMessageOriginMetadata.
         * @implements IBotMessageOriginMetadata
         * @constructor
         * @param {AICommon.IBotMessageOriginMetadata=} [properties] Properties to set
         */
        function BotMessageOriginMetadata(properties) {
            this.origins = [];
            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]];
        }

        /**
         * BotMessageOriginMetadata origins.
         * @member {Array.<AICommon.IBotMessageOrigin>} origins
         * @memberof AICommon.BotMessageOriginMetadata
         * @instance
         */
        BotMessageOriginMetadata.prototype.origins = $util.emptyArray;

        /**
         * Creates a new BotMessageOriginMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotMessageOriginMetadata
         * @static
         * @param {AICommon.IBotMessageOriginMetadata=} [properties] Properties to set
         * @returns {AICommon.BotMessageOriginMetadata} BotMessageOriginMetadata instance
         */
        BotMessageOriginMetadata.create = function create(properties) {
            return new BotMessageOriginMetadata(properties);
        };

        /**
         * Encodes the specified BotMessageOriginMetadata message. Does not implicitly {@link AICommon.BotMessageOriginMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotMessageOriginMetadata
         * @static
         * @param {AICommon.IBotMessageOriginMetadata} message BotMessageOriginMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMessageOriginMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.origins != null && message.origins.length)
                for (var i = 0; i < message.origins.length; ++i)
                    $root.AICommon.BotMessageOrigin.encode(message.origins[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified BotMessageOriginMetadata message, length delimited. Does not implicitly {@link AICommon.BotMessageOriginMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotMessageOriginMetadata
         * @static
         * @param {AICommon.IBotMessageOriginMetadata} message BotMessageOriginMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMessageOriginMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotMessageOriginMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotMessageOriginMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotMessageOriginMetadata} BotMessageOriginMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotMessageOriginMetadata.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.AICommon.BotMessageOriginMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        if (!(message.origins && message.origins.length))
                            message.origins = [];
                        message.origins.push($root.AICommon.BotMessageOrigin.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotMessageOriginMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotMessageOriginMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotMessageOriginMetadata} BotMessageOriginMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotMessageOriginMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotMessageOriginMetadata message.
         * @function verify
         * @memberof AICommon.BotMessageOriginMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotMessageOriginMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.origins != null && message.hasOwnProperty("origins")) {
                if (!Array.isArray(message.origins))
                    return "origins: array expected";
                for (var i = 0; i < message.origins.length; ++i) {
                    var error = $root.AICommon.BotMessageOrigin.verify(message.origins[i]);
                    if (error)
                        return "origins." + error;
                }
            }
            return null;
        };

        /**
         * Creates a BotMessageOriginMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotMessageOriginMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotMessageOriginMetadata} BotMessageOriginMetadata
         */
        BotMessageOriginMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotMessageOriginMetadata)
                return object;
            var message = new $root.AICommon.BotMessageOriginMetadata();
            if (object.origins) {
                if (!Array.isArray(object.origins))
                    throw TypeError(".AICommon.BotMessageOriginMetadata.origins: array expected");
                message.origins = [];
                for (var i = 0; i < object.origins.length; ++i) {
                    if (typeof object.origins[i] !== "object")
                        throw TypeError(".AICommon.BotMessageOriginMetadata.origins: object expected");
                    message.origins[i] = $root.AICommon.BotMessageOrigin.fromObject(object.origins[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a BotMessageOriginMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotMessageOriginMetadata
         * @static
         * @param {AICommon.BotMessageOriginMetadata} message BotMessageOriginMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotMessageOriginMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.origins = [];
            if (message.origins && message.origins.length) {
                object.origins = [];
                for (var j = 0; j < message.origins.length; ++j)
                    object.origins[j] = $root.AICommon.BotMessageOrigin.toObject(message.origins[j], options);
            }
            return object;
        };

        /**
         * Converts this BotMessageOriginMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotMessageOriginMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotMessageOriginMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotMessageOriginMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotMessageOriginMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotMessageOriginMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotMessageOriginMetadata";
        };

        return BotMessageOriginMetadata;
    })();

    AICommon.InThreadSurveyMetadata = (function() {

        /**
         * Properties of an InThreadSurveyMetadata.
         * @memberof AICommon
         * @interface IInThreadSurveyMetadata
         * @property {string|null} [tessaSessionId] InThreadSurveyMetadata tessaSessionId
         * @property {string|null} [simonSessionId] InThreadSurveyMetadata simonSessionId
         * @property {string|null} [simonSurveyId] InThreadSurveyMetadata simonSurveyId
         * @property {string|null} [tessaRootId] InThreadSurveyMetadata tessaRootId
         * @property {string|null} [requestId] InThreadSurveyMetadata requestId
         * @property {string|null} [tessaEvent] InThreadSurveyMetadata tessaEvent
         * @property {string|null} [invitationHeaderText] InThreadSurveyMetadata invitationHeaderText
         * @property {string|null} [invitationBodyText] InThreadSurveyMetadata invitationBodyText
         * @property {string|null} [invitationCtaText] InThreadSurveyMetadata invitationCtaText
         * @property {string|null} [invitationCtaUrl] InThreadSurveyMetadata invitationCtaUrl
         * @property {string|null} [surveyTitle] InThreadSurveyMetadata surveyTitle
         * @property {Array.<AICommon.InThreadSurveyMetadata.IInThreadSurveyQuestion>|null} [questions] InThreadSurveyMetadata questions
         * @property {string|null} [surveyContinueButtonText] InThreadSurveyMetadata surveyContinueButtonText
         * @property {string|null} [surveySubmitButtonText] InThreadSurveyMetadata surveySubmitButtonText
         * @property {string|null} [privacyStatementFull] InThreadSurveyMetadata privacyStatementFull
         * @property {Array.<AICommon.InThreadSurveyMetadata.IInThreadSurveyPrivacyStatementPart>|null} [privacyStatementParts] InThreadSurveyMetadata privacyStatementParts
         * @property {string|null} [feedbackToastText] InThreadSurveyMetadata feedbackToastText
         * @property {number|null} [startQuestionIndex] InThreadSurveyMetadata startQuestionIndex
         */

        /**
         * Constructs a new InThreadSurveyMetadata.
         * @memberof AICommon
         * @classdesc Represents an InThreadSurveyMetadata.
         * @implements IInThreadSurveyMetadata
         * @constructor
         * @param {AICommon.IInThreadSurveyMetadata=} [properties] Properties to set
         */
        function InThreadSurveyMetadata(properties) {
            this.questions = [];
            this.privacyStatementParts = [];
            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]];
        }

        /**
         * InThreadSurveyMetadata tessaSessionId.
         * @member {string|null|undefined} tessaSessionId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.tessaSessionId = null;

        /**
         * InThreadSurveyMetadata simonSessionId.
         * @member {string|null|undefined} simonSessionId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.simonSessionId = null;

        /**
         * InThreadSurveyMetadata simonSurveyId.
         * @member {string|null|undefined} simonSurveyId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.simonSurveyId = null;

        /**
         * InThreadSurveyMetadata tessaRootId.
         * @member {string|null|undefined} tessaRootId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.tessaRootId = null;

        /**
         * InThreadSurveyMetadata requestId.
         * @member {string|null|undefined} requestId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.requestId = null;

        /**
         * InThreadSurveyMetadata tessaEvent.
         * @member {string|null|undefined} tessaEvent
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.tessaEvent = null;

        /**
         * InThreadSurveyMetadata invitationHeaderText.
         * @member {string|null|undefined} invitationHeaderText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.invitationHeaderText = null;

        /**
         * InThreadSurveyMetadata invitationBodyText.
         * @member {string|null|undefined} invitationBodyText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.invitationBodyText = null;

        /**
         * InThreadSurveyMetadata invitationCtaText.
         * @member {string|null|undefined} invitationCtaText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.invitationCtaText = null;

        /**
         * InThreadSurveyMetadata invitationCtaUrl.
         * @member {string|null|undefined} invitationCtaUrl
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.invitationCtaUrl = null;

        /**
         * InThreadSurveyMetadata surveyTitle.
         * @member {string|null|undefined} surveyTitle
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.surveyTitle = null;

        /**
         * InThreadSurveyMetadata questions.
         * @member {Array.<AICommon.InThreadSurveyMetadata.IInThreadSurveyQuestion>} questions
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.questions = $util.emptyArray;

        /**
         * InThreadSurveyMetadata surveyContinueButtonText.
         * @member {string|null|undefined} surveyContinueButtonText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.surveyContinueButtonText = null;

        /**
         * InThreadSurveyMetadata surveySubmitButtonText.
         * @member {string|null|undefined} surveySubmitButtonText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.surveySubmitButtonText = null;

        /**
         * InThreadSurveyMetadata privacyStatementFull.
         * @member {string|null|undefined} privacyStatementFull
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.privacyStatementFull = null;

        /**
         * InThreadSurveyMetadata privacyStatementParts.
         * @member {Array.<AICommon.InThreadSurveyMetadata.IInThreadSurveyPrivacyStatementPart>} privacyStatementParts
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.privacyStatementParts = $util.emptyArray;

        /**
         * InThreadSurveyMetadata feedbackToastText.
         * @member {string|null|undefined} feedbackToastText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.feedbackToastText = null;

        /**
         * InThreadSurveyMetadata startQuestionIndex.
         * @member {number|null|undefined} startQuestionIndex
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        InThreadSurveyMetadata.prototype.startQuestionIndex = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * InThreadSurveyMetadata _tessaSessionId.
         * @member {"tessaSessionId"|undefined} _tessaSessionId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_tessaSessionId", {
            get: $util.oneOfGetter($oneOfFields = ["tessaSessionId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _simonSessionId.
         * @member {"simonSessionId"|undefined} _simonSessionId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_simonSessionId", {
            get: $util.oneOfGetter($oneOfFields = ["simonSessionId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _simonSurveyId.
         * @member {"simonSurveyId"|undefined} _simonSurveyId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_simonSurveyId", {
            get: $util.oneOfGetter($oneOfFields = ["simonSurveyId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _tessaRootId.
         * @member {"tessaRootId"|undefined} _tessaRootId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_tessaRootId", {
            get: $util.oneOfGetter($oneOfFields = ["tessaRootId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _requestId.
         * @member {"requestId"|undefined} _requestId
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_requestId", {
            get: $util.oneOfGetter($oneOfFields = ["requestId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _tessaEvent.
         * @member {"tessaEvent"|undefined} _tessaEvent
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_tessaEvent", {
            get: $util.oneOfGetter($oneOfFields = ["tessaEvent"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _invitationHeaderText.
         * @member {"invitationHeaderText"|undefined} _invitationHeaderText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_invitationHeaderText", {
            get: $util.oneOfGetter($oneOfFields = ["invitationHeaderText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _invitationBodyText.
         * @member {"invitationBodyText"|undefined} _invitationBodyText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_invitationBodyText", {
            get: $util.oneOfGetter($oneOfFields = ["invitationBodyText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _invitationCtaText.
         * @member {"invitationCtaText"|undefined} _invitationCtaText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_invitationCtaText", {
            get: $util.oneOfGetter($oneOfFields = ["invitationCtaText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _invitationCtaUrl.
         * @member {"invitationCtaUrl"|undefined} _invitationCtaUrl
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_invitationCtaUrl", {
            get: $util.oneOfGetter($oneOfFields = ["invitationCtaUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _surveyTitle.
         * @member {"surveyTitle"|undefined} _surveyTitle
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_surveyTitle", {
            get: $util.oneOfGetter($oneOfFields = ["surveyTitle"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _surveyContinueButtonText.
         * @member {"surveyContinueButtonText"|undefined} _surveyContinueButtonText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_surveyContinueButtonText", {
            get: $util.oneOfGetter($oneOfFields = ["surveyContinueButtonText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _surveySubmitButtonText.
         * @member {"surveySubmitButtonText"|undefined} _surveySubmitButtonText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_surveySubmitButtonText", {
            get: $util.oneOfGetter($oneOfFields = ["surveySubmitButtonText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _privacyStatementFull.
         * @member {"privacyStatementFull"|undefined} _privacyStatementFull
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_privacyStatementFull", {
            get: $util.oneOfGetter($oneOfFields = ["privacyStatementFull"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _feedbackToastText.
         * @member {"feedbackToastText"|undefined} _feedbackToastText
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_feedbackToastText", {
            get: $util.oneOfGetter($oneOfFields = ["feedbackToastText"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * InThreadSurveyMetadata _startQuestionIndex.
         * @member {"startQuestionIndex"|undefined} _startQuestionIndex
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         */
        Object.defineProperty(InThreadSurveyMetadata.prototype, "_startQuestionIndex", {
            get: $util.oneOfGetter($oneOfFields = ["startQuestionIndex"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new InThreadSurveyMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.InThreadSurveyMetadata
         * @static
         * @param {AICommon.IInThreadSurveyMetadata=} [properties] Properties to set
         * @returns {AICommon.InThreadSurveyMetadata} InThreadSurveyMetadata instance
         */
        InThreadSurveyMetadata.create = function create(properties) {
            return new InThreadSurveyMetadata(properties);
        };

        /**
         * Encodes the specified InThreadSurveyMetadata message. Does not implicitly {@link AICommon.InThreadSurveyMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.InThreadSurveyMetadata
         * @static
         * @param {AICommon.IInThreadSurveyMetadata} message InThreadSurveyMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        InThreadSurveyMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.tessaSessionId != null && Object.hasOwnProperty.call(message, "tessaSessionId"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.tessaSessionId);
            if (message.simonSessionId != null && Object.hasOwnProperty.call(message, "simonSessionId"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.simonSessionId);
            if (message.simonSurveyId != null && Object.hasOwnProperty.call(message, "simonSurveyId"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.simonSurveyId);
            if (message.tessaRootId != null && Object.hasOwnProperty.call(message, "tessaRootId"))
                writer.uint32(/* id 4, wireType 2 =*/34).string(message.tessaRootId);
            if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId"))
                writer.uint32(/* id 5, wireType 2 =*/42).string(message.requestId);
            if (message.tessaEvent != null && Object.hasOwnProperty.call(message, "tessaEvent"))
                writer.uint32(/* id 6, wireType 2 =*/50).string(message.tessaEvent);
            if (message.invitationHeaderText != null && Object.hasOwnProperty.call(message, "invitationHeaderText"))
                writer.uint32(/* id 7, wireType 2 =*/58).string(message.invitationHeaderText);
            if (message.invitationBodyText != null && Object.hasOwnProperty.call(message, "invitationBodyText"))
                writer.uint32(/* id 8, wireType 2 =*/66).string(message.invitationBodyText);
            if (message.invitationCtaText != null && Object.hasOwnProperty.call(message, "invitationCtaText"))
                writer.uint32(/* id 9, wireType 2 =*/74).string(message.invitationCtaText);
            if (message.invitationCtaUrl != null && Object.hasOwnProperty.call(message, "invitationCtaUrl"))
                writer.uint32(/* id 10, wireType 2 =*/82).string(message.invitationCtaUrl);
            if (message.surveyTitle != null && Object.hasOwnProperty.call(message, "surveyTitle"))
                writer.uint32(/* id 11, wireType 2 =*/90).string(message.surveyTitle);
            if (message.questions != null && message.questions.length)
                for (var i = 0; i < message.questions.length; ++i)
                    $root.AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion.encode(message.questions[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
            if (message.surveyContinueButtonText != null && Object.hasOwnProperty.call(message, "surveyContinueButtonText"))
                writer.uint32(/* id 13, wireType 2 =*/106).string(message.surveyContinueButtonText);
            if (message.surveySubmitButtonText != null && Object.hasOwnProperty.call(message, "surveySubmitButtonText"))
                writer.uint32(/* id 14, wireType 2 =*/114).string(message.surveySubmitButtonText);
            if (message.privacyStatementFull != null && Object.hasOwnProperty.call(message, "privacyStatementFull"))
                writer.uint32(/* id 15, wireType 2 =*/122).string(message.privacyStatementFull);
            if (message.privacyStatementParts != null && message.privacyStatementParts.length)
                for (var i = 0; i < message.privacyStatementParts.length; ++i)
                    $root.AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart.encode(message.privacyStatementParts[i], writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
            if (message.feedbackToastText != null && Object.hasOwnProperty.call(message, "feedbackToastText"))
                writer.uint32(/* id 17, wireType 2 =*/138).string(message.feedbackToastText);
            if (message.startQuestionIndex != null && Object.hasOwnProperty.call(message, "startQuestionIndex"))
                writer.uint32(/* id 18, wireType 0 =*/144).int32(message.startQuestionIndex);
            return writer;
        };

        /**
         * Encodes the specified InThreadSurveyMetadata message, length delimited. Does not implicitly {@link AICommon.InThreadSurveyMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.InThreadSurveyMetadata
         * @static
         * @param {AICommon.IInThreadSurveyMetadata} message InThreadSurveyMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        InThreadSurveyMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes an InThreadSurveyMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.InThreadSurveyMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.InThreadSurveyMetadata} InThreadSurveyMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        InThreadSurveyMetadata.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.AICommon.InThreadSurveyMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.tessaSessionId = reader.string();
                        break;
                    }
                case 2: {
                        message.simonSessionId = reader.string();
                        break;
                    }
                case 3: {
                        message.simonSurveyId = reader.string();
                        break;
                    }
                case 4: {
                        message.tessaRootId = reader.string();
                        break;
                    }
                case 5: {
                        message.requestId = reader.string();
                        break;
                    }
                case 6: {
                        message.tessaEvent = reader.string();
                        break;
                    }
                case 7: {
                        message.invitationHeaderText = reader.string();
                        break;
                    }
                case 8: {
                        message.invitationBodyText = reader.string();
                        break;
                    }
                case 9: {
                        message.invitationCtaText = reader.string();
                        break;
                    }
                case 10: {
                        message.invitationCtaUrl = reader.string();
                        break;
                    }
                case 11: {
                        message.surveyTitle = reader.string();
                        break;
                    }
                case 12: {
                        if (!(message.questions && message.questions.length))
                            message.questions = [];
                        message.questions.push($root.AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion.decode(reader, reader.uint32()));
                        break;
                    }
                case 13: {
                        message.surveyContinueButtonText = reader.string();
                        break;
                    }
                case 14: {
                        message.surveySubmitButtonText = reader.string();
                        break;
                    }
                case 15: {
                        message.privacyStatementFull = reader.string();
                        break;
                    }
                case 16: {
                        if (!(message.privacyStatementParts && message.privacyStatementParts.length))
                            message.privacyStatementParts = [];
                        message.privacyStatementParts.push($root.AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart.decode(reader, reader.uint32()));
                        break;
                    }
                case 17: {
                        message.feedbackToastText = reader.string();
                        break;
                    }
                case 18: {
                        message.startQuestionIndex = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes an InThreadSurveyMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.InThreadSurveyMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.InThreadSurveyMetadata} InThreadSurveyMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        InThreadSurveyMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies an InThreadSurveyMetadata message.
         * @function verify
         * @memberof AICommon.InThreadSurveyMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        InThreadSurveyMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.tessaSessionId != null && message.hasOwnProperty("tessaSessionId")) {
                properties._tessaSessionId = 1;
                if (!$util.isString(message.tessaSessionId))
                    return "tessaSessionId: string expected";
            }
            if (message.simonSessionId != null && message.hasOwnProperty("simonSessionId")) {
                properties._simonSessionId = 1;
                if (!$util.isString(message.simonSessionId))
                    return "simonSessionId: string expected";
            }
            if (message.simonSurveyId != null && message.hasOwnProperty("simonSurveyId")) {
                properties._simonSurveyId = 1;
                if (!$util.isString(message.simonSurveyId))
                    return "simonSurveyId: string expected";
            }
            if (message.tessaRootId != null && message.hasOwnProperty("tessaRootId")) {
                properties._tessaRootId = 1;
                if (!$util.isString(message.tessaRootId))
                    return "tessaRootId: string expected";
            }
            if (message.requestId != null && message.hasOwnProperty("requestId")) {
                properties._requestId = 1;
                if (!$util.isString(message.requestId))
                    return "requestId: string expected";
            }
            if (message.tessaEvent != null && message.hasOwnProperty("tessaEvent")) {
                properties._tessaEvent = 1;
                if (!$util.isString(message.tessaEvent))
                    return "tessaEvent: string expected";
            }
            if (message.invitationHeaderText != null && message.hasOwnProperty("invitationHeaderText")) {
                properties._invitationHeaderText = 1;
                if (!$util.isString(message.invitationHeaderText))
                    return "invitationHeaderText: string expected";
            }
            if (message.invitationBodyText != null && message.hasOwnProperty("invitationBodyText")) {
                properties._invitationBodyText = 1;
                if (!$util.isString(message.invitationBodyText))
                    return "invitationBodyText: string expected";
            }
            if (message.invitationCtaText != null && message.hasOwnProperty("invitationCtaText")) {
                properties._invitationCtaText = 1;
                if (!$util.isString(message.invitationCtaText))
                    return "invitationCtaText: string expected";
            }
            if (message.invitationCtaUrl != null && message.hasOwnProperty("invitationCtaUrl")) {
                properties._invitationCtaUrl = 1;
                if (!$util.isString(message.invitationCtaUrl))
                    return "invitationCtaUrl: string expected";
            }
            if (message.surveyTitle != null && message.hasOwnProperty("surveyTitle")) {
                properties._surveyTitle = 1;
                if (!$util.isString(message.surveyTitle))
                    return "surveyTitle: string expected";
            }
            if (message.questions != null && message.hasOwnProperty("questions")) {
                if (!Array.isArray(message.questions))
                    return "questions: array expected";
                for (var i = 0; i < message.questions.length; ++i) {
                    var error = $root.AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion.verify(message.questions[i]);
                    if (error)
                        return "questions." + error;
                }
            }
            if (message.surveyContinueButtonText != null && message.hasOwnProperty("surveyContinueButtonText")) {
                properties._surveyContinueButtonText = 1;
                if (!$util.isString(message.surveyContinueButtonText))
                    return "surveyContinueButtonText: string expected";
            }
            if (message.surveySubmitButtonText != null && message.hasOwnProperty("surveySubmitButtonText")) {
                properties._surveySubmitButtonText = 1;
                if (!$util.isString(message.surveySubmitButtonText))
                    return "surveySubmitButtonText: string expected";
            }
            if (message.privacyStatementFull != null && message.hasOwnProperty("privacyStatementFull")) {
                properties._privacyStatementFull = 1;
                if (!$util.isString(message.privacyStatementFull))
                    return "privacyStatementFull: string expected";
            }
            if (message.privacyStatementParts != null && message.hasOwnProperty("privacyStatementParts")) {
                if (!Array.isArray(message.privacyStatementParts))
                    return "privacyStatementParts: array expected";
                for (var i = 0; i < message.privacyStatementParts.length; ++i) {
                    var error = $root.AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart.verify(message.privacyStatementParts[i]);
                    if (error)
                        return "privacyStatementParts." + error;
                }
            }
            if (message.feedbackToastText != null && message.hasOwnProperty("feedbackToastText")) {
                properties._feedbackToastText = 1;
                if (!$util.isString(message.feedbackToastText))
                    return "feedbackToastText: string expected";
            }
            if (message.startQuestionIndex != null && message.hasOwnProperty("startQuestionIndex")) {
                properties._startQuestionIndex = 1;
                if (!$util.isInteger(message.startQuestionIndex))
                    return "startQuestionIndex: integer expected";
            }
            return null;
        };

        /**
         * Creates an InThreadSurveyMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.InThreadSurveyMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.InThreadSurveyMetadata} InThreadSurveyMetadata
         */
        InThreadSurveyMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.InThreadSurveyMetadata)
                return object;
            var message = new $root.AICommon.InThreadSurveyMetadata();
            if (object.tessaSessionId != null)
                message.tessaSessionId = String(object.tessaSessionId);
            if (object.simonSessionId != null)
                message.simonSessionId = String(object.simonSessionId);
            if (object.simonSurveyId != null)
                message.simonSurveyId = String(object.simonSurveyId);
            if (object.tessaRootId != null)
                message.tessaRootId = String(object.tessaRootId);
            if (object.requestId != null)
                message.requestId = String(object.requestId);
            if (object.tessaEvent != null)
                message.tessaEvent = String(object.tessaEvent);
            if (object.invitationHeaderText != null)
                message.invitationHeaderText = String(object.invitationHeaderText);
            if (object.invitationBodyText != null)
                message.invitationBodyText = String(object.invitationBodyText);
            if (object.invitationCtaText != null)
                message.invitationCtaText = String(object.invitationCtaText);
            if (object.invitationCtaUrl != null)
                message.invitationCtaUrl = String(object.invitationCtaUrl);
            if (object.surveyTitle != null)
                message.surveyTitle = String(object.surveyTitle);
            if (object.questions) {
                if (!Array.isArray(object.questions))
                    throw TypeError(".AICommon.InThreadSurveyMetadata.questions: array expected");
                message.questions = [];
                for (var i = 0; i < object.questions.length; ++i) {
                    if (typeof object.questions[i] !== "object")
                        throw TypeError(".AICommon.InThreadSurveyMetadata.questions: object expected");
                    message.questions[i] = $root.AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion.fromObject(object.questions[i]);
                }
            }
            if (object.surveyContinueButtonText != null)
                message.surveyContinueButtonText = String(object.surveyContinueButtonText);
            if (object.surveySubmitButtonText != null)
                message.surveySubmitButtonText = String(object.surveySubmitButtonText);
            if (object.privacyStatementFull != null)
                message.privacyStatementFull = String(object.privacyStatementFull);
            if (object.privacyStatementParts) {
                if (!Array.isArray(object.privacyStatementParts))
                    throw TypeError(".AICommon.InThreadSurveyMetadata.privacyStatementParts: array expected");
                message.privacyStatementParts = [];
                for (var i = 0; i < object.privacyStatementParts.length; ++i) {
                    if (typeof object.privacyStatementParts[i] !== "object")
                        throw TypeError(".AICommon.InThreadSurveyMetadata.privacyStatementParts: object expected");
                    message.privacyStatementParts[i] = $root.AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart.fromObject(object.privacyStatementParts[i]);
                }
            }
            if (object.feedbackToastText != null)
                message.feedbackToastText = String(object.feedbackToastText);
            if (object.startQuestionIndex != null)
                message.startQuestionIndex = object.startQuestionIndex | 0;
            return message;
        };

        /**
         * Creates a plain object from an InThreadSurveyMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.InThreadSurveyMetadata
         * @static
         * @param {AICommon.InThreadSurveyMetadata} message InThreadSurveyMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        InThreadSurveyMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults) {
                object.questions = [];
                object.privacyStatementParts = [];
            }
            if (message.tessaSessionId != null && message.hasOwnProperty("tessaSessionId")) {
                object.tessaSessionId = message.tessaSessionId;
                if (options.oneofs)
                    object._tessaSessionId = "tessaSessionId";
            }
            if (message.simonSessionId != null && message.hasOwnProperty("simonSessionId")) {
                object.simonSessionId = message.simonSessionId;
                if (options.oneofs)
                    object._simonSessionId = "simonSessionId";
            }
            if (message.simonSurveyId != null && message.hasOwnProperty("simonSurveyId")) {
                object.simonSurveyId = message.simonSurveyId;
                if (options.oneofs)
                    object._simonSurveyId = "simonSurveyId";
            }
            if (message.tessaRootId != null && message.hasOwnProperty("tessaRootId")) {
                object.tessaRootId = message.tessaRootId;
                if (options.oneofs)
                    object._tessaRootId = "tessaRootId";
            }
            if (message.requestId != null && message.hasOwnProperty("requestId")) {
                object.requestId = message.requestId;
                if (options.oneofs)
                    object._requestId = "requestId";
            }
            if (message.tessaEvent != null && message.hasOwnProperty("tessaEvent")) {
                object.tessaEvent = message.tessaEvent;
                if (options.oneofs)
                    object._tessaEvent = "tessaEvent";
            }
            if (message.invitationHeaderText != null && message.hasOwnProperty("invitationHeaderText")) {
                object.invitationHeaderText = message.invitationHeaderText;
                if (options.oneofs)
                    object._invitationHeaderText = "invitationHeaderText";
            }
            if (message.invitationBodyText != null && message.hasOwnProperty("invitationBodyText")) {
                object.invitationBodyText = message.invitationBodyText;
                if (options.oneofs)
                    object._invitationBodyText = "invitationBodyText";
            }
            if (message.invitationCtaText != null && message.hasOwnProperty("invitationCtaText")) {
                object.invitationCtaText = message.invitationCtaText;
                if (options.oneofs)
                    object._invitationCtaText = "invitationCtaText";
            }
            if (message.invitationCtaUrl != null && message.hasOwnProperty("invitationCtaUrl")) {
                object.invitationCtaUrl = message.invitationCtaUrl;
                if (options.oneofs)
                    object._invitationCtaUrl = "invitationCtaUrl";
            }
            if (message.surveyTitle != null && message.hasOwnProperty("surveyTitle")) {
                object.surveyTitle = message.surveyTitle;
                if (options.oneofs)
                    object._surveyTitle = "surveyTitle";
            }
            if (message.questions && message.questions.length) {
                object.questions = [];
                for (var j = 0; j < message.questions.length; ++j)
                    object.questions[j] = $root.AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion.toObject(message.questions[j], options);
            }
            if (message.surveyContinueButtonText != null && message.hasOwnProperty("surveyContinueButtonText")) {
                object.surveyContinueButtonText = message.surveyContinueButtonText;
                if (options.oneofs)
                    object._surveyContinueButtonText = "surveyContinueButtonText";
            }
            if (message.surveySubmitButtonText != null && message.hasOwnProperty("surveySubmitButtonText")) {
                object.surveySubmitButtonText = message.surveySubmitButtonText;
                if (options.oneofs)
                    object._surveySubmitButtonText = "surveySubmitButtonText";
            }
            if (message.privacyStatementFull != null && message.hasOwnProperty("privacyStatementFull")) {
                object.privacyStatementFull = message.privacyStatementFull;
                if (options.oneofs)
                    object._privacyStatementFull = "privacyStatementFull";
            }
            if (message.privacyStatementParts && message.privacyStatementParts.length) {
                object.privacyStatementParts = [];
                for (var j = 0; j < message.privacyStatementParts.length; ++j)
                    object.privacyStatementParts[j] = $root.AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart.toObject(message.privacyStatementParts[j], options);
            }
            if (message.feedbackToastText != null && message.hasOwnProperty("feedbackToastText")) {
                object.feedbackToastText = message.feedbackToastText;
                if (options.oneofs)
                    object._feedbackToastText = "feedbackToastText";
            }
            if (message.startQuestionIndex != null && message.hasOwnProperty("startQuestionIndex")) {
                object.startQuestionIndex = message.startQuestionIndex;
                if (options.oneofs)
                    object._startQuestionIndex = "startQuestionIndex";
            }
            return object;
        };

        /**
         * Converts this InThreadSurveyMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.InThreadSurveyMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        InThreadSurveyMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for InThreadSurveyMetadata
         * @function getTypeUrl
         * @memberof AICommon.InThreadSurveyMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        InThreadSurveyMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.InThreadSurveyMetadata";
        };

        InThreadSurveyMetadata.InThreadSurveyOption = (function() {

            /**
             * Properties of an InThreadSurveyOption.
             * @memberof AICommon.InThreadSurveyMetadata
             * @interface IInThreadSurveyOption
             * @property {string|null} [stringValue] InThreadSurveyOption stringValue
             * @property {number|null} [numericValue] InThreadSurveyOption numericValue
             * @property {string|null} [textTranslated] InThreadSurveyOption textTranslated
             */

            /**
             * Constructs a new InThreadSurveyOption.
             * @memberof AICommon.InThreadSurveyMetadata
             * @classdesc Represents an InThreadSurveyOption.
             * @implements IInThreadSurveyOption
             * @constructor
             * @param {AICommon.InThreadSurveyMetadata.IInThreadSurveyOption=} [properties] Properties to set
             */
            function InThreadSurveyOption(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]];
            }

            /**
             * InThreadSurveyOption stringValue.
             * @member {string|null|undefined} stringValue
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @instance
             */
            InThreadSurveyOption.prototype.stringValue = null;

            /**
             * InThreadSurveyOption numericValue.
             * @member {number|null|undefined} numericValue
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @instance
             */
            InThreadSurveyOption.prototype.numericValue = null;

            /**
             * InThreadSurveyOption textTranslated.
             * @member {string|null|undefined} textTranslated
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @instance
             */
            InThreadSurveyOption.prototype.textTranslated = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * InThreadSurveyOption _stringValue.
             * @member {"stringValue"|undefined} _stringValue
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @instance
             */
            Object.defineProperty(InThreadSurveyOption.prototype, "_stringValue", {
                get: $util.oneOfGetter($oneOfFields = ["stringValue"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InThreadSurveyOption _numericValue.
             * @member {"numericValue"|undefined} _numericValue
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @instance
             */
            Object.defineProperty(InThreadSurveyOption.prototype, "_numericValue", {
                get: $util.oneOfGetter($oneOfFields = ["numericValue"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InThreadSurveyOption _textTranslated.
             * @member {"textTranslated"|undefined} _textTranslated
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @instance
             */
            Object.defineProperty(InThreadSurveyOption.prototype, "_textTranslated", {
                get: $util.oneOfGetter($oneOfFields = ["textTranslated"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new InThreadSurveyOption instance using the specified properties.
             * @function create
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @static
             * @param {AICommon.InThreadSurveyMetadata.IInThreadSurveyOption=} [properties] Properties to set
             * @returns {AICommon.InThreadSurveyMetadata.InThreadSurveyOption} InThreadSurveyOption instance
             */
            InThreadSurveyOption.create = function create(properties) {
                return new InThreadSurveyOption(properties);
            };

            /**
             * Encodes the specified InThreadSurveyOption message. Does not implicitly {@link AICommon.InThreadSurveyMetadata.InThreadSurveyOption.verify|verify} messages.
             * @function encode
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @static
             * @param {AICommon.InThreadSurveyMetadata.IInThreadSurveyOption} message InThreadSurveyOption message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InThreadSurveyOption.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.stringValue);
                if (message.numericValue != null && Object.hasOwnProperty.call(message, "numericValue"))
                    writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.numericValue);
                if (message.textTranslated != null && Object.hasOwnProperty.call(message, "textTranslated"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.textTranslated);
                return writer;
            };

            /**
             * Encodes the specified InThreadSurveyOption message, length delimited. Does not implicitly {@link AICommon.InThreadSurveyMetadata.InThreadSurveyOption.verify|verify} messages.
             * @function encodeDelimited
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @static
             * @param {AICommon.InThreadSurveyMetadata.IInThreadSurveyOption} message InThreadSurveyOption message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InThreadSurveyOption.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an InThreadSurveyOption message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.InThreadSurveyMetadata.InThreadSurveyOption} InThreadSurveyOption
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InThreadSurveyOption.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.AICommon.InThreadSurveyMetadata.InThreadSurveyOption();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.stringValue = reader.string();
                            break;
                        }
                    case 2: {
                            message.numericValue = reader.uint32();
                            break;
                        }
                    case 3: {
                            message.textTranslated = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an InThreadSurveyOption message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {AICommon.InThreadSurveyMetadata.InThreadSurveyOption} InThreadSurveyOption
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InThreadSurveyOption.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an InThreadSurveyOption message.
             * @function verify
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            InThreadSurveyOption.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.stringValue != null && message.hasOwnProperty("stringValue")) {
                    properties._stringValue = 1;
                    if (!$util.isString(message.stringValue))
                        return "stringValue: string expected";
                }
                if (message.numericValue != null && message.hasOwnProperty("numericValue")) {
                    properties._numericValue = 1;
                    if (!$util.isInteger(message.numericValue))
                        return "numericValue: integer expected";
                }
                if (message.textTranslated != null && message.hasOwnProperty("textTranslated")) {
                    properties._textTranslated = 1;
                    if (!$util.isString(message.textTranslated))
                        return "textTranslated: string expected";
                }
                return null;
            };

            /**
             * Creates an InThreadSurveyOption message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.InThreadSurveyMetadata.InThreadSurveyOption} InThreadSurveyOption
             */
            InThreadSurveyOption.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.InThreadSurveyMetadata.InThreadSurveyOption)
                    return object;
                var message = new $root.AICommon.InThreadSurveyMetadata.InThreadSurveyOption();
                if (object.stringValue != null)
                    message.stringValue = String(object.stringValue);
                if (object.numericValue != null)
                    message.numericValue = object.numericValue >>> 0;
                if (object.textTranslated != null)
                    message.textTranslated = String(object.textTranslated);
                return message;
            };

            /**
             * Creates a plain object from an InThreadSurveyOption message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @static
             * @param {AICommon.InThreadSurveyMetadata.InThreadSurveyOption} message InThreadSurveyOption
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            InThreadSurveyOption.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.stringValue != null && message.hasOwnProperty("stringValue")) {
                    object.stringValue = message.stringValue;
                    if (options.oneofs)
                        object._stringValue = "stringValue";
                }
                if (message.numericValue != null && message.hasOwnProperty("numericValue")) {
                    object.numericValue = message.numericValue;
                    if (options.oneofs)
                        object._numericValue = "numericValue";
                }
                if (message.textTranslated != null && message.hasOwnProperty("textTranslated")) {
                    object.textTranslated = message.textTranslated;
                    if (options.oneofs)
                        object._textTranslated = "textTranslated";
                }
                return object;
            };

            /**
             * Converts this InThreadSurveyOption to JSON.
             * @function toJSON
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            InThreadSurveyOption.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for InThreadSurveyOption
             * @function getTypeUrl
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyOption
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            InThreadSurveyOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/AICommon.InThreadSurveyMetadata.InThreadSurveyOption";
            };

            return InThreadSurveyOption;
        })();

        InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart = (function() {

            /**
             * Properties of an InThreadSurveyPrivacyStatementPart.
             * @memberof AICommon.InThreadSurveyMetadata
             * @interface IInThreadSurveyPrivacyStatementPart
             * @property {string|null} [text] InThreadSurveyPrivacyStatementPart text
             * @property {string|null} [url] InThreadSurveyPrivacyStatementPart url
             */

            /**
             * Constructs a new InThreadSurveyPrivacyStatementPart.
             * @memberof AICommon.InThreadSurveyMetadata
             * @classdesc Represents an InThreadSurveyPrivacyStatementPart.
             * @implements IInThreadSurveyPrivacyStatementPart
             * @constructor
             * @param {AICommon.InThreadSurveyMetadata.IInThreadSurveyPrivacyStatementPart=} [properties] Properties to set
             */
            function InThreadSurveyPrivacyStatementPart(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]];
            }

            /**
             * InThreadSurveyPrivacyStatementPart text.
             * @member {string|null|undefined} text
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @instance
             */
            InThreadSurveyPrivacyStatementPart.prototype.text = null;

            /**
             * InThreadSurveyPrivacyStatementPart url.
             * @member {string|null|undefined} url
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @instance
             */
            InThreadSurveyPrivacyStatementPart.prototype.url = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * InThreadSurveyPrivacyStatementPart _text.
             * @member {"text"|undefined} _text
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @instance
             */
            Object.defineProperty(InThreadSurveyPrivacyStatementPart.prototype, "_text", {
                get: $util.oneOfGetter($oneOfFields = ["text"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InThreadSurveyPrivacyStatementPart _url.
             * @member {"url"|undefined} _url
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @instance
             */
            Object.defineProperty(InThreadSurveyPrivacyStatementPart.prototype, "_url", {
                get: $util.oneOfGetter($oneOfFields = ["url"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new InThreadSurveyPrivacyStatementPart instance using the specified properties.
             * @function create
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @static
             * @param {AICommon.InThreadSurveyMetadata.IInThreadSurveyPrivacyStatementPart=} [properties] Properties to set
             * @returns {AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart} InThreadSurveyPrivacyStatementPart instance
             */
            InThreadSurveyPrivacyStatementPart.create = function create(properties) {
                return new InThreadSurveyPrivacyStatementPart(properties);
            };

            /**
             * Encodes the specified InThreadSurveyPrivacyStatementPart message. Does not implicitly {@link AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart.verify|verify} messages.
             * @function encode
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @static
             * @param {AICommon.InThreadSurveyMetadata.IInThreadSurveyPrivacyStatementPart} message InThreadSurveyPrivacyStatementPart message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InThreadSurveyPrivacyStatementPart.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.text);
                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.url);
                return writer;
            };

            /**
             * Encodes the specified InThreadSurveyPrivacyStatementPart message, length delimited. Does not implicitly {@link AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart.verify|verify} messages.
             * @function encodeDelimited
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @static
             * @param {AICommon.InThreadSurveyMetadata.IInThreadSurveyPrivacyStatementPart} message InThreadSurveyPrivacyStatementPart message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InThreadSurveyPrivacyStatementPart.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an InThreadSurveyPrivacyStatementPart message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart} InThreadSurveyPrivacyStatementPart
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InThreadSurveyPrivacyStatementPart.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.AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.text = reader.string();
                            break;
                        }
                    case 2: {
                            message.url = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an InThreadSurveyPrivacyStatementPart message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart} InThreadSurveyPrivacyStatementPart
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InThreadSurveyPrivacyStatementPart.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an InThreadSurveyPrivacyStatementPart message.
             * @function verify
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            InThreadSurveyPrivacyStatementPart.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.text != null && message.hasOwnProperty("text")) {
                    properties._text = 1;
                    if (!$util.isString(message.text))
                        return "text: string expected";
                }
                if (message.url != null && message.hasOwnProperty("url")) {
                    properties._url = 1;
                    if (!$util.isString(message.url))
                        return "url: string expected";
                }
                return null;
            };

            /**
             * Creates an InThreadSurveyPrivacyStatementPart message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart} InThreadSurveyPrivacyStatementPart
             */
            InThreadSurveyPrivacyStatementPart.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart)
                    return object;
                var message = new $root.AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart();
                if (object.text != null)
                    message.text = String(object.text);
                if (object.url != null)
                    message.url = String(object.url);
                return message;
            };

            /**
             * Creates a plain object from an InThreadSurveyPrivacyStatementPart message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @static
             * @param {AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart} message InThreadSurveyPrivacyStatementPart
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            InThreadSurveyPrivacyStatementPart.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.text != null && message.hasOwnProperty("text")) {
                    object.text = message.text;
                    if (options.oneofs)
                        object._text = "text";
                }
                if (message.url != null && message.hasOwnProperty("url")) {
                    object.url = message.url;
                    if (options.oneofs)
                        object._url = "url";
                }
                return object;
            };

            /**
             * Converts this InThreadSurveyPrivacyStatementPart to JSON.
             * @function toJSON
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            InThreadSurveyPrivacyStatementPart.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for InThreadSurveyPrivacyStatementPart
             * @function getTypeUrl
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            InThreadSurveyPrivacyStatementPart.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/AICommon.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart";
            };

            return InThreadSurveyPrivacyStatementPart;
        })();

        InThreadSurveyMetadata.InThreadSurveyQuestion = (function() {

            /**
             * Properties of an InThreadSurveyQuestion.
             * @memberof AICommon.InThreadSurveyMetadata
             * @interface IInThreadSurveyQuestion
             * @property {string|null} [questionText] InThreadSurveyQuestion questionText
             * @property {string|null} [questionId] InThreadSurveyQuestion questionId
             * @property {Array.<AICommon.InThreadSurveyMetadata.IInThreadSurveyOption>|null} [questionOptions] InThreadSurveyQuestion questionOptions
             */

            /**
             * Constructs a new InThreadSurveyQuestion.
             * @memberof AICommon.InThreadSurveyMetadata
             * @classdesc Represents an InThreadSurveyQuestion.
             * @implements IInThreadSurveyQuestion
             * @constructor
             * @param {AICommon.InThreadSurveyMetadata.IInThreadSurveyQuestion=} [properties] Properties to set
             */
            function InThreadSurveyQuestion(properties) {
                this.questionOptions = [];
                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]];
            }

            /**
             * InThreadSurveyQuestion questionText.
             * @member {string|null|undefined} questionText
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @instance
             */
            InThreadSurveyQuestion.prototype.questionText = null;

            /**
             * InThreadSurveyQuestion questionId.
             * @member {string|null|undefined} questionId
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @instance
             */
            InThreadSurveyQuestion.prototype.questionId = null;

            /**
             * InThreadSurveyQuestion questionOptions.
             * @member {Array.<AICommon.InThreadSurveyMetadata.IInThreadSurveyOption>} questionOptions
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @instance
             */
            InThreadSurveyQuestion.prototype.questionOptions = $util.emptyArray;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * InThreadSurveyQuestion _questionText.
             * @member {"questionText"|undefined} _questionText
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @instance
             */
            Object.defineProperty(InThreadSurveyQuestion.prototype, "_questionText", {
                get: $util.oneOfGetter($oneOfFields = ["questionText"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * InThreadSurveyQuestion _questionId.
             * @member {"questionId"|undefined} _questionId
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @instance
             */
            Object.defineProperty(InThreadSurveyQuestion.prototype, "_questionId", {
                get: $util.oneOfGetter($oneOfFields = ["questionId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new InThreadSurveyQuestion instance using the specified properties.
             * @function create
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @static
             * @param {AICommon.InThreadSurveyMetadata.IInThreadSurveyQuestion=} [properties] Properties to set
             * @returns {AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion} InThreadSurveyQuestion instance
             */
            InThreadSurveyQuestion.create = function create(properties) {
                return new InThreadSurveyQuestion(properties);
            };

            /**
             * Encodes the specified InThreadSurveyQuestion message. Does not implicitly {@link AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion.verify|verify} messages.
             * @function encode
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @static
             * @param {AICommon.InThreadSurveyMetadata.IInThreadSurveyQuestion} message InThreadSurveyQuestion message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InThreadSurveyQuestion.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.questionText != null && Object.hasOwnProperty.call(message, "questionText"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.questionText);
                if (message.questionId != null && Object.hasOwnProperty.call(message, "questionId"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.questionId);
                if (message.questionOptions != null && message.questionOptions.length)
                    for (var i = 0; i < message.questionOptions.length; ++i)
                        $root.AICommon.InThreadSurveyMetadata.InThreadSurveyOption.encode(message.questionOptions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified InThreadSurveyQuestion message, length delimited. Does not implicitly {@link AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion.verify|verify} messages.
             * @function encodeDelimited
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @static
             * @param {AICommon.InThreadSurveyMetadata.IInThreadSurveyQuestion} message InThreadSurveyQuestion message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InThreadSurveyQuestion.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an InThreadSurveyQuestion message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion} InThreadSurveyQuestion
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InThreadSurveyQuestion.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.AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.questionText = reader.string();
                            break;
                        }
                    case 2: {
                            message.questionId = reader.string();
                            break;
                        }
                    case 3: {
                            if (!(message.questionOptions && message.questionOptions.length))
                                message.questionOptions = [];
                            message.questionOptions.push($root.AICommon.InThreadSurveyMetadata.InThreadSurveyOption.decode(reader, reader.uint32()));
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an InThreadSurveyQuestion message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion} InThreadSurveyQuestion
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InThreadSurveyQuestion.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an InThreadSurveyQuestion message.
             * @function verify
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            InThreadSurveyQuestion.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.questionText != null && message.hasOwnProperty("questionText")) {
                    properties._questionText = 1;
                    if (!$util.isString(message.questionText))
                        return "questionText: string expected";
                }
                if (message.questionId != null && message.hasOwnProperty("questionId")) {
                    properties._questionId = 1;
                    if (!$util.isString(message.questionId))
                        return "questionId: string expected";
                }
                if (message.questionOptions != null && message.hasOwnProperty("questionOptions")) {
                    if (!Array.isArray(message.questionOptions))
                        return "questionOptions: array expected";
                    for (var i = 0; i < message.questionOptions.length; ++i) {
                        var error = $root.AICommon.InThreadSurveyMetadata.InThreadSurveyOption.verify(message.questionOptions[i]);
                        if (error)
                            return "questionOptions." + error;
                    }
                }
                return null;
            };

            /**
             * Creates an InThreadSurveyQuestion message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion} InThreadSurveyQuestion
             */
            InThreadSurveyQuestion.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion)
                    return object;
                var message = new $root.AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion();
                if (object.questionText != null)
                    message.questionText = String(object.questionText);
                if (object.questionId != null)
                    message.questionId = String(object.questionId);
                if (object.questionOptions) {
                    if (!Array.isArray(object.questionOptions))
                        throw TypeError(".AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion.questionOptions: array expected");
                    message.questionOptions = [];
                    for (var i = 0; i < object.questionOptions.length; ++i) {
                        if (typeof object.questionOptions[i] !== "object")
                            throw TypeError(".AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion.questionOptions: object expected");
                        message.questionOptions[i] = $root.AICommon.InThreadSurveyMetadata.InThreadSurveyOption.fromObject(object.questionOptions[i]);
                    }
                }
                return message;
            };

            /**
             * Creates a plain object from an InThreadSurveyQuestion message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @static
             * @param {AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion} message InThreadSurveyQuestion
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            InThreadSurveyQuestion.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.questionOptions = [];
                if (message.questionText != null && message.hasOwnProperty("questionText")) {
                    object.questionText = message.questionText;
                    if (options.oneofs)
                        object._questionText = "questionText";
                }
                if (message.questionId != null && message.hasOwnProperty("questionId")) {
                    object.questionId = message.questionId;
                    if (options.oneofs)
                        object._questionId = "questionId";
                }
                if (message.questionOptions && message.questionOptions.length) {
                    object.questionOptions = [];
                    for (var j = 0; j < message.questionOptions.length; ++j)
                        object.questionOptions[j] = $root.AICommon.InThreadSurveyMetadata.InThreadSurveyOption.toObject(message.questionOptions[j], options);
                }
                return object;
            };

            /**
             * Converts this InThreadSurveyQuestion to JSON.
             * @function toJSON
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            InThreadSurveyQuestion.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for InThreadSurveyQuestion
             * @function getTypeUrl
             * @memberof AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            InThreadSurveyQuestion.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/AICommon.InThreadSurveyMetadata.InThreadSurveyQuestion";
            };

            return InThreadSurveyQuestion;
        })();

        return InThreadSurveyMetadata;
    })();

    AICommon.BotSourcesMetadata = (function() {

        /**
         * Properties of a BotSourcesMetadata.
         * @memberof AICommon
         * @interface IBotSourcesMetadata
         * @property {Array.<AICommon.BotSourcesMetadata.IBotSourceItem>|null} [sources] BotSourcesMetadata sources
         */

        /**
         * Constructs a new BotSourcesMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotSourcesMetadata.
         * @implements IBotSourcesMetadata
         * @constructor
         * @param {AICommon.IBotSourcesMetadata=} [properties] Properties to set
         */
        function BotSourcesMetadata(properties) {
            this.sources = [];
            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]];
        }

        /**
         * BotSourcesMetadata sources.
         * @member {Array.<AICommon.BotSourcesMetadata.IBotSourceItem>} sources
         * @memberof AICommon.BotSourcesMetadata
         * @instance
         */
        BotSourcesMetadata.prototype.sources = $util.emptyArray;

        /**
         * Creates a new BotSourcesMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotSourcesMetadata
         * @static
         * @param {AICommon.IBotSourcesMetadata=} [properties] Properties to set
         * @returns {AICommon.BotSourcesMetadata} BotSourcesMetadata instance
         */
        BotSourcesMetadata.create = function create(properties) {
            return new BotSourcesMetadata(properties);
        };

        /**
         * Encodes the specified BotSourcesMetadata message. Does not implicitly {@link AICommon.BotSourcesMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotSourcesMetadata
         * @static
         * @param {AICommon.IBotSourcesMetadata} message BotSourcesMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotSourcesMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.sources != null && message.sources.length)
                for (var i = 0; i < message.sources.length; ++i)
                    $root.AICommon.BotSourcesMetadata.BotSourceItem.encode(message.sources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified BotSourcesMetadata message, length delimited. Does not implicitly {@link AICommon.BotSourcesMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotSourcesMetadata
         * @static
         * @param {AICommon.IBotSourcesMetadata} message BotSourcesMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotSourcesMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotSourcesMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotSourcesMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotSourcesMetadata} BotSourcesMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotSourcesMetadata.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.AICommon.BotSourcesMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        if (!(message.sources && message.sources.length))
                            message.sources = [];
                        message.sources.push($root.AICommon.BotSourcesMetadata.BotSourceItem.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotSourcesMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotSourcesMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotSourcesMetadata} BotSourcesMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotSourcesMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotSourcesMetadata message.
         * @function verify
         * @memberof AICommon.BotSourcesMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotSourcesMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.sources != null && message.hasOwnProperty("sources")) {
                if (!Array.isArray(message.sources))
                    return "sources: array expected";
                for (var i = 0; i < message.sources.length; ++i) {
                    var error = $root.AICommon.BotSourcesMetadata.BotSourceItem.verify(message.sources[i]);
                    if (error)
                        return "sources." + error;
                }
            }
            return null;
        };

        /**
         * Creates a BotSourcesMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotSourcesMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotSourcesMetadata} BotSourcesMetadata
         */
        BotSourcesMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotSourcesMetadata)
                return object;
            var message = new $root.AICommon.BotSourcesMetadata();
            if (object.sources) {
                if (!Array.isArray(object.sources))
                    throw TypeError(".AICommon.BotSourcesMetadata.sources: array expected");
                message.sources = [];
                for (var i = 0; i < object.sources.length; ++i) {
                    if (typeof object.sources[i] !== "object")
                        throw TypeError(".AICommon.BotSourcesMetadata.sources: object expected");
                    message.sources[i] = $root.AICommon.BotSourcesMetadata.BotSourceItem.fromObject(object.sources[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a BotSourcesMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotSourcesMetadata
         * @static
         * @param {AICommon.BotSourcesMetadata} message BotSourcesMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotSourcesMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.sources = [];
            if (message.sources && message.sources.length) {
                object.sources = [];
                for (var j = 0; j < message.sources.length; ++j)
                    object.sources[j] = $root.AICommon.BotSourcesMetadata.BotSourceItem.toObject(message.sources[j], options);
            }
            return object;
        };

        /**
         * Converts this BotSourcesMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotSourcesMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotSourcesMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotSourcesMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotSourcesMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotSourcesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotSourcesMetadata";
        };

        BotSourcesMetadata.BotSourceItem = (function() {

            /**
             * Properties of a BotSourceItem.
             * @memberof AICommon.BotSourcesMetadata
             * @interface IBotSourceItem
             * @property {AICommon.BotSourcesMetadata.BotSourceItem.SourceProvider|null} [provider] BotSourceItem provider
             * @property {string|null} [thumbnailCdnUrl] BotSourceItem thumbnailCdnUrl
             * @property {string|null} [sourceProviderUrl] BotSourceItem sourceProviderUrl
             * @property {string|null} [sourceQuery] BotSourceItem sourceQuery
             * @property {string|null} [faviconCdnUrl] BotSourceItem faviconCdnUrl
             * @property {number|null} [citationNumber] BotSourceItem citationNumber
             * @property {string|null} [sourceTitle] BotSourceItem sourceTitle
             */

            /**
             * Constructs a new BotSourceItem.
             * @memberof AICommon.BotSourcesMetadata
             * @classdesc Represents a BotSourceItem.
             * @implements IBotSourceItem
             * @constructor
             * @param {AICommon.BotSourcesMetadata.IBotSourceItem=} [properties] Properties to set
             */
            function BotSourceItem(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]];
            }

            /**
             * BotSourceItem provider.
             * @member {AICommon.BotSourcesMetadata.BotSourceItem.SourceProvider|null|undefined} provider
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.provider = null;

            /**
             * BotSourceItem thumbnailCdnUrl.
             * @member {string|null|undefined} thumbnailCdnUrl
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.thumbnailCdnUrl = null;

            /**
             * BotSourceItem sourceProviderUrl.
             * @member {string|null|undefined} sourceProviderUrl
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.sourceProviderUrl = null;

            /**
             * BotSourceItem sourceQuery.
             * @member {string|null|undefined} sourceQuery
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.sourceQuery = null;

            /**
             * BotSourceItem faviconCdnUrl.
             * @member {string|null|undefined} faviconCdnUrl
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.faviconCdnUrl = null;

            /**
             * BotSourceItem citationNumber.
             * @member {number|null|undefined} citationNumber
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.citationNumber = null;

            /**
             * BotSourceItem sourceTitle.
             * @member {string|null|undefined} sourceTitle
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            BotSourceItem.prototype.sourceTitle = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * BotSourceItem _provider.
             * @member {"provider"|undefined} _provider
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            Object.defineProperty(BotSourceItem.prototype, "_provider", {
                get: $util.oneOfGetter($oneOfFields = ["provider"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotSourceItem _thumbnailCdnUrl.
             * @member {"thumbnailCdnUrl"|undefined} _thumbnailCdnUrl
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            Object.defineProperty(BotSourceItem.prototype, "_thumbnailCdnUrl", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailCdnUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotSourceItem _sourceProviderUrl.
             * @member {"sourceProviderUrl"|undefined} _sourceProviderUrl
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            Object.defineProperty(BotSourceItem.prototype, "_sourceProviderUrl", {
                get: $util.oneOfGetter($oneOfFields = ["sourceProviderUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotSourceItem _sourceQuery.
             * @member {"sourceQuery"|undefined} _sourceQuery
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            Object.defineProperty(BotSourceItem.prototype, "_sourceQuery", {
                get: $util.oneOfGetter($oneOfFields = ["sourceQuery"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotSourceItem _faviconCdnUrl.
             * @member {"faviconCdnUrl"|undefined} _faviconCdnUrl
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            Object.defineProperty(BotSourceItem.prototype, "_faviconCdnUrl", {
                get: $util.oneOfGetter($oneOfFields = ["faviconCdnUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotSourceItem _citationNumber.
             * @member {"citationNumber"|undefined} _citationNumber
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            Object.defineProperty(BotSourceItem.prototype, "_citationNumber", {
                get: $util.oneOfGetter($oneOfFields = ["citationNumber"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotSourceItem _sourceTitle.
             * @member {"sourceTitle"|undefined} _sourceTitle
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             */
            Object.defineProperty(BotSourceItem.prototype, "_sourceTitle", {
                get: $util.oneOfGetter($oneOfFields = ["sourceTitle"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new BotSourceItem instance using the specified properties.
             * @function create
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @static
             * @param {AICommon.BotSourcesMetadata.IBotSourceItem=} [properties] Properties to set
             * @returns {AICommon.BotSourcesMetadata.BotSourceItem} BotSourceItem instance
             */
            BotSourceItem.create = function create(properties) {
                return new BotSourceItem(properties);
            };

            /**
             * Encodes the specified BotSourceItem message. Does not implicitly {@link AICommon.BotSourcesMetadata.BotSourceItem.verify|verify} messages.
             * @function encode
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @static
             * @param {AICommon.BotSourcesMetadata.IBotSourceItem} message BotSourceItem message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BotSourceItem.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.provider != null && Object.hasOwnProperty.call(message, "provider"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.provider);
                if (message.thumbnailCdnUrl != null && Object.hasOwnProperty.call(message, "thumbnailCdnUrl"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.thumbnailCdnUrl);
                if (message.sourceProviderUrl != null && Object.hasOwnProperty.call(message, "sourceProviderUrl"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceProviderUrl);
                if (message.sourceQuery != null && Object.hasOwnProperty.call(message, "sourceQuery"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.sourceQuery);
                if (message.faviconCdnUrl != null && Object.hasOwnProperty.call(message, "faviconCdnUrl"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.faviconCdnUrl);
                if (message.citationNumber != null && Object.hasOwnProperty.call(message, "citationNumber"))
                    writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.citationNumber);
                if (message.sourceTitle != null && Object.hasOwnProperty.call(message, "sourceTitle"))
                    writer.uint32(/* id 7, wireType 2 =*/58).string(message.sourceTitle);
                return writer;
            };

            /**
             * Encodes the specified BotSourceItem message, length delimited. Does not implicitly {@link AICommon.BotSourcesMetadata.BotSourceItem.verify|verify} messages.
             * @function encodeDelimited
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @static
             * @param {AICommon.BotSourcesMetadata.IBotSourceItem} message BotSourceItem message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BotSourceItem.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BotSourceItem message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.BotSourcesMetadata.BotSourceItem} BotSourceItem
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BotSourceItem.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.AICommon.BotSourcesMetadata.BotSourceItem();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.provider = reader.int32();
                            break;
                        }
                    case 2: {
                            message.thumbnailCdnUrl = reader.string();
                            break;
                        }
                    case 3: {
                            message.sourceProviderUrl = reader.string();
                            break;
                        }
                    case 4: {
                            message.sourceQuery = reader.string();
                            break;
                        }
                    case 5: {
                            message.faviconCdnUrl = reader.string();
                            break;
                        }
                    case 6: {
                            message.citationNumber = reader.uint32();
                            break;
                        }
                    case 7: {
                            message.sourceTitle = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a BotSourceItem message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {AICommon.BotSourcesMetadata.BotSourceItem} BotSourceItem
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BotSourceItem.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BotSourceItem message.
             * @function verify
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BotSourceItem.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.provider != null && message.hasOwnProperty("provider")) {
                    properties._provider = 1;
                    switch (message.provider) {
                    default:
                        return "provider: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                        break;
                    }
                }
                if (message.thumbnailCdnUrl != null && message.hasOwnProperty("thumbnailCdnUrl")) {
                    properties._thumbnailCdnUrl = 1;
                    if (!$util.isString(message.thumbnailCdnUrl))
                        return "thumbnailCdnUrl: string expected";
                }
                if (message.sourceProviderUrl != null && message.hasOwnProperty("sourceProviderUrl")) {
                    properties._sourceProviderUrl = 1;
                    if (!$util.isString(message.sourceProviderUrl))
                        return "sourceProviderUrl: string expected";
                }
                if (message.sourceQuery != null && message.hasOwnProperty("sourceQuery")) {
                    properties._sourceQuery = 1;
                    if (!$util.isString(message.sourceQuery))
                        return "sourceQuery: string expected";
                }
                if (message.faviconCdnUrl != null && message.hasOwnProperty("faviconCdnUrl")) {
                    properties._faviconCdnUrl = 1;
                    if (!$util.isString(message.faviconCdnUrl))
                        return "faviconCdnUrl: string expected";
                }
                if (message.citationNumber != null && message.hasOwnProperty("citationNumber")) {
                    properties._citationNumber = 1;
                    if (!$util.isInteger(message.citationNumber))
                        return "citationNumber: integer expected";
                }
                if (message.sourceTitle != null && message.hasOwnProperty("sourceTitle")) {
                    properties._sourceTitle = 1;
                    if (!$util.isString(message.sourceTitle))
                        return "sourceTitle: string expected";
                }
                return null;
            };

            /**
             * Creates a BotSourceItem message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.BotSourcesMetadata.BotSourceItem} BotSourceItem
             */
            BotSourceItem.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.BotSourcesMetadata.BotSourceItem)
                    return object;
                var message = new $root.AICommon.BotSourcesMetadata.BotSourceItem();
                switch (object.provider) {
                default:
                    if (typeof object.provider === "number") {
                        message.provider = object.provider;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.provider = 0;
                    break;
                case "BING":
                case 1:
                    message.provider = 1;
                    break;
                case "GOOGLE":
                case 2:
                    message.provider = 2;
                    break;
                case "SUPPORT":
                case 3:
                    message.provider = 3;
                    break;
                case "OTHER":
                case 4:
                    message.provider = 4;
                    break;
                }
                if (object.thumbnailCdnUrl != null)
                    message.thumbnailCdnUrl = String(object.thumbnailCdnUrl);
                if (object.sourceProviderUrl != null)
                    message.sourceProviderUrl = String(object.sourceProviderUrl);
                if (object.sourceQuery != null)
                    message.sourceQuery = String(object.sourceQuery);
                if (object.faviconCdnUrl != null)
                    message.faviconCdnUrl = String(object.faviconCdnUrl);
                if (object.citationNumber != null)
                    message.citationNumber = object.citationNumber >>> 0;
                if (object.sourceTitle != null)
                    message.sourceTitle = String(object.sourceTitle);
                return message;
            };

            /**
             * Creates a plain object from a BotSourceItem message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @static
             * @param {AICommon.BotSourcesMetadata.BotSourceItem} message BotSourceItem
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BotSourceItem.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.provider != null && message.hasOwnProperty("provider")) {
                    object.provider = options.enums === String ? $root.AICommon.BotSourcesMetadata.BotSourceItem.SourceProvider[message.provider] === undefined ? message.provider : $root.AICommon.BotSourcesMetadata.BotSourceItem.SourceProvider[message.provider] : message.provider;
                    if (options.oneofs)
                        object._provider = "provider";
                }
                if (message.thumbnailCdnUrl != null && message.hasOwnProperty("thumbnailCdnUrl")) {
                    object.thumbnailCdnUrl = message.thumbnailCdnUrl;
                    if (options.oneofs)
                        object._thumbnailCdnUrl = "thumbnailCdnUrl";
                }
                if (message.sourceProviderUrl != null && message.hasOwnProperty("sourceProviderUrl")) {
                    object.sourceProviderUrl = message.sourceProviderUrl;
                    if (options.oneofs)
                        object._sourceProviderUrl = "sourceProviderUrl";
                }
                if (message.sourceQuery != null && message.hasOwnProperty("sourceQuery")) {
                    object.sourceQuery = message.sourceQuery;
                    if (options.oneofs)
                        object._sourceQuery = "sourceQuery";
                }
                if (message.faviconCdnUrl != null && message.hasOwnProperty("faviconCdnUrl")) {
                    object.faviconCdnUrl = message.faviconCdnUrl;
                    if (options.oneofs)
                        object._faviconCdnUrl = "faviconCdnUrl";
                }
                if (message.citationNumber != null && message.hasOwnProperty("citationNumber")) {
                    object.citationNumber = message.citationNumber;
                    if (options.oneofs)
                        object._citationNumber = "citationNumber";
                }
                if (message.sourceTitle != null && message.hasOwnProperty("sourceTitle")) {
                    object.sourceTitle = message.sourceTitle;
                    if (options.oneofs)
                        object._sourceTitle = "sourceTitle";
                }
                return object;
            };

            /**
             * Converts this BotSourceItem to JSON.
             * @function toJSON
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BotSourceItem.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for BotSourceItem
             * @function getTypeUrl
             * @memberof AICommon.BotSourcesMetadata.BotSourceItem
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            BotSourceItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/AICommon.BotSourcesMetadata.BotSourceItem";
            };

            /**
             * SourceProvider enum.
             * @name AICommon.BotSourcesMetadata.BotSourceItem.SourceProvider
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} BING=1 BING value
             * @property {number} GOOGLE=2 GOOGLE value
             * @property {number} SUPPORT=3 SUPPORT value
             * @property {number} OTHER=4 OTHER value
             */
            BotSourceItem.SourceProvider = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "BING"] = 1;
                values[valuesById[2] = "GOOGLE"] = 2;
                values[valuesById[3] = "SUPPORT"] = 3;
                values[valuesById[4] = "OTHER"] = 4;
                return values;
            })();

            return BotSourceItem;
        })();

        return BotSourcesMetadata;
    })();

    AICommon.BotAgeCollectionMetadata = (function() {

        /**
         * Properties of a BotAgeCollectionMetadata.
         * @memberof AICommon
         * @interface IBotAgeCollectionMetadata
         * @property {boolean|null} [ageCollectionEligible] BotAgeCollectionMetadata ageCollectionEligible
         * @property {boolean|null} [shouldTriggerAgeCollectionOnClient] BotAgeCollectionMetadata shouldTriggerAgeCollectionOnClient
         * @property {AICommon.BotAgeCollectionMetadata.AgeCollectionType|null} [ageCollectionType] BotAgeCollectionMetadata ageCollectionType
         */

        /**
         * Constructs a new BotAgeCollectionMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotAgeCollectionMetadata.
         * @implements IBotAgeCollectionMetadata
         * @constructor
         * @param {AICommon.IBotAgeCollectionMetadata=} [properties] Properties to set
         */
        function BotAgeCollectionMetadata(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]];
        }

        /**
         * BotAgeCollectionMetadata ageCollectionEligible.
         * @member {boolean|null|undefined} ageCollectionEligible
         * @memberof AICommon.BotAgeCollectionMetadata
         * @instance
         */
        BotAgeCollectionMetadata.prototype.ageCollectionEligible = null;

        /**
         * BotAgeCollectionMetadata shouldTriggerAgeCollectionOnClient.
         * @member {boolean|null|undefined} shouldTriggerAgeCollectionOnClient
         * @memberof AICommon.BotAgeCollectionMetadata
         * @instance
         */
        BotAgeCollectionMetadata.prototype.shouldTriggerAgeCollectionOnClient = null;

        /**
         * BotAgeCollectionMetadata ageCollectionType.
         * @member {AICommon.BotAgeCollectionMetadata.AgeCollectionType|null|undefined} ageCollectionType
         * @memberof AICommon.BotAgeCollectionMetadata
         * @instance
         */
        BotAgeCollectionMetadata.prototype.ageCollectionType = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotAgeCollectionMetadata _ageCollectionEligible.
         * @member {"ageCollectionEligible"|undefined} _ageCollectionEligible
         * @memberof AICommon.BotAgeCollectionMetadata
         * @instance
         */
        Object.defineProperty(BotAgeCollectionMetadata.prototype, "_ageCollectionEligible", {
            get: $util.oneOfGetter($oneOfFields = ["ageCollectionEligible"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotAgeCollectionMetadata _shouldTriggerAgeCollectionOnClient.
         * @member {"shouldTriggerAgeCollectionOnClient"|undefined} _shouldTriggerAgeCollectionOnClient
         * @memberof AICommon.BotAgeCollectionMetadata
         * @instance
         */
        Object.defineProperty(BotAgeCollectionMetadata.prototype, "_shouldTriggerAgeCollectionOnClient", {
            get: $util.oneOfGetter($oneOfFields = ["shouldTriggerAgeCollectionOnClient"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotAgeCollectionMetadata _ageCollectionType.
         * @member {"ageCollectionType"|undefined} _ageCollectionType
         * @memberof AICommon.BotAgeCollectionMetadata
         * @instance
         */
        Object.defineProperty(BotAgeCollectionMetadata.prototype, "_ageCollectionType", {
            get: $util.oneOfGetter($oneOfFields = ["ageCollectionType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotAgeCollectionMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotAgeCollectionMetadata
         * @static
         * @param {AICommon.IBotAgeCollectionMetadata=} [properties] Properties to set
         * @returns {AICommon.BotAgeCollectionMetadata} BotAgeCollectionMetadata instance
         */
        BotAgeCollectionMetadata.create = function create(properties) {
            return new BotAgeCollectionMetadata(properties);
        };

        /**
         * Encodes the specified BotAgeCollectionMetadata message. Does not implicitly {@link AICommon.BotAgeCollectionMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotAgeCollectionMetadata
         * @static
         * @param {AICommon.IBotAgeCollectionMetadata} message BotAgeCollectionMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotAgeCollectionMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.ageCollectionEligible != null && Object.hasOwnProperty.call(message, "ageCollectionEligible"))
                writer.uint32(/* id 1, wireType 0 =*/8).bool(message.ageCollectionEligible);
            if (message.shouldTriggerAgeCollectionOnClient != null && Object.hasOwnProperty.call(message, "shouldTriggerAgeCollectionOnClient"))
                writer.uint32(/* id 2, wireType 0 =*/16).bool(message.shouldTriggerAgeCollectionOnClient);
            if (message.ageCollectionType != null && Object.hasOwnProperty.call(message, "ageCollectionType"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.ageCollectionType);
            return writer;
        };

        /**
         * Encodes the specified BotAgeCollectionMetadata message, length delimited. Does not implicitly {@link AICommon.BotAgeCollectionMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotAgeCollectionMetadata
         * @static
         * @param {AICommon.IBotAgeCollectionMetadata} message BotAgeCollectionMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotAgeCollectionMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotAgeCollectionMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotAgeCollectionMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotAgeCollectionMetadata} BotAgeCollectionMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotAgeCollectionMetadata.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.AICommon.BotAgeCollectionMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.ageCollectionEligible = reader.bool();
                        break;
                    }
                case 2: {
                        message.shouldTriggerAgeCollectionOnClient = reader.bool();
                        break;
                    }
                case 3: {
                        message.ageCollectionType = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotAgeCollectionMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotAgeCollectionMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotAgeCollectionMetadata} BotAgeCollectionMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotAgeCollectionMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotAgeCollectionMetadata message.
         * @function verify
         * @memberof AICommon.BotAgeCollectionMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotAgeCollectionMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.ageCollectionEligible != null && message.hasOwnProperty("ageCollectionEligible")) {
                properties._ageCollectionEligible = 1;
                if (typeof message.ageCollectionEligible !== "boolean")
                    return "ageCollectionEligible: boolean expected";
            }
            if (message.shouldTriggerAgeCollectionOnClient != null && message.hasOwnProperty("shouldTriggerAgeCollectionOnClient")) {
                properties._shouldTriggerAgeCollectionOnClient = 1;
                if (typeof message.shouldTriggerAgeCollectionOnClient !== "boolean")
                    return "shouldTriggerAgeCollectionOnClient: boolean expected";
            }
            if (message.ageCollectionType != null && message.hasOwnProperty("ageCollectionType")) {
                properties._ageCollectionType = 1;
                switch (message.ageCollectionType) {
                default:
                    return "ageCollectionType: enum value expected";
                case 0:
                case 1:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a BotAgeCollectionMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotAgeCollectionMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotAgeCollectionMetadata} BotAgeCollectionMetadata
         */
        BotAgeCollectionMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotAgeCollectionMetadata)
                return object;
            var message = new $root.AICommon.BotAgeCollectionMetadata();
            if (object.ageCollectionEligible != null)
                message.ageCollectionEligible = Boolean(object.ageCollectionEligible);
            if (object.shouldTriggerAgeCollectionOnClient != null)
                message.shouldTriggerAgeCollectionOnClient = Boolean(object.shouldTriggerAgeCollectionOnClient);
            switch (object.ageCollectionType) {
            default:
                if (typeof object.ageCollectionType === "number") {
                    message.ageCollectionType = object.ageCollectionType;
                    break;
                }
                break;
            case "O18_BINARY":
            case 0:
                message.ageCollectionType = 0;
                break;
            case "WAFFLE":
            case 1:
                message.ageCollectionType = 1;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a BotAgeCollectionMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotAgeCollectionMetadata
         * @static
         * @param {AICommon.BotAgeCollectionMetadata} message BotAgeCollectionMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotAgeCollectionMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.ageCollectionEligible != null && message.hasOwnProperty("ageCollectionEligible")) {
                object.ageCollectionEligible = message.ageCollectionEligible;
                if (options.oneofs)
                    object._ageCollectionEligible = "ageCollectionEligible";
            }
            if (message.shouldTriggerAgeCollectionOnClient != null && message.hasOwnProperty("shouldTriggerAgeCollectionOnClient")) {
                object.shouldTriggerAgeCollectionOnClient = message.shouldTriggerAgeCollectionOnClient;
                if (options.oneofs)
                    object._shouldTriggerAgeCollectionOnClient = "shouldTriggerAgeCollectionOnClient";
            }
            if (message.ageCollectionType != null && message.hasOwnProperty("ageCollectionType")) {
                object.ageCollectionType = options.enums === String ? $root.AICommon.BotAgeCollectionMetadata.AgeCollectionType[message.ageCollectionType] === undefined ? message.ageCollectionType : $root.AICommon.BotAgeCollectionMetadata.AgeCollectionType[message.ageCollectionType] : message.ageCollectionType;
                if (options.oneofs)
                    object._ageCollectionType = "ageCollectionType";
            }
            return object;
        };

        /**
         * Converts this BotAgeCollectionMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotAgeCollectionMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotAgeCollectionMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotAgeCollectionMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotAgeCollectionMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotAgeCollectionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotAgeCollectionMetadata";
        };

        /**
         * AgeCollectionType enum.
         * @name AICommon.BotAgeCollectionMetadata.AgeCollectionType
         * @enum {number}
         * @property {number} O18_BINARY=0 O18_BINARY value
         * @property {number} WAFFLE=1 WAFFLE value
         */
        BotAgeCollectionMetadata.AgeCollectionType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "O18_BINARY"] = 0;
            values[valuesById[1] = "WAFFLE"] = 1;
            return values;
        })();

        return BotAgeCollectionMetadata;
    })();

    AICommon.BotImagineMetadata = (function() {

        /**
         * Properties of a BotImagineMetadata.
         * @memberof AICommon
         * @interface IBotImagineMetadata
         * @property {AICommon.BotImagineMetadata.ImagineType|null} [imagineType] BotImagineMetadata imagineType
         */

        /**
         * Constructs a new BotImagineMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotImagineMetadata.
         * @implements IBotImagineMetadata
         * @constructor
         * @param {AICommon.IBotImagineMetadata=} [properties] Properties to set
         */
        function BotImagineMetadata(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]];
        }

        /**
         * BotImagineMetadata imagineType.
         * @member {AICommon.BotImagineMetadata.ImagineType|null|undefined} imagineType
         * @memberof AICommon.BotImagineMetadata
         * @instance
         */
        BotImagineMetadata.prototype.imagineType = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotImagineMetadata _imagineType.
         * @member {"imagineType"|undefined} _imagineType
         * @memberof AICommon.BotImagineMetadata
         * @instance
         */
        Object.defineProperty(BotImagineMetadata.prototype, "_imagineType", {
            get: $util.oneOfGetter($oneOfFields = ["imagineType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotImagineMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotImagineMetadata
         * @static
         * @param {AICommon.IBotImagineMetadata=} [properties] Properties to set
         * @returns {AICommon.BotImagineMetadata} BotImagineMetadata instance
         */
        BotImagineMetadata.create = function create(properties) {
            return new BotImagineMetadata(properties);
        };

        /**
         * Encodes the specified BotImagineMetadata message. Does not implicitly {@link AICommon.BotImagineMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotImagineMetadata
         * @static
         * @param {AICommon.IBotImagineMetadata} message BotImagineMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotImagineMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.imagineType != null && Object.hasOwnProperty.call(message, "imagineType"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.imagineType);
            return writer;
        };

        /**
         * Encodes the specified BotImagineMetadata message, length delimited. Does not implicitly {@link AICommon.BotImagineMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotImagineMetadata
         * @static
         * @param {AICommon.IBotImagineMetadata} message BotImagineMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotImagineMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotImagineMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotImagineMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotImagineMetadata} BotImagineMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotImagineMetadata.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.AICommon.BotImagineMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.imagineType = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotImagineMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotImagineMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotImagineMetadata} BotImagineMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotImagineMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotImagineMetadata message.
         * @function verify
         * @memberof AICommon.BotImagineMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotImagineMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.imagineType != null && message.hasOwnProperty("imagineType")) {
                properties._imagineType = 1;
                switch (message.imagineType) {
                default:
                    return "imagineType: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a BotImagineMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotImagineMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotImagineMetadata} BotImagineMetadata
         */
        BotImagineMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotImagineMetadata)
                return object;
            var message = new $root.AICommon.BotImagineMetadata();
            switch (object.imagineType) {
            default:
                if (typeof object.imagineType === "number") {
                    message.imagineType = object.imagineType;
                    break;
                }
                break;
            case "UNKNOWN":
            case 0:
                message.imagineType = 0;
                break;
            case "IMAGINE":
            case 1:
                message.imagineType = 1;
                break;
            case "MEMU":
            case 2:
                message.imagineType = 2;
                break;
            case "FLASH":
            case 3:
                message.imagineType = 3;
                break;
            case "EDIT":
            case 4:
                message.imagineType = 4;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a BotImagineMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotImagineMetadata
         * @static
         * @param {AICommon.BotImagineMetadata} message BotImagineMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotImagineMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.imagineType != null && message.hasOwnProperty("imagineType")) {
                object.imagineType = options.enums === String ? $root.AICommon.BotImagineMetadata.ImagineType[message.imagineType] === undefined ? message.imagineType : $root.AICommon.BotImagineMetadata.ImagineType[message.imagineType] : message.imagineType;
                if (options.oneofs)
                    object._imagineType = "imagineType";
            }
            return object;
        };

        /**
         * Converts this BotImagineMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotImagineMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotImagineMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotImagineMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotImagineMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotImagineMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotImagineMetadata";
        };

        /**
         * ImagineType enum.
         * @name AICommon.BotImagineMetadata.ImagineType
         * @enum {number}
         * @property {number} UNKNOWN=0 UNKNOWN value
         * @property {number} IMAGINE=1 IMAGINE value
         * @property {number} MEMU=2 MEMU value
         * @property {number} FLASH=3 FLASH value
         * @property {number} EDIT=4 EDIT value
         */
        BotImagineMetadata.ImagineType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "IMAGINE"] = 1;
            values[valuesById[2] = "MEMU"] = 2;
            values[valuesById[3] = "FLASH"] = 3;
            values[valuesById[4] = "EDIT"] = 4;
            return values;
        })();

        return BotImagineMetadata;
    })();

    AICommon.BotQuotaMetadata = (function() {

        /**
         * Properties of a BotQuotaMetadata.
         * @memberof AICommon
         * @interface IBotQuotaMetadata
         * @property {Array.<AICommon.BotQuotaMetadata.IBotFeatureQuotaMetadata>|null} [botFeatureQuotaMetadata] BotQuotaMetadata botFeatureQuotaMetadata
         */

        /**
         * Constructs a new BotQuotaMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotQuotaMetadata.
         * @implements IBotQuotaMetadata
         * @constructor
         * @param {AICommon.IBotQuotaMetadata=} [properties] Properties to set
         */
        function BotQuotaMetadata(properties) {
            this.botFeatureQuotaMetadata = [];
            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]];
        }

        /**
         * BotQuotaMetadata botFeatureQuotaMetadata.
         * @member {Array.<AICommon.BotQuotaMetadata.IBotFeatureQuotaMetadata>} botFeatureQuotaMetadata
         * @memberof AICommon.BotQuotaMetadata
         * @instance
         */
        BotQuotaMetadata.prototype.botFeatureQuotaMetadata = $util.emptyArray;

        /**
         * Creates a new BotQuotaMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotQuotaMetadata
         * @static
         * @param {AICommon.IBotQuotaMetadata=} [properties] Properties to set
         * @returns {AICommon.BotQuotaMetadata} BotQuotaMetadata instance
         */
        BotQuotaMetadata.create = function create(properties) {
            return new BotQuotaMetadata(properties);
        };

        /**
         * Encodes the specified BotQuotaMetadata message. Does not implicitly {@link AICommon.BotQuotaMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotQuotaMetadata
         * @static
         * @param {AICommon.IBotQuotaMetadata} message BotQuotaMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotQuotaMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.botFeatureQuotaMetadata != null && message.botFeatureQuotaMetadata.length)
                for (var i = 0; i < message.botFeatureQuotaMetadata.length; ++i)
                    $root.AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata.encode(message.botFeatureQuotaMetadata[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified BotQuotaMetadata message, length delimited. Does not implicitly {@link AICommon.BotQuotaMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotQuotaMetadata
         * @static
         * @param {AICommon.IBotQuotaMetadata} message BotQuotaMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotQuotaMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotQuotaMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotQuotaMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotQuotaMetadata} BotQuotaMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotQuotaMetadata.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.AICommon.BotQuotaMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        if (!(message.botFeatureQuotaMetadata && message.botFeatureQuotaMetadata.length))
                            message.botFeatureQuotaMetadata = [];
                        message.botFeatureQuotaMetadata.push($root.AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotQuotaMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotQuotaMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotQuotaMetadata} BotQuotaMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotQuotaMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotQuotaMetadata message.
         * @function verify
         * @memberof AICommon.BotQuotaMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotQuotaMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.botFeatureQuotaMetadata != null && message.hasOwnProperty("botFeatureQuotaMetadata")) {
                if (!Array.isArray(message.botFeatureQuotaMetadata))
                    return "botFeatureQuotaMetadata: array expected";
                for (var i = 0; i < message.botFeatureQuotaMetadata.length; ++i) {
                    var error = $root.AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata.verify(message.botFeatureQuotaMetadata[i]);
                    if (error)
                        return "botFeatureQuotaMetadata." + error;
                }
            }
            return null;
        };

        /**
         * Creates a BotQuotaMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotQuotaMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotQuotaMetadata} BotQuotaMetadata
         */
        BotQuotaMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotQuotaMetadata)
                return object;
            var message = new $root.AICommon.BotQuotaMetadata();
            if (object.botFeatureQuotaMetadata) {
                if (!Array.isArray(object.botFeatureQuotaMetadata))
                    throw TypeError(".AICommon.BotQuotaMetadata.botFeatureQuotaMetadata: array expected");
                message.botFeatureQuotaMetadata = [];
                for (var i = 0; i < object.botFeatureQuotaMetadata.length; ++i) {
                    if (typeof object.botFeatureQuotaMetadata[i] !== "object")
                        throw TypeError(".AICommon.BotQuotaMetadata.botFeatureQuotaMetadata: object expected");
                    message.botFeatureQuotaMetadata[i] = $root.AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata.fromObject(object.botFeatureQuotaMetadata[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a BotQuotaMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotQuotaMetadata
         * @static
         * @param {AICommon.BotQuotaMetadata} message BotQuotaMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotQuotaMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.botFeatureQuotaMetadata = [];
            if (message.botFeatureQuotaMetadata && message.botFeatureQuotaMetadata.length) {
                object.botFeatureQuotaMetadata = [];
                for (var j = 0; j < message.botFeatureQuotaMetadata.length; ++j)
                    object.botFeatureQuotaMetadata[j] = $root.AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata.toObject(message.botFeatureQuotaMetadata[j], options);
            }
            return object;
        };

        /**
         * Converts this BotQuotaMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotQuotaMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotQuotaMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotQuotaMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotQuotaMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotQuotaMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotQuotaMetadata";
        };

        BotQuotaMetadata.BotFeatureQuotaMetadata = (function() {

            /**
             * Properties of a BotFeatureQuotaMetadata.
             * @memberof AICommon.BotQuotaMetadata
             * @interface IBotFeatureQuotaMetadata
             * @property {AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata.BotFeatureType|null} [featureType] BotFeatureQuotaMetadata featureType
             * @property {number|null} [remainingQuota] BotFeatureQuotaMetadata remainingQuota
             * @property {number|Long|null} [expirationTimestamp] BotFeatureQuotaMetadata expirationTimestamp
             */

            /**
             * Constructs a new BotFeatureQuotaMetadata.
             * @memberof AICommon.BotQuotaMetadata
             * @classdesc Represents a BotFeatureQuotaMetadata.
             * @implements IBotFeatureQuotaMetadata
             * @constructor
             * @param {AICommon.BotQuotaMetadata.IBotFeatureQuotaMetadata=} [properties] Properties to set
             */
            function BotFeatureQuotaMetadata(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]];
            }

            /**
             * BotFeatureQuotaMetadata featureType.
             * @member {AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata.BotFeatureType|null|undefined} featureType
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @instance
             */
            BotFeatureQuotaMetadata.prototype.featureType = null;

            /**
             * BotFeatureQuotaMetadata remainingQuota.
             * @member {number|null|undefined} remainingQuota
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @instance
             */
            BotFeatureQuotaMetadata.prototype.remainingQuota = null;

            /**
             * BotFeatureQuotaMetadata expirationTimestamp.
             * @member {number|Long|null|undefined} expirationTimestamp
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @instance
             */
            BotFeatureQuotaMetadata.prototype.expirationTimestamp = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * BotFeatureQuotaMetadata _featureType.
             * @member {"featureType"|undefined} _featureType
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @instance
             */
            Object.defineProperty(BotFeatureQuotaMetadata.prototype, "_featureType", {
                get: $util.oneOfGetter($oneOfFields = ["featureType"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotFeatureQuotaMetadata _remainingQuota.
             * @member {"remainingQuota"|undefined} _remainingQuota
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @instance
             */
            Object.defineProperty(BotFeatureQuotaMetadata.prototype, "_remainingQuota", {
                get: $util.oneOfGetter($oneOfFields = ["remainingQuota"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotFeatureQuotaMetadata _expirationTimestamp.
             * @member {"expirationTimestamp"|undefined} _expirationTimestamp
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @instance
             */
            Object.defineProperty(BotFeatureQuotaMetadata.prototype, "_expirationTimestamp", {
                get: $util.oneOfGetter($oneOfFields = ["expirationTimestamp"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new BotFeatureQuotaMetadata instance using the specified properties.
             * @function create
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @static
             * @param {AICommon.BotQuotaMetadata.IBotFeatureQuotaMetadata=} [properties] Properties to set
             * @returns {AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata} BotFeatureQuotaMetadata instance
             */
            BotFeatureQuotaMetadata.create = function create(properties) {
                return new BotFeatureQuotaMetadata(properties);
            };

            /**
             * Encodes the specified BotFeatureQuotaMetadata message. Does not implicitly {@link AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata.verify|verify} messages.
             * @function encode
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @static
             * @param {AICommon.BotQuotaMetadata.IBotFeatureQuotaMetadata} message BotFeatureQuotaMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BotFeatureQuotaMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.featureType != null && Object.hasOwnProperty.call(message, "featureType"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.featureType);
                if (message.remainingQuota != null && Object.hasOwnProperty.call(message, "remainingQuota"))
                    writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.remainingQuota);
                if (message.expirationTimestamp != null && Object.hasOwnProperty.call(message, "expirationTimestamp"))
                    writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.expirationTimestamp);
                return writer;
            };

            /**
             * Encodes the specified BotFeatureQuotaMetadata message, length delimited. Does not implicitly {@link AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @static
             * @param {AICommon.BotQuotaMetadata.IBotFeatureQuotaMetadata} message BotFeatureQuotaMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BotFeatureQuotaMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BotFeatureQuotaMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata} BotFeatureQuotaMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BotFeatureQuotaMetadata.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.AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.featureType = reader.int32();
                            break;
                        }
                    case 2: {
                            message.remainingQuota = reader.uint32();
                            break;
                        }
                    case 3: {
                            message.expirationTimestamp = reader.uint64();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a BotFeatureQuotaMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata} BotFeatureQuotaMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BotFeatureQuotaMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BotFeatureQuotaMetadata message.
             * @function verify
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BotFeatureQuotaMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.featureType != null && message.hasOwnProperty("featureType")) {
                    properties._featureType = 1;
                    switch (message.featureType) {
                    default:
                        return "featureType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                if (message.remainingQuota != null && message.hasOwnProperty("remainingQuota")) {
                    properties._remainingQuota = 1;
                    if (!$util.isInteger(message.remainingQuota))
                        return "remainingQuota: integer expected";
                }
                if (message.expirationTimestamp != null && message.hasOwnProperty("expirationTimestamp")) {
                    properties._expirationTimestamp = 1;
                    if (!$util.isInteger(message.expirationTimestamp) && !(message.expirationTimestamp && $util.isInteger(message.expirationTimestamp.low) && $util.isInteger(message.expirationTimestamp.high)))
                        return "expirationTimestamp: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a BotFeatureQuotaMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata} BotFeatureQuotaMetadata
             */
            BotFeatureQuotaMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata)
                    return object;
                var message = new $root.AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata();
                switch (object.featureType) {
                default:
                    if (typeof object.featureType === "number") {
                        message.featureType = object.featureType;
                        break;
                    }
                    break;
                case "UNKNOWN_FEATURE":
                case 0:
                    message.featureType = 0;
                    break;
                case "REASONING_FEATURE":
                case 1:
                    message.featureType = 1;
                    break;
                }
                if (object.remainingQuota != null)
                    message.remainingQuota = object.remainingQuota >>> 0;
                if (object.expirationTimestamp != null)
                    if ($util.Long)
                        (message.expirationTimestamp = $util.Long.fromValue(object.expirationTimestamp)).unsigned = true;
                    else if (typeof object.expirationTimestamp === "string")
                        message.expirationTimestamp = parseInt(object.expirationTimestamp, 10);
                    else if (typeof object.expirationTimestamp === "number")
                        message.expirationTimestamp = object.expirationTimestamp;
                    else if (typeof object.expirationTimestamp === "object")
                        message.expirationTimestamp = new $util.LongBits(object.expirationTimestamp.low >>> 0, object.expirationTimestamp.high >>> 0).toNumber(true);
                return message;
            };

            /**
             * Creates a plain object from a BotFeatureQuotaMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @static
             * @param {AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata} message BotFeatureQuotaMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BotFeatureQuotaMetadata.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.featureType != null && message.hasOwnProperty("featureType")) {
                    object.featureType = options.enums === String ? $root.AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata.BotFeatureType[message.featureType] === undefined ? message.featureType : $root.AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata.BotFeatureType[message.featureType] : message.featureType;
                    if (options.oneofs)
                        object._featureType = "featureType";
                }
                if (message.remainingQuota != null && message.hasOwnProperty("remainingQuota")) {
                    object.remainingQuota = message.remainingQuota;
                    if (options.oneofs)
                        object._remainingQuota = "remainingQuota";
                }
                if (message.expirationTimestamp != null && message.hasOwnProperty("expirationTimestamp")) {
                    if (typeof message.expirationTimestamp === "number")
                        object.expirationTimestamp = options.longs === String ? String(message.expirationTimestamp) : message.expirationTimestamp;
                    else
                        object.expirationTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.expirationTimestamp) : options.longs === Number ? new $util.LongBits(message.expirationTimestamp.low >>> 0, message.expirationTimestamp.high >>> 0).toNumber(true) : message.expirationTimestamp;
                    if (options.oneofs)
                        object._expirationTimestamp = "expirationTimestamp";
                }
                return object;
            };

            /**
             * Converts this BotFeatureQuotaMetadata to JSON.
             * @function toJSON
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BotFeatureQuotaMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for BotFeatureQuotaMetadata
             * @function getTypeUrl
             * @memberof AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            BotFeatureQuotaMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata";
            };

            /**
             * BotFeatureType enum.
             * @name AICommon.BotQuotaMetadata.BotFeatureQuotaMetadata.BotFeatureType
             * @enum {number}
             * @property {number} UNKNOWN_FEATURE=0 UNKNOWN_FEATURE value
             * @property {number} REASONING_FEATURE=1 REASONING_FEATURE value
             */
            BotFeatureQuotaMetadata.BotFeatureType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN_FEATURE"] = 0;
                values[valuesById[1] = "REASONING_FEATURE"] = 1;
                return values;
            })();

            return BotFeatureQuotaMetadata;
        })();

        return BotQuotaMetadata;
    })();

    AICommon.BotModeSelectionMetadata = (function() {

        /**
         * Properties of a BotModeSelectionMetadata.
         * @memberof AICommon
         * @interface IBotModeSelectionMetadata
         * @property {Array.<AICommon.BotModeSelectionMetadata.BotUserSelectionMode>|null} [mode] BotModeSelectionMetadata mode
         */

        /**
         * Constructs a new BotModeSelectionMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotModeSelectionMetadata.
         * @implements IBotModeSelectionMetadata
         * @constructor
         * @param {AICommon.IBotModeSelectionMetadata=} [properties] Properties to set
         */
        function BotModeSelectionMetadata(properties) {
            this.mode = [];
            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]];
        }

        /**
         * BotModeSelectionMetadata mode.
         * @member {Array.<AICommon.BotModeSelectionMetadata.BotUserSelectionMode>} mode
         * @memberof AICommon.BotModeSelectionMetadata
         * @instance
         */
        BotModeSelectionMetadata.prototype.mode = $util.emptyArray;

        /**
         * Creates a new BotModeSelectionMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotModeSelectionMetadata
         * @static
         * @param {AICommon.IBotModeSelectionMetadata=} [properties] Properties to set
         * @returns {AICommon.BotModeSelectionMetadata} BotModeSelectionMetadata instance
         */
        BotModeSelectionMetadata.create = function create(properties) {
            return new BotModeSelectionMetadata(properties);
        };

        /**
         * Encodes the specified BotModeSelectionMetadata message. Does not implicitly {@link AICommon.BotModeSelectionMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotModeSelectionMetadata
         * @static
         * @param {AICommon.IBotModeSelectionMetadata} message BotModeSelectionMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotModeSelectionMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.mode != null && message.mode.length) {
                writer.uint32(/* id 1, wireType 2 =*/10).fork();
                for (var i = 0; i < message.mode.length; ++i)
                    writer.int32(message.mode[i]);
                writer.ldelim();
            }
            return writer;
        };

        /**
         * Encodes the specified BotModeSelectionMetadata message, length delimited. Does not implicitly {@link AICommon.BotModeSelectionMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotModeSelectionMetadata
         * @static
         * @param {AICommon.IBotModeSelectionMetadata} message BotModeSelectionMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotModeSelectionMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotModeSelectionMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotModeSelectionMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotModeSelectionMetadata} BotModeSelectionMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotModeSelectionMetadata.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.AICommon.BotModeSelectionMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        if (!(message.mode && message.mode.length))
                            message.mode = [];
                        if ((tag & 7) === 2) {
                            var end2 = reader.uint32() + reader.pos;
                            while (reader.pos < end2)
                                message.mode.push(reader.int32());
                        } else
                            message.mode.push(reader.int32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotModeSelectionMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotModeSelectionMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotModeSelectionMetadata} BotModeSelectionMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotModeSelectionMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotModeSelectionMetadata message.
         * @function verify
         * @memberof AICommon.BotModeSelectionMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotModeSelectionMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.mode != null && message.hasOwnProperty("mode")) {
                if (!Array.isArray(message.mode))
                    return "mode: array expected";
                for (var i = 0; i < message.mode.length; ++i)
                    switch (message.mode[i]) {
                    default:
                        return "mode: enum value[] expected";
                    case 0:
                    case 1:
                        break;
                    }
            }
            return null;
        };

        /**
         * Creates a BotModeSelectionMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotModeSelectionMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotModeSelectionMetadata} BotModeSelectionMetadata
         */
        BotModeSelectionMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotModeSelectionMetadata)
                return object;
            var message = new $root.AICommon.BotModeSelectionMetadata();
            if (object.mode) {
                if (!Array.isArray(object.mode))
                    throw TypeError(".AICommon.BotModeSelectionMetadata.mode: array expected");
                message.mode = [];
                for (var i = 0; i < object.mode.length; ++i)
                    switch (object.mode[i]) {
                    default:
                        if (typeof object.mode[i] === "number") {
                            message.mode[i] = object.mode[i];
                            break;
                        }
                    case "UNKNOWN_MODE":
                    case 0:
                        message.mode[i] = 0;
                        break;
                    case "REASONING_MODE":
                    case 1:
                        message.mode[i] = 1;
                        break;
                    }
            }
            return message;
        };

        /**
         * Creates a plain object from a BotModeSelectionMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotModeSelectionMetadata
         * @static
         * @param {AICommon.BotModeSelectionMetadata} message BotModeSelectionMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotModeSelectionMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.mode = [];
            if (message.mode && message.mode.length) {
                object.mode = [];
                for (var j = 0; j < message.mode.length; ++j)
                    object.mode[j] = options.enums === String ? $root.AICommon.BotModeSelectionMetadata.BotUserSelectionMode[message.mode[j]] === undefined ? message.mode[j] : $root.AICommon.BotModeSelectionMetadata.BotUserSelectionMode[message.mode[j]] : message.mode[j];
            }
            return object;
        };

        /**
         * Converts this BotModeSelectionMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotModeSelectionMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotModeSelectionMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotModeSelectionMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotModeSelectionMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotModeSelectionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotModeSelectionMetadata";
        };

        /**
         * BotUserSelectionMode enum.
         * @name AICommon.BotModeSelectionMetadata.BotUserSelectionMode
         * @enum {number}
         * @property {number} UNKNOWN_MODE=0 UNKNOWN_MODE value
         * @property {number} REASONING_MODE=1 REASONING_MODE value
         */
        BotModeSelectionMetadata.BotUserSelectionMode = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN_MODE"] = 0;
            values[valuesById[1] = "REASONING_MODE"] = 1;
            return values;
        })();

        return BotModeSelectionMetadata;
    })();

    AICommon.BotCapabilityMetadata = (function() {

        /**
         * Properties of a BotCapabilityMetadata.
         * @memberof AICommon
         * @interface IBotCapabilityMetadata
         * @property {Array.<AICommon.BotCapabilityMetadata.BotCapabilityType>|null} [capabilities] BotCapabilityMetadata capabilities
         */

        /**
         * Constructs a new BotCapabilityMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotCapabilityMetadata.
         * @implements IBotCapabilityMetadata
         * @constructor
         * @param {AICommon.IBotCapabilityMetadata=} [properties] Properties to set
         */
        function BotCapabilityMetadata(properties) {
            this.capabilities = [];
            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]];
        }

        /**
         * BotCapabilityMetadata capabilities.
         * @member {Array.<AICommon.BotCapabilityMetadata.BotCapabilityType>} capabilities
         * @memberof AICommon.BotCapabilityMetadata
         * @instance
         */
        BotCapabilityMetadata.prototype.capabilities = $util.emptyArray;

        /**
         * Creates a new BotCapabilityMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotCapabilityMetadata
         * @static
         * @param {AICommon.IBotCapabilityMetadata=} [properties] Properties to set
         * @returns {AICommon.BotCapabilityMetadata} BotCapabilityMetadata instance
         */
        BotCapabilityMetadata.create = function create(properties) {
            return new BotCapabilityMetadata(properties);
        };

        /**
         * Encodes the specified BotCapabilityMetadata message. Does not implicitly {@link AICommon.BotCapabilityMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotCapabilityMetadata
         * @static
         * @param {AICommon.IBotCapabilityMetadata} message BotCapabilityMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotCapabilityMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.capabilities != null && message.capabilities.length) {
                writer.uint32(/* id 1, wireType 2 =*/10).fork();
                for (var i = 0; i < message.capabilities.length; ++i)
                    writer.int32(message.capabilities[i]);
                writer.ldelim();
            }
            return writer;
        };

        /**
         * Encodes the specified BotCapabilityMetadata message, length delimited. Does not implicitly {@link AICommon.BotCapabilityMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotCapabilityMetadata
         * @static
         * @param {AICommon.IBotCapabilityMetadata} message BotCapabilityMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotCapabilityMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotCapabilityMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotCapabilityMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotCapabilityMetadata} BotCapabilityMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotCapabilityMetadata.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.AICommon.BotCapabilityMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        if (!(message.capabilities && message.capabilities.length))
                            message.capabilities = [];
                        if ((tag & 7) === 2) {
                            var end2 = reader.uint32() + reader.pos;
                            while (reader.pos < end2)
                                message.capabilities.push(reader.int32());
                        } else
                            message.capabilities.push(reader.int32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotCapabilityMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotCapabilityMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotCapabilityMetadata} BotCapabilityMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotCapabilityMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotCapabilityMetadata message.
         * @function verify
         * @memberof AICommon.BotCapabilityMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotCapabilityMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.capabilities != null && message.hasOwnProperty("capabilities")) {
                if (!Array.isArray(message.capabilities))
                    return "capabilities: array expected";
                for (var i = 0; i < message.capabilities.length; ++i)
                    switch (message.capabilities[i]) {
                    default:
                        return "capabilities: 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:
                    case 11:
                    case 12:
                    case 13:
                    case 14:
                    case 15:
                    case 16:
                    case 17:
                    case 18:
                    case 19:
                    case 20:
                    case 21:
                    case 22:
                    case 23:
                    case 24:
                    case 25:
                    case 26:
                    case 27:
                    case 28:
                    case 29:
                    case 30:
                    case 31:
                    case 32:
                    case 33:
                    case 34:
                    case 35:
                    case 36:
                    case 37:
                    case 38:
                    case 39:
                    case 40:
                    case 41:
                    case 42:
                    case 43:
                    case 44:
                    case 45:
                    case 46:
                    case 47:
                    case 48:
                    case 49:
                        break;
                    }
            }
            return null;
        };

        /**
         * Creates a BotCapabilityMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotCapabilityMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotCapabilityMetadata} BotCapabilityMetadata
         */
        BotCapabilityMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotCapabilityMetadata)
                return object;
            var message = new $root.AICommon.BotCapabilityMetadata();
            if (object.capabilities) {
                if (!Array.isArray(object.capabilities))
                    throw TypeError(".AICommon.BotCapabilityMetadata.capabilities: array expected");
                message.capabilities = [];
                for (var i = 0; i < object.capabilities.length; ++i)
                    switch (object.capabilities[i]) {
                    default:
                        if (typeof object.capabilities[i] === "number") {
                            message.capabilities[i] = object.capabilities[i];
                            break;
                        }
                    case "UNKNOWN":
                    case 0:
                        message.capabilities[i] = 0;
                        break;
                    case "PROGRESS_INDICATOR":
                    case 1:
                        message.capabilities[i] = 1;
                        break;
                    case "RICH_RESPONSE_HEADING":
                    case 2:
                        message.capabilities[i] = 2;
                        break;
                    case "RICH_RESPONSE_NESTED_LIST":
                    case 3:
                        message.capabilities[i] = 3;
                        break;
                    case "AI_MEMORY":
                    case 4:
                        message.capabilities[i] = 4;
                        break;
                    case "RICH_RESPONSE_THREAD_SURFING":
                    case 5:
                        message.capabilities[i] = 5;
                        break;
                    case "RICH_RESPONSE_TABLE":
                    case 6:
                        message.capabilities[i] = 6;
                        break;
                    case "RICH_RESPONSE_CODE":
                    case 7:
                        message.capabilities[i] = 7;
                        break;
                    case "RICH_RESPONSE_STRUCTURED_RESPONSE":
                    case 8:
                        message.capabilities[i] = 8;
                        break;
                    case "RICH_RESPONSE_INLINE_IMAGE":
                    case 9:
                        message.capabilities[i] = 9;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_CONTROL":
                    case 10:
                        message.capabilities[i] = 10;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_1":
                    case 11:
                        message.capabilities[i] = 11;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_2":
                    case 12:
                        message.capabilities[i] = 12;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_3":
                    case 13:
                        message.capabilities[i] = 13;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_4":
                    case 14:
                        message.capabilities[i] = 14;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_5":
                    case 15:
                        message.capabilities[i] = 15;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_6":
                    case 16:
                        message.capabilities[i] = 16;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_7":
                    case 17:
                        message.capabilities[i] = 17;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_8":
                    case 18:
                        message.capabilities[i] = 18;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_9":
                    case 19:
                        message.capabilities[i] = 19;
                        break;
                    case "WA_IG_1P_PLUGIN_RANKING_UPDATE_10":
                    case 20:
                        message.capabilities[i] = 20;
                        break;
                    case "RICH_RESPONSE_SUB_HEADING":
                    case 21:
                        message.capabilities[i] = 21;
                        break;
                    case "RICH_RESPONSE_GRID_IMAGE":
                    case 22:
                        message.capabilities[i] = 22;
                        break;
                    case "AI_STUDIO_UGC_MEMORY":
                    case 23:
                        message.capabilities[i] = 23;
                        break;
                    case "RICH_RESPONSE_LATEX":
                    case 24:
                        message.capabilities[i] = 24;
                        break;
                    case "RICH_RESPONSE_MAPS":
                    case 25:
                        message.capabilities[i] = 25;
                        break;
                    case "RICH_RESPONSE_INLINE_REELS":
                    case 26:
                        message.capabilities[i] = 26;
                        break;
                    case "AGENTIC_PLANNING":
                    case 27:
                        message.capabilities[i] = 27;
                        break;
                    case "ACCOUNT_LINKING":
                    case 28:
                        message.capabilities[i] = 28;
                        break;
                    case "STREAMING_DISAGGREGATION":
                    case 29:
                        message.capabilities[i] = 29;
                        break;
                    case "RICH_RESPONSE_GRID_IMAGE_3P":
                    case 30:
                        message.capabilities[i] = 30;
                        break;
                    case "RICH_RESPONSE_LATEX_INLINE":
                    case 31:
                        message.capabilities[i] = 31;
                        break;
                    case "QUERY_PLAN":
                    case 32:
                        message.capabilities[i] = 32;
                        break;
                    case "PROACTIVE_MESSAGE":
                    case 33:
                        message.capabilities[i] = 33;
                        break;
                    case "RICH_RESPONSE_UNIFIED_RESPONSE":
                    case 34:
                        message.capabilities[i] = 34;
                        break;
                    case "PROMOTION_MESSAGE":
                    case 35:
                        message.capabilities[i] = 35;
                        break;
                    case "SIMPLIFIED_PROFILE_PAGE":
                    case 36:
                        message.capabilities[i] = 36;
                        break;
                    case "RICH_RESPONSE_SOURCES_IN_MESSAGE":
                    case 37:
                        message.capabilities[i] = 37;
                        break;
                    case "RICH_RESPONSE_SIDE_BY_SIDE_SURVEY":
                    case 38:
                        message.capabilities[i] = 38;
                        break;
                    case "RICH_RESPONSE_UNIFIED_TEXT_COMPONENT":
                    case 39:
                        message.capabilities[i] = 39;
                        break;
                    case "AI_SHARED_MEMORY":
                    case 40:
                        message.capabilities[i] = 40;
                        break;
                    case "RICH_RESPONSE_UNIFIED_SOURCES":
                    case 41:
                        message.capabilities[i] = 41;
                        break;
                    case "RICH_RESPONSE_UNIFIED_DOMAIN_CITATIONS":
                    case 42:
                        message.capabilities[i] = 42;
                        break;
                    case "RICH_RESPONSE_UR_INLINE_REELS_ENABLED":
                    case 43:
                        message.capabilities[i] = 43;
                        break;
                    case "RICH_RESPONSE_UR_MEDIA_GRID_ENABLED":
                    case 44:
                        message.capabilities[i] = 44;
                        break;
                    case "RICH_RESPONSE_UR_TIMESTAMP_PLACEHOLDER":
                    case 45:
                        message.capabilities[i] = 45;
                        break;
                    case "RICH_RESPONSE_IN_APP_SURVEY":
                    case 46:
                        message.capabilities[i] = 46;
                        break;
                    case "AI_RESPONSE_MODEL_BRANDING":
                    case 47:
                        message.capabilities[i] = 47;
                        break;
                    case "SESSION_TRANSPARENCY_SYSTEM_MESSAGE":
                    case 48:
                        message.capabilities[i] = 48;
                        break;
                    case "RICH_RESPONSE_UR_REASONING":
                    case 49:
                        message.capabilities[i] = 49;
                        break;
                    }
            }
            return message;
        };

        /**
         * Creates a plain object from a BotCapabilityMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotCapabilityMetadata
         * @static
         * @param {AICommon.BotCapabilityMetadata} message BotCapabilityMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotCapabilityMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.capabilities = [];
            if (message.capabilities && message.capabilities.length) {
                object.capabilities = [];
                for (var j = 0; j < message.capabilities.length; ++j)
                    object.capabilities[j] = options.enums === String ? $root.AICommon.BotCapabilityMetadata.BotCapabilityType[message.capabilities[j]] === undefined ? message.capabilities[j] : $root.AICommon.BotCapabilityMetadata.BotCapabilityType[message.capabilities[j]] : message.capabilities[j];
            }
            return object;
        };

        /**
         * Converts this BotCapabilityMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotCapabilityMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotCapabilityMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotCapabilityMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotCapabilityMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotCapabilityMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotCapabilityMetadata";
        };

        /**
         * BotCapabilityType enum.
         * @name AICommon.BotCapabilityMetadata.BotCapabilityType
         * @enum {number}
         * @property {number} UNKNOWN=0 UNKNOWN value
         * @property {number} PROGRESS_INDICATOR=1 PROGRESS_INDICATOR value
         * @property {number} RICH_RESPONSE_HEADING=2 RICH_RESPONSE_HEADING value
         * @property {number} RICH_RESPONSE_NESTED_LIST=3 RICH_RESPONSE_NESTED_LIST value
         * @property {number} AI_MEMORY=4 AI_MEMORY value
         * @property {number} RICH_RESPONSE_THREAD_SURFING=5 RICH_RESPONSE_THREAD_SURFING value
         * @property {number} RICH_RESPONSE_TABLE=6 RICH_RESPONSE_TABLE value
         * @property {number} RICH_RESPONSE_CODE=7 RICH_RESPONSE_CODE value
         * @property {number} RICH_RESPONSE_STRUCTURED_RESPONSE=8 RICH_RESPONSE_STRUCTURED_RESPONSE value
         * @property {number} RICH_RESPONSE_INLINE_IMAGE=9 RICH_RESPONSE_INLINE_IMAGE value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_CONTROL=10 WA_IG_1P_PLUGIN_RANKING_CONTROL value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_1=11 WA_IG_1P_PLUGIN_RANKING_UPDATE_1 value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_2=12 WA_IG_1P_PLUGIN_RANKING_UPDATE_2 value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_3=13 WA_IG_1P_PLUGIN_RANKING_UPDATE_3 value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_4=14 WA_IG_1P_PLUGIN_RANKING_UPDATE_4 value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_5=15 WA_IG_1P_PLUGIN_RANKING_UPDATE_5 value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_6=16 WA_IG_1P_PLUGIN_RANKING_UPDATE_6 value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_7=17 WA_IG_1P_PLUGIN_RANKING_UPDATE_7 value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_8=18 WA_IG_1P_PLUGIN_RANKING_UPDATE_8 value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_9=19 WA_IG_1P_PLUGIN_RANKING_UPDATE_9 value
         * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_10=20 WA_IG_1P_PLUGIN_RANKING_UPDATE_10 value
         * @property {number} RICH_RESPONSE_SUB_HEADING=21 RICH_RESPONSE_SUB_HEADING value
         * @property {number} RICH_RESPONSE_GRID_IMAGE=22 RICH_RESPONSE_GRID_IMAGE value
         * @property {number} AI_STUDIO_UGC_MEMORY=23 AI_STUDIO_UGC_MEMORY value
         * @property {number} RICH_RESPONSE_LATEX=24 RICH_RESPONSE_LATEX value
         * @property {number} RICH_RESPONSE_MAPS=25 RICH_RESPONSE_MAPS value
         * @property {number} RICH_RESPONSE_INLINE_REELS=26 RICH_RESPONSE_INLINE_REELS value
         * @property {number} AGENTIC_PLANNING=27 AGENTIC_PLANNING value
         * @property {number} ACCOUNT_LINKING=28 ACCOUNT_LINKING value
         * @property {number} STREAMING_DISAGGREGATION=29 STREAMING_DISAGGREGATION value
         * @property {number} RICH_RESPONSE_GRID_IMAGE_3P=30 RICH_RESPONSE_GRID_IMAGE_3P value
         * @property {number} RICH_RESPONSE_LATEX_INLINE=31 RICH_RESPONSE_LATEX_INLINE value
         * @property {number} QUERY_PLAN=32 QUERY_PLAN value
         * @property {number} PROACTIVE_MESSAGE=33 PROACTIVE_MESSAGE value
         * @property {number} RICH_RESPONSE_UNIFIED_RESPONSE=34 RICH_RESPONSE_UNIFIED_RESPONSE value
         * @property {number} PROMOTION_MESSAGE=35 PROMOTION_MESSAGE value
         * @property {number} SIMPLIFIED_PROFILE_PAGE=36 SIMPLIFIED_PROFILE_PAGE value
         * @property {number} RICH_RESPONSE_SOURCES_IN_MESSAGE=37 RICH_RESPONSE_SOURCES_IN_MESSAGE value
         * @property {number} RICH_RESPONSE_SIDE_BY_SIDE_SURVEY=38 RICH_RESPONSE_SIDE_BY_SIDE_SURVEY value
         * @property {number} RICH_RESPONSE_UNIFIED_TEXT_COMPONENT=39 RICH_RESPONSE_UNIFIED_TEXT_COMPONENT value
         * @property {number} AI_SHARED_MEMORY=40 AI_SHARED_MEMORY value
         * @property {number} RICH_RESPONSE_UNIFIED_SOURCES=41 RICH_RESPONSE_UNIFIED_SOURCES value
         * @property {number} RICH_RESPONSE_UNIFIED_DOMAIN_CITATIONS=42 RICH_RESPONSE_UNIFIED_DOMAIN_CITATIONS value
         * @property {number} RICH_RESPONSE_UR_INLINE_REELS_ENABLED=43 RICH_RESPONSE_UR_INLINE_REELS_ENABLED value
         * @property {number} RICH_RESPONSE_UR_MEDIA_GRID_ENABLED=44 RICH_RESPONSE_UR_MEDIA_GRID_ENABLED value
         * @property {number} RICH_RESPONSE_UR_TIMESTAMP_PLACEHOLDER=45 RICH_RESPONSE_UR_TIMESTAMP_PLACEHOLDER value
         * @property {number} RICH_RESPONSE_IN_APP_SURVEY=46 RICH_RESPONSE_IN_APP_SURVEY value
         * @property {number} AI_RESPONSE_MODEL_BRANDING=47 AI_RESPONSE_MODEL_BRANDING value
         * @property {number} SESSION_TRANSPARENCY_SYSTEM_MESSAGE=48 SESSION_TRANSPARENCY_SYSTEM_MESSAGE value
         * @property {number} RICH_RESPONSE_UR_REASONING=49 RICH_RESPONSE_UR_REASONING value
         */
        BotCapabilityMetadata.BotCapabilityType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "PROGRESS_INDICATOR"] = 1;
            values[valuesById[2] = "RICH_RESPONSE_HEADING"] = 2;
            values[valuesById[3] = "RICH_RESPONSE_NESTED_LIST"] = 3;
            values[valuesById[4] = "AI_MEMORY"] = 4;
            values[valuesById[5] = "RICH_RESPONSE_THREAD_SURFING"] = 5;
            values[valuesById[6] = "RICH_RESPONSE_TABLE"] = 6;
            values[valuesById[7] = "RICH_RESPONSE_CODE"] = 7;
            values[valuesById[8] = "RICH_RESPONSE_STRUCTURED_RESPONSE"] = 8;
            values[valuesById[9] = "RICH_RESPONSE_INLINE_IMAGE"] = 9;
            values[valuesById[10] = "WA_IG_1P_PLUGIN_RANKING_CONTROL"] = 10;
            values[valuesById[11] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_1"] = 11;
            values[valuesById[12] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_2"] = 12;
            values[valuesById[13] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_3"] = 13;
            values[valuesById[14] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_4"] = 14;
            values[valuesById[15] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_5"] = 15;
            values[valuesById[16] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_6"] = 16;
            values[valuesById[17] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_7"] = 17;
            values[valuesById[18] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_8"] = 18;
            values[valuesById[19] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_9"] = 19;
            values[valuesById[20] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_10"] = 20;
            values[valuesById[21] = "RICH_RESPONSE_SUB_HEADING"] = 21;
            values[valuesById[22] = "RICH_RESPONSE_GRID_IMAGE"] = 22;
            values[valuesById[23] = "AI_STUDIO_UGC_MEMORY"] = 23;
            values[valuesById[24] = "RICH_RESPONSE_LATEX"] = 24;
            values[valuesById[25] = "RICH_RESPONSE_MAPS"] = 25;
            values[valuesById[26] = "RICH_RESPONSE_INLINE_REELS"] = 26;
            values[valuesById[27] = "AGENTIC_PLANNING"] = 27;
            values[valuesById[28] = "ACCOUNT_LINKING"] = 28;
            values[valuesById[29] = "STREAMING_DISAGGREGATION"] = 29;
            values[valuesById[30] = "RICH_RESPONSE_GRID_IMAGE_3P"] = 30;
            values[valuesById[31] = "RICH_RESPONSE_LATEX_INLINE"] = 31;
            values[valuesById[32] = "QUERY_PLAN"] = 32;
            values[valuesById[33] = "PROACTIVE_MESSAGE"] = 33;
            values[valuesById[34] = "RICH_RESPONSE_UNIFIED_RESPONSE"] = 34;
            values[valuesById[35] = "PROMOTION_MESSAGE"] = 35;
            values[valuesById[36] = "SIMPLIFIED_PROFILE_PAGE"] = 36;
            values[valuesById[37] = "RICH_RESPONSE_SOURCES_IN_MESSAGE"] = 37;
            values[valuesById[38] = "RICH_RESPONSE_SIDE_BY_SIDE_SURVEY"] = 38;
            values[valuesById[39] = "RICH_RESPONSE_UNIFIED_TEXT_COMPONENT"] = 39;
            values[valuesById[40] = "AI_SHARED_MEMORY"] = 40;
            values[valuesById[41] = "RICH_RESPONSE_UNIFIED_SOURCES"] = 41;
            values[valuesById[42] = "RICH_RESPONSE_UNIFIED_DOMAIN_CITATIONS"] = 42;
            values[valuesById[43] = "RICH_RESPONSE_UR_INLINE_REELS_ENABLED"] = 43;
            values[valuesById[44] = "RICH_RESPONSE_UR_MEDIA_GRID_ENABLED"] = 44;
            values[valuesById[45] = "RICH_RESPONSE_UR_TIMESTAMP_PLACEHOLDER"] = 45;
            values[valuesById[46] = "RICH_RESPONSE_IN_APP_SURVEY"] = 46;
            values[valuesById[47] = "AI_RESPONSE_MODEL_BRANDING"] = 47;
            values[valuesById[48] = "SESSION_TRANSPARENCY_SYSTEM_MESSAGE"] = 48;
            values[valuesById[49] = "RICH_RESPONSE_UR_REASONING"] = 49;
            return values;
        })();

        return BotCapabilityMetadata;
    })();

    AICommon.BotProgressIndicatorMetadata = (function() {

        /**
         * Properties of a BotProgressIndicatorMetadata.
         * @memberof AICommon
         * @interface IBotProgressIndicatorMetadata
         * @property {string|null} [progressDescription] BotProgressIndicatorMetadata progressDescription
         * @property {Array.<AICommon.BotProgressIndicatorMetadata.IBotPlanningStepMetadata>|null} [stepsMetadata] BotProgressIndicatorMetadata stepsMetadata
         */

        /**
         * Constructs a new BotProgressIndicatorMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotProgressIndicatorMetadata.
         * @implements IBotProgressIndicatorMetadata
         * @constructor
         * @param {AICommon.IBotProgressIndicatorMetadata=} [properties] Properties to set
         */
        function BotProgressIndicatorMetadata(properties) {
            this.stepsMetadata = [];
            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]];
        }

        /**
         * BotProgressIndicatorMetadata progressDescription.
         * @member {string|null|undefined} progressDescription
         * @memberof AICommon.BotProgressIndicatorMetadata
         * @instance
         */
        BotProgressIndicatorMetadata.prototype.progressDescription = null;

        /**
         * BotProgressIndicatorMetadata stepsMetadata.
         * @member {Array.<AICommon.BotProgressIndicatorMetadata.IBotPlanningStepMetadata>} stepsMetadata
         * @memberof AICommon.BotProgressIndicatorMetadata
         * @instance
         */
        BotProgressIndicatorMetadata.prototype.stepsMetadata = $util.emptyArray;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotProgressIndicatorMetadata _progressDescription.
         * @member {"progressDescription"|undefined} _progressDescription
         * @memberof AICommon.BotProgressIndicatorMetadata
         * @instance
         */
        Object.defineProperty(BotProgressIndicatorMetadata.prototype, "_progressDescription", {
            get: $util.oneOfGetter($oneOfFields = ["progressDescription"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotProgressIndicatorMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotProgressIndicatorMetadata
         * @static
         * @param {AICommon.IBotProgressIndicatorMetadata=} [properties] Properties to set
         * @returns {AICommon.BotProgressIndicatorMetadata} BotProgressIndicatorMetadata instance
         */
        BotProgressIndicatorMetadata.create = function create(properties) {
            return new BotProgressIndicatorMetadata(properties);
        };

        /**
         * Encodes the specified BotProgressIndicatorMetadata message. Does not implicitly {@link AICommon.BotProgressIndicatorMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotProgressIndicatorMetadata
         * @static
         * @param {AICommon.IBotProgressIndicatorMetadata} message BotProgressIndicatorMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotProgressIndicatorMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.progressDescription != null && Object.hasOwnProperty.call(message, "progressDescription"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.progressDescription);
            if (message.stepsMetadata != null && message.stepsMetadata.length)
                for (var i = 0; i < message.stepsMetadata.length; ++i)
                    $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.encode(message.stepsMetadata[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified BotProgressIndicatorMetadata message, length delimited. Does not implicitly {@link AICommon.BotProgressIndicatorMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotProgressIndicatorMetadata
         * @static
         * @param {AICommon.IBotProgressIndicatorMetadata} message BotProgressIndicatorMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotProgressIndicatorMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotProgressIndicatorMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotProgressIndicatorMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotProgressIndicatorMetadata} BotProgressIndicatorMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotProgressIndicatorMetadata.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.AICommon.BotProgressIndicatorMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.progressDescription = reader.string();
                        break;
                    }
                case 2: {
                        if (!(message.stepsMetadata && message.stepsMetadata.length))
                            message.stepsMetadata = [];
                        message.stepsMetadata.push($root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotProgressIndicatorMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotProgressIndicatorMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotProgressIndicatorMetadata} BotProgressIndicatorMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotProgressIndicatorMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotProgressIndicatorMetadata message.
         * @function verify
         * @memberof AICommon.BotProgressIndicatorMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotProgressIndicatorMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.progressDescription != null && message.hasOwnProperty("progressDescription")) {
                properties._progressDescription = 1;
                if (!$util.isString(message.progressDescription))
                    return "progressDescription: string expected";
            }
            if (message.stepsMetadata != null && message.hasOwnProperty("stepsMetadata")) {
                if (!Array.isArray(message.stepsMetadata))
                    return "stepsMetadata: array expected";
                for (var i = 0; i < message.stepsMetadata.length; ++i) {
                    var error = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.verify(message.stepsMetadata[i]);
                    if (error)
                        return "stepsMetadata." + error;
                }
            }
            return null;
        };

        /**
         * Creates a BotProgressIndicatorMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotProgressIndicatorMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotProgressIndicatorMetadata} BotProgressIndicatorMetadata
         */
        BotProgressIndicatorMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotProgressIndicatorMetadata)
                return object;
            var message = new $root.AICommon.BotProgressIndicatorMetadata();
            if (object.progressDescription != null)
                message.progressDescription = String(object.progressDescription);
            if (object.stepsMetadata) {
                if (!Array.isArray(object.stepsMetadata))
                    throw TypeError(".AICommon.BotProgressIndicatorMetadata.stepsMetadata: array expected");
                message.stepsMetadata = [];
                for (var i = 0; i < object.stepsMetadata.length; ++i) {
                    if (typeof object.stepsMetadata[i] !== "object")
                        throw TypeError(".AICommon.BotProgressIndicatorMetadata.stepsMetadata: object expected");
                    message.stepsMetadata[i] = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.fromObject(object.stepsMetadata[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a BotProgressIndicatorMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotProgressIndicatorMetadata
         * @static
         * @param {AICommon.BotProgressIndicatorMetadata} message BotProgressIndicatorMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotProgressIndicatorMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.stepsMetadata = [];
            if (message.progressDescription != null && message.hasOwnProperty("progressDescription")) {
                object.progressDescription = message.progressDescription;
                if (options.oneofs)
                    object._progressDescription = "progressDescription";
            }
            if (message.stepsMetadata && message.stepsMetadata.length) {
                object.stepsMetadata = [];
                for (var j = 0; j < message.stepsMetadata.length; ++j)
                    object.stepsMetadata[j] = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.toObject(message.stepsMetadata[j], options);
            }
            return object;
        };

        /**
         * Converts this BotProgressIndicatorMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotProgressIndicatorMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotProgressIndicatorMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotProgressIndicatorMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotProgressIndicatorMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotProgressIndicatorMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotProgressIndicatorMetadata";
        };

        BotProgressIndicatorMetadata.BotPlanningStepMetadata = (function() {

            /**
             * Properties of a BotPlanningStepMetadata.
             * @memberof AICommon.BotProgressIndicatorMetadata
             * @interface IBotPlanningStepMetadata
             * @property {string|null} [statusTitle] BotPlanningStepMetadata statusTitle
             * @property {string|null} [statusBody] BotPlanningStepMetadata statusBody
             * @property {Array.<AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata>|null} [sourcesMetadata] BotPlanningStepMetadata sourcesMetadata
             * @property {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus|null} [status] BotPlanningStepMetadata status
             * @property {boolean|null} [isReasoning] BotPlanningStepMetadata isReasoning
             * @property {boolean|null} [isEnhancedSearch] BotPlanningStepMetadata isEnhancedSearch
             * @property {Array.<AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningStepSectionMetadata>|null} [sections] BotPlanningStepMetadata sections
             */

            /**
             * Constructs a new BotPlanningStepMetadata.
             * @memberof AICommon.BotProgressIndicatorMetadata
             * @classdesc Represents a BotPlanningStepMetadata.
             * @implements IBotPlanningStepMetadata
             * @constructor
             * @param {AICommon.BotProgressIndicatorMetadata.IBotPlanningStepMetadata=} [properties] Properties to set
             */
            function BotPlanningStepMetadata(properties) {
                this.sourcesMetadata = [];
                this.sections = [];
                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]];
            }

            /**
             * BotPlanningStepMetadata statusTitle.
             * @member {string|null|undefined} statusTitle
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.statusTitle = null;

            /**
             * BotPlanningStepMetadata statusBody.
             * @member {string|null|undefined} statusBody
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.statusBody = null;

            /**
             * BotPlanningStepMetadata sourcesMetadata.
             * @member {Array.<AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata>} sourcesMetadata
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.sourcesMetadata = $util.emptyArray;

            /**
             * BotPlanningStepMetadata status.
             * @member {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus|null|undefined} status
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.status = null;

            /**
             * BotPlanningStepMetadata isReasoning.
             * @member {boolean|null|undefined} isReasoning
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.isReasoning = null;

            /**
             * BotPlanningStepMetadata isEnhancedSearch.
             * @member {boolean|null|undefined} isEnhancedSearch
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.isEnhancedSearch = null;

            /**
             * BotPlanningStepMetadata sections.
             * @member {Array.<AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningStepSectionMetadata>} sections
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            BotPlanningStepMetadata.prototype.sections = $util.emptyArray;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * BotPlanningStepMetadata _statusTitle.
             * @member {"statusTitle"|undefined} _statusTitle
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            Object.defineProperty(BotPlanningStepMetadata.prototype, "_statusTitle", {
                get: $util.oneOfGetter($oneOfFields = ["statusTitle"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotPlanningStepMetadata _statusBody.
             * @member {"statusBody"|undefined} _statusBody
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            Object.defineProperty(BotPlanningStepMetadata.prototype, "_statusBody", {
                get: $util.oneOfGetter($oneOfFields = ["statusBody"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotPlanningStepMetadata _status.
             * @member {"status"|undefined} _status
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            Object.defineProperty(BotPlanningStepMetadata.prototype, "_status", {
                get: $util.oneOfGetter($oneOfFields = ["status"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotPlanningStepMetadata _isReasoning.
             * @member {"isReasoning"|undefined} _isReasoning
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            Object.defineProperty(BotPlanningStepMetadata.prototype, "_isReasoning", {
                get: $util.oneOfGetter($oneOfFields = ["isReasoning"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * BotPlanningStepMetadata _isEnhancedSearch.
             * @member {"isEnhancedSearch"|undefined} _isEnhancedSearch
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             */
            Object.defineProperty(BotPlanningStepMetadata.prototype, "_isEnhancedSearch", {
                get: $util.oneOfGetter($oneOfFields = ["isEnhancedSearch"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new BotPlanningStepMetadata instance using the specified properties.
             * @function create
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @static
             * @param {AICommon.BotProgressIndicatorMetadata.IBotPlanningStepMetadata=} [properties] Properties to set
             * @returns {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata} BotPlanningStepMetadata instance
             */
            BotPlanningStepMetadata.create = function create(properties) {
                return new BotPlanningStepMetadata(properties);
            };

            /**
             * Encodes the specified BotPlanningStepMetadata message. Does not implicitly {@link AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.verify|verify} messages.
             * @function encode
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @static
             * @param {AICommon.BotProgressIndicatorMetadata.IBotPlanningStepMetadata} message BotPlanningStepMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BotPlanningStepMetadata.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.statusTitle != null && Object.hasOwnProperty.call(message, "statusTitle"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.statusTitle);
                if (message.statusBody != null && Object.hasOwnProperty.call(message, "statusBody"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.statusBody);
                if (message.sourcesMetadata != null && message.sourcesMetadata.length)
                    for (var i = 0; i < message.sourcesMetadata.length; ++i)
                        $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.encode(message.sourcesMetadata[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                if (message.status != null && Object.hasOwnProperty.call(message, "status"))
                    writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status);
                if (message.isReasoning != null && Object.hasOwnProperty.call(message, "isReasoning"))
                    writer.uint32(/* id 5, wireType 0 =*/40).bool(message.isReasoning);
                if (message.isEnhancedSearch != null && Object.hasOwnProperty.call(message, "isEnhancedSearch"))
                    writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isEnhancedSearch);
                if (message.sections != null && message.sections.length)
                    for (var i = 0; i < message.sections.length; ++i)
                        $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata.encode(message.sections[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified BotPlanningStepMetadata message, length delimited. Does not implicitly {@link AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @static
             * @param {AICommon.BotProgressIndicatorMetadata.IBotPlanningStepMetadata} message BotPlanningStepMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BotPlanningStepMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BotPlanningStepMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata} BotPlanningStepMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BotPlanningStepMetadata.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.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.statusTitle = reader.string();
                            break;
                        }
                    case 2: {
                            message.statusBody = reader.string();
                            break;
                        }
                    case 3: {
                            if (!(message.sourcesMetadata && message.sourcesMetadata.length))
                                message.sourcesMetadata = [];
                            message.sourcesMetadata.push($root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.decode(reader, reader.uint32()));
                            break;
                        }
                    case 4: {
                            message.status = reader.int32();
                            break;
                        }
                    case 5: {
                            message.isReasoning = reader.bool();
                            break;
                        }
                    case 6: {
                            message.isEnhancedSearch = reader.bool();
                            break;
                        }
                    case 7: {
                            if (!(message.sections && message.sections.length))
                                message.sections = [];
                            message.sections.push($root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata.decode(reader, reader.uint32()));
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a BotPlanningStepMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata} BotPlanningStepMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BotPlanningStepMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BotPlanningStepMetadata message.
             * @function verify
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BotPlanningStepMetadata.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.statusTitle != null && message.hasOwnProperty("statusTitle")) {
                    properties._statusTitle = 1;
                    if (!$util.isString(message.statusTitle))
                        return "statusTitle: string expected";
                }
                if (message.statusBody != null && message.hasOwnProperty("statusBody")) {
                    properties._statusBody = 1;
                    if (!$util.isString(message.statusBody))
                        return "statusBody: string expected";
                }
                if (message.sourcesMetadata != null && message.hasOwnProperty("sourcesMetadata")) {
                    if (!Array.isArray(message.sourcesMetadata))
                        return "sourcesMetadata: array expected";
                    for (var i = 0; i < message.sourcesMetadata.length; ++i) {
                        var error = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.verify(message.sourcesMetadata[i]);
                        if (error)
                            return "sourcesMetadata." + error;
                    }
                }
                if (message.status != null && message.hasOwnProperty("status")) {
                    properties._status = 1;
                    switch (message.status) {
                    default:
                        return "status: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                if (message.isReasoning != null && message.hasOwnProperty("isReasoning")) {
                    properties._isReasoning = 1;
                    if (typeof message.isReasoning !== "boolean")
                        return "isReasoning: boolean expected";
                }
                if (message.isEnhancedSearch != null && message.hasOwnProperty("isEnhancedSearch")) {
                    properties._isEnhancedSearch = 1;
                    if (typeof message.isEnhancedSearch !== "boolean")
                        return "isEnhancedSearch: boolean expected";
                }
                if (message.sections != null && message.hasOwnProperty("sections")) {
                    if (!Array.isArray(message.sections))
                        return "sections: array expected";
                    for (var i = 0; i < message.sections.length; ++i) {
                        var error = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata.verify(message.sections[i]);
                        if (error)
                            return "sections." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a BotPlanningStepMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata} BotPlanningStepMetadata
             */
            BotPlanningStepMetadata.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata)
                    return object;
                var message = new $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata();
                if (object.statusTitle != null)
                    message.statusTitle = String(object.statusTitle);
                if (object.statusBody != null)
                    message.statusBody = String(object.statusBody);
                if (object.sourcesMetadata) {
                    if (!Array.isArray(object.sourcesMetadata))
                        throw TypeError(".AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.sourcesMetadata: array expected");
                    message.sourcesMetadata = [];
                    for (var i = 0; i < object.sourcesMetadata.length; ++i) {
                        if (typeof object.sourcesMetadata[i] !== "object")
                            throw TypeError(".AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.sourcesMetadata: object expected");
                        message.sourcesMetadata[i] = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.fromObject(object.sourcesMetadata[i]);
                    }
                }
                switch (object.status) {
                default:
                    if (typeof object.status === "number") {
                        message.status = object.status;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.status = 0;
                    break;
                case "PLANNED":
                case 1:
                    message.status = 1;
                    break;
                case "EXECUTING":
                case 2:
                    message.status = 2;
                    break;
                case "FINISHED":
                case 3:
                    message.status = 3;
                    break;
                }
                if (object.isReasoning != null)
                    message.isReasoning = Boolean(object.isReasoning);
                if (object.isEnhancedSearch != null)
                    message.isEnhancedSearch = Boolean(object.isEnhancedSearch);
                if (object.sections) {
                    if (!Array.isArray(object.sections))
                        throw TypeError(".AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.sections: array expected");
                    message.sections = [];
                    for (var i = 0; i < object.sections.length; ++i) {
                        if (typeof object.sections[i] !== "object")
                            throw TypeError(".AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.sections: object expected");
                        message.sections[i] = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata.fromObject(object.sections[i]);
                    }
                }
                return message;
            };

            /**
             * Creates a plain object from a BotPlanningStepMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @static
             * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata} message BotPlanningStepMetadata
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BotPlanningStepMetadata.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults) {
                    object.sourcesMetadata = [];
                    object.sections = [];
                }
                if (message.statusTitle != null && message.hasOwnProperty("statusTitle")) {
                    object.statusTitle = message.statusTitle;
                    if (options.oneofs)
                        object._statusTitle = "statusTitle";
                }
                if (message.statusBody != null && message.hasOwnProperty("statusBody")) {
                    object.statusBody = message.statusBody;
                    if (options.oneofs)
                        object._statusBody = "statusBody";
                }
                if (message.sourcesMetadata && message.sourcesMetadata.length) {
                    object.sourcesMetadata = [];
                    for (var j = 0; j < message.sourcesMetadata.length; ++j)
                        object.sourcesMetadata[j] = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.toObject(message.sourcesMetadata[j], options);
                }
                if (message.status != null && message.hasOwnProperty("status")) {
                    object.status = options.enums === String ? $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus[message.status] === undefined ? message.status : $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus[message.status] : message.status;
                    if (options.oneofs)
                        object._status = "status";
                }
                if (message.isReasoning != null && message.hasOwnProperty("isReasoning")) {
                    object.isReasoning = message.isReasoning;
                    if (options.oneofs)
                        object._isReasoning = "isReasoning";
                }
                if (message.isEnhancedSearch != null && message.hasOwnProperty("isEnhancedSearch")) {
                    object.isEnhancedSearch = message.isEnhancedSearch;
                    if (options.oneofs)
                        object._isEnhancedSearch = "isEnhancedSearch";
                }
                if (message.sections && message.sections.length) {
                    object.sections = [];
                    for (var j = 0; j < message.sections.length; ++j)
                        object.sections[j] = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata.toObject(message.sections[j], options);
                }
                return object;
            };

            /**
             * Converts this BotPlanningStepMetadata to JSON.
             * @function toJSON
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BotPlanningStepMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for BotPlanningStepMetadata
             * @function getTypeUrl
             * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            BotPlanningStepMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata";
            };

            BotPlanningStepMetadata.BotPlanningSearchSourceMetadata = (function() {

                /**
                 * Properties of a BotPlanningSearchSourceMetadata.
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
                 * @interface IBotPlanningSearchSourceMetadata
                 * @property {string|null} [title] BotPlanningSearchSourceMetadata title
                 * @property {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotSearchSourceProvider|null} [provider] BotPlanningSearchSourceMetadata provider
                 * @property {string|null} [sourceUrl] BotPlanningSearchSourceMetadata sourceUrl
                 * @property {string|null} [favIconUrl] BotPlanningSearchSourceMetadata favIconUrl
                 */

                /**
                 * Constructs a new BotPlanningSearchSourceMetadata.
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
                 * @classdesc Represents a BotPlanningSearchSourceMetadata.
                 * @implements IBotPlanningSearchSourceMetadata
                 * @constructor
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourceMetadata=} [properties] Properties to set
                 */
                function BotPlanningSearchSourceMetadata(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]];
                }

                /**
                 * BotPlanningSearchSourceMetadata title.
                 * @member {string|null|undefined} title
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                BotPlanningSearchSourceMetadata.prototype.title = null;

                /**
                 * BotPlanningSearchSourceMetadata provider.
                 * @member {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotSearchSourceProvider|null|undefined} provider
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                BotPlanningSearchSourceMetadata.prototype.provider = null;

                /**
                 * BotPlanningSearchSourceMetadata sourceUrl.
                 * @member {string|null|undefined} sourceUrl
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                BotPlanningSearchSourceMetadata.prototype.sourceUrl = null;

                /**
                 * BotPlanningSearchSourceMetadata favIconUrl.
                 * @member {string|null|undefined} favIconUrl
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                BotPlanningSearchSourceMetadata.prototype.favIconUrl = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * BotPlanningSearchSourceMetadata _title.
                 * @member {"title"|undefined} _title
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                Object.defineProperty(BotPlanningSearchSourceMetadata.prototype, "_title", {
                    get: $util.oneOfGetter($oneOfFields = ["title"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * BotPlanningSearchSourceMetadata _provider.
                 * @member {"provider"|undefined} _provider
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                Object.defineProperty(BotPlanningSearchSourceMetadata.prototype, "_provider", {
                    get: $util.oneOfGetter($oneOfFields = ["provider"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * BotPlanningSearchSourceMetadata _sourceUrl.
                 * @member {"sourceUrl"|undefined} _sourceUrl
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                Object.defineProperty(BotPlanningSearchSourceMetadata.prototype, "_sourceUrl", {
                    get: $util.oneOfGetter($oneOfFields = ["sourceUrl"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * BotPlanningSearchSourceMetadata _favIconUrl.
                 * @member {"favIconUrl"|undefined} _favIconUrl
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 */
                Object.defineProperty(BotPlanningSearchSourceMetadata.prototype, "_favIconUrl", {
                    get: $util.oneOfGetter($oneOfFields = ["favIconUrl"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new BotPlanningSearchSourceMetadata instance using the specified properties.
                 * @function create
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @static
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourceMetadata=} [properties] Properties to set
                 * @returns {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata} BotPlanningSearchSourceMetadata instance
                 */
                BotPlanningSearchSourceMetadata.create = function create(properties) {
                    return new BotPlanningSearchSourceMetadata(properties);
                };

                /**
                 * Encodes the specified BotPlanningSearchSourceMetadata message. Does not implicitly {@link AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata.verify|verify} messages.
                 * @function encode
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @static
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourceMetadata} message BotPlanningSearchSourceMetadata message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BotPlanningSearchSourceMetadata.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.title);
                    if (message.provider != null && Object.hasOwnProperty.call(message, "provider"))
                        writer.uint32(/* id 2, wireType 0 =*/16).int32(message.provider);
                    if (message.sourceUrl != null && Object.hasOwnProperty.call(message, "sourceUrl"))
                        writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceUrl);
                    if (message.favIconUrl != null && Object.hasOwnProperty.call(message, "favIconUrl"))
                        writer.uint32(/* id 4, wireType 2 =*/34).string(message.favIconUrl);
                    return writer;
                };

                /**
                 * Encodes the specified BotPlanningSearchSourceMetadata message, length delimited. Does not implicitly {@link AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @static
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourceMetadata} message BotPlanningSearchSourceMetadata message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BotPlanningSearchSourceMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a BotPlanningSearchSourceMetadata message from the specified reader or buffer.
                 * @function decode
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata} BotPlanningSearchSourceMetadata
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BotPlanningSearchSourceMetadata.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.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.title = reader.string();
                                break;
                            }
                        case 2: {
                                message.provider = reader.int32();
                                break;
                            }
                        case 3: {
                                message.sourceUrl = reader.string();
                                break;
                            }
                        case 4: {
                                message.favIconUrl = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a BotPlanningSearchSourceMetadata message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata} BotPlanningSearchSourceMetadata
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BotPlanningSearchSourceMetadata.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a BotPlanningSearchSourceMetadata message.
                 * @function verify
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                BotPlanningSearchSourceMetadata.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.title != null && message.hasOwnProperty("title")) {
                        properties._title = 1;
                        if (!$util.isString(message.title))
                            return "title: string expected";
                    }
                    if (message.provider != null && message.hasOwnProperty("provider")) {
                        properties._provider = 1;
                        switch (message.provider) {
                        default:
                            return "provider: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                            break;
                        }
                    }
                    if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) {
                        properties._sourceUrl = 1;
                        if (!$util.isString(message.sourceUrl))
                            return "sourceUrl: string expected";
                    }
                    if (message.favIconUrl != null && message.hasOwnProperty("favIconUrl")) {
                        properties._favIconUrl = 1;
                        if (!$util.isString(message.favIconUrl))
                            return "favIconUrl: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a BotPlanningSearchSourceMetadata message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata} BotPlanningSearchSourceMetadata
                 */
                BotPlanningSearchSourceMetadata.fromObject = function fromObject(object) {
                    if (object instanceof $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata)
                        return object;
                    var message = new $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata();
                    if (object.title != null)
                        message.title = String(object.title);
                    switch (object.provider) {
                    default:
                        if (typeof object.provider === "number") {
                            message.provider = object.provider;
                            break;
                        }
                        break;
                    case "UNKNOWN_PROVIDER":
                    case 0:
                        message.provider = 0;
                        break;
                    case "OTHER":
                    case 1:
                        message.provider = 1;
                        break;
                    case "GOOGLE":
                    case 2:
                        message.provider = 2;
                        break;
                    case "BING":
                    case 3:
                        message.provider = 3;
                        break;
                    }
                    if (object.sourceUrl != null)
                        message.sourceUrl = String(object.sourceUrl);
                    if (object.favIconUrl != null)
                        message.favIconUrl = String(object.favIconUrl);
                    return message;
                };

                /**
                 * Creates a plain object from a BotPlanningSearchSourceMetadata message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @static
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata} message BotPlanningSearchSourceMetadata
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                BotPlanningSearchSourceMetadata.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.title != null && message.hasOwnProperty("title")) {
                        object.title = message.title;
                        if (options.oneofs)
                            object._title = "title";
                    }
                    if (message.provider != null && message.hasOwnProperty("provider")) {
                        object.provider = options.enums === String ? $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotSearchSourceProvider[message.provider] === undefined ? message.provider : $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotSearchSourceProvider[message.provider] : message.provider;
                        if (options.oneofs)
                            object._provider = "provider";
                    }
                    if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) {
                        object.sourceUrl = message.sourceUrl;
                        if (options.oneofs)
                            object._sourceUrl = "sourceUrl";
                    }
                    if (message.favIconUrl != null && message.hasOwnProperty("favIconUrl")) {
                        object.favIconUrl = message.favIconUrl;
                        if (options.oneofs)
                            object._favIconUrl = "favIconUrl";
                    }
                    return object;
                };

                /**
                 * Converts this BotPlanningSearchSourceMetadata to JSON.
                 * @function toJSON
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                BotPlanningSearchSourceMetadata.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for BotPlanningSearchSourceMetadata
                 * @function getTypeUrl
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                BotPlanningSearchSourceMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata";
                };

                return BotPlanningSearchSourceMetadata;
            })();

            BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata = (function() {

                /**
                 * Properties of a BotPlanningSearchSourcesMetadata.
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
                 * @interface IBotPlanningSearchSourcesMetadata
                 * @property {string|null} [sourceTitle] BotPlanningSearchSourcesMetadata sourceTitle
                 * @property {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider|null} [provider] BotPlanningSearchSourcesMetadata provider
                 * @property {string|null} [sourceUrl] BotPlanningSearchSourcesMetadata sourceUrl
                 */

                /**
                 * Constructs a new BotPlanningSearchSourcesMetadata.
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
                 * @classdesc Represents a BotPlanningSearchSourcesMetadata.
                 * @implements IBotPlanningSearchSourcesMetadata
                 * @constructor
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata=} [properties] Properties to set
                 */
                function BotPlanningSearchSourcesMetadata(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]];
                }

                /**
                 * BotPlanningSearchSourcesMetadata sourceTitle.
                 * @member {string|null|undefined} sourceTitle
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @instance
                 */
                BotPlanningSearchSourcesMetadata.prototype.sourceTitle = null;

                /**
                 * BotPlanningSearchSourcesMetadata provider.
                 * @member {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider|null|undefined} provider
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @instance
                 */
                BotPlanningSearchSourcesMetadata.prototype.provider = null;

                /**
                 * BotPlanningSearchSourcesMetadata sourceUrl.
                 * @member {string|null|undefined} sourceUrl
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @instance
                 */
                BotPlanningSearchSourcesMetadata.prototype.sourceUrl = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * BotPlanningSearchSourcesMetadata _sourceTitle.
                 * @member {"sourceTitle"|undefined} _sourceTitle
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @instance
                 */
                Object.defineProperty(BotPlanningSearchSourcesMetadata.prototype, "_sourceTitle", {
                    get: $util.oneOfGetter($oneOfFields = ["sourceTitle"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * BotPlanningSearchSourcesMetadata _provider.
                 * @member {"provider"|undefined} _provider
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @instance
                 */
                Object.defineProperty(BotPlanningSearchSourcesMetadata.prototype, "_provider", {
                    get: $util.oneOfGetter($oneOfFields = ["provider"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * BotPlanningSearchSourcesMetadata _sourceUrl.
                 * @member {"sourceUrl"|undefined} _sourceUrl
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @instance
                 */
                Object.defineProperty(BotPlanningSearchSourcesMetadata.prototype, "_sourceUrl", {
                    get: $util.oneOfGetter($oneOfFields = ["sourceUrl"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new BotPlanningSearchSourcesMetadata instance using the specified properties.
                 * @function create
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @static
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata=} [properties] Properties to set
                 * @returns {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata} BotPlanningSearchSourcesMetadata instance
                 */
                BotPlanningSearchSourcesMetadata.create = function create(properties) {
                    return new BotPlanningSearchSourcesMetadata(properties);
                };

                /**
                 * Encodes the specified BotPlanningSearchSourcesMetadata message. Does not implicitly {@link AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.verify|verify} messages.
                 * @function encode
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @static
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata} message BotPlanningSearchSourcesMetadata message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BotPlanningSearchSourcesMetadata.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.sourceTitle != null && Object.hasOwnProperty.call(message, "sourceTitle"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceTitle);
                    if (message.provider != null && Object.hasOwnProperty.call(message, "provider"))
                        writer.uint32(/* id 2, wireType 0 =*/16).int32(message.provider);
                    if (message.sourceUrl != null && Object.hasOwnProperty.call(message, "sourceUrl"))
                        writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceUrl);
                    return writer;
                };

                /**
                 * Encodes the specified BotPlanningSearchSourcesMetadata message, length delimited. Does not implicitly {@link AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @static
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata} message BotPlanningSearchSourcesMetadata message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BotPlanningSearchSourcesMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a BotPlanningSearchSourcesMetadata message from the specified reader or buffer.
                 * @function decode
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata} BotPlanningSearchSourcesMetadata
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BotPlanningSearchSourcesMetadata.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.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.sourceTitle = reader.string();
                                break;
                            }
                        case 2: {
                                message.provider = reader.int32();
                                break;
                            }
                        case 3: {
                                message.sourceUrl = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a BotPlanningSearchSourcesMetadata message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata} BotPlanningSearchSourcesMetadata
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BotPlanningSearchSourcesMetadata.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a BotPlanningSearchSourcesMetadata message.
                 * @function verify
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                BotPlanningSearchSourcesMetadata.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.sourceTitle != null && message.hasOwnProperty("sourceTitle")) {
                        properties._sourceTitle = 1;
                        if (!$util.isString(message.sourceTitle))
                            return "sourceTitle: string expected";
                    }
                    if (message.provider != null && message.hasOwnProperty("provider")) {
                        properties._provider = 1;
                        switch (message.provider) {
                        default:
                            return "provider: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                            break;
                        }
                    }
                    if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) {
                        properties._sourceUrl = 1;
                        if (!$util.isString(message.sourceUrl))
                            return "sourceUrl: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a BotPlanningSearchSourcesMetadata message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata} BotPlanningSearchSourcesMetadata
                 */
                BotPlanningSearchSourcesMetadata.fromObject = function fromObject(object) {
                    if (object instanceof $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata)
                        return object;
                    var message = new $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata();
                    if (object.sourceTitle != null)
                        message.sourceTitle = String(object.sourceTitle);
                    switch (object.provider) {
                    default:
                        if (typeof object.provider === "number") {
                            message.provider = object.provider;
                            break;
                        }
                        break;
                    case "UNKNOWN":
                    case 0:
                        message.provider = 0;
                        break;
                    case "OTHER":
                    case 1:
                        message.provider = 1;
                        break;
                    case "GOOGLE":
                    case 2:
                        message.provider = 2;
                        break;
                    case "BING":
                    case 3:
                        message.provider = 3;
                        break;
                    }
                    if (object.sourceUrl != null)
                        message.sourceUrl = String(object.sourceUrl);
                    return message;
                };

                /**
                 * Creates a plain object from a BotPlanningSearchSourcesMetadata message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @static
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata} message BotPlanningSearchSourcesMetadata
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                BotPlanningSearchSourcesMetadata.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.sourceTitle != null && message.hasOwnProperty("sourceTitle")) {
                        object.sourceTitle = message.sourceTitle;
                        if (options.oneofs)
                            object._sourceTitle = "sourceTitle";
                    }
                    if (message.provider != null && message.hasOwnProperty("provider")) {
                        object.provider = options.enums === String ? $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider[message.provider] === undefined ? message.provider : $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider[message.provider] : message.provider;
                        if (options.oneofs)
                            object._provider = "provider";
                    }
                    if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) {
                        object.sourceUrl = message.sourceUrl;
                        if (options.oneofs)
                            object._sourceUrl = "sourceUrl";
                    }
                    return object;
                };

                /**
                 * Converts this BotPlanningSearchSourcesMetadata to JSON.
                 * @function toJSON
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                BotPlanningSearchSourcesMetadata.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for BotPlanningSearchSourcesMetadata
                 * @function getTypeUrl
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                BotPlanningSearchSourcesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata";
                };

                /**
                 * BotPlanningSearchSourceProvider enum.
                 * @name AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider
                 * @enum {number}
                 * @property {number} UNKNOWN=0 UNKNOWN value
                 * @property {number} OTHER=1 OTHER value
                 * @property {number} GOOGLE=2 GOOGLE value
                 * @property {number} BING=3 BING value
                 */
                BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "UNKNOWN"] = 0;
                    values[valuesById[1] = "OTHER"] = 1;
                    values[valuesById[2] = "GOOGLE"] = 2;
                    values[valuesById[3] = "BING"] = 3;
                    return values;
                })();

                return BotPlanningSearchSourcesMetadata;
            })();

            BotPlanningStepMetadata.BotPlanningStepSectionMetadata = (function() {

                /**
                 * Properties of a BotPlanningStepSectionMetadata.
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
                 * @interface IBotPlanningStepSectionMetadata
                 * @property {string|null} [sectionTitle] BotPlanningStepSectionMetadata sectionTitle
                 * @property {string|null} [sectionBody] BotPlanningStepSectionMetadata sectionBody
                 * @property {Array.<AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourceMetadata>|null} [sourcesMetadata] BotPlanningStepSectionMetadata sourcesMetadata
                 */

                /**
                 * Constructs a new BotPlanningStepSectionMetadata.
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata
                 * @classdesc Represents a BotPlanningStepSectionMetadata.
                 * @implements IBotPlanningStepSectionMetadata
                 * @constructor
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningStepSectionMetadata=} [properties] Properties to set
                 */
                function BotPlanningStepSectionMetadata(properties) {
                    this.sourcesMetadata = [];
                    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]];
                }

                /**
                 * BotPlanningStepSectionMetadata sectionTitle.
                 * @member {string|null|undefined} sectionTitle
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @instance
                 */
                BotPlanningStepSectionMetadata.prototype.sectionTitle = null;

                /**
                 * BotPlanningStepSectionMetadata sectionBody.
                 * @member {string|null|undefined} sectionBody
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @instance
                 */
                BotPlanningStepSectionMetadata.prototype.sectionBody = null;

                /**
                 * BotPlanningStepSectionMetadata sourcesMetadata.
                 * @member {Array.<AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourceMetadata>} sourcesMetadata
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @instance
                 */
                BotPlanningStepSectionMetadata.prototype.sourcesMetadata = $util.emptyArray;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * BotPlanningStepSectionMetadata _sectionTitle.
                 * @member {"sectionTitle"|undefined} _sectionTitle
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @instance
                 */
                Object.defineProperty(BotPlanningStepSectionMetadata.prototype, "_sectionTitle", {
                    get: $util.oneOfGetter($oneOfFields = ["sectionTitle"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * BotPlanningStepSectionMetadata _sectionBody.
                 * @member {"sectionBody"|undefined} _sectionBody
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @instance
                 */
                Object.defineProperty(BotPlanningStepSectionMetadata.prototype, "_sectionBody", {
                    get: $util.oneOfGetter($oneOfFields = ["sectionBody"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new BotPlanningStepSectionMetadata instance using the specified properties.
                 * @function create
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @static
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningStepSectionMetadata=} [properties] Properties to set
                 * @returns {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata} BotPlanningStepSectionMetadata instance
                 */
                BotPlanningStepSectionMetadata.create = function create(properties) {
                    return new BotPlanningStepSectionMetadata(properties);
                };

                /**
                 * Encodes the specified BotPlanningStepSectionMetadata message. Does not implicitly {@link AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata.verify|verify} messages.
                 * @function encode
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @static
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningStepSectionMetadata} message BotPlanningStepSectionMetadata message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BotPlanningStepSectionMetadata.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.sectionTitle != null && Object.hasOwnProperty.call(message, "sectionTitle"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.sectionTitle);
                    if (message.sectionBody != null && Object.hasOwnProperty.call(message, "sectionBody"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.sectionBody);
                    if (message.sourcesMetadata != null && message.sourcesMetadata.length)
                        for (var i = 0; i < message.sourcesMetadata.length; ++i)
                            $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata.encode(message.sourcesMetadata[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                    return writer;
                };

                /**
                 * Encodes the specified BotPlanningStepSectionMetadata message, length delimited. Does not implicitly {@link AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @static
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningStepSectionMetadata} message BotPlanningStepSectionMetadata message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BotPlanningStepSectionMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a BotPlanningStepSectionMetadata message from the specified reader or buffer.
                 * @function decode
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata} BotPlanningStepSectionMetadata
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BotPlanningStepSectionMetadata.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.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.sectionTitle = reader.string();
                                break;
                            }
                        case 2: {
                                message.sectionBody = reader.string();
                                break;
                            }
                        case 3: {
                                if (!(message.sourcesMetadata && message.sourcesMetadata.length))
                                    message.sourcesMetadata = [];
                                message.sourcesMetadata.push($root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata.decode(reader, reader.uint32()));
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a BotPlanningStepSectionMetadata message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata} BotPlanningStepSectionMetadata
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BotPlanningStepSectionMetadata.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a BotPlanningStepSectionMetadata message.
                 * @function verify
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                BotPlanningStepSectionMetadata.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.sectionTitle != null && message.hasOwnProperty("sectionTitle")) {
                        properties._sectionTitle = 1;
                        if (!$util.isString(message.sectionTitle))
                            return "sectionTitle: string expected";
                    }
                    if (message.sectionBody != null && message.hasOwnProperty("sectionBody")) {
                        properties._sectionBody = 1;
                        if (!$util.isString(message.sectionBody))
                            return "sectionBody: string expected";
                    }
                    if (message.sourcesMetadata != null && message.hasOwnProperty("sourcesMetadata")) {
                        if (!Array.isArray(message.sourcesMetadata))
                            return "sourcesMetadata: array expected";
                        for (var i = 0; i < message.sourcesMetadata.length; ++i) {
                            var error = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata.verify(message.sourcesMetadata[i]);
                            if (error)
                                return "sourcesMetadata." + error;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a BotPlanningStepSectionMetadata message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata} BotPlanningStepSectionMetadata
                 */
                BotPlanningStepSectionMetadata.fromObject = function fromObject(object) {
                    if (object instanceof $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata)
                        return object;
                    var message = new $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata();
                    if (object.sectionTitle != null)
                        message.sectionTitle = String(object.sectionTitle);
                    if (object.sectionBody != null)
                        message.sectionBody = String(object.sectionBody);
                    if (object.sourcesMetadata) {
                        if (!Array.isArray(object.sourcesMetadata))
                            throw TypeError(".AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata.sourcesMetadata: array expected");
                        message.sourcesMetadata = [];
                        for (var i = 0; i < object.sourcesMetadata.length; ++i) {
                            if (typeof object.sourcesMetadata[i] !== "object")
                                throw TypeError(".AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata.sourcesMetadata: object expected");
                            message.sourcesMetadata[i] = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata.fromObject(object.sourcesMetadata[i]);
                        }
                    }
                    return message;
                };

                /**
                 * Creates a plain object from a BotPlanningStepSectionMetadata message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @static
                 * @param {AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata} message BotPlanningStepSectionMetadata
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                BotPlanningStepSectionMetadata.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.sourcesMetadata = [];
                    if (message.sectionTitle != null && message.hasOwnProperty("sectionTitle")) {
                        object.sectionTitle = message.sectionTitle;
                        if (options.oneofs)
                            object._sectionTitle = "sectionTitle";
                    }
                    if (message.sectionBody != null && message.hasOwnProperty("sectionBody")) {
                        object.sectionBody = message.sectionBody;
                        if (options.oneofs)
                            object._sectionBody = "sectionBody";
                    }
                    if (message.sourcesMetadata && message.sourcesMetadata.length) {
                        object.sourcesMetadata = [];
                        for (var j = 0; j < message.sourcesMetadata.length; ++j)
                            object.sourcesMetadata[j] = $root.AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata.toObject(message.sourcesMetadata[j], options);
                    }
                    return object;
                };

                /**
                 * Converts this BotPlanningStepSectionMetadata to JSON.
                 * @function toJSON
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                BotPlanningStepSectionMetadata.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for BotPlanningStepSectionMetadata
                 * @function getTypeUrl
                 * @memberof AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                BotPlanningStepSectionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata";
                };

                return BotPlanningStepSectionMetadata;
            })();

            /**
             * BotSearchSourceProvider enum.
             * @name AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotSearchSourceProvider
             * @enum {number}
             * @property {number} UNKNOWN_PROVIDER=0 UNKNOWN_PROVIDER value
             * @property {number} OTHER=1 OTHER value
             * @property {number} GOOGLE=2 GOOGLE value
             * @property {number} BING=3 BING value
             */
            BotPlanningStepMetadata.BotSearchSourceProvider = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN_PROVIDER"] = 0;
                values[valuesById[1] = "OTHER"] = 1;
                values[valuesById[2] = "GOOGLE"] = 2;
                values[valuesById[3] = "BING"] = 3;
                return values;
            })();

            /**
             * PlanningStepStatus enum.
             * @name AICommon.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} PLANNED=1 PLANNED value
             * @property {number} EXECUTING=2 EXECUTING value
             * @property {number} FINISHED=3 FINISHED value
             */
            BotPlanningStepMetadata.PlanningStepStatus = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "PLANNED"] = 1;
                values[valuesById[2] = "EXECUTING"] = 2;
                values[valuesById[3] = "FINISHED"] = 3;
                return values;
            })();

            return BotPlanningStepMetadata;
        })();

        return BotProgressIndicatorMetadata;
    })();

    AICommon.BotModelMetadata = (function() {

        /**
         * Properties of a BotModelMetadata.
         * @memberof AICommon
         * @interface IBotModelMetadata
         * @property {AICommon.BotModelMetadata.ModelType|null} [modelType] BotModelMetadata modelType
         * @property {AICommon.BotModelMetadata.PremiumModelStatus|null} [premiumModelStatus] BotModelMetadata premiumModelStatus
         * @property {string|null} [modelNameOverride] BotModelMetadata modelNameOverride
         */

        /**
         * Constructs a new BotModelMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotModelMetadata.
         * @implements IBotModelMetadata
         * @constructor
         * @param {AICommon.IBotModelMetadata=} [properties] Properties to set
         */
        function BotModelMetadata(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]];
        }

        /**
         * BotModelMetadata modelType.
         * @member {AICommon.BotModelMetadata.ModelType|null|undefined} modelType
         * @memberof AICommon.BotModelMetadata
         * @instance
         */
        BotModelMetadata.prototype.modelType = null;

        /**
         * BotModelMetadata premiumModelStatus.
         * @member {AICommon.BotModelMetadata.PremiumModelStatus|null|undefined} premiumModelStatus
         * @memberof AICommon.BotModelMetadata
         * @instance
         */
        BotModelMetadata.prototype.premiumModelStatus = null;

        /**
         * BotModelMetadata modelNameOverride.
         * @member {string|null|undefined} modelNameOverride
         * @memberof AICommon.BotModelMetadata
         * @instance
         */
        BotModelMetadata.prototype.modelNameOverride = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotModelMetadata _modelType.
         * @member {"modelType"|undefined} _modelType
         * @memberof AICommon.BotModelMetadata
         * @instance
         */
        Object.defineProperty(BotModelMetadata.prototype, "_modelType", {
            get: $util.oneOfGetter($oneOfFields = ["modelType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotModelMetadata _premiumModelStatus.
         * @member {"premiumModelStatus"|undefined} _premiumModelStatus
         * @memberof AICommon.BotModelMetadata
         * @instance
         */
        Object.defineProperty(BotModelMetadata.prototype, "_premiumModelStatus", {
            get: $util.oneOfGetter($oneOfFields = ["premiumModelStatus"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotModelMetadata _modelNameOverride.
         * @member {"modelNameOverride"|undefined} _modelNameOverride
         * @memberof AICommon.BotModelMetadata
         * @instance
         */
        Object.defineProperty(BotModelMetadata.prototype, "_modelNameOverride", {
            get: $util.oneOfGetter($oneOfFields = ["modelNameOverride"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotModelMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotModelMetadata
         * @static
         * @param {AICommon.IBotModelMetadata=} [properties] Properties to set
         * @returns {AICommon.BotModelMetadata} BotModelMetadata instance
         */
        BotModelMetadata.create = function create(properties) {
            return new BotModelMetadata(properties);
        };

        /**
         * Encodes the specified BotModelMetadata message. Does not implicitly {@link AICommon.BotModelMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotModelMetadata
         * @static
         * @param {AICommon.IBotModelMetadata} message BotModelMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotModelMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.modelType != null && Object.hasOwnProperty.call(message, "modelType"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.modelType);
            if (message.premiumModelStatus != null && Object.hasOwnProperty.call(message, "premiumModelStatus"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.premiumModelStatus);
            if (message.modelNameOverride != null && Object.hasOwnProperty.call(message, "modelNameOverride"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.modelNameOverride);
            return writer;
        };

        /**
         * Encodes the specified BotModelMetadata message, length delimited. Does not implicitly {@link AICommon.BotModelMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotModelMetadata
         * @static
         * @param {AICommon.IBotModelMetadata} message BotModelMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotModelMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotModelMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotModelMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotModelMetadata} BotModelMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotModelMetadata.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.AICommon.BotModelMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.modelType = reader.int32();
                        break;
                    }
                case 2: {
                        message.premiumModelStatus = reader.int32();
                        break;
                    }
                case 3: {
                        message.modelNameOverride = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotModelMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotModelMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotModelMetadata} BotModelMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotModelMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotModelMetadata message.
         * @function verify
         * @memberof AICommon.BotModelMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotModelMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.modelType != null && message.hasOwnProperty("modelType")) {
                properties._modelType = 1;
                switch (message.modelType) {
                default:
                    return "modelType: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            }
            if (message.premiumModelStatus != null && message.hasOwnProperty("premiumModelStatus")) {
                properties._premiumModelStatus = 1;
                switch (message.premiumModelStatus) {
                default:
                    return "premiumModelStatus: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            }
            if (message.modelNameOverride != null && message.hasOwnProperty("modelNameOverride")) {
                properties._modelNameOverride = 1;
                if (!$util.isString(message.modelNameOverride))
                    return "modelNameOverride: string expected";
            }
            return null;
        };

        /**
         * Creates a BotModelMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotModelMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotModelMetadata} BotModelMetadata
         */
        BotModelMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotModelMetadata)
                return object;
            var message = new $root.AICommon.BotModelMetadata();
            switch (object.modelType) {
            default:
                if (typeof object.modelType === "number") {
                    message.modelType = object.modelType;
                    break;
                }
                break;
            case "UNKNOWN_TYPE":
            case 0:
                message.modelType = 0;
                break;
            case "LLAMA_PROD":
            case 1:
                message.modelType = 1;
                break;
            case "LLAMA_PROD_PREMIUM":
            case 2:
                message.modelType = 2;
                break;
            }
            switch (object.premiumModelStatus) {
            default:
                if (typeof object.premiumModelStatus === "number") {
                    message.premiumModelStatus = object.premiumModelStatus;
                    break;
                }
                break;
            case "UNKNOWN_STATUS":
            case 0:
                message.premiumModelStatus = 0;
                break;
            case "AVAILABLE":
            case 1:
                message.premiumModelStatus = 1;
                break;
            case "QUOTA_EXCEED_LIMIT":
            case 2:
                message.premiumModelStatus = 2;
                break;
            }
            if (object.modelNameOverride != null)
                message.modelNameOverride = String(object.modelNameOverride);
            return message;
        };

        /**
         * Creates a plain object from a BotModelMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotModelMetadata
         * @static
         * @param {AICommon.BotModelMetadata} message BotModelMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotModelMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.modelType != null && message.hasOwnProperty("modelType")) {
                object.modelType = options.enums === String ? $root.AICommon.BotModelMetadata.ModelType[message.modelType] === undefined ? message.modelType : $root.AICommon.BotModelMetadata.ModelType[message.modelType] : message.modelType;
                if (options.oneofs)
                    object._modelType = "modelType";
            }
            if (message.premiumModelStatus != null && message.hasOwnProperty("premiumModelStatus")) {
                object.premiumModelStatus = options.enums === String ? $root.AICommon.BotModelMetadata.PremiumModelStatus[message.premiumModelStatus] === undefined ? message.premiumModelStatus : $root.AICommon.BotModelMetadata.PremiumModelStatus[message.premiumModelStatus] : message.premiumModelStatus;
                if (options.oneofs)
                    object._premiumModelStatus = "premiumModelStatus";
            }
            if (message.modelNameOverride != null && message.hasOwnProperty("modelNameOverride")) {
                object.modelNameOverride = message.modelNameOverride;
                if (options.oneofs)
                    object._modelNameOverride = "modelNameOverride";
            }
            return object;
        };

        /**
         * Converts this BotModelMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotModelMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotModelMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotModelMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotModelMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotModelMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotModelMetadata";
        };

        /**
         * ModelType enum.
         * @name AICommon.BotModelMetadata.ModelType
         * @enum {number}
         * @property {number} UNKNOWN_TYPE=0 UNKNOWN_TYPE value
         * @property {number} LLAMA_PROD=1 LLAMA_PROD value
         * @property {number} LLAMA_PROD_PREMIUM=2 LLAMA_PROD_PREMIUM value
         */
        BotModelMetadata.ModelType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN_TYPE"] = 0;
            values[valuesById[1] = "LLAMA_PROD"] = 1;
            values[valuesById[2] = "LLAMA_PROD_PREMIUM"] = 2;
            return values;
        })();

        /**
         * PremiumModelStatus enum.
         * @name AICommon.BotModelMetadata.PremiumModelStatus
         * @enum {number}
         * @property {number} UNKNOWN_STATUS=0 UNKNOWN_STATUS value
         * @property {number} AVAILABLE=1 AVAILABLE value
         * @property {number} QUOTA_EXCEED_LIMIT=2 QUOTA_EXCEED_LIMIT value
         */
        BotModelMetadata.PremiumModelStatus = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN_STATUS"] = 0;
            values[valuesById[1] = "AVAILABLE"] = 1;
            values[valuesById[2] = "QUOTA_EXCEED_LIMIT"] = 2;
            return values;
        })();

        return BotModelMetadata;
    })();

    AICommon.BotReminderMetadata = (function() {

        /**
         * Properties of a BotReminderMetadata.
         * @memberof AICommon
         * @interface IBotReminderMetadata
         * @property {Protocol.IMessageKey|null} [requestMessageKey] BotReminderMetadata requestMessageKey
         * @property {AICommon.BotReminderMetadata.ReminderAction|null} [action] BotReminderMetadata action
         * @property {string|null} [name] BotReminderMetadata name
         * @property {number|Long|null} [nextTriggerTimestamp] BotReminderMetadata nextTriggerTimestamp
         * @property {AICommon.BotReminderMetadata.ReminderFrequency|null} [frequency] BotReminderMetadata frequency
         */

        /**
         * Constructs a new BotReminderMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotReminderMetadata.
         * @implements IBotReminderMetadata
         * @constructor
         * @param {AICommon.IBotReminderMetadata=} [properties] Properties to set
         */
        function BotReminderMetadata(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]];
        }

        /**
         * BotReminderMetadata requestMessageKey.
         * @member {Protocol.IMessageKey|null|undefined} requestMessageKey
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        BotReminderMetadata.prototype.requestMessageKey = null;

        /**
         * BotReminderMetadata action.
         * @member {AICommon.BotReminderMetadata.ReminderAction|null|undefined} action
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        BotReminderMetadata.prototype.action = null;

        /**
         * BotReminderMetadata name.
         * @member {string|null|undefined} name
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        BotReminderMetadata.prototype.name = null;

        /**
         * BotReminderMetadata nextTriggerTimestamp.
         * @member {number|Long|null|undefined} nextTriggerTimestamp
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        BotReminderMetadata.prototype.nextTriggerTimestamp = null;

        /**
         * BotReminderMetadata frequency.
         * @member {AICommon.BotReminderMetadata.ReminderFrequency|null|undefined} frequency
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        BotReminderMetadata.prototype.frequency = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotReminderMetadata _requestMessageKey.
         * @member {"requestMessageKey"|undefined} _requestMessageKey
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        Object.defineProperty(BotReminderMetadata.prototype, "_requestMessageKey", {
            get: $util.oneOfGetter($oneOfFields = ["requestMessageKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotReminderMetadata _action.
         * @member {"action"|undefined} _action
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        Object.defineProperty(BotReminderMetadata.prototype, "_action", {
            get: $util.oneOfGetter($oneOfFields = ["action"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotReminderMetadata _name.
         * @member {"name"|undefined} _name
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        Object.defineProperty(BotReminderMetadata.prototype, "_name", {
            get: $util.oneOfGetter($oneOfFields = ["name"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotReminderMetadata _nextTriggerTimestamp.
         * @member {"nextTriggerTimestamp"|undefined} _nextTriggerTimestamp
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        Object.defineProperty(BotReminderMetadata.prototype, "_nextTriggerTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["nextTriggerTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotReminderMetadata _frequency.
         * @member {"frequency"|undefined} _frequency
         * @memberof AICommon.BotReminderMetadata
         * @instance
         */
        Object.defineProperty(BotReminderMetadata.prototype, "_frequency", {
            get: $util.oneOfGetter($oneOfFields = ["frequency"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotReminderMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotReminderMetadata
         * @static
         * @param {AICommon.IBotReminderMetadata=} [properties] Properties to set
         * @returns {AICommon.BotReminderMetadata} BotReminderMetadata instance
         */
        BotReminderMetadata.create = function create(properties) {
            return new BotReminderMetadata(properties);
        };

        /**
         * Encodes the specified BotReminderMetadata message. Does not implicitly {@link AICommon.BotReminderMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotReminderMetadata
         * @static
         * @param {AICommon.IBotReminderMetadata} message BotReminderMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotReminderMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.requestMessageKey != null && Object.hasOwnProperty.call(message, "requestMessageKey"))
                $root.Protocol.MessageKey.encode(message.requestMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.action != null && Object.hasOwnProperty.call(message, "action"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.action);
            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.name);
            if (message.nextTriggerTimestamp != null && Object.hasOwnProperty.call(message, "nextTriggerTimestamp"))
                writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.nextTriggerTimestamp);
            if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency"))
                writer.uint32(/* id 5, wireType 0 =*/40).int32(message.frequency);
            return writer;
        };

        /**
         * Encodes the specified BotReminderMetadata message, length delimited. Does not implicitly {@link AICommon.BotReminderMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotReminderMetadata
         * @static
         * @param {AICommon.IBotReminderMetadata} message BotReminderMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotReminderMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotReminderMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotReminderMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotReminderMetadata} BotReminderMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotReminderMetadata.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.AICommon.BotReminderMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.requestMessageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.action = reader.int32();
                        break;
                    }
                case 3: {
                        message.name = reader.string();
                        break;
                    }
                case 4: {
                        message.nextTriggerTimestamp = reader.uint64();
                        break;
                    }
                case 5: {
                        message.frequency = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotReminderMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotReminderMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotReminderMetadata} BotReminderMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotReminderMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotReminderMetadata message.
         * @function verify
         * @memberof AICommon.BotReminderMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotReminderMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) {
                properties._requestMessageKey = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.requestMessageKey);
                    if (error)
                        return "requestMessageKey." + error;
                }
            }
            if (message.action != null && message.hasOwnProperty("action")) {
                properties._action = 1;
                switch (message.action) {
                default:
                    return "action: enum value expected";
                case 1:
                case 2:
                case 3:
                case 4:
                    break;
                }
            }
            if (message.name != null && message.hasOwnProperty("name")) {
                properties._name = 1;
                if (!$util.isString(message.name))
                    return "name: string expected";
            }
            if (message.nextTriggerTimestamp != null && message.hasOwnProperty("nextTriggerTimestamp")) {
                properties._nextTriggerTimestamp = 1;
                if (!$util.isInteger(message.nextTriggerTimestamp) && !(message.nextTriggerTimestamp && $util.isInteger(message.nextTriggerTimestamp.low) && $util.isInteger(message.nextTriggerTimestamp.high)))
                    return "nextTriggerTimestamp: integer|Long expected";
            }
            if (message.frequency != null && message.hasOwnProperty("frequency")) {
                properties._frequency = 1;
                switch (message.frequency) {
                default:
                    return "frequency: enum value expected";
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a BotReminderMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotReminderMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotReminderMetadata} BotReminderMetadata
         */
        BotReminderMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotReminderMetadata)
                return object;
            var message = new $root.AICommon.BotReminderMetadata();
            if (object.requestMessageKey != null) {
                if (typeof object.requestMessageKey !== "object")
                    throw TypeError(".AICommon.BotReminderMetadata.requestMessageKey: object expected");
                message.requestMessageKey = $root.Protocol.MessageKey.fromObject(object.requestMessageKey);
            }
            switch (object.action) {
            default:
                if (typeof object.action === "number") {
                    message.action = object.action;
                    break;
                }
                break;
            case "NOTIFY":
            case 1:
                message.action = 1;
                break;
            case "CREATE":
            case 2:
                message.action = 2;
                break;
            case "DELETE":
            case 3:
                message.action = 3;
                break;
            case "UPDATE":
            case 4:
                message.action = 4;
                break;
            }
            if (object.name != null)
                message.name = String(object.name);
            if (object.nextTriggerTimestamp != null)
                if ($util.Long)
                    (message.nextTriggerTimestamp = $util.Long.fromValue(object.nextTriggerTimestamp)).unsigned = true;
                else if (typeof object.nextTriggerTimestamp === "string")
                    message.nextTriggerTimestamp = parseInt(object.nextTriggerTimestamp, 10);
                else if (typeof object.nextTriggerTimestamp === "number")
                    message.nextTriggerTimestamp = object.nextTriggerTimestamp;
                else if (typeof object.nextTriggerTimestamp === "object")
                    message.nextTriggerTimestamp = new $util.LongBits(object.nextTriggerTimestamp.low >>> 0, object.nextTriggerTimestamp.high >>> 0).toNumber(true);
            switch (object.frequency) {
            default:
                if (typeof object.frequency === "number") {
                    message.frequency = object.frequency;
                    break;
                }
                break;
            case "ONCE":
            case 1:
                message.frequency = 1;
                break;
            case "DAILY":
            case 2:
                message.frequency = 2;
                break;
            case "WEEKLY":
            case 3:
                message.frequency = 3;
                break;
            case "BIWEEKLY":
            case 4:
                message.frequency = 4;
                break;
            case "MONTHLY":
            case 5:
                message.frequency = 5;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a BotReminderMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotReminderMetadata
         * @static
         * @param {AICommon.BotReminderMetadata} message BotReminderMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotReminderMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) {
                object.requestMessageKey = $root.Protocol.MessageKey.toObject(message.requestMessageKey, options);
                if (options.oneofs)
                    object._requestMessageKey = "requestMessageKey";
            }
            if (message.action != null && message.hasOwnProperty("action")) {
                object.action = options.enums === String ? $root.AICommon.BotReminderMetadata.ReminderAction[message.action] === undefined ? message.action : $root.AICommon.BotReminderMetadata.ReminderAction[message.action] : message.action;
                if (options.oneofs)
                    object._action = "action";
            }
            if (message.name != null && message.hasOwnProperty("name")) {
                object.name = message.name;
                if (options.oneofs)
                    object._name = "name";
            }
            if (message.nextTriggerTimestamp != null && message.hasOwnProperty("nextTriggerTimestamp")) {
                if (typeof message.nextTriggerTimestamp === "number")
                    object.nextTriggerTimestamp = options.longs === String ? String(message.nextTriggerTimestamp) : message.nextTriggerTimestamp;
                else
                    object.nextTriggerTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.nextTriggerTimestamp) : options.longs === Number ? new $util.LongBits(message.nextTriggerTimestamp.low >>> 0, message.nextTriggerTimestamp.high >>> 0).toNumber(true) : message.nextTriggerTimestamp;
                if (options.oneofs)
                    object._nextTriggerTimestamp = "nextTriggerTimestamp";
            }
            if (message.frequency != null && message.hasOwnProperty("frequency")) {
                object.frequency = options.enums === String ? $root.AICommon.BotReminderMetadata.ReminderFrequency[message.frequency] === undefined ? message.frequency : $root.AICommon.BotReminderMetadata.ReminderFrequency[message.frequency] : message.frequency;
                if (options.oneofs)
                    object._frequency = "frequency";
            }
            return object;
        };

        /**
         * Converts this BotReminderMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotReminderMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotReminderMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotReminderMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotReminderMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotReminderMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotReminderMetadata";
        };

        /**
         * ReminderAction enum.
         * @name AICommon.BotReminderMetadata.ReminderAction
         * @enum {number}
         * @property {number} NOTIFY=1 NOTIFY value
         * @property {number} CREATE=2 CREATE value
         * @property {number} DELETE=3 DELETE value
         * @property {number} UPDATE=4 UPDATE value
         */
        BotReminderMetadata.ReminderAction = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[1] = "NOTIFY"] = 1;
            values[valuesById[2] = "CREATE"] = 2;
            values[valuesById[3] = "DELETE"] = 3;
            values[valuesById[4] = "UPDATE"] = 4;
            return values;
        })();

        /**
         * ReminderFrequency enum.
         * @name AICommon.BotReminderMetadata.ReminderFrequency
         * @enum {number}
         * @property {number} ONCE=1 ONCE value
         * @property {number} DAILY=2 DAILY value
         * @property {number} WEEKLY=3 WEEKLY value
         * @property {number} BIWEEKLY=4 BIWEEKLY value
         * @property {number} MONTHLY=5 MONTHLY value
         */
        BotReminderMetadata.ReminderFrequency = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[1] = "ONCE"] = 1;
            values[valuesById[2] = "DAILY"] = 2;
            values[valuesById[3] = "WEEKLY"] = 3;
            values[valuesById[4] = "BIWEEKLY"] = 4;
            values[valuesById[5] = "MONTHLY"] = 5;
            return values;
        })();

        return BotReminderMetadata;
    })();

    AICommon.BotMemuMetadata = (function() {

        /**
         * Properties of a BotMemuMetadata.
         * @memberof AICommon
         * @interface IBotMemuMetadata
         * @property {Array.<AICommon.IBotMediaMetadata>|null} [faceImages] BotMemuMetadata faceImages
         */

        /**
         * Constructs a new BotMemuMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotMemuMetadata.
         * @implements IBotMemuMetadata
         * @constructor
         * @param {AICommon.IBotMemuMetadata=} [properties] Properties to set
         */
        function BotMemuMetadata(properties) {
            this.faceImages = [];
            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]];
        }

        /**
         * BotMemuMetadata faceImages.
         * @member {Array.<AICommon.IBotMediaMetadata>} faceImages
         * @memberof AICommon.BotMemuMetadata
         * @instance
         */
        BotMemuMetadata.prototype.faceImages = $util.emptyArray;

        /**
         * Creates a new BotMemuMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotMemuMetadata
         * @static
         * @param {AICommon.IBotMemuMetadata=} [properties] Properties to set
         * @returns {AICommon.BotMemuMetadata} BotMemuMetadata instance
         */
        BotMemuMetadata.create = function create(properties) {
            return new BotMemuMetadata(properties);
        };

        /**
         * Encodes the specified BotMemuMetadata message. Does not implicitly {@link AICommon.BotMemuMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotMemuMetadata
         * @static
         * @param {AICommon.IBotMemuMetadata} message BotMemuMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMemuMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.faceImages != null && message.faceImages.length)
                for (var i = 0; i < message.faceImages.length; ++i)
                    $root.AICommon.BotMediaMetadata.encode(message.faceImages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified BotMemuMetadata message, length delimited. Does not implicitly {@link AICommon.BotMemuMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotMemuMetadata
         * @static
         * @param {AICommon.IBotMemuMetadata} message BotMemuMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMemuMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotMemuMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotMemuMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotMemuMetadata} BotMemuMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotMemuMetadata.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.AICommon.BotMemuMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        if (!(message.faceImages && message.faceImages.length))
                            message.faceImages = [];
                        message.faceImages.push($root.AICommon.BotMediaMetadata.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotMemuMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotMemuMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotMemuMetadata} BotMemuMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotMemuMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotMemuMetadata message.
         * @function verify
         * @memberof AICommon.BotMemuMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotMemuMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.faceImages != null && message.hasOwnProperty("faceImages")) {
                if (!Array.isArray(message.faceImages))
                    return "faceImages: array expected";
                for (var i = 0; i < message.faceImages.length; ++i) {
                    var error = $root.AICommon.BotMediaMetadata.verify(message.faceImages[i]);
                    if (error)
                        return "faceImages." + error;
                }
            }
            return null;
        };

        /**
         * Creates a BotMemuMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotMemuMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotMemuMetadata} BotMemuMetadata
         */
        BotMemuMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotMemuMetadata)
                return object;
            var message = new $root.AICommon.BotMemuMetadata();
            if (object.faceImages) {
                if (!Array.isArray(object.faceImages))
                    throw TypeError(".AICommon.BotMemuMetadata.faceImages: array expected");
                message.faceImages = [];
                for (var i = 0; i < object.faceImages.length; ++i) {
                    if (typeof object.faceImages[i] !== "object")
                        throw TypeError(".AICommon.BotMemuMetadata.faceImages: object expected");
                    message.faceImages[i] = $root.AICommon.BotMediaMetadata.fromObject(object.faceImages[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a BotMemuMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotMemuMetadata
         * @static
         * @param {AICommon.BotMemuMetadata} message BotMemuMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotMemuMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.faceImages = [];
            if (message.faceImages && message.faceImages.length) {
                object.faceImages = [];
                for (var j = 0; j < message.faceImages.length; ++j)
                    object.faceImages[j] = $root.AICommon.BotMediaMetadata.toObject(message.faceImages[j], options);
            }
            return object;
        };

        /**
         * Converts this BotMemuMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotMemuMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotMemuMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotMemuMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotMemuMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotMemuMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotMemuMetadata";
        };

        return BotMemuMetadata;
    })();

    AICommon.BotMediaMetadata = (function() {

        /**
         * Properties of a BotMediaMetadata.
         * @memberof AICommon
         * @interface IBotMediaMetadata
         * @property {string|null} [fileSha256] BotMediaMetadata fileSha256
         * @property {string|null} [mediaKey] BotMediaMetadata mediaKey
         * @property {string|null} [fileEncSha256] BotMediaMetadata fileEncSha256
         * @property {string|null} [directPath] BotMediaMetadata directPath
         * @property {number|Long|null} [mediaKeyTimestamp] BotMediaMetadata mediaKeyTimestamp
         * @property {string|null} [mimetype] BotMediaMetadata mimetype
         * @property {AICommon.BotMediaMetadata.OrientationType|null} [orientationType] BotMediaMetadata orientationType
         */

        /**
         * Constructs a new BotMediaMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotMediaMetadata.
         * @implements IBotMediaMetadata
         * @constructor
         * @param {AICommon.IBotMediaMetadata=} [properties] Properties to set
         */
        function BotMediaMetadata(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]];
        }

        /**
         * BotMediaMetadata fileSha256.
         * @member {string|null|undefined} fileSha256
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.fileSha256 = null;

        /**
         * BotMediaMetadata mediaKey.
         * @member {string|null|undefined} mediaKey
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.mediaKey = null;

        /**
         * BotMediaMetadata fileEncSha256.
         * @member {string|null|undefined} fileEncSha256
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.fileEncSha256 = null;

        /**
         * BotMediaMetadata directPath.
         * @member {string|null|undefined} directPath
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.directPath = null;

        /**
         * BotMediaMetadata mediaKeyTimestamp.
         * @member {number|Long|null|undefined} mediaKeyTimestamp
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.mediaKeyTimestamp = null;

        /**
         * BotMediaMetadata mimetype.
         * @member {string|null|undefined} mimetype
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.mimetype = null;

        /**
         * BotMediaMetadata orientationType.
         * @member {AICommon.BotMediaMetadata.OrientationType|null|undefined} orientationType
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        BotMediaMetadata.prototype.orientationType = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotMediaMetadata _fileSha256.
         * @member {"fileSha256"|undefined} _fileSha256
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        Object.defineProperty(BotMediaMetadata.prototype, "_fileSha256", {
            get: $util.oneOfGetter($oneOfFields = ["fileSha256"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMediaMetadata _mediaKey.
         * @member {"mediaKey"|undefined} _mediaKey
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        Object.defineProperty(BotMediaMetadata.prototype, "_mediaKey", {
            get: $util.oneOfGetter($oneOfFields = ["mediaKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMediaMetadata _fileEncSha256.
         * @member {"fileEncSha256"|undefined} _fileEncSha256
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        Object.defineProperty(BotMediaMetadata.prototype, "_fileEncSha256", {
            get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMediaMetadata _directPath.
         * @member {"directPath"|undefined} _directPath
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        Object.defineProperty(BotMediaMetadata.prototype, "_directPath", {
            get: $util.oneOfGetter($oneOfFields = ["directPath"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMediaMetadata _mediaKeyTimestamp.
         * @member {"mediaKeyTimestamp"|undefined} _mediaKeyTimestamp
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        Object.defineProperty(BotMediaMetadata.prototype, "_mediaKeyTimestamp", {
            get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMediaMetadata _mimetype.
         * @member {"mimetype"|undefined} _mimetype
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        Object.defineProperty(BotMediaMetadata.prototype, "_mimetype", {
            get: $util.oneOfGetter($oneOfFields = ["mimetype"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMediaMetadata _orientationType.
         * @member {"orientationType"|undefined} _orientationType
         * @memberof AICommon.BotMediaMetadata
         * @instance
         */
        Object.defineProperty(BotMediaMetadata.prototype, "_orientationType", {
            get: $util.oneOfGetter($oneOfFields = ["orientationType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotMediaMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotMediaMetadata
         * @static
         * @param {AICommon.IBotMediaMetadata=} [properties] Properties to set
         * @returns {AICommon.BotMediaMetadata} BotMediaMetadata instance
         */
        BotMediaMetadata.create = function create(properties) {
            return new BotMediaMetadata(properties);
        };

        /**
         * Encodes the specified BotMediaMetadata message. Does not implicitly {@link AICommon.BotMediaMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotMediaMetadata
         * @static
         * @param {AICommon.IBotMediaMetadata} message BotMediaMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMediaMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.fileSha256);
            if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.mediaKey);
            if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.fileEncSha256);
            if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath"))
                writer.uint32(/* id 4, wireType 2 =*/34).string(message.directPath);
            if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp"))
                writer.uint32(/* id 5, wireType 0 =*/40).int64(message.mediaKeyTimestamp);
            if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype"))
                writer.uint32(/* id 6, wireType 2 =*/50).string(message.mimetype);
            if (message.orientationType != null && Object.hasOwnProperty.call(message, "orientationType"))
                writer.uint32(/* id 7, wireType 0 =*/56).int32(message.orientationType);
            return writer;
        };

        /**
         * Encodes the specified BotMediaMetadata message, length delimited. Does not implicitly {@link AICommon.BotMediaMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotMediaMetadata
         * @static
         * @param {AICommon.IBotMediaMetadata} message BotMediaMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMediaMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotMediaMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotMediaMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotMediaMetadata} BotMediaMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotMediaMetadata.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.AICommon.BotMediaMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.fileSha256 = reader.string();
                        break;
                    }
                case 2: {
                        message.mediaKey = reader.string();
                        break;
                    }
                case 3: {
                        message.fileEncSha256 = reader.string();
                        break;
                    }
                case 4: {
                        message.directPath = reader.string();
                        break;
                    }
                case 5: {
                        message.mediaKeyTimestamp = reader.int64();
                        break;
                    }
                case 6: {
                        message.mimetype = reader.string();
                        break;
                    }
                case 7: {
                        message.orientationType = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotMediaMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotMediaMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotMediaMetadata} BotMediaMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotMediaMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotMediaMetadata message.
         * @function verify
         * @memberof AICommon.BotMediaMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotMediaMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                properties._fileSha256 = 1;
                if (!$util.isString(message.fileSha256))
                    return "fileSha256: string expected";
            }
            if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                properties._mediaKey = 1;
                if (!$util.isString(message.mediaKey))
                    return "mediaKey: string expected";
            }
            if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                properties._fileEncSha256 = 1;
                if (!$util.isString(message.fileEncSha256))
                    return "fileEncSha256: string expected";
            }
            if (message.directPath != null && message.hasOwnProperty("directPath")) {
                properties._directPath = 1;
                if (!$util.isString(message.directPath))
                    return "directPath: string expected";
            }
            if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                properties._mediaKeyTimestamp = 1;
                if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high)))
                    return "mediaKeyTimestamp: integer|Long expected";
            }
            if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                properties._mimetype = 1;
                if (!$util.isString(message.mimetype))
                    return "mimetype: string expected";
            }
            if (message.orientationType != null && message.hasOwnProperty("orientationType")) {
                properties._orientationType = 1;
                switch (message.orientationType) {
                default:
                    return "orientationType: enum value expected";
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a BotMediaMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotMediaMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotMediaMetadata} BotMediaMetadata
         */
        BotMediaMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotMediaMetadata)
                return object;
            var message = new $root.AICommon.BotMediaMetadata();
            if (object.fileSha256 != null)
                message.fileSha256 = String(object.fileSha256);
            if (object.mediaKey != null)
                message.mediaKey = String(object.mediaKey);
            if (object.fileEncSha256 != null)
                message.fileEncSha256 = String(object.fileEncSha256);
            if (object.directPath != null)
                message.directPath = String(object.directPath);
            if (object.mediaKeyTimestamp != null)
                if ($util.Long)
                    (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false;
                else if (typeof object.mediaKeyTimestamp === "string")
                    message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10);
                else if (typeof object.mediaKeyTimestamp === "number")
                    message.mediaKeyTimestamp = object.mediaKeyTimestamp;
                else if (typeof object.mediaKeyTimestamp === "object")
                    message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber();
            if (object.mimetype != null)
                message.mimetype = String(object.mimetype);
            switch (object.orientationType) {
            default:
                if (typeof object.orientationType === "number") {
                    message.orientationType = object.orientationType;
                    break;
                }
                break;
            case "CENTER":
            case 1:
                message.orientationType = 1;
                break;
            case "LEFT":
            case 2:
                message.orientationType = 2;
                break;
            case "RIGHT":
            case 3:
                message.orientationType = 3;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a BotMediaMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotMediaMetadata
         * @static
         * @param {AICommon.BotMediaMetadata} message BotMediaMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotMediaMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) {
                object.fileSha256 = message.fileSha256;
                if (options.oneofs)
                    object._fileSha256 = "fileSha256";
            }
            if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) {
                object.mediaKey = message.mediaKey;
                if (options.oneofs)
                    object._mediaKey = "mediaKey";
            }
            if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) {
                object.fileEncSha256 = message.fileEncSha256;
                if (options.oneofs)
                    object._fileEncSha256 = "fileEncSha256";
            }
            if (message.directPath != null && message.hasOwnProperty("directPath")) {
                object.directPath = message.directPath;
                if (options.oneofs)
                    object._directPath = "directPath";
            }
            if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) {
                if (typeof message.mediaKeyTimestamp === "number")
                    object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp;
                else
                    object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp;
                if (options.oneofs)
                    object._mediaKeyTimestamp = "mediaKeyTimestamp";
            }
            if (message.mimetype != null && message.hasOwnProperty("mimetype")) {
                object.mimetype = message.mimetype;
                if (options.oneofs)
                    object._mimetype = "mimetype";
            }
            if (message.orientationType != null && message.hasOwnProperty("orientationType")) {
                object.orientationType = options.enums === String ? $root.AICommon.BotMediaMetadata.OrientationType[message.orientationType] === undefined ? message.orientationType : $root.AICommon.BotMediaMetadata.OrientationType[message.orientationType] : message.orientationType;
                if (options.oneofs)
                    object._orientationType = "orientationType";
            }
            return object;
        };

        /**
         * Converts this BotMediaMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotMediaMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotMediaMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotMediaMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotMediaMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotMediaMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotMediaMetadata";
        };

        /**
         * OrientationType enum.
         * @name AICommon.BotMediaMetadata.OrientationType
         * @enum {number}
         * @property {number} CENTER=1 CENTER value
         * @property {number} LEFT=2 LEFT value
         * @property {number} RIGHT=3 RIGHT value
         */
        BotMediaMetadata.OrientationType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[1] = "CENTER"] = 1;
            values[valuesById[2] = "LEFT"] = 2;
            values[valuesById[3] = "RIGHT"] = 3;
            return values;
        })();

        return BotMediaMetadata;
    })();

    AICommon.BotSessionMetadata = (function() {

        /**
         * Properties of a BotSessionMetadata.
         * @memberof AICommon
         * @interface IBotSessionMetadata
         * @property {string|null} [sessionId] BotSessionMetadata sessionId
         * @property {AICommon.BotSessionSource|null} [sessionSource] BotSessionMetadata sessionSource
         */

        /**
         * Constructs a new BotSessionMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotSessionMetadata.
         * @implements IBotSessionMetadata
         * @constructor
         * @param {AICommon.IBotSessionMetadata=} [properties] Properties to set
         */
        function BotSessionMetadata(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]];
        }

        /**
         * BotSessionMetadata sessionId.
         * @member {string|null|undefined} sessionId
         * @memberof AICommon.BotSessionMetadata
         * @instance
         */
        BotSessionMetadata.prototype.sessionId = null;

        /**
         * BotSessionMetadata sessionSource.
         * @member {AICommon.BotSessionSource|null|undefined} sessionSource
         * @memberof AICommon.BotSessionMetadata
         * @instance
         */
        BotSessionMetadata.prototype.sessionSource = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotSessionMetadata _sessionId.
         * @member {"sessionId"|undefined} _sessionId
         * @memberof AICommon.BotSessionMetadata
         * @instance
         */
        Object.defineProperty(BotSessionMetadata.prototype, "_sessionId", {
            get: $util.oneOfGetter($oneOfFields = ["sessionId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotSessionMetadata _sessionSource.
         * @member {"sessionSource"|undefined} _sessionSource
         * @memberof AICommon.BotSessionMetadata
         * @instance
         */
        Object.defineProperty(BotSessionMetadata.prototype, "_sessionSource", {
            get: $util.oneOfGetter($oneOfFields = ["sessionSource"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotSessionMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotSessionMetadata
         * @static
         * @param {AICommon.IBotSessionMetadata=} [properties] Properties to set
         * @returns {AICommon.BotSessionMetadata} BotSessionMetadata instance
         */
        BotSessionMetadata.create = function create(properties) {
            return new BotSessionMetadata(properties);
        };

        /**
         * Encodes the specified BotSessionMetadata message. Does not implicitly {@link AICommon.BotSessionMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotSessionMetadata
         * @static
         * @param {AICommon.IBotSessionMetadata} message BotSessionMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotSessionMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.sessionId);
            if (message.sessionSource != null && Object.hasOwnProperty.call(message, "sessionSource"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sessionSource);
            return writer;
        };

        /**
         * Encodes the specified BotSessionMetadata message, length delimited. Does not implicitly {@link AICommon.BotSessionMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotSessionMetadata
         * @static
         * @param {AICommon.IBotSessionMetadata} message BotSessionMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotSessionMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotSessionMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotSessionMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotSessionMetadata} BotSessionMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotSessionMetadata.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.AICommon.BotSessionMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.sessionId = reader.string();
                        break;
                    }
                case 2: {
                        message.sessionSource = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotSessionMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotSessionMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotSessionMetadata} BotSessionMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotSessionMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotSessionMetadata message.
         * @function verify
         * @memberof AICommon.BotSessionMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotSessionMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.sessionId != null && message.hasOwnProperty("sessionId")) {
                properties._sessionId = 1;
                if (!$util.isString(message.sessionId))
                    return "sessionId: string expected";
            }
            if (message.sessionSource != null && message.hasOwnProperty("sessionSource")) {
                properties._sessionSource = 1;
                switch (message.sessionSource) {
                default:
                    return "sessionSource: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                case 6:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a BotSessionMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotSessionMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotSessionMetadata} BotSessionMetadata
         */
        BotSessionMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotSessionMetadata)
                return object;
            var message = new $root.AICommon.BotSessionMetadata();
            if (object.sessionId != null)
                message.sessionId = String(object.sessionId);
            switch (object.sessionSource) {
            default:
                if (typeof object.sessionSource === "number") {
                    message.sessionSource = object.sessionSource;
                    break;
                }
                break;
            case "NONE":
            case 0:
                message.sessionSource = 0;
                break;
            case "NULL_STATE":
            case 1:
                message.sessionSource = 1;
                break;
            case "TYPEAHEAD":
            case 2:
                message.sessionSource = 2;
                break;
            case "USER_INPUT":
            case 3:
                message.sessionSource = 3;
                break;
            case "EMU_FLASH":
            case 4:
                message.sessionSource = 4;
                break;
            case "EMU_FLASH_FOLLOWUP":
            case 5:
                message.sessionSource = 5;
                break;
            case "VOICE":
            case 6:
                message.sessionSource = 6;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a BotSessionMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotSessionMetadata
         * @static
         * @param {AICommon.BotSessionMetadata} message BotSessionMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotSessionMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.sessionId != null && message.hasOwnProperty("sessionId")) {
                object.sessionId = message.sessionId;
                if (options.oneofs)
                    object._sessionId = "sessionId";
            }
            if (message.sessionSource != null && message.hasOwnProperty("sessionSource")) {
                object.sessionSource = options.enums === String ? $root.AICommon.BotSessionSource[message.sessionSource] === undefined ? message.sessionSource : $root.AICommon.BotSessionSource[message.sessionSource] : message.sessionSource;
                if (options.oneofs)
                    object._sessionSource = "sessionSource";
            }
            return object;
        };

        /**
         * Converts this BotSessionMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotSessionMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotSessionMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotSessionMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotSessionMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotSessionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotSessionMetadata";
        };

        return BotSessionMetadata;
    })();

    AICommon.BotMetricsMetadata = (function() {

        /**
         * Properties of a BotMetricsMetadata.
         * @memberof AICommon
         * @interface IBotMetricsMetadata
         * @property {string|null} [destinationId] BotMetricsMetadata destinationId
         * @property {AICommon.BotMetricsEntryPoint|null} [destinationEntryPoint] BotMetricsMetadata destinationEntryPoint
         * @property {AICommon.BotMetricsThreadEntryPoint|null} [threadOrigin] BotMetricsMetadata threadOrigin
         */

        /**
         * Constructs a new BotMetricsMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotMetricsMetadata.
         * @implements IBotMetricsMetadata
         * @constructor
         * @param {AICommon.IBotMetricsMetadata=} [properties] Properties to set
         */
        function BotMetricsMetadata(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]];
        }

        /**
         * BotMetricsMetadata destinationId.
         * @member {string|null|undefined} destinationId
         * @memberof AICommon.BotMetricsMetadata
         * @instance
         */
        BotMetricsMetadata.prototype.destinationId = null;

        /**
         * BotMetricsMetadata destinationEntryPoint.
         * @member {AICommon.BotMetricsEntryPoint|null|undefined} destinationEntryPoint
         * @memberof AICommon.BotMetricsMetadata
         * @instance
         */
        BotMetricsMetadata.prototype.destinationEntryPoint = null;

        /**
         * BotMetricsMetadata threadOrigin.
         * @member {AICommon.BotMetricsThreadEntryPoint|null|undefined} threadOrigin
         * @memberof AICommon.BotMetricsMetadata
         * @instance
         */
        BotMetricsMetadata.prototype.threadOrigin = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotMetricsMetadata _destinationId.
         * @member {"destinationId"|undefined} _destinationId
         * @memberof AICommon.BotMetricsMetadata
         * @instance
         */
        Object.defineProperty(BotMetricsMetadata.prototype, "_destinationId", {
            get: $util.oneOfGetter($oneOfFields = ["destinationId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetricsMetadata _destinationEntryPoint.
         * @member {"destinationEntryPoint"|undefined} _destinationEntryPoint
         * @memberof AICommon.BotMetricsMetadata
         * @instance
         */
        Object.defineProperty(BotMetricsMetadata.prototype, "_destinationEntryPoint", {
            get: $util.oneOfGetter($oneOfFields = ["destinationEntryPoint"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMetricsMetadata _threadOrigin.
         * @member {"threadOrigin"|undefined} _threadOrigin
         * @memberof AICommon.BotMetricsMetadata
         * @instance
         */
        Object.defineProperty(BotMetricsMetadata.prototype, "_threadOrigin", {
            get: $util.oneOfGetter($oneOfFields = ["threadOrigin"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotMetricsMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotMetricsMetadata
         * @static
         * @param {AICommon.IBotMetricsMetadata=} [properties] Properties to set
         * @returns {AICommon.BotMetricsMetadata} BotMetricsMetadata instance
         */
        BotMetricsMetadata.create = function create(properties) {
            return new BotMetricsMetadata(properties);
        };

        /**
         * Encodes the specified BotMetricsMetadata message. Does not implicitly {@link AICommon.BotMetricsMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotMetricsMetadata
         * @static
         * @param {AICommon.IBotMetricsMetadata} message BotMetricsMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMetricsMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.destinationId != null && Object.hasOwnProperty.call(message, "destinationId"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationId);
            if (message.destinationEntryPoint != null && Object.hasOwnProperty.call(message, "destinationEntryPoint"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.destinationEntryPoint);
            if (message.threadOrigin != null && Object.hasOwnProperty.call(message, "threadOrigin"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.threadOrigin);
            return writer;
        };

        /**
         * Encodes the specified BotMetricsMetadata message, length delimited. Does not implicitly {@link AICommon.BotMetricsMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotMetricsMetadata
         * @static
         * @param {AICommon.IBotMetricsMetadata} message BotMetricsMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMetricsMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotMetricsMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotMetricsMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotMetricsMetadata} BotMetricsMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotMetricsMetadata.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.AICommon.BotMetricsMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.destinationId = reader.string();
                        break;
                    }
                case 2: {
                        message.destinationEntryPoint = reader.int32();
                        break;
                    }
                case 3: {
                        message.threadOrigin = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotMetricsMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotMetricsMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotMetricsMetadata} BotMetricsMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotMetricsMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotMetricsMetadata message.
         * @function verify
         * @memberof AICommon.BotMetricsMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotMetricsMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.destinationId != null && message.hasOwnProperty("destinationId")) {
                properties._destinationId = 1;
                if (!$util.isString(message.destinationId))
                    return "destinationId: string expected";
            }
            if (message.destinationEntryPoint != null && message.hasOwnProperty("destinationEntryPoint")) {
                properties._destinationEntryPoint = 1;
                switch (message.destinationEntryPoint) {
                default:
                    return "destinationEntryPoint: 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:
                case 11:
                case 12:
                case 13:
                case 14:
                case 15:
                case 16:
                case 17:
                case 18:
                case 19:
                case 20:
                case 21:
                case 22:
                case 23:
                case 24:
                case 25:
                case 26:
                case 27:
                case 28:
                case 29:
                case 30:
                case 31:
                case 32:
                case 33:
                case 34:
                case 35:
                case 36:
                case 37:
                case 38:
                    break;
                }
            }
            if (message.threadOrigin != null && message.hasOwnProperty("threadOrigin")) {
                properties._threadOrigin = 1;
                switch (message.threadOrigin) {
                default:
                    return "threadOrigin: enum value expected";
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a BotMetricsMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotMetricsMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotMetricsMetadata} BotMetricsMetadata
         */
        BotMetricsMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotMetricsMetadata)
                return object;
            var message = new $root.AICommon.BotMetricsMetadata();
            if (object.destinationId != null)
                message.destinationId = String(object.destinationId);
            switch (object.destinationEntryPoint) {
            default:
                if (typeof object.destinationEntryPoint === "number") {
                    message.destinationEntryPoint = object.destinationEntryPoint;
                    break;
                }
                break;
            case "UNDEFINED_ENTRY_POINT":
            case 0:
                message.destinationEntryPoint = 0;
                break;
            case "FAVICON":
            case 1:
                message.destinationEntryPoint = 1;
                break;
            case "CHATLIST":
            case 2:
                message.destinationEntryPoint = 2;
                break;
            case "AISEARCH_NULL_STATE_PAPER_PLANE":
            case 3:
                message.destinationEntryPoint = 3;
                break;
            case "AISEARCH_NULL_STATE_SUGGESTION":
            case 4:
                message.destinationEntryPoint = 4;
                break;
            case "AISEARCH_TYPE_AHEAD_SUGGESTION":
            case 5:
                message.destinationEntryPoint = 5;
                break;
            case "AISEARCH_TYPE_AHEAD_PAPER_PLANE":
            case 6:
                message.destinationEntryPoint = 6;
                break;
            case "AISEARCH_TYPE_AHEAD_RESULT_CHATLIST":
            case 7:
                message.destinationEntryPoint = 7;
                break;
            case "AISEARCH_TYPE_AHEAD_RESULT_MESSAGES":
            case 8:
                message.destinationEntryPoint = 8;
                break;
            case "AIVOICE_SEARCH_BAR":
            case 9:
                message.destinationEntryPoint = 9;
                break;
            case "AIVOICE_FAVICON":
            case 10:
                message.destinationEntryPoint = 10;
                break;
            case "AISTUDIO":
            case 11:
                message.destinationEntryPoint = 11;
                break;
            case "DEEPLINK":
            case 12:
                message.destinationEntryPoint = 12;
                break;
            case "NOTIFICATION":
            case 13:
                message.destinationEntryPoint = 13;
                break;
            case "PROFILE_MESSAGE_BUTTON":
            case 14:
                message.destinationEntryPoint = 14;
                break;
            case "FORWARD":
            case 15:
                message.destinationEntryPoint = 15;
                break;
            case "APP_SHORTCUT":
            case 16:
                message.destinationEntryPoint = 16;
                break;
            case "FF_FAMILY":
            case 17:
                message.destinationEntryPoint = 17;
                break;
            case "AI_TAB":
            case 18:
                message.destinationEntryPoint = 18;
                break;
            case "AI_HOME":
            case 19:
                message.destinationEntryPoint = 19;
                break;
            case "AI_DEEPLINK_IMMERSIVE":
            case 20:
                message.destinationEntryPoint = 20;
                break;
            case "AI_DEEPLINK":
            case 21:
                message.destinationEntryPoint = 21;
                break;
            case "META_AI_CHAT_SHORTCUT_AI_STUDIO":
            case 22:
                message.destinationEntryPoint = 22;
                break;
            case "UGC_CHAT_SHORTCUT_AI_STUDIO":
            case 23:
                message.destinationEntryPoint = 23;
                break;
            case "NEW_CHAT_AI_STUDIO":
            case 24:
                message.destinationEntryPoint = 24;
                break;
            case "AIVOICE_FAVICON_CALL_HISTORY":
            case 25:
                message.destinationEntryPoint = 25;
                break;
            case "ASK_META_AI_CONTEXT_MENU":
            case 26:
                message.destinationEntryPoint = 26;
                break;
            case "ASK_META_AI_CONTEXT_MENU_1ON1":
            case 27:
                message.destinationEntryPoint = 27;
                break;
            case "ASK_META_AI_CONTEXT_MENU_GROUP":
            case 28:
                message.destinationEntryPoint = 28;
                break;
            case "INVOKE_META_AI_1ON1":
            case 29:
                message.destinationEntryPoint = 29;
                break;
            case "INVOKE_META_AI_GROUP":
            case 30:
                message.destinationEntryPoint = 30;
                break;
            case "META_AI_FORWARD":
            case 31:
                message.destinationEntryPoint = 31;
                break;
            case "NEW_CHAT_AI_CONTACT":
            case 32:
                message.destinationEntryPoint = 32;
                break;
            case "MESSAGE_QUICK_ACTION_1_ON_1_CHAT":
            case 33:
                message.destinationEntryPoint = 33;
                break;
            case "MESSAGE_QUICK_ACTION_GROUP_CHAT":
            case 34:
                message.destinationEntryPoint = 34;
                break;
            case "ATTACHMENT_TRAY_1_ON_1_CHAT":
            case 35:
                message.destinationEntryPoint = 35;
                break;
            case "ATTACHMENT_TRAY_GROUP_CHAT":
            case 36:
                message.destinationEntryPoint = 36;
                break;
            case "ASK_META_AI_MEDIA_VIEWER_1ON1":
            case 37:
                message.destinationEntryPoint = 37;
                break;
            case "ASK_META_AI_MEDIA_VIEWER_GROUP":
            case 38:
                message.destinationEntryPoint = 38;
                break;
            }
            switch (object.threadOrigin) {
            default:
                if (typeof object.threadOrigin === "number") {
                    message.threadOrigin = object.threadOrigin;
                    break;
                }
                break;
            case "AI_TAB_THREAD":
            case 1:
                message.threadOrigin = 1;
                break;
            case "AI_HOME_THREAD":
            case 2:
                message.threadOrigin = 2;
                break;
            case "AI_DEEPLINK_IMMERSIVE_THREAD":
            case 3:
                message.threadOrigin = 3;
                break;
            case "AI_DEEPLINK_THREAD":
            case 4:
                message.threadOrigin = 4;
                break;
            case "ASK_META_AI_CONTEXT_MENU_THREAD":
            case 5:
                message.threadOrigin = 5;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a BotMetricsMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotMetricsMetadata
         * @static
         * @param {AICommon.BotMetricsMetadata} message BotMetricsMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotMetricsMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.destinationId != null && message.hasOwnProperty("destinationId")) {
                object.destinationId = message.destinationId;
                if (options.oneofs)
                    object._destinationId = "destinationId";
            }
            if (message.destinationEntryPoint != null && message.hasOwnProperty("destinationEntryPoint")) {
                object.destinationEntryPoint = options.enums === String ? $root.AICommon.BotMetricsEntryPoint[message.destinationEntryPoint] === undefined ? message.destinationEntryPoint : $root.AICommon.BotMetricsEntryPoint[message.destinationEntryPoint] : message.destinationEntryPoint;
                if (options.oneofs)
                    object._destinationEntryPoint = "destinationEntryPoint";
            }
            if (message.threadOrigin != null && message.hasOwnProperty("threadOrigin")) {
                object.threadOrigin = options.enums === String ? $root.AICommon.BotMetricsThreadEntryPoint[message.threadOrigin] === undefined ? message.threadOrigin : $root.AICommon.BotMetricsThreadEntryPoint[message.threadOrigin] : message.threadOrigin;
                if (options.oneofs)
                    object._threadOrigin = "threadOrigin";
            }
            return object;
        };

        /**
         * Converts this BotMetricsMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotMetricsMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotMetricsMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotMetricsMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotMetricsMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotMetricsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotMetricsMetadata";
        };

        return BotMetricsMetadata;
    })();

    AICommon.BotRenderingMetadata = (function() {

        /**
         * Properties of a BotRenderingMetadata.
         * @memberof AICommon
         * @interface IBotRenderingMetadata
         * @property {Array.<AICommon.BotRenderingMetadata.IKeyword>|null} [keywords] BotRenderingMetadata keywords
         */

        /**
         * Constructs a new BotRenderingMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotRenderingMetadata.
         * @implements IBotRenderingMetadata
         * @constructor
         * @param {AICommon.IBotRenderingMetadata=} [properties] Properties to set
         */
        function BotRenderingMetadata(properties) {
            this.keywords = [];
            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]];
        }

        /**
         * BotRenderingMetadata keywords.
         * @member {Array.<AICommon.BotRenderingMetadata.IKeyword>} keywords
         * @memberof AICommon.BotRenderingMetadata
         * @instance
         */
        BotRenderingMetadata.prototype.keywords = $util.emptyArray;

        /**
         * Creates a new BotRenderingMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotRenderingMetadata
         * @static
         * @param {AICommon.IBotRenderingMetadata=} [properties] Properties to set
         * @returns {AICommon.BotRenderingMetadata} BotRenderingMetadata instance
         */
        BotRenderingMetadata.create = function create(properties) {
            return new BotRenderingMetadata(properties);
        };

        /**
         * Encodes the specified BotRenderingMetadata message. Does not implicitly {@link AICommon.BotRenderingMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotRenderingMetadata
         * @static
         * @param {AICommon.IBotRenderingMetadata} message BotRenderingMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotRenderingMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.keywords != null && message.keywords.length)
                for (var i = 0; i < message.keywords.length; ++i)
                    $root.AICommon.BotRenderingMetadata.Keyword.encode(message.keywords[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified BotRenderingMetadata message, length delimited. Does not implicitly {@link AICommon.BotRenderingMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotRenderingMetadata
         * @static
         * @param {AICommon.IBotRenderingMetadata} message BotRenderingMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotRenderingMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotRenderingMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotRenderingMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotRenderingMetadata} BotRenderingMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotRenderingMetadata.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.AICommon.BotRenderingMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        if (!(message.keywords && message.keywords.length))
                            message.keywords = [];
                        message.keywords.push($root.AICommon.BotRenderingMetadata.Keyword.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotRenderingMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotRenderingMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotRenderingMetadata} BotRenderingMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotRenderingMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotRenderingMetadata message.
         * @function verify
         * @memberof AICommon.BotRenderingMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotRenderingMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.keywords != null && message.hasOwnProperty("keywords")) {
                if (!Array.isArray(message.keywords))
                    return "keywords: array expected";
                for (var i = 0; i < message.keywords.length; ++i) {
                    var error = $root.AICommon.BotRenderingMetadata.Keyword.verify(message.keywords[i]);
                    if (error)
                        return "keywords." + error;
                }
            }
            return null;
        };

        /**
         * Creates a BotRenderingMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotRenderingMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotRenderingMetadata} BotRenderingMetadata
         */
        BotRenderingMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotRenderingMetadata)
                return object;
            var message = new $root.AICommon.BotRenderingMetadata();
            if (object.keywords) {
                if (!Array.isArray(object.keywords))
                    throw TypeError(".AICommon.BotRenderingMetadata.keywords: array expected");
                message.keywords = [];
                for (var i = 0; i < object.keywords.length; ++i) {
                    if (typeof object.keywords[i] !== "object")
                        throw TypeError(".AICommon.BotRenderingMetadata.keywords: object expected");
                    message.keywords[i] = $root.AICommon.BotRenderingMetadata.Keyword.fromObject(object.keywords[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a BotRenderingMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotRenderingMetadata
         * @static
         * @param {AICommon.BotRenderingMetadata} message BotRenderingMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotRenderingMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.keywords = [];
            if (message.keywords && message.keywords.length) {
                object.keywords = [];
                for (var j = 0; j < message.keywords.length; ++j)
                    object.keywords[j] = $root.AICommon.BotRenderingMetadata.Keyword.toObject(message.keywords[j], options);
            }
            return object;
        };

        /**
         * Converts this BotRenderingMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotRenderingMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotRenderingMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotRenderingMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotRenderingMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotRenderingMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotRenderingMetadata";
        };

        BotRenderingMetadata.Keyword = (function() {

            /**
             * Properties of a Keyword.
             * @memberof AICommon.BotRenderingMetadata
             * @interface IKeyword
             * @property {string|null} [value] Keyword value
             * @property {Array.<string>|null} [associatedPrompts] Keyword associatedPrompts
             */

            /**
             * Constructs a new Keyword.
             * @memberof AICommon.BotRenderingMetadata
             * @classdesc Represents a Keyword.
             * @implements IKeyword
             * @constructor
             * @param {AICommon.BotRenderingMetadata.IKeyword=} [properties] Properties to set
             */
            function Keyword(properties) {
                this.associatedPrompts = [];
                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]];
            }

            /**
             * Keyword value.
             * @member {string|null|undefined} value
             * @memberof AICommon.BotRenderingMetadata.Keyword
             * @instance
             */
            Keyword.prototype.value = null;

            /**
             * Keyword associatedPrompts.
             * @member {Array.<string>} associatedPrompts
             * @memberof AICommon.BotRenderingMetadata.Keyword
             * @instance
             */
            Keyword.prototype.associatedPrompts = $util.emptyArray;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * Keyword _value.
             * @member {"value"|undefined} _value
             * @memberof AICommon.BotRenderingMetadata.Keyword
             * @instance
             */
            Object.defineProperty(Keyword.prototype, "_value", {
                get: $util.oneOfGetter($oneOfFields = ["value"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new Keyword instance using the specified properties.
             * @function create
             * @memberof AICommon.BotRenderingMetadata.Keyword
             * @static
             * @param {AICommon.BotRenderingMetadata.IKeyword=} [properties] Properties to set
             * @returns {AICommon.BotRenderingMetadata.Keyword} Keyword instance
             */
            Keyword.create = function create(properties) {
                return new Keyword(properties);
            };

            /**
             * Encodes the specified Keyword message. Does not implicitly {@link AICommon.BotRenderingMetadata.Keyword.verify|verify} messages.
             * @function encode
             * @memberof AICommon.BotRenderingMetadata.Keyword
             * @static
             * @param {AICommon.BotRenderingMetadata.IKeyword} message Keyword message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Keyword.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.value);
                if (message.associatedPrompts != null && message.associatedPrompts.length)
                    for (var i = 0; i < message.associatedPrompts.length; ++i)
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.associatedPrompts[i]);
                return writer;
            };

            /**
             * Encodes the specified Keyword message, length delimited. Does not implicitly {@link AICommon.BotRenderingMetadata.Keyword.verify|verify} messages.
             * @function encodeDelimited
             * @memberof AICommon.BotRenderingMetadata.Keyword
             * @static
             * @param {AICommon.BotRenderingMetadata.IKeyword} message Keyword message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Keyword.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a Keyword message from the specified reader or buffer.
             * @function decode
             * @memberof AICommon.BotRenderingMetadata.Keyword
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {AICommon.BotRenderingMetadata.Keyword} Keyword
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Keyword.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.AICommon.BotRenderingMetadata.Keyword();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.value = reader.string();
                            break;
                        }
                    case 2: {
                            if (!(message.associatedPrompts && message.associatedPrompts.length))
                                message.associatedPrompts = [];
                            message.associatedPrompts.push(reader.string());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a Keyword message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof AICommon.BotRenderingMetadata.Keyword
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {AICommon.BotRenderingMetadata.Keyword} Keyword
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Keyword.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a Keyword message.
             * @function verify
             * @memberof AICommon.BotRenderingMetadata.Keyword
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Keyword.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.value != null && message.hasOwnProperty("value")) {
                    properties._value = 1;
                    if (!$util.isString(message.value))
                        return "value: string expected";
                }
                if (message.associatedPrompts != null && message.hasOwnProperty("associatedPrompts")) {
                    if (!Array.isArray(message.associatedPrompts))
                        return "associatedPrompts: array expected";
                    for (var i = 0; i < message.associatedPrompts.length; ++i)
                        if (!$util.isString(message.associatedPrompts[i]))
                            return "associatedPrompts: string[] expected";
                }
                return null;
            };

            /**
             * Creates a Keyword message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof AICommon.BotRenderingMetadata.Keyword
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {AICommon.BotRenderingMetadata.Keyword} Keyword
             */
            Keyword.fromObject = function fromObject(object) {
                if (object instanceof $root.AICommon.BotRenderingMetadata.Keyword)
                    return object;
                var message = new $root.AICommon.BotRenderingMetadata.Keyword();
                if (object.value != null)
                    message.value = String(object.value);
                if (object.associatedPrompts) {
                    if (!Array.isArray(object.associatedPrompts))
                        throw TypeError(".AICommon.BotRenderingMetadata.Keyword.associatedPrompts: array expected");
                    message.associatedPrompts = [];
                    for (var i = 0; i < object.associatedPrompts.length; ++i)
                        message.associatedPrompts[i] = String(object.associatedPrompts[i]);
                }
                return message;
            };

            /**
             * Creates a plain object from a Keyword message. Also converts values to other types if specified.
             * @function toObject
             * @memberof AICommon.BotRenderingMetadata.Keyword
             * @static
             * @param {AICommon.BotRenderingMetadata.Keyword} message Keyword
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Keyword.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.arrays || options.defaults)
                    object.associatedPrompts = [];
                if (message.value != null && message.hasOwnProperty("value")) {
                    object.value = message.value;
                    if (options.oneofs)
                        object._value = "value";
                }
                if (message.associatedPrompts && message.associatedPrompts.length) {
                    object.associatedPrompts = [];
                    for (var j = 0; j < message.associatedPrompts.length; ++j)
                        object.associatedPrompts[j] = message.associatedPrompts[j];
                }
                return object;
            };

            /**
             * Converts this Keyword to JSON.
             * @function toJSON
             * @memberof AICommon.BotRenderingMetadata.Keyword
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Keyword.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for Keyword
             * @function getTypeUrl
             * @memberof AICommon.BotRenderingMetadata.Keyword
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            Keyword.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/AICommon.BotRenderingMetadata.Keyword";
            };

            return Keyword;
        })();

        return BotRenderingMetadata;
    })();

    AICommon.BotPromotionMessageMetadata = (function() {

        /**
         * Properties of a BotPromotionMessageMetadata.
         * @memberof AICommon
         * @interface IBotPromotionMessageMetadata
         * @property {AICommon.BotPromotionMessageMetadata.BotPromotionType|null} [promotionType] BotPromotionMessageMetadata promotionType
         * @property {string|null} [buttonTitle] BotPromotionMessageMetadata buttonTitle
         */

        /**
         * Constructs a new BotPromotionMessageMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotPromotionMessageMetadata.
         * @implements IBotPromotionMessageMetadata
         * @constructor
         * @param {AICommon.IBotPromotionMessageMetadata=} [properties] Properties to set
         */
        function BotPromotionMessageMetadata(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]];
        }

        /**
         * BotPromotionMessageMetadata promotionType.
         * @member {AICommon.BotPromotionMessageMetadata.BotPromotionType|null|undefined} promotionType
         * @memberof AICommon.BotPromotionMessageMetadata
         * @instance
         */
        BotPromotionMessageMetadata.prototype.promotionType = null;

        /**
         * BotPromotionMessageMetadata buttonTitle.
         * @member {string|null|undefined} buttonTitle
         * @memberof AICommon.BotPromotionMessageMetadata
         * @instance
         */
        BotPromotionMessageMetadata.prototype.buttonTitle = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotPromotionMessageMetadata _promotionType.
         * @member {"promotionType"|undefined} _promotionType
         * @memberof AICommon.BotPromotionMessageMetadata
         * @instance
         */
        Object.defineProperty(BotPromotionMessageMetadata.prototype, "_promotionType", {
            get: $util.oneOfGetter($oneOfFields = ["promotionType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPromotionMessageMetadata _buttonTitle.
         * @member {"buttonTitle"|undefined} _buttonTitle
         * @memberof AICommon.BotPromotionMessageMetadata
         * @instance
         */
        Object.defineProperty(BotPromotionMessageMetadata.prototype, "_buttonTitle", {
            get: $util.oneOfGetter($oneOfFields = ["buttonTitle"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotPromotionMessageMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotPromotionMessageMetadata
         * @static
         * @param {AICommon.IBotPromotionMessageMetadata=} [properties] Properties to set
         * @returns {AICommon.BotPromotionMessageMetadata} BotPromotionMessageMetadata instance
         */
        BotPromotionMessageMetadata.create = function create(properties) {
            return new BotPromotionMessageMetadata(properties);
        };

        /**
         * Encodes the specified BotPromotionMessageMetadata message. Does not implicitly {@link AICommon.BotPromotionMessageMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotPromotionMessageMetadata
         * @static
         * @param {AICommon.IBotPromotionMessageMetadata} message BotPromotionMessageMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotPromotionMessageMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.promotionType != null && Object.hasOwnProperty.call(message, "promotionType"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.promotionType);
            if (message.buttonTitle != null && Object.hasOwnProperty.call(message, "buttonTitle"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.buttonTitle);
            return writer;
        };

        /**
         * Encodes the specified BotPromotionMessageMetadata message, length delimited. Does not implicitly {@link AICommon.BotPromotionMessageMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotPromotionMessageMetadata
         * @static
         * @param {AICommon.IBotPromotionMessageMetadata} message BotPromotionMessageMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotPromotionMessageMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotPromotionMessageMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotPromotionMessageMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotPromotionMessageMetadata} BotPromotionMessageMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotPromotionMessageMetadata.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.AICommon.BotPromotionMessageMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.promotionType = reader.int32();
                        break;
                    }
                case 2: {
                        message.buttonTitle = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotPromotionMessageMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotPromotionMessageMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotPromotionMessageMetadata} BotPromotionMessageMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotPromotionMessageMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotPromotionMessageMetadata message.
         * @function verify
         * @memberof AICommon.BotPromotionMessageMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotPromotionMessageMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.promotionType != null && message.hasOwnProperty("promotionType")) {
                properties._promotionType = 1;
                switch (message.promotionType) {
                default:
                    return "promotionType: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            }
            if (message.buttonTitle != null && message.hasOwnProperty("buttonTitle")) {
                properties._buttonTitle = 1;
                if (!$util.isString(message.buttonTitle))
                    return "buttonTitle: string expected";
            }
            return null;
        };

        /**
         * Creates a BotPromotionMessageMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotPromotionMessageMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotPromotionMessageMetadata} BotPromotionMessageMetadata
         */
        BotPromotionMessageMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotPromotionMessageMetadata)
                return object;
            var message = new $root.AICommon.BotPromotionMessageMetadata();
            switch (object.promotionType) {
            default:
                if (typeof object.promotionType === "number") {
                    message.promotionType = object.promotionType;
                    break;
                }
                break;
            case "UNKNOWN_TYPE":
            case 0:
                message.promotionType = 0;
                break;
            case "C50":
            case 1:
                message.promotionType = 1;
                break;
            case "SURVEY_PLATFORM":
            case 2:
                message.promotionType = 2;
                break;
            }
            if (object.buttonTitle != null)
                message.buttonTitle = String(object.buttonTitle);
            return message;
        };

        /**
         * Creates a plain object from a BotPromotionMessageMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotPromotionMessageMetadata
         * @static
         * @param {AICommon.BotPromotionMessageMetadata} message BotPromotionMessageMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotPromotionMessageMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.promotionType != null && message.hasOwnProperty("promotionType")) {
                object.promotionType = options.enums === String ? $root.AICommon.BotPromotionMessageMetadata.BotPromotionType[message.promotionType] === undefined ? message.promotionType : $root.AICommon.BotPromotionMessageMetadata.BotPromotionType[message.promotionType] : message.promotionType;
                if (options.oneofs)
                    object._promotionType = "promotionType";
            }
            if (message.buttonTitle != null && message.hasOwnProperty("buttonTitle")) {
                object.buttonTitle = message.buttonTitle;
                if (options.oneofs)
                    object._buttonTitle = "buttonTitle";
            }
            return object;
        };

        /**
         * Converts this BotPromotionMessageMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotPromotionMessageMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotPromotionMessageMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotPromotionMessageMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotPromotionMessageMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotPromotionMessageMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotPromotionMessageMetadata";
        };

        /**
         * BotPromotionType enum.
         * @name AICommon.BotPromotionMessageMetadata.BotPromotionType
         * @enum {number}
         * @property {number} UNKNOWN_TYPE=0 UNKNOWN_TYPE value
         * @property {number} C50=1 C50 value
         * @property {number} SURVEY_PLATFORM=2 SURVEY_PLATFORM value
         */
        BotPromotionMessageMetadata.BotPromotionType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN_TYPE"] = 0;
            values[valuesById[1] = "C50"] = 1;
            values[valuesById[2] = "SURVEY_PLATFORM"] = 2;
            return values;
        })();

        return BotPromotionMessageMetadata;
    })();

    AICommon.BotSignatureVerificationUseCaseProof = (function() {

        /**
         * Properties of a BotSignatureVerificationUseCaseProof.
         * @memberof AICommon
         * @interface IBotSignatureVerificationUseCaseProof
         * @property {number|null} [version] BotSignatureVerificationUseCaseProof version
         * @property {AICommon.BotSignatureVerificationUseCaseProof.BotSignatureUseCase|null} [useCase] BotSignatureVerificationUseCaseProof useCase
         * @property {Uint8Array|null} [signature] BotSignatureVerificationUseCaseProof signature
         * @property {Array.<Uint8Array>|null} [certificateChain] BotSignatureVerificationUseCaseProof certificateChain
         */

        /**
         * Constructs a new BotSignatureVerificationUseCaseProof.
         * @memberof AICommon
         * @classdesc Represents a BotSignatureVerificationUseCaseProof.
         * @implements IBotSignatureVerificationUseCaseProof
         * @constructor
         * @param {AICommon.IBotSignatureVerificationUseCaseProof=} [properties] Properties to set
         */
        function BotSignatureVerificationUseCaseProof(properties) {
            this.certificateChain = [];
            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]];
        }

        /**
         * BotSignatureVerificationUseCaseProof version.
         * @member {number|null|undefined} version
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @instance
         */
        BotSignatureVerificationUseCaseProof.prototype.version = null;

        /**
         * BotSignatureVerificationUseCaseProof useCase.
         * @member {AICommon.BotSignatureVerificationUseCaseProof.BotSignatureUseCase|null|undefined} useCase
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @instance
         */
        BotSignatureVerificationUseCaseProof.prototype.useCase = null;

        /**
         * BotSignatureVerificationUseCaseProof signature.
         * @member {Uint8Array|null|undefined} signature
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @instance
         */
        BotSignatureVerificationUseCaseProof.prototype.signature = null;

        /**
         * BotSignatureVerificationUseCaseProof certificateChain.
         * @member {Array.<Uint8Array>} certificateChain
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @instance
         */
        BotSignatureVerificationUseCaseProof.prototype.certificateChain = $util.emptyArray;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotSignatureVerificationUseCaseProof _version.
         * @member {"version"|undefined} _version
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @instance
         */
        Object.defineProperty(BotSignatureVerificationUseCaseProof.prototype, "_version", {
            get: $util.oneOfGetter($oneOfFields = ["version"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotSignatureVerificationUseCaseProof _useCase.
         * @member {"useCase"|undefined} _useCase
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @instance
         */
        Object.defineProperty(BotSignatureVerificationUseCaseProof.prototype, "_useCase", {
            get: $util.oneOfGetter($oneOfFields = ["useCase"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotSignatureVerificationUseCaseProof _signature.
         * @member {"signature"|undefined} _signature
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @instance
         */
        Object.defineProperty(BotSignatureVerificationUseCaseProof.prototype, "_signature", {
            get: $util.oneOfGetter($oneOfFields = ["signature"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotSignatureVerificationUseCaseProof instance using the specified properties.
         * @function create
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @static
         * @param {AICommon.IBotSignatureVerificationUseCaseProof=} [properties] Properties to set
         * @returns {AICommon.BotSignatureVerificationUseCaseProof} BotSignatureVerificationUseCaseProof instance
         */
        BotSignatureVerificationUseCaseProof.create = function create(properties) {
            return new BotSignatureVerificationUseCaseProof(properties);
        };

        /**
         * Encodes the specified BotSignatureVerificationUseCaseProof message. Does not implicitly {@link AICommon.BotSignatureVerificationUseCaseProof.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @static
         * @param {AICommon.IBotSignatureVerificationUseCaseProof} message BotSignatureVerificationUseCaseProof message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotSignatureVerificationUseCaseProof.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.version != null && Object.hasOwnProperty.call(message, "version"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version);
            if (message.useCase != null && Object.hasOwnProperty.call(message, "useCase"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.useCase);
            if (message.signature != null && Object.hasOwnProperty.call(message, "signature"))
                writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signature);
            if (message.certificateChain != null && message.certificateChain.length)
                for (var i = 0; i < message.certificateChain.length; ++i)
                    writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.certificateChain[i]);
            return writer;
        };

        /**
         * Encodes the specified BotSignatureVerificationUseCaseProof message, length delimited. Does not implicitly {@link AICommon.BotSignatureVerificationUseCaseProof.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @static
         * @param {AICommon.IBotSignatureVerificationUseCaseProof} message BotSignatureVerificationUseCaseProof message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotSignatureVerificationUseCaseProof.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotSignatureVerificationUseCaseProof message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotSignatureVerificationUseCaseProof} BotSignatureVerificationUseCaseProof
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotSignatureVerificationUseCaseProof.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.AICommon.BotSignatureVerificationUseCaseProof();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.version = reader.int32();
                        break;
                    }
                case 2: {
                        message.useCase = reader.int32();
                        break;
                    }
                case 3: {
                        message.signature = reader.bytes();
                        break;
                    }
                case 4: {
                        if (!(message.certificateChain && message.certificateChain.length))
                            message.certificateChain = [];
                        message.certificateChain.push(reader.bytes());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotSignatureVerificationUseCaseProof message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotSignatureVerificationUseCaseProof} BotSignatureVerificationUseCaseProof
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotSignatureVerificationUseCaseProof.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotSignatureVerificationUseCaseProof message.
         * @function verify
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotSignatureVerificationUseCaseProof.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.version != null && message.hasOwnProperty("version")) {
                properties._version = 1;
                if (!$util.isInteger(message.version))
                    return "version: integer expected";
            }
            if (message.useCase != null && message.hasOwnProperty("useCase")) {
                properties._useCase = 1;
                switch (message.useCase) {
                default:
                    return "useCase: enum value expected";
                case 0:
                case 1:
                    break;
                }
            }
            if (message.signature != null && message.hasOwnProperty("signature")) {
                properties._signature = 1;
                if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature)))
                    return "signature: buffer expected";
            }
            if (message.certificateChain != null && message.hasOwnProperty("certificateChain")) {
                if (!Array.isArray(message.certificateChain))
                    return "certificateChain: array expected";
                for (var i = 0; i < message.certificateChain.length; ++i)
                    if (!(message.certificateChain[i] && typeof message.certificateChain[i].length === "number" || $util.isString(message.certificateChain[i])))
                        return "certificateChain: buffer[] expected";
            }
            return null;
        };

        /**
         * Creates a BotSignatureVerificationUseCaseProof message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotSignatureVerificationUseCaseProof} BotSignatureVerificationUseCaseProof
         */
        BotSignatureVerificationUseCaseProof.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotSignatureVerificationUseCaseProof)
                return object;
            var message = new $root.AICommon.BotSignatureVerificationUseCaseProof();
            if (object.version != null)
                message.version = object.version | 0;
            switch (object.useCase) {
            default:
                if (typeof object.useCase === "number") {
                    message.useCase = object.useCase;
                    break;
                }
                break;
            case "UNSPECIFIED":
            case 0:
                message.useCase = 0;
                break;
            case "WA_BOT_MSG":
            case 1:
                message.useCase = 1;
                break;
            }
            if (object.signature != null)
                if (typeof object.signature === "string")
                    $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0);
                else if (object.signature.length >= 0)
                    message.signature = object.signature;
            if (object.certificateChain) {
                if (!Array.isArray(object.certificateChain))
                    throw TypeError(".AICommon.BotSignatureVerificationUseCaseProof.certificateChain: array expected");
                message.certificateChain = [];
                for (var i = 0; i < object.certificateChain.length; ++i)
                    if (typeof object.certificateChain[i] === "string")
                        $util.base64.decode(object.certificateChain[i], message.certificateChain[i] = $util.newBuffer($util.base64.length(object.certificateChain[i])), 0);
                    else if (object.certificateChain[i].length >= 0)
                        message.certificateChain[i] = object.certificateChain[i];
            }
            return message;
        };

        /**
         * Creates a plain object from a BotSignatureVerificationUseCaseProof message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @static
         * @param {AICommon.BotSignatureVerificationUseCaseProof} message BotSignatureVerificationUseCaseProof
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotSignatureVerificationUseCaseProof.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.certificateChain = [];
            if (message.version != null && message.hasOwnProperty("version")) {
                object.version = message.version;
                if (options.oneofs)
                    object._version = "version";
            }
            if (message.useCase != null && message.hasOwnProperty("useCase")) {
                object.useCase = options.enums === String ? $root.AICommon.BotSignatureVerificationUseCaseProof.BotSignatureUseCase[message.useCase] === undefined ? message.useCase : $root.AICommon.BotSignatureVerificationUseCaseProof.BotSignatureUseCase[message.useCase] : message.useCase;
                if (options.oneofs)
                    object._useCase = "useCase";
            }
            if (message.signature != null && message.hasOwnProperty("signature")) {
                object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature;
                if (options.oneofs)
                    object._signature = "signature";
            }
            if (message.certificateChain && message.certificateChain.length) {
                object.certificateChain = [];
                for (var j = 0; j < message.certificateChain.length; ++j)
                    object.certificateChain[j] = options.bytes === String ? $util.base64.encode(message.certificateChain[j], 0, message.certificateChain[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.certificateChain[j]) : message.certificateChain[j];
            }
            return object;
        };

        /**
         * Converts this BotSignatureVerificationUseCaseProof to JSON.
         * @function toJSON
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotSignatureVerificationUseCaseProof.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotSignatureVerificationUseCaseProof
         * @function getTypeUrl
         * @memberof AICommon.BotSignatureVerificationUseCaseProof
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotSignatureVerificationUseCaseProof.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotSignatureVerificationUseCaseProof";
        };

        /**
         * BotSignatureUseCase enum.
         * @name AICommon.BotSignatureVerificationUseCaseProof.BotSignatureUseCase
         * @enum {number}
         * @property {number} UNSPECIFIED=0 UNSPECIFIED value
         * @property {number} WA_BOT_MSG=1 WA_BOT_MSG value
         */
        BotSignatureVerificationUseCaseProof.BotSignatureUseCase = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNSPECIFIED"] = 0;
            values[valuesById[1] = "WA_BOT_MSG"] = 1;
            return values;
        })();

        return BotSignatureVerificationUseCaseProof;
    })();

    AICommon.BotSignatureVerificationMetadata = (function() {

        /**
         * Properties of a BotSignatureVerificationMetadata.
         * @memberof AICommon
         * @interface IBotSignatureVerificationMetadata
         * @property {Array.<AICommon.IBotSignatureVerificationUseCaseProof>|null} [proofs] BotSignatureVerificationMetadata proofs
         */

        /**
         * Constructs a new BotSignatureVerificationMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotSignatureVerificationMetadata.
         * @implements IBotSignatureVerificationMetadata
         * @constructor
         * @param {AICommon.IBotSignatureVerificationMetadata=} [properties] Properties to set
         */
        function BotSignatureVerificationMetadata(properties) {
            this.proofs = [];
            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]];
        }

        /**
         * BotSignatureVerificationMetadata proofs.
         * @member {Array.<AICommon.IBotSignatureVerificationUseCaseProof>} proofs
         * @memberof AICommon.BotSignatureVerificationMetadata
         * @instance
         */
        BotSignatureVerificationMetadata.prototype.proofs = $util.emptyArray;

        /**
         * Creates a new BotSignatureVerificationMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotSignatureVerificationMetadata
         * @static
         * @param {AICommon.IBotSignatureVerificationMetadata=} [properties] Properties to set
         * @returns {AICommon.BotSignatureVerificationMetadata} BotSignatureVerificationMetadata instance
         */
        BotSignatureVerificationMetadata.create = function create(properties) {
            return new BotSignatureVerificationMetadata(properties);
        };

        /**
         * Encodes the specified BotSignatureVerificationMetadata message. Does not implicitly {@link AICommon.BotSignatureVerificationMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotSignatureVerificationMetadata
         * @static
         * @param {AICommon.IBotSignatureVerificationMetadata} message BotSignatureVerificationMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotSignatureVerificationMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.proofs != null && message.proofs.length)
                for (var i = 0; i < message.proofs.length; ++i)
                    $root.AICommon.BotSignatureVerificationUseCaseProof.encode(message.proofs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified BotSignatureVerificationMetadata message, length delimited. Does not implicitly {@link AICommon.BotSignatureVerificationMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotSignatureVerificationMetadata
         * @static
         * @param {AICommon.IBotSignatureVerificationMetadata} message BotSignatureVerificationMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotSignatureVerificationMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotSignatureVerificationMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotSignatureVerificationMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotSignatureVerificationMetadata} BotSignatureVerificationMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotSignatureVerificationMetadata.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.AICommon.BotSignatureVerificationMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        if (!(message.proofs && message.proofs.length))
                            message.proofs = [];
                        message.proofs.push($root.AICommon.BotSignatureVerificationUseCaseProof.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotSignatureVerificationMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotSignatureVerificationMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotSignatureVerificationMetadata} BotSignatureVerificationMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotSignatureVerificationMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotSignatureVerificationMetadata message.
         * @function verify
         * @memberof AICommon.BotSignatureVerificationMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotSignatureVerificationMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.proofs != null && message.hasOwnProperty("proofs")) {
                if (!Array.isArray(message.proofs))
                    return "proofs: array expected";
                for (var i = 0; i < message.proofs.length; ++i) {
                    var error = $root.AICommon.BotSignatureVerificationUseCaseProof.verify(message.proofs[i]);
                    if (error)
                        return "proofs." + error;
                }
            }
            return null;
        };

        /**
         * Creates a BotSignatureVerificationMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotSignatureVerificationMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotSignatureVerificationMetadata} BotSignatureVerificationMetadata
         */
        BotSignatureVerificationMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotSignatureVerificationMetadata)
                return object;
            var message = new $root.AICommon.BotSignatureVerificationMetadata();
            if (object.proofs) {
                if (!Array.isArray(object.proofs))
                    throw TypeError(".AICommon.BotSignatureVerificationMetadata.proofs: array expected");
                message.proofs = [];
                for (var i = 0; i < object.proofs.length; ++i) {
                    if (typeof object.proofs[i] !== "object")
                        throw TypeError(".AICommon.BotSignatureVerificationMetadata.proofs: object expected");
                    message.proofs[i] = $root.AICommon.BotSignatureVerificationUseCaseProof.fromObject(object.proofs[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a BotSignatureVerificationMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotSignatureVerificationMetadata
         * @static
         * @param {AICommon.BotSignatureVerificationMetadata} message BotSignatureVerificationMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotSignatureVerificationMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.proofs = [];
            if (message.proofs && message.proofs.length) {
                object.proofs = [];
                for (var j = 0; j < message.proofs.length; ++j)
                    object.proofs[j] = $root.AICommon.BotSignatureVerificationUseCaseProof.toObject(message.proofs[j], options);
            }
            return object;
        };

        /**
         * Converts this BotSignatureVerificationMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotSignatureVerificationMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotSignatureVerificationMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotSignatureVerificationMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotSignatureVerificationMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotSignatureVerificationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotSignatureVerificationMetadata";
        };

        return BotSignatureVerificationMetadata;
    })();

    AICommon.BotMemoryFact = (function() {

        /**
         * Properties of a BotMemoryFact.
         * @memberof AICommon
         * @interface IBotMemoryFact
         * @property {string|null} [fact] BotMemoryFact fact
         * @property {string|null} [factId] BotMemoryFact factId
         */

        /**
         * Constructs a new BotMemoryFact.
         * @memberof AICommon
         * @classdesc Represents a BotMemoryFact.
         * @implements IBotMemoryFact
         * @constructor
         * @param {AICommon.IBotMemoryFact=} [properties] Properties to set
         */
        function BotMemoryFact(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]];
        }

        /**
         * BotMemoryFact fact.
         * @member {string|null|undefined} fact
         * @memberof AICommon.BotMemoryFact
         * @instance
         */
        BotMemoryFact.prototype.fact = null;

        /**
         * BotMemoryFact factId.
         * @member {string|null|undefined} factId
         * @memberof AICommon.BotMemoryFact
         * @instance
         */
        BotMemoryFact.prototype.factId = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotMemoryFact _fact.
         * @member {"fact"|undefined} _fact
         * @memberof AICommon.BotMemoryFact
         * @instance
         */
        Object.defineProperty(BotMemoryFact.prototype, "_fact", {
            get: $util.oneOfGetter($oneOfFields = ["fact"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotMemoryFact _factId.
         * @member {"factId"|undefined} _factId
         * @memberof AICommon.BotMemoryFact
         * @instance
         */
        Object.defineProperty(BotMemoryFact.prototype, "_factId", {
            get: $util.oneOfGetter($oneOfFields = ["factId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotMemoryFact instance using the specified properties.
         * @function create
         * @memberof AICommon.BotMemoryFact
         * @static
         * @param {AICommon.IBotMemoryFact=} [properties] Properties to set
         * @returns {AICommon.BotMemoryFact} BotMemoryFact instance
         */
        BotMemoryFact.create = function create(properties) {
            return new BotMemoryFact(properties);
        };

        /**
         * Encodes the specified BotMemoryFact message. Does not implicitly {@link AICommon.BotMemoryFact.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotMemoryFact
         * @static
         * @param {AICommon.IBotMemoryFact} message BotMemoryFact message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMemoryFact.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.fact != null && Object.hasOwnProperty.call(message, "fact"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.fact);
            if (message.factId != null && Object.hasOwnProperty.call(message, "factId"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.factId);
            return writer;
        };

        /**
         * Encodes the specified BotMemoryFact message, length delimited. Does not implicitly {@link AICommon.BotMemoryFact.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotMemoryFact
         * @static
         * @param {AICommon.IBotMemoryFact} message BotMemoryFact message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMemoryFact.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotMemoryFact message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotMemoryFact
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotMemoryFact} BotMemoryFact
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotMemoryFact.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.AICommon.BotMemoryFact();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.fact = reader.string();
                        break;
                    }
                case 2: {
                        message.factId = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotMemoryFact message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotMemoryFact
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotMemoryFact} BotMemoryFact
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotMemoryFact.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotMemoryFact message.
         * @function verify
         * @memberof AICommon.BotMemoryFact
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotMemoryFact.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.fact != null && message.hasOwnProperty("fact")) {
                properties._fact = 1;
                if (!$util.isString(message.fact))
                    return "fact: string expected";
            }
            if (message.factId != null && message.hasOwnProperty("factId")) {
                properties._factId = 1;
                if (!$util.isString(message.factId))
                    return "factId: string expected";
            }
            return null;
        };

        /**
         * Creates a BotMemoryFact message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotMemoryFact
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotMemoryFact} BotMemoryFact
         */
        BotMemoryFact.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotMemoryFact)
                return object;
            var message = new $root.AICommon.BotMemoryFact();
            if (object.fact != null)
                message.fact = String(object.fact);
            if (object.factId != null)
                message.factId = String(object.factId);
            return message;
        };

        /**
         * Creates a plain object from a BotMemoryFact message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotMemoryFact
         * @static
         * @param {AICommon.BotMemoryFact} message BotMemoryFact
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotMemoryFact.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.fact != null && message.hasOwnProperty("fact")) {
                object.fact = message.fact;
                if (options.oneofs)
                    object._fact = "fact";
            }
            if (message.factId != null && message.hasOwnProperty("factId")) {
                object.factId = message.factId;
                if (options.oneofs)
                    object._factId = "factId";
            }
            return object;
        };

        /**
         * Converts this BotMemoryFact to JSON.
         * @function toJSON
         * @memberof AICommon.BotMemoryFact
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotMemoryFact.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotMemoryFact
         * @function getTypeUrl
         * @memberof AICommon.BotMemoryFact
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotMemoryFact.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotMemoryFact";
        };

        return BotMemoryFact;
    })();

    AICommon.BotMemoryMetadata = (function() {

        /**
         * Properties of a BotMemoryMetadata.
         * @memberof AICommon
         * @interface IBotMemoryMetadata
         * @property {Array.<AICommon.IBotMemoryFact>|null} [addedFacts] BotMemoryMetadata addedFacts
         * @property {Array.<AICommon.IBotMemoryFact>|null} [removedFacts] BotMemoryMetadata removedFacts
         * @property {string|null} [disclaimer] BotMemoryMetadata disclaimer
         */

        /**
         * Constructs a new BotMemoryMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotMemoryMetadata.
         * @implements IBotMemoryMetadata
         * @constructor
         * @param {AICommon.IBotMemoryMetadata=} [properties] Properties to set
         */
        function BotMemoryMetadata(properties) {
            this.addedFacts = [];
            this.removedFacts = [];
            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]];
        }

        /**
         * BotMemoryMetadata addedFacts.
         * @member {Array.<AICommon.IBotMemoryFact>} addedFacts
         * @memberof AICommon.BotMemoryMetadata
         * @instance
         */
        BotMemoryMetadata.prototype.addedFacts = $util.emptyArray;

        /**
         * BotMemoryMetadata removedFacts.
         * @member {Array.<AICommon.IBotMemoryFact>} removedFacts
         * @memberof AICommon.BotMemoryMetadata
         * @instance
         */
        BotMemoryMetadata.prototype.removedFacts = $util.emptyArray;

        /**
         * BotMemoryMetadata disclaimer.
         * @member {string|null|undefined} disclaimer
         * @memberof AICommon.BotMemoryMetadata
         * @instance
         */
        BotMemoryMetadata.prototype.disclaimer = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotMemoryMetadata _disclaimer.
         * @member {"disclaimer"|undefined} _disclaimer
         * @memberof AICommon.BotMemoryMetadata
         * @instance
         */
        Object.defineProperty(BotMemoryMetadata.prototype, "_disclaimer", {
            get: $util.oneOfGetter($oneOfFields = ["disclaimer"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotMemoryMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotMemoryMetadata
         * @static
         * @param {AICommon.IBotMemoryMetadata=} [properties] Properties to set
         * @returns {AICommon.BotMemoryMetadata} BotMemoryMetadata instance
         */
        BotMemoryMetadata.create = function create(properties) {
            return new BotMemoryMetadata(properties);
        };

        /**
         * Encodes the specified BotMemoryMetadata message. Does not implicitly {@link AICommon.BotMemoryMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotMemoryMetadata
         * @static
         * @param {AICommon.IBotMemoryMetadata} message BotMemoryMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMemoryMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.addedFacts != null && message.addedFacts.length)
                for (var i = 0; i < message.addedFacts.length; ++i)
                    $root.AICommon.BotMemoryFact.encode(message.addedFacts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.removedFacts != null && message.removedFacts.length)
                for (var i = 0; i < message.removedFacts.length; ++i)
                    $root.AICommon.BotMemoryFact.encode(message.removedFacts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.disclaimer != null && Object.hasOwnProperty.call(message, "disclaimer"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.disclaimer);
            return writer;
        };

        /**
         * Encodes the specified BotMemoryMetadata message, length delimited. Does not implicitly {@link AICommon.BotMemoryMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotMemoryMetadata
         * @static
         * @param {AICommon.IBotMemoryMetadata} message BotMemoryMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotMemoryMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotMemoryMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotMemoryMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotMemoryMetadata} BotMemoryMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotMemoryMetadata.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.AICommon.BotMemoryMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        if (!(message.addedFacts && message.addedFacts.length))
                            message.addedFacts = [];
                        message.addedFacts.push($root.AICommon.BotMemoryFact.decode(reader, reader.uint32()));
                        break;
                    }
                case 2: {
                        if (!(message.removedFacts && message.removedFacts.length))
                            message.removedFacts = [];
                        message.removedFacts.push($root.AICommon.BotMemoryFact.decode(reader, reader.uint32()));
                        break;
                    }
                case 3: {
                        message.disclaimer = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotMemoryMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotMemoryMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotMemoryMetadata} BotMemoryMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotMemoryMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotMemoryMetadata message.
         * @function verify
         * @memberof AICommon.BotMemoryMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotMemoryMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.addedFacts != null && message.hasOwnProperty("addedFacts")) {
                if (!Array.isArray(message.addedFacts))
                    return "addedFacts: array expected";
                for (var i = 0; i < message.addedFacts.length; ++i) {
                    var error = $root.AICommon.BotMemoryFact.verify(message.addedFacts[i]);
                    if (error)
                        return "addedFacts." + error;
                }
            }
            if (message.removedFacts != null && message.hasOwnProperty("removedFacts")) {
                if (!Array.isArray(message.removedFacts))
                    return "removedFacts: array expected";
                for (var i = 0; i < message.removedFacts.length; ++i) {
                    var error = $root.AICommon.BotMemoryFact.verify(message.removedFacts[i]);
                    if (error)
                        return "removedFacts." + error;
                }
            }
            if (message.disclaimer != null && message.hasOwnProperty("disclaimer")) {
                properties._disclaimer = 1;
                if (!$util.isString(message.disclaimer))
                    return "disclaimer: string expected";
            }
            return null;
        };

        /**
         * Creates a BotMemoryMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotMemoryMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotMemoryMetadata} BotMemoryMetadata
         */
        BotMemoryMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotMemoryMetadata)
                return object;
            var message = new $root.AICommon.BotMemoryMetadata();
            if (object.addedFacts) {
                if (!Array.isArray(object.addedFacts))
                    throw TypeError(".AICommon.BotMemoryMetadata.addedFacts: array expected");
                message.addedFacts = [];
                for (var i = 0; i < object.addedFacts.length; ++i) {
                    if (typeof object.addedFacts[i] !== "object")
                        throw TypeError(".AICommon.BotMemoryMetadata.addedFacts: object expected");
                    message.addedFacts[i] = $root.AICommon.BotMemoryFact.fromObject(object.addedFacts[i]);
                }
            }
            if (object.removedFacts) {
                if (!Array.isArray(object.removedFacts))
                    throw TypeError(".AICommon.BotMemoryMetadata.removedFacts: array expected");
                message.removedFacts = [];
                for (var i = 0; i < object.removedFacts.length; ++i) {
                    if (typeof object.removedFacts[i] !== "object")
                        throw TypeError(".AICommon.BotMemoryMetadata.removedFacts: object expected");
                    message.removedFacts[i] = $root.AICommon.BotMemoryFact.fromObject(object.removedFacts[i]);
                }
            }
            if (object.disclaimer != null)
                message.disclaimer = String(object.disclaimer);
            return message;
        };

        /**
         * Creates a plain object from a BotMemoryMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotMemoryMetadata
         * @static
         * @param {AICommon.BotMemoryMetadata} message BotMemoryMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotMemoryMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults) {
                object.addedFacts = [];
                object.removedFacts = [];
            }
            if (message.addedFacts && message.addedFacts.length) {
                object.addedFacts = [];
                for (var j = 0; j < message.addedFacts.length; ++j)
                    object.addedFacts[j] = $root.AICommon.BotMemoryFact.toObject(message.addedFacts[j], options);
            }
            if (message.removedFacts && message.removedFacts.length) {
                object.removedFacts = [];
                for (var j = 0; j < message.removedFacts.length; ++j)
                    object.removedFacts[j] = $root.AICommon.BotMemoryFact.toObject(message.removedFacts[j], options);
            }
            if (message.disclaimer != null && message.hasOwnProperty("disclaimer")) {
                object.disclaimer = message.disclaimer;
                if (options.oneofs)
                    object._disclaimer = "disclaimer";
            }
            return object;
        };

        /**
         * Converts this BotMemoryMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotMemoryMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotMemoryMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotMemoryMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotMemoryMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotMemoryMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotMemoryMetadata";
        };

        return BotMemoryMetadata;
    })();

    AICommon.BotLinkedAccount = (function() {

        /**
         * Properties of a BotLinkedAccount.
         * @memberof AICommon
         * @interface IBotLinkedAccount
         * @property {AICommon.BotLinkedAccount.BotLinkedAccountType|null} [type] BotLinkedAccount type
         */

        /**
         * Constructs a new BotLinkedAccount.
         * @memberof AICommon
         * @classdesc Represents a BotLinkedAccount.
         * @implements IBotLinkedAccount
         * @constructor
         * @param {AICommon.IBotLinkedAccount=} [properties] Properties to set
         */
        function BotLinkedAccount(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]];
        }

        /**
         * BotLinkedAccount type.
         * @member {AICommon.BotLinkedAccount.BotLinkedAccountType|null|undefined} type
         * @memberof AICommon.BotLinkedAccount
         * @instance
         */
        BotLinkedAccount.prototype.type = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotLinkedAccount _type.
         * @member {"type"|undefined} _type
         * @memberof AICommon.BotLinkedAccount
         * @instance
         */
        Object.defineProperty(BotLinkedAccount.prototype, "_type", {
            get: $util.oneOfGetter($oneOfFields = ["type"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotLinkedAccount instance using the specified properties.
         * @function create
         * @memberof AICommon.BotLinkedAccount
         * @static
         * @param {AICommon.IBotLinkedAccount=} [properties] Properties to set
         * @returns {AICommon.BotLinkedAccount} BotLinkedAccount instance
         */
        BotLinkedAccount.create = function create(properties) {
            return new BotLinkedAccount(properties);
        };

        /**
         * Encodes the specified BotLinkedAccount message. Does not implicitly {@link AICommon.BotLinkedAccount.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotLinkedAccount
         * @static
         * @param {AICommon.IBotLinkedAccount} message BotLinkedAccount message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotLinkedAccount.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
            return writer;
        };

        /**
         * Encodes the specified BotLinkedAccount message, length delimited. Does not implicitly {@link AICommon.BotLinkedAccount.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotLinkedAccount
         * @static
         * @param {AICommon.IBotLinkedAccount} message BotLinkedAccount message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotLinkedAccount.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotLinkedAccount message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotLinkedAccount
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotLinkedAccount} BotLinkedAccount
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotLinkedAccount.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.AICommon.BotLinkedAccount();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.type = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotLinkedAccount message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotLinkedAccount
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotLinkedAccount} BotLinkedAccount
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotLinkedAccount.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotLinkedAccount message.
         * @function verify
         * @memberof AICommon.BotLinkedAccount
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotLinkedAccount.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.type != null && message.hasOwnProperty("type")) {
                properties._type = 1;
                switch (message.type) {
                default:
                    return "type: enum value expected";
                case 0:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a BotLinkedAccount message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotLinkedAccount
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotLinkedAccount} BotLinkedAccount
         */
        BotLinkedAccount.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotLinkedAccount)
                return object;
            var message = new $root.AICommon.BotLinkedAccount();
            switch (object.type) {
            default:
                if (typeof object.type === "number") {
                    message.type = object.type;
                    break;
                }
                break;
            case "BOT_LINKED_ACCOUNT_TYPE_1P":
            case 0:
                message.type = 0;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a BotLinkedAccount message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotLinkedAccount
         * @static
         * @param {AICommon.BotLinkedAccount} message BotLinkedAccount
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotLinkedAccount.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.type != null && message.hasOwnProperty("type")) {
                object.type = options.enums === String ? $root.AICommon.BotLinkedAccount.BotLinkedAccountType[message.type] === undefined ? message.type : $root.AICommon.BotLinkedAccount.BotLinkedAccountType[message.type] : message.type;
                if (options.oneofs)
                    object._type = "type";
            }
            return object;
        };

        /**
         * Converts this BotLinkedAccount to JSON.
         * @function toJSON
         * @memberof AICommon.BotLinkedAccount
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotLinkedAccount.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotLinkedAccount
         * @function getTypeUrl
         * @memberof AICommon.BotLinkedAccount
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotLinkedAccount.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotLinkedAccount";
        };

        /**
         * BotLinkedAccountType enum.
         * @name AICommon.BotLinkedAccount.BotLinkedAccountType
         * @enum {number}
         * @property {number} BOT_LINKED_ACCOUNT_TYPE_1P=0 BOT_LINKED_ACCOUNT_TYPE_1P value
         */
        BotLinkedAccount.BotLinkedAccountType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "BOT_LINKED_ACCOUNT_TYPE_1P"] = 0;
            return values;
        })();

        return BotLinkedAccount;
    })();

    AICommon.BotLinkedAccountsMetadata = (function() {

        /**
         * Properties of a BotLinkedAccountsMetadata.
         * @memberof AICommon
         * @interface IBotLinkedAccountsMetadata
         * @property {Array.<AICommon.IBotLinkedAccount>|null} [accounts] BotLinkedAccountsMetadata accounts
         * @property {Uint8Array|null} [acAuthTokens] BotLinkedAccountsMetadata acAuthTokens
         * @property {number|null} [acErrorCode] BotLinkedAccountsMetadata acErrorCode
         */

        /**
         * Constructs a new BotLinkedAccountsMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotLinkedAccountsMetadata.
         * @implements IBotLinkedAccountsMetadata
         * @constructor
         * @param {AICommon.IBotLinkedAccountsMetadata=} [properties] Properties to set
         */
        function BotLinkedAccountsMetadata(properties) {
            this.accounts = [];
            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]];
        }

        /**
         * BotLinkedAccountsMetadata accounts.
         * @member {Array.<AICommon.IBotLinkedAccount>} accounts
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @instance
         */
        BotLinkedAccountsMetadata.prototype.accounts = $util.emptyArray;

        /**
         * BotLinkedAccountsMetadata acAuthTokens.
         * @member {Uint8Array|null|undefined} acAuthTokens
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @instance
         */
        BotLinkedAccountsMetadata.prototype.acAuthTokens = null;

        /**
         * BotLinkedAccountsMetadata acErrorCode.
         * @member {number|null|undefined} acErrorCode
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @instance
         */
        BotLinkedAccountsMetadata.prototype.acErrorCode = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotLinkedAccountsMetadata _acAuthTokens.
         * @member {"acAuthTokens"|undefined} _acAuthTokens
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @instance
         */
        Object.defineProperty(BotLinkedAccountsMetadata.prototype, "_acAuthTokens", {
            get: $util.oneOfGetter($oneOfFields = ["acAuthTokens"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotLinkedAccountsMetadata _acErrorCode.
         * @member {"acErrorCode"|undefined} _acErrorCode
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @instance
         */
        Object.defineProperty(BotLinkedAccountsMetadata.prototype, "_acErrorCode", {
            get: $util.oneOfGetter($oneOfFields = ["acErrorCode"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotLinkedAccountsMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @static
         * @param {AICommon.IBotLinkedAccountsMetadata=} [properties] Properties to set
         * @returns {AICommon.BotLinkedAccountsMetadata} BotLinkedAccountsMetadata instance
         */
        BotLinkedAccountsMetadata.create = function create(properties) {
            return new BotLinkedAccountsMetadata(properties);
        };

        /**
         * Encodes the specified BotLinkedAccountsMetadata message. Does not implicitly {@link AICommon.BotLinkedAccountsMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @static
         * @param {AICommon.IBotLinkedAccountsMetadata} message BotLinkedAccountsMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotLinkedAccountsMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.accounts != null && message.accounts.length)
                for (var i = 0; i < message.accounts.length; ++i)
                    $root.AICommon.BotLinkedAccount.encode(message.accounts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.acAuthTokens != null && Object.hasOwnProperty.call(message, "acAuthTokens"))
                writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.acAuthTokens);
            if (message.acErrorCode != null && Object.hasOwnProperty.call(message, "acErrorCode"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.acErrorCode);
            return writer;
        };

        /**
         * Encodes the specified BotLinkedAccountsMetadata message, length delimited. Does not implicitly {@link AICommon.BotLinkedAccountsMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @static
         * @param {AICommon.IBotLinkedAccountsMetadata} message BotLinkedAccountsMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotLinkedAccountsMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotLinkedAccountsMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotLinkedAccountsMetadata} BotLinkedAccountsMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotLinkedAccountsMetadata.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.AICommon.BotLinkedAccountsMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        if (!(message.accounts && message.accounts.length))
                            message.accounts = [];
                        message.accounts.push($root.AICommon.BotLinkedAccount.decode(reader, reader.uint32()));
                        break;
                    }
                case 2: {
                        message.acAuthTokens = reader.bytes();
                        break;
                    }
                case 3: {
                        message.acErrorCode = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotLinkedAccountsMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotLinkedAccountsMetadata} BotLinkedAccountsMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotLinkedAccountsMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotLinkedAccountsMetadata message.
         * @function verify
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotLinkedAccountsMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.accounts != null && message.hasOwnProperty("accounts")) {
                if (!Array.isArray(message.accounts))
                    return "accounts: array expected";
                for (var i = 0; i < message.accounts.length; ++i) {
                    var error = $root.AICommon.BotLinkedAccount.verify(message.accounts[i]);
                    if (error)
                        return "accounts." + error;
                }
            }
            if (message.acAuthTokens != null && message.hasOwnProperty("acAuthTokens")) {
                properties._acAuthTokens = 1;
                if (!(message.acAuthTokens && typeof message.acAuthTokens.length === "number" || $util.isString(message.acAuthTokens)))
                    return "acAuthTokens: buffer expected";
            }
            if (message.acErrorCode != null && message.hasOwnProperty("acErrorCode")) {
                properties._acErrorCode = 1;
                if (!$util.isInteger(message.acErrorCode))
                    return "acErrorCode: integer expected";
            }
            return null;
        };

        /**
         * Creates a BotLinkedAccountsMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotLinkedAccountsMetadata} BotLinkedAccountsMetadata
         */
        BotLinkedAccountsMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotLinkedAccountsMetadata)
                return object;
            var message = new $root.AICommon.BotLinkedAccountsMetadata();
            if (object.accounts) {
                if (!Array.isArray(object.accounts))
                    throw TypeError(".AICommon.BotLinkedAccountsMetadata.accounts: array expected");
                message.accounts = [];
                for (var i = 0; i < object.accounts.length; ++i) {
                    if (typeof object.accounts[i] !== "object")
                        throw TypeError(".AICommon.BotLinkedAccountsMetadata.accounts: object expected");
                    message.accounts[i] = $root.AICommon.BotLinkedAccount.fromObject(object.accounts[i]);
                }
            }
            if (object.acAuthTokens != null)
                if (typeof object.acAuthTokens === "string")
                    $util.base64.decode(object.acAuthTokens, message.acAuthTokens = $util.newBuffer($util.base64.length(object.acAuthTokens)), 0);
                else if (object.acAuthTokens.length >= 0)
                    message.acAuthTokens = object.acAuthTokens;
            if (object.acErrorCode != null)
                message.acErrorCode = object.acErrorCode | 0;
            return message;
        };

        /**
         * Creates a plain object from a BotLinkedAccountsMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @static
         * @param {AICommon.BotLinkedAccountsMetadata} message BotLinkedAccountsMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotLinkedAccountsMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.accounts = [];
            if (message.accounts && message.accounts.length) {
                object.accounts = [];
                for (var j = 0; j < message.accounts.length; ++j)
                    object.accounts[j] = $root.AICommon.BotLinkedAccount.toObject(message.accounts[j], options);
            }
            if (message.acAuthTokens != null && message.hasOwnProperty("acAuthTokens")) {
                object.acAuthTokens = options.bytes === String ? $util.base64.encode(message.acAuthTokens, 0, message.acAuthTokens.length) : options.bytes === Array ? Array.prototype.slice.call(message.acAuthTokens) : message.acAuthTokens;
                if (options.oneofs)
                    object._acAuthTokens = "acAuthTokens";
            }
            if (message.acErrorCode != null && message.hasOwnProperty("acErrorCode")) {
                object.acErrorCode = message.acErrorCode;
                if (options.oneofs)
                    object._acErrorCode = "acErrorCode";
            }
            return object;
        };

        /**
         * Converts this BotLinkedAccountsMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotLinkedAccountsMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotLinkedAccountsMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotLinkedAccountsMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotLinkedAccountsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotLinkedAccountsMetadata";
        };

        return BotLinkedAccountsMetadata;
    })();

    AICommon.BotPromptSuggestion = (function() {

        /**
         * Properties of a BotPromptSuggestion.
         * @memberof AICommon
         * @interface IBotPromptSuggestion
         * @property {string|null} [prompt] BotPromptSuggestion prompt
         * @property {string|null} [promptId] BotPromptSuggestion promptId
         */

        /**
         * Constructs a new BotPromptSuggestion.
         * @memberof AICommon
         * @classdesc Represents a BotPromptSuggestion.
         * @implements IBotPromptSuggestion
         * @constructor
         * @param {AICommon.IBotPromptSuggestion=} [properties] Properties to set
         */
        function BotPromptSuggestion(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]];
        }

        /**
         * BotPromptSuggestion prompt.
         * @member {string|null|undefined} prompt
         * @memberof AICommon.BotPromptSuggestion
         * @instance
         */
        BotPromptSuggestion.prototype.prompt = null;

        /**
         * BotPromptSuggestion promptId.
         * @member {string|null|undefined} promptId
         * @memberof AICommon.BotPromptSuggestion
         * @instance
         */
        BotPromptSuggestion.prototype.promptId = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotPromptSuggestion _prompt.
         * @member {"prompt"|undefined} _prompt
         * @memberof AICommon.BotPromptSuggestion
         * @instance
         */
        Object.defineProperty(BotPromptSuggestion.prototype, "_prompt", {
            get: $util.oneOfGetter($oneOfFields = ["prompt"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPromptSuggestion _promptId.
         * @member {"promptId"|undefined} _promptId
         * @memberof AICommon.BotPromptSuggestion
         * @instance
         */
        Object.defineProperty(BotPromptSuggestion.prototype, "_promptId", {
            get: $util.oneOfGetter($oneOfFields = ["promptId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotPromptSuggestion instance using the specified properties.
         * @function create
         * @memberof AICommon.BotPromptSuggestion
         * @static
         * @param {AICommon.IBotPromptSuggestion=} [properties] Properties to set
         * @returns {AICommon.BotPromptSuggestion} BotPromptSuggestion instance
         */
        BotPromptSuggestion.create = function create(properties) {
            return new BotPromptSuggestion(properties);
        };

        /**
         * Encodes the specified BotPromptSuggestion message. Does not implicitly {@link AICommon.BotPromptSuggestion.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotPromptSuggestion
         * @static
         * @param {AICommon.IBotPromptSuggestion} message BotPromptSuggestion message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotPromptSuggestion.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.prompt != null && Object.hasOwnProperty.call(message, "prompt"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.prompt);
            if (message.promptId != null && Object.hasOwnProperty.call(message, "promptId"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.promptId);
            return writer;
        };

        /**
         * Encodes the specified BotPromptSuggestion message, length delimited. Does not implicitly {@link AICommon.BotPromptSuggestion.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotPromptSuggestion
         * @static
         * @param {AICommon.IBotPromptSuggestion} message BotPromptSuggestion message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotPromptSuggestion.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotPromptSuggestion message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotPromptSuggestion
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotPromptSuggestion} BotPromptSuggestion
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotPromptSuggestion.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.AICommon.BotPromptSuggestion();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.prompt = reader.string();
                        break;
                    }
                case 2: {
                        message.promptId = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotPromptSuggestion message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotPromptSuggestion
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotPromptSuggestion} BotPromptSuggestion
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotPromptSuggestion.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotPromptSuggestion message.
         * @function verify
         * @memberof AICommon.BotPromptSuggestion
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotPromptSuggestion.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.prompt != null && message.hasOwnProperty("prompt")) {
                properties._prompt = 1;
                if (!$util.isString(message.prompt))
                    return "prompt: string expected";
            }
            if (message.promptId != null && message.hasOwnProperty("promptId")) {
                properties._promptId = 1;
                if (!$util.isString(message.promptId))
                    return "promptId: string expected";
            }
            return null;
        };

        /**
         * Creates a BotPromptSuggestion message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotPromptSuggestion
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotPromptSuggestion} BotPromptSuggestion
         */
        BotPromptSuggestion.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotPromptSuggestion)
                return object;
            var message = new $root.AICommon.BotPromptSuggestion();
            if (object.prompt != null)
                message.prompt = String(object.prompt);
            if (object.promptId != null)
                message.promptId = String(object.promptId);
            return message;
        };

        /**
         * Creates a plain object from a BotPromptSuggestion message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotPromptSuggestion
         * @static
         * @param {AICommon.BotPromptSuggestion} message BotPromptSuggestion
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotPromptSuggestion.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.prompt != null && message.hasOwnProperty("prompt")) {
                object.prompt = message.prompt;
                if (options.oneofs)
                    object._prompt = "prompt";
            }
            if (message.promptId != null && message.hasOwnProperty("promptId")) {
                object.promptId = message.promptId;
                if (options.oneofs)
                    object._promptId = "promptId";
            }
            return object;
        };

        /**
         * Converts this BotPromptSuggestion to JSON.
         * @function toJSON
         * @memberof AICommon.BotPromptSuggestion
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotPromptSuggestion.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotPromptSuggestion
         * @function getTypeUrl
         * @memberof AICommon.BotPromptSuggestion
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotPromptSuggestion.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotPromptSuggestion";
        };

        return BotPromptSuggestion;
    })();

    AICommon.BotPromptSuggestions = (function() {

        /**
         * Properties of a BotPromptSuggestions.
         * @memberof AICommon
         * @interface IBotPromptSuggestions
         * @property {Array.<AICommon.IBotPromptSuggestion>|null} [suggestions] BotPromptSuggestions suggestions
         */

        /**
         * Constructs a new BotPromptSuggestions.
         * @memberof AICommon
         * @classdesc Represents a BotPromptSuggestions.
         * @implements IBotPromptSuggestions
         * @constructor
         * @param {AICommon.IBotPromptSuggestions=} [properties] Properties to set
         */
        function BotPromptSuggestions(properties) {
            this.suggestions = [];
            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]];
        }

        /**
         * BotPromptSuggestions suggestions.
         * @member {Array.<AICommon.IBotPromptSuggestion>} suggestions
         * @memberof AICommon.BotPromptSuggestions
         * @instance
         */
        BotPromptSuggestions.prototype.suggestions = $util.emptyArray;

        /**
         * Creates a new BotPromptSuggestions instance using the specified properties.
         * @function create
         * @memberof AICommon.BotPromptSuggestions
         * @static
         * @param {AICommon.IBotPromptSuggestions=} [properties] Properties to set
         * @returns {AICommon.BotPromptSuggestions} BotPromptSuggestions instance
         */
        BotPromptSuggestions.create = function create(properties) {
            return new BotPromptSuggestions(properties);
        };

        /**
         * Encodes the specified BotPromptSuggestions message. Does not implicitly {@link AICommon.BotPromptSuggestions.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotPromptSuggestions
         * @static
         * @param {AICommon.IBotPromptSuggestions} message BotPromptSuggestions message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotPromptSuggestions.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.suggestions != null && message.suggestions.length)
                for (var i = 0; i < message.suggestions.length; ++i)
                    $root.AICommon.BotPromptSuggestion.encode(message.suggestions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified BotPromptSuggestions message, length delimited. Does not implicitly {@link AICommon.BotPromptSuggestions.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotPromptSuggestions
         * @static
         * @param {AICommon.IBotPromptSuggestions} message BotPromptSuggestions message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotPromptSuggestions.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotPromptSuggestions message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotPromptSuggestions
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotPromptSuggestions} BotPromptSuggestions
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotPromptSuggestions.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.AICommon.BotPromptSuggestions();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        if (!(message.suggestions && message.suggestions.length))
                            message.suggestions = [];
                        message.suggestions.push($root.AICommon.BotPromptSuggestion.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotPromptSuggestions message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotPromptSuggestions
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotPromptSuggestions} BotPromptSuggestions
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotPromptSuggestions.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotPromptSuggestions message.
         * @function verify
         * @memberof AICommon.BotPromptSuggestions
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotPromptSuggestions.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.suggestions != null && message.hasOwnProperty("suggestions")) {
                if (!Array.isArray(message.suggestions))
                    return "suggestions: array expected";
                for (var i = 0; i < message.suggestions.length; ++i) {
                    var error = $root.AICommon.BotPromptSuggestion.verify(message.suggestions[i]);
                    if (error)
                        return "suggestions." + error;
                }
            }
            return null;
        };

        /**
         * Creates a BotPromptSuggestions message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotPromptSuggestions
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotPromptSuggestions} BotPromptSuggestions
         */
        BotPromptSuggestions.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotPromptSuggestions)
                return object;
            var message = new $root.AICommon.BotPromptSuggestions();
            if (object.suggestions) {
                if (!Array.isArray(object.suggestions))
                    throw TypeError(".AICommon.BotPromptSuggestions.suggestions: array expected");
                message.suggestions = [];
                for (var i = 0; i < object.suggestions.length; ++i) {
                    if (typeof object.suggestions[i] !== "object")
                        throw TypeError(".AICommon.BotPromptSuggestions.suggestions: object expected");
                    message.suggestions[i] = $root.AICommon.BotPromptSuggestion.fromObject(object.suggestions[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a BotPromptSuggestions message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotPromptSuggestions
         * @static
         * @param {AICommon.BotPromptSuggestions} message BotPromptSuggestions
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotPromptSuggestions.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.suggestions = [];
            if (message.suggestions && message.suggestions.length) {
                object.suggestions = [];
                for (var j = 0; j < message.suggestions.length; ++j)
                    object.suggestions[j] = $root.AICommon.BotPromptSuggestion.toObject(message.suggestions[j], options);
            }
            return object;
        };

        /**
         * Converts this BotPromptSuggestions to JSON.
         * @function toJSON
         * @memberof AICommon.BotPromptSuggestions
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotPromptSuggestions.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotPromptSuggestions
         * @function getTypeUrl
         * @memberof AICommon.BotPromptSuggestions
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotPromptSuggestions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotPromptSuggestions";
        };

        return BotPromptSuggestions;
    })();

    AICommon.BotSuggestedPromptMetadata = (function() {

        /**
         * Properties of a BotSuggestedPromptMetadata.
         * @memberof AICommon
         * @interface IBotSuggestedPromptMetadata
         * @property {Array.<string>|null} [suggestedPrompts] BotSuggestedPromptMetadata suggestedPrompts
         * @property {number|null} [selectedPromptIndex] BotSuggestedPromptMetadata selectedPromptIndex
         * @property {AICommon.IBotPromptSuggestions|null} [promptSuggestions] BotSuggestedPromptMetadata promptSuggestions
         * @property {string|null} [selectedPromptId] BotSuggestedPromptMetadata selectedPromptId
         */

        /**
         * Constructs a new BotSuggestedPromptMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotSuggestedPromptMetadata.
         * @implements IBotSuggestedPromptMetadata
         * @constructor
         * @param {AICommon.IBotSuggestedPromptMetadata=} [properties] Properties to set
         */
        function BotSuggestedPromptMetadata(properties) {
            this.suggestedPrompts = [];
            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]];
        }

        /**
         * BotSuggestedPromptMetadata suggestedPrompts.
         * @member {Array.<string>} suggestedPrompts
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @instance
         */
        BotSuggestedPromptMetadata.prototype.suggestedPrompts = $util.emptyArray;

        /**
         * BotSuggestedPromptMetadata selectedPromptIndex.
         * @member {number|null|undefined} selectedPromptIndex
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @instance
         */
        BotSuggestedPromptMetadata.prototype.selectedPromptIndex = null;

        /**
         * BotSuggestedPromptMetadata promptSuggestions.
         * @member {AICommon.IBotPromptSuggestions|null|undefined} promptSuggestions
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @instance
         */
        BotSuggestedPromptMetadata.prototype.promptSuggestions = null;

        /**
         * BotSuggestedPromptMetadata selectedPromptId.
         * @member {string|null|undefined} selectedPromptId
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @instance
         */
        BotSuggestedPromptMetadata.prototype.selectedPromptId = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotSuggestedPromptMetadata _selectedPromptIndex.
         * @member {"selectedPromptIndex"|undefined} _selectedPromptIndex
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @instance
         */
        Object.defineProperty(BotSuggestedPromptMetadata.prototype, "_selectedPromptIndex", {
            get: $util.oneOfGetter($oneOfFields = ["selectedPromptIndex"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotSuggestedPromptMetadata _promptSuggestions.
         * @member {"promptSuggestions"|undefined} _promptSuggestions
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @instance
         */
        Object.defineProperty(BotSuggestedPromptMetadata.prototype, "_promptSuggestions", {
            get: $util.oneOfGetter($oneOfFields = ["promptSuggestions"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotSuggestedPromptMetadata _selectedPromptId.
         * @member {"selectedPromptId"|undefined} _selectedPromptId
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @instance
         */
        Object.defineProperty(BotSuggestedPromptMetadata.prototype, "_selectedPromptId", {
            get: $util.oneOfGetter($oneOfFields = ["selectedPromptId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotSuggestedPromptMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @static
         * @param {AICommon.IBotSuggestedPromptMetadata=} [properties] Properties to set
         * @returns {AICommon.BotSuggestedPromptMetadata} BotSuggestedPromptMetadata instance
         */
        BotSuggestedPromptMetadata.create = function create(properties) {
            return new BotSuggestedPromptMetadata(properties);
        };

        /**
         * Encodes the specified BotSuggestedPromptMetadata message. Does not implicitly {@link AICommon.BotSuggestedPromptMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @static
         * @param {AICommon.IBotSuggestedPromptMetadata} message BotSuggestedPromptMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotSuggestedPromptMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.suggestedPrompts != null && message.suggestedPrompts.length)
                for (var i = 0; i < message.suggestedPrompts.length; ++i)
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.suggestedPrompts[i]);
            if (message.selectedPromptIndex != null && Object.hasOwnProperty.call(message, "selectedPromptIndex"))
                writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.selectedPromptIndex);
            if (message.promptSuggestions != null && Object.hasOwnProperty.call(message, "promptSuggestions"))
                $root.AICommon.BotPromptSuggestions.encode(message.promptSuggestions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.selectedPromptId != null && Object.hasOwnProperty.call(message, "selectedPromptId"))
                writer.uint32(/* id 4, wireType 2 =*/34).string(message.selectedPromptId);
            return writer;
        };

        /**
         * Encodes the specified BotSuggestedPromptMetadata message, length delimited. Does not implicitly {@link AICommon.BotSuggestedPromptMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @static
         * @param {AICommon.IBotSuggestedPromptMetadata} message BotSuggestedPromptMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotSuggestedPromptMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotSuggestedPromptMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotSuggestedPromptMetadata} BotSuggestedPromptMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotSuggestedPromptMetadata.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.AICommon.BotSuggestedPromptMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        if (!(message.suggestedPrompts && message.suggestedPrompts.length))
                            message.suggestedPrompts = [];
                        message.suggestedPrompts.push(reader.string());
                        break;
                    }
                case 2: {
                        message.selectedPromptIndex = reader.uint32();
                        break;
                    }
                case 3: {
                        message.promptSuggestions = $root.AICommon.BotPromptSuggestions.decode(reader, reader.uint32());
                        break;
                    }
                case 4: {
                        message.selectedPromptId = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotSuggestedPromptMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotSuggestedPromptMetadata} BotSuggestedPromptMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotSuggestedPromptMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotSuggestedPromptMetadata message.
         * @function verify
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotSuggestedPromptMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.suggestedPrompts != null && message.hasOwnProperty("suggestedPrompts")) {
                if (!Array.isArray(message.suggestedPrompts))
                    return "suggestedPrompts: array expected";
                for (var i = 0; i < message.suggestedPrompts.length; ++i)
                    if (!$util.isString(message.suggestedPrompts[i]))
                        return "suggestedPrompts: string[] expected";
            }
            if (message.selectedPromptIndex != null && message.hasOwnProperty("selectedPromptIndex")) {
                properties._selectedPromptIndex = 1;
                if (!$util.isInteger(message.selectedPromptIndex))
                    return "selectedPromptIndex: integer expected";
            }
            if (message.promptSuggestions != null && message.hasOwnProperty("promptSuggestions")) {
                properties._promptSuggestions = 1;
                {
                    var error = $root.AICommon.BotPromptSuggestions.verify(message.promptSuggestions);
                    if (error)
                        return "promptSuggestions." + error;
                }
            }
            if (message.selectedPromptId != null && message.hasOwnProperty("selectedPromptId")) {
                properties._selectedPromptId = 1;
                if (!$util.isString(message.selectedPromptId))
                    return "selectedPromptId: string expected";
            }
            return null;
        };

        /**
         * Creates a BotSuggestedPromptMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotSuggestedPromptMetadata} BotSuggestedPromptMetadata
         */
        BotSuggestedPromptMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotSuggestedPromptMetadata)
                return object;
            var message = new $root.AICommon.BotSuggestedPromptMetadata();
            if (object.suggestedPrompts) {
                if (!Array.isArray(object.suggestedPrompts))
                    throw TypeError(".AICommon.BotSuggestedPromptMetadata.suggestedPrompts: array expected");
                message.suggestedPrompts = [];
                for (var i = 0; i < object.suggestedPrompts.length; ++i)
                    message.suggestedPrompts[i] = String(object.suggestedPrompts[i]);
            }
            if (object.selectedPromptIndex != null)
                message.selectedPromptIndex = object.selectedPromptIndex >>> 0;
            if (object.promptSuggestions != null) {
                if (typeof object.promptSuggestions !== "object")
                    throw TypeError(".AICommon.BotSuggestedPromptMetadata.promptSuggestions: object expected");
                message.promptSuggestions = $root.AICommon.BotPromptSuggestions.fromObject(object.promptSuggestions);
            }
            if (object.selectedPromptId != null)
                message.selectedPromptId = String(object.selectedPromptId);
            return message;
        };

        /**
         * Creates a plain object from a BotSuggestedPromptMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @static
         * @param {AICommon.BotSuggestedPromptMetadata} message BotSuggestedPromptMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotSuggestedPromptMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.suggestedPrompts = [];
            if (message.suggestedPrompts && message.suggestedPrompts.length) {
                object.suggestedPrompts = [];
                for (var j = 0; j < message.suggestedPrompts.length; ++j)
                    object.suggestedPrompts[j] = message.suggestedPrompts[j];
            }
            if (message.selectedPromptIndex != null && message.hasOwnProperty("selectedPromptIndex")) {
                object.selectedPromptIndex = message.selectedPromptIndex;
                if (options.oneofs)
                    object._selectedPromptIndex = "selectedPromptIndex";
            }
            if (message.promptSuggestions != null && message.hasOwnProperty("promptSuggestions")) {
                object.promptSuggestions = $root.AICommon.BotPromptSuggestions.toObject(message.promptSuggestions, options);
                if (options.oneofs)
                    object._promptSuggestions = "promptSuggestions";
            }
            if (message.selectedPromptId != null && message.hasOwnProperty("selectedPromptId")) {
                object.selectedPromptId = message.selectedPromptId;
                if (options.oneofs)
                    object._selectedPromptId = "selectedPromptId";
            }
            return object;
        };

        /**
         * Converts this BotSuggestedPromptMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotSuggestedPromptMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotSuggestedPromptMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotSuggestedPromptMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotSuggestedPromptMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotSuggestedPromptMetadata";
        };

        return BotSuggestedPromptMetadata;
    })();

    AICommon.BotPluginMetadata = (function() {

        /**
         * Properties of a BotPluginMetadata.
         * @memberof AICommon
         * @interface IBotPluginMetadata
         * @property {AICommon.BotPluginMetadata.SearchProvider|null} [provider] BotPluginMetadata provider
         * @property {AICommon.BotPluginMetadata.PluginType|null} [pluginType] BotPluginMetadata pluginType
         * @property {string|null} [thumbnailCdnUrl] BotPluginMetadata thumbnailCdnUrl
         * @property {string|null} [profilePhotoCdnUrl] BotPluginMetadata profilePhotoCdnUrl
         * @property {string|null} [searchProviderUrl] BotPluginMetadata searchProviderUrl
         * @property {number|null} [referenceIndex] BotPluginMetadata referenceIndex
         * @property {number|null} [expectedLinksCount] BotPluginMetadata expectedLinksCount
         * @property {string|null} [searchQuery] BotPluginMetadata searchQuery
         * @property {Protocol.IMessageKey|null} [parentPluginMessageKey] BotPluginMetadata parentPluginMessageKey
         * @property {AICommon.BotPluginMetadata.PluginType|null} [deprecatedField] BotPluginMetadata deprecatedField
         * @property {AICommon.BotPluginMetadata.PluginType|null} [parentPluginType] BotPluginMetadata parentPluginType
         * @property {string|null} [faviconCdnUrl] BotPluginMetadata faviconCdnUrl
         */

        /**
         * Constructs a new BotPluginMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotPluginMetadata.
         * @implements IBotPluginMetadata
         * @constructor
         * @param {AICommon.IBotPluginMetadata=} [properties] Properties to set
         */
        function BotPluginMetadata(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]];
        }

        /**
         * BotPluginMetadata provider.
         * @member {AICommon.BotPluginMetadata.SearchProvider|null|undefined} provider
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.provider = null;

        /**
         * BotPluginMetadata pluginType.
         * @member {AICommon.BotPluginMetadata.PluginType|null|undefined} pluginType
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.pluginType = null;

        /**
         * BotPluginMetadata thumbnailCdnUrl.
         * @member {string|null|undefined} thumbnailCdnUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.thumbnailCdnUrl = null;

        /**
         * BotPluginMetadata profilePhotoCdnUrl.
         * @member {string|null|undefined} profilePhotoCdnUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.profilePhotoCdnUrl = null;

        /**
         * BotPluginMetadata searchProviderUrl.
         * @member {string|null|undefined} searchProviderUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.searchProviderUrl = null;

        /**
         * BotPluginMetadata referenceIndex.
         * @member {number|null|undefined} referenceIndex
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.referenceIndex = null;

        /**
         * BotPluginMetadata expectedLinksCount.
         * @member {number|null|undefined} expectedLinksCount
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.expectedLinksCount = null;

        /**
         * BotPluginMetadata searchQuery.
         * @member {string|null|undefined} searchQuery
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.searchQuery = null;

        /**
         * BotPluginMetadata parentPluginMessageKey.
         * @member {Protocol.IMessageKey|null|undefined} parentPluginMessageKey
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.parentPluginMessageKey = null;

        /**
         * BotPluginMetadata deprecatedField.
         * @member {AICommon.BotPluginMetadata.PluginType|null|undefined} deprecatedField
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.deprecatedField = null;

        /**
         * BotPluginMetadata parentPluginType.
         * @member {AICommon.BotPluginMetadata.PluginType|null|undefined} parentPluginType
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.parentPluginType = null;

        /**
         * BotPluginMetadata faviconCdnUrl.
         * @member {string|null|undefined} faviconCdnUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        BotPluginMetadata.prototype.faviconCdnUrl = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotPluginMetadata _provider.
         * @member {"provider"|undefined} _provider
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_provider", {
            get: $util.oneOfGetter($oneOfFields = ["provider"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _pluginType.
         * @member {"pluginType"|undefined} _pluginType
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_pluginType", {
            get: $util.oneOfGetter($oneOfFields = ["pluginType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _thumbnailCdnUrl.
         * @member {"thumbnailCdnUrl"|undefined} _thumbnailCdnUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_thumbnailCdnUrl", {
            get: $util.oneOfGetter($oneOfFields = ["thumbnailCdnUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _profilePhotoCdnUrl.
         * @member {"profilePhotoCdnUrl"|undefined} _profilePhotoCdnUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_profilePhotoCdnUrl", {
            get: $util.oneOfGetter($oneOfFields = ["profilePhotoCdnUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _searchProviderUrl.
         * @member {"searchProviderUrl"|undefined} _searchProviderUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_searchProviderUrl", {
            get: $util.oneOfGetter($oneOfFields = ["searchProviderUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _referenceIndex.
         * @member {"referenceIndex"|undefined} _referenceIndex
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_referenceIndex", {
            get: $util.oneOfGetter($oneOfFields = ["referenceIndex"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _expectedLinksCount.
         * @member {"expectedLinksCount"|undefined} _expectedLinksCount
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_expectedLinksCount", {
            get: $util.oneOfGetter($oneOfFields = ["expectedLinksCount"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _searchQuery.
         * @member {"searchQuery"|undefined} _searchQuery
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_searchQuery", {
            get: $util.oneOfGetter($oneOfFields = ["searchQuery"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _parentPluginMessageKey.
         * @member {"parentPluginMessageKey"|undefined} _parentPluginMessageKey
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_parentPluginMessageKey", {
            get: $util.oneOfGetter($oneOfFields = ["parentPluginMessageKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _deprecatedField.
         * @member {"deprecatedField"|undefined} _deprecatedField
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_deprecatedField", {
            get: $util.oneOfGetter($oneOfFields = ["deprecatedField"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _parentPluginType.
         * @member {"parentPluginType"|undefined} _parentPluginType
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_parentPluginType", {
            get: $util.oneOfGetter($oneOfFields = ["parentPluginType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotPluginMetadata _faviconCdnUrl.
         * @member {"faviconCdnUrl"|undefined} _faviconCdnUrl
         * @memberof AICommon.BotPluginMetadata
         * @instance
         */
        Object.defineProperty(BotPluginMetadata.prototype, "_faviconCdnUrl", {
            get: $util.oneOfGetter($oneOfFields = ["faviconCdnUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotPluginMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotPluginMetadata
         * @static
         * @param {AICommon.IBotPluginMetadata=} [properties] Properties to set
         * @returns {AICommon.BotPluginMetadata} BotPluginMetadata instance
         */
        BotPluginMetadata.create = function create(properties) {
            return new BotPluginMetadata(properties);
        };

        /**
         * Encodes the specified BotPluginMetadata message. Does not implicitly {@link AICommon.BotPluginMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotPluginMetadata
         * @static
         * @param {AICommon.IBotPluginMetadata} message BotPluginMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotPluginMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.provider != null && Object.hasOwnProperty.call(message, "provider"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.provider);
            if (message.pluginType != null && Object.hasOwnProperty.call(message, "pluginType"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pluginType);
            if (message.thumbnailCdnUrl != null && Object.hasOwnProperty.call(message, "thumbnailCdnUrl"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.thumbnailCdnUrl);
            if (message.profilePhotoCdnUrl != null && Object.hasOwnProperty.call(message, "profilePhotoCdnUrl"))
                writer.uint32(/* id 4, wireType 2 =*/34).string(message.profilePhotoCdnUrl);
            if (message.searchProviderUrl != null && Object.hasOwnProperty.call(message, "searchProviderUrl"))
                writer.uint32(/* id 5, wireType 2 =*/42).string(message.searchProviderUrl);
            if (message.referenceIndex != null && Object.hasOwnProperty.call(message, "referenceIndex"))
                writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.referenceIndex);
            if (message.expectedLinksCount != null && Object.hasOwnProperty.call(message, "expectedLinksCount"))
                writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.expectedLinksCount);
            if (message.searchQuery != null && Object.hasOwnProperty.call(message, "searchQuery"))
                writer.uint32(/* id 9, wireType 2 =*/74).string(message.searchQuery);
            if (message.parentPluginMessageKey != null && Object.hasOwnProperty.call(message, "parentPluginMessageKey"))
                $root.Protocol.MessageKey.encode(message.parentPluginMessageKey, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
            if (message.deprecatedField != null && Object.hasOwnProperty.call(message, "deprecatedField"))
                writer.uint32(/* id 11, wireType 0 =*/88).int32(message.deprecatedField);
            if (message.parentPluginType != null && Object.hasOwnProperty.call(message, "parentPluginType"))
                writer.uint32(/* id 12, wireType 0 =*/96).int32(message.parentPluginType);
            if (message.faviconCdnUrl != null && Object.hasOwnProperty.call(message, "faviconCdnUrl"))
                writer.uint32(/* id 13, wireType 2 =*/106).string(message.faviconCdnUrl);
            return writer;
        };

        /**
         * Encodes the specified BotPluginMetadata message, length delimited. Does not implicitly {@link AICommon.BotPluginMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotPluginMetadata
         * @static
         * @param {AICommon.IBotPluginMetadata} message BotPluginMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotPluginMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotPluginMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotPluginMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotPluginMetadata} BotPluginMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotPluginMetadata.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.AICommon.BotPluginMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.provider = reader.int32();
                        break;
                    }
                case 2: {
                        message.pluginType = reader.int32();
                        break;
                    }
                case 3: {
                        message.thumbnailCdnUrl = reader.string();
                        break;
                    }
                case 4: {
                        message.profilePhotoCdnUrl = reader.string();
                        break;
                    }
                case 5: {
                        message.searchProviderUrl = reader.string();
                        break;
                    }
                case 6: {
                        message.referenceIndex = reader.uint32();
                        break;
                    }
                case 7: {
                        message.expectedLinksCount = reader.uint32();
                        break;
                    }
                case 9: {
                        message.searchQuery = reader.string();
                        break;
                    }
                case 10: {
                        message.parentPluginMessageKey = $root.Protocol.MessageKey.decode(reader, reader.uint32());
                        break;
                    }
                case 11: {
                        message.deprecatedField = reader.int32();
                        break;
                    }
                case 12: {
                        message.parentPluginType = reader.int32();
                        break;
                    }
                case 13: {
                        message.faviconCdnUrl = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotPluginMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotPluginMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotPluginMetadata} BotPluginMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotPluginMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotPluginMetadata message.
         * @function verify
         * @memberof AICommon.BotPluginMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotPluginMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.provider != null && message.hasOwnProperty("provider")) {
                properties._provider = 1;
                switch (message.provider) {
                default:
                    return "provider: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            if (message.pluginType != null && message.hasOwnProperty("pluginType")) {
                properties._pluginType = 1;
                switch (message.pluginType) {
                default:
                    return "pluginType: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            }
            if (message.thumbnailCdnUrl != null && message.hasOwnProperty("thumbnailCdnUrl")) {
                properties._thumbnailCdnUrl = 1;
                if (!$util.isString(message.thumbnailCdnUrl))
                    return "thumbnailCdnUrl: string expected";
            }
            if (message.profilePhotoCdnUrl != null && message.hasOwnProperty("profilePhotoCdnUrl")) {
                properties._profilePhotoCdnUrl = 1;
                if (!$util.isString(message.profilePhotoCdnUrl))
                    return "profilePhotoCdnUrl: string expected";
            }
            if (message.searchProviderUrl != null && message.hasOwnProperty("searchProviderUrl")) {
                properties._searchProviderUrl = 1;
                if (!$util.isString(message.searchProviderUrl))
                    return "searchProviderUrl: string expected";
            }
            if (message.referenceIndex != null && message.hasOwnProperty("referenceIndex")) {
                properties._referenceIndex = 1;
                if (!$util.isInteger(message.referenceIndex))
                    return "referenceIndex: integer expected";
            }
            if (message.expectedLinksCount != null && message.hasOwnProperty("expectedLinksCount")) {
                properties._expectedLinksCount = 1;
                if (!$util.isInteger(message.expectedLinksCount))
                    return "expectedLinksCount: integer expected";
            }
            if (message.searchQuery != null && message.hasOwnProperty("searchQuery")) {
                properties._searchQuery = 1;
                if (!$util.isString(message.searchQuery))
                    return "searchQuery: string expected";
            }
            if (message.parentPluginMessageKey != null && message.hasOwnProperty("parentPluginMessageKey")) {
                properties._parentPluginMessageKey = 1;
                {
                    var error = $root.Protocol.MessageKey.verify(message.parentPluginMessageKey);
                    if (error)
                        return "parentPluginMessageKey." + error;
                }
            }
            if (message.deprecatedField != null && message.hasOwnProperty("deprecatedField")) {
                properties._deprecatedField = 1;
                switch (message.deprecatedField) {
                default:
                    return "deprecatedField: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            }
            if (message.parentPluginType != null && message.hasOwnProperty("parentPluginType")) {
                properties._parentPluginType = 1;
                switch (message.parentPluginType) {
                default:
                    return "parentPluginType: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            }
            if (message.faviconCdnUrl != null && message.hasOwnProperty("faviconCdnUrl")) {
                properties._faviconCdnUrl = 1;
                if (!$util.isString(message.faviconCdnUrl))
                    return "faviconCdnUrl: string expected";
            }
            return null;
        };

        /**
         * Creates a BotPluginMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotPluginMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotPluginMetadata} BotPluginMetadata
         */
        BotPluginMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotPluginMetadata)
                return object;
            var message = new $root.AICommon.BotPluginMetadata();
            switch (object.provider) {
            default:
                if (typeof object.provider === "number") {
                    message.provider = object.provider;
                    break;
                }
                break;
            case "UNKNOWN":
            case 0:
                message.provider = 0;
                break;
            case "BING":
            case 1:
                message.provider = 1;
                break;
            case "GOOGLE":
            case 2:
                message.provider = 2;
                break;
            case "SUPPORT":
            case 3:
                message.provider = 3;
                break;
            }
            switch (object.pluginType) {
            default:
                if (typeof object.pluginType === "number") {
                    message.pluginType = object.pluginType;
                    break;
                }
                break;
            case "UNKNOWN_PLUGIN":
            case 0:
                message.pluginType = 0;
                break;
            case "REELS":
            case 1:
                message.pluginType = 1;
                break;
            case "SEARCH":
            case 2:
                message.pluginType = 2;
                break;
            }
            if (object.thumbnailCdnUrl != null)
                message.thumbnailCdnUrl = String(object.thumbnailCdnUrl);
            if (object.profilePhotoCdnUrl != null)
                message.profilePhotoCdnUrl = String(object.profilePhotoCdnUrl);
            if (object.searchProviderUrl != null)
                message.searchProviderUrl = String(object.searchProviderUrl);
            if (object.referenceIndex != null)
                message.referenceIndex = object.referenceIndex >>> 0;
            if (object.expectedLinksCount != null)
                message.expectedLinksCount = object.expectedLinksCount >>> 0;
            if (object.searchQuery != null)
                message.searchQuery = String(object.searchQuery);
            if (object.parentPluginMessageKey != null) {
                if (typeof object.parentPluginMessageKey !== "object")
                    throw TypeError(".AICommon.BotPluginMetadata.parentPluginMessageKey: object expected");
                message.parentPluginMessageKey = $root.Protocol.MessageKey.fromObject(object.parentPluginMessageKey);
            }
            switch (object.deprecatedField) {
            default:
                if (typeof object.deprecatedField === "number") {
                    message.deprecatedField = object.deprecatedField;
                    break;
                }
                break;
            case "UNKNOWN_PLUGIN":
            case 0:
                message.deprecatedField = 0;
                break;
            case "REELS":
            case 1:
                message.deprecatedField = 1;
                break;
            case "SEARCH":
            case 2:
                message.deprecatedField = 2;
                break;
            }
            switch (object.parentPluginType) {
            default:
                if (typeof object.parentPluginType === "number") {
                    message.parentPluginType = object.parentPluginType;
                    break;
                }
                break;
            case "UNKNOWN_PLUGIN":
            case 0:
                message.parentPluginType = 0;
                break;
            case "REELS":
            case 1:
                message.parentPluginType = 1;
                break;
            case "SEARCH":
            case 2:
                message.parentPluginType = 2;
                break;
            }
            if (object.faviconCdnUrl != null)
                message.faviconCdnUrl = String(object.faviconCdnUrl);
            return message;
        };

        /**
         * Creates a plain object from a BotPluginMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotPluginMetadata
         * @static
         * @param {AICommon.BotPluginMetadata} message BotPluginMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotPluginMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.provider != null && message.hasOwnProperty("provider")) {
                object.provider = options.enums === String ? $root.AICommon.BotPluginMetadata.SearchProvider[message.provider] === undefined ? message.provider : $root.AICommon.BotPluginMetadata.SearchProvider[message.provider] : message.provider;
                if (options.oneofs)
                    object._provider = "provider";
            }
            if (message.pluginType != null && message.hasOwnProperty("pluginType")) {
                object.pluginType = options.enums === String ? $root.AICommon.BotPluginMetadata.PluginType[message.pluginType] === undefined ? message.pluginType : $root.AICommon.BotPluginMetadata.PluginType[message.pluginType] : message.pluginType;
                if (options.oneofs)
                    object._pluginType = "pluginType";
            }
            if (message.thumbnailCdnUrl != null && message.hasOwnProperty("thumbnailCdnUrl")) {
                object.thumbnailCdnUrl = message.thumbnailCdnUrl;
                if (options.oneofs)
                    object._thumbnailCdnUrl = "thumbnailCdnUrl";
            }
            if (message.profilePhotoCdnUrl != null && message.hasOwnProperty("profilePhotoCdnUrl")) {
                object.profilePhotoCdnUrl = message.profilePhotoCdnUrl;
                if (options.oneofs)
                    object._profilePhotoCdnUrl = "profilePhotoCdnUrl";
            }
            if (message.searchProviderUrl != null && message.hasOwnProperty("searchProviderUrl")) {
                object.searchProviderUrl = message.searchProviderUrl;
                if (options.oneofs)
                    object._searchProviderUrl = "searchProviderUrl";
            }
            if (message.referenceIndex != null && message.hasOwnProperty("referenceIndex")) {
                object.referenceIndex = message.referenceIndex;
                if (options.oneofs)
                    object._referenceIndex = "referenceIndex";
            }
            if (message.expectedLinksCount != null && message.hasOwnProperty("expectedLinksCount")) {
                object.expectedLinksCount = message.expectedLinksCount;
                if (options.oneofs)
                    object._expectedLinksCount = "expectedLinksCount";
            }
            if (message.searchQuery != null && message.hasOwnProperty("searchQuery")) {
                object.searchQuery = message.searchQuery;
                if (options.oneofs)
                    object._searchQuery = "searchQuery";
            }
            if (message.parentPluginMessageKey != null && message.hasOwnProperty("parentPluginMessageKey")) {
                object.parentPluginMessageKey = $root.Protocol.MessageKey.toObject(message.parentPluginMessageKey, options);
                if (options.oneofs)
                    object._parentPluginMessageKey = "parentPluginMessageKey";
            }
            if (message.deprecatedField != null && message.hasOwnProperty("deprecatedField")) {
                object.deprecatedField = options.enums === String ? $root.AICommon.BotPluginMetadata.PluginType[message.deprecatedField] === undefined ? message.deprecatedField : $root.AICommon.BotPluginMetadata.PluginType[message.deprecatedField] : message.deprecatedField;
                if (options.oneofs)
                    object._deprecatedField = "deprecatedField";
            }
            if (message.parentPluginType != null && message.hasOwnProperty("parentPluginType")) {
                object.parentPluginType = options.enums === String ? $root.AICommon.BotPluginMetadata.PluginType[message.parentPluginType] === undefined ? message.parentPluginType : $root.AICommon.BotPluginMetadata.PluginType[message.parentPluginType] : message.parentPluginType;
                if (options.oneofs)
                    object._parentPluginType = "parentPluginType";
            }
            if (message.faviconCdnUrl != null && message.hasOwnProperty("faviconCdnUrl")) {
                object.faviconCdnUrl = message.faviconCdnUrl;
                if (options.oneofs)
                    object._faviconCdnUrl = "faviconCdnUrl";
            }
            return object;
        };

        /**
         * Converts this BotPluginMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotPluginMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotPluginMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotPluginMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotPluginMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotPluginMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotPluginMetadata";
        };

        /**
         * PluginType enum.
         * @name AICommon.BotPluginMetadata.PluginType
         * @enum {number}
         * @property {number} UNKNOWN_PLUGIN=0 UNKNOWN_PLUGIN value
         * @property {number} REELS=1 REELS value
         * @property {number} SEARCH=2 SEARCH value
         */
        BotPluginMetadata.PluginType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN_PLUGIN"] = 0;
            values[valuesById[1] = "REELS"] = 1;
            values[valuesById[2] = "SEARCH"] = 2;
            return values;
        })();

        /**
         * SearchProvider enum.
         * @name AICommon.BotPluginMetadata.SearchProvider
         * @enum {number}
         * @property {number} UNKNOWN=0 UNKNOWN value
         * @property {number} BING=1 BING value
         * @property {number} GOOGLE=2 GOOGLE value
         * @property {number} SUPPORT=3 SUPPORT value
         */
        BotPluginMetadata.SearchProvider = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "BING"] = 1;
            values[valuesById[2] = "GOOGLE"] = 2;
            values[valuesById[3] = "SUPPORT"] = 3;
            return values;
        })();

        return BotPluginMetadata;
    })();

    AICommon.BotAvatarMetadata = (function() {

        /**
         * Properties of a BotAvatarMetadata.
         * @memberof AICommon
         * @interface IBotAvatarMetadata
         * @property {number|null} [sentiment] BotAvatarMetadata sentiment
         * @property {string|null} [behaviorGraph] BotAvatarMetadata behaviorGraph
         * @property {number|null} [action] BotAvatarMetadata action
         * @property {number|null} [intensity] BotAvatarMetadata intensity
         * @property {number|null} [wordCount] BotAvatarMetadata wordCount
         */

        /**
         * Constructs a new BotAvatarMetadata.
         * @memberof AICommon
         * @classdesc Represents a BotAvatarMetadata.
         * @implements IBotAvatarMetadata
         * @constructor
         * @param {AICommon.IBotAvatarMetadata=} [properties] Properties to set
         */
        function BotAvatarMetadata(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]];
        }

        /**
         * BotAvatarMetadata sentiment.
         * @member {number|null|undefined} sentiment
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.sentiment = null;

        /**
         * BotAvatarMetadata behaviorGraph.
         * @member {string|null|undefined} behaviorGraph
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.behaviorGraph = null;

        /**
         * BotAvatarMetadata action.
         * @member {number|null|undefined} action
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.action = null;

        /**
         * BotAvatarMetadata intensity.
         * @member {number|null|undefined} intensity
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.intensity = null;

        /**
         * BotAvatarMetadata wordCount.
         * @member {number|null|undefined} wordCount
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        BotAvatarMetadata.prototype.wordCount = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * BotAvatarMetadata _sentiment.
         * @member {"sentiment"|undefined} _sentiment
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        Object.defineProperty(BotAvatarMetadata.prototype, "_sentiment", {
            get: $util.oneOfGetter($oneOfFields = ["sentiment"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotAvatarMetadata _behaviorGraph.
         * @member {"behaviorGraph"|undefined} _behaviorGraph
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        Object.defineProperty(BotAvatarMetadata.prototype, "_behaviorGraph", {
            get: $util.oneOfGetter($oneOfFields = ["behaviorGraph"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotAvatarMetadata _action.
         * @member {"action"|undefined} _action
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        Object.defineProperty(BotAvatarMetadata.prototype, "_action", {
            get: $util.oneOfGetter($oneOfFields = ["action"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotAvatarMetadata _intensity.
         * @member {"intensity"|undefined} _intensity
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        Object.defineProperty(BotAvatarMetadata.prototype, "_intensity", {
            get: $util.oneOfGetter($oneOfFields = ["intensity"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * BotAvatarMetadata _wordCount.
         * @member {"wordCount"|undefined} _wordCount
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         */
        Object.defineProperty(BotAvatarMetadata.prototype, "_wordCount", {
            get: $util.oneOfGetter($oneOfFields = ["wordCount"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new BotAvatarMetadata instance using the specified properties.
         * @function create
         * @memberof AICommon.BotAvatarMetadata
         * @static
         * @param {AICommon.IBotAvatarMetadata=} [properties] Properties to set
         * @returns {AICommon.BotAvatarMetadata} BotAvatarMetadata instance
         */
        BotAvatarMetadata.create = function create(properties) {
            return new BotAvatarMetadata(properties);
        };

        /**
         * Encodes the specified BotAvatarMetadata message. Does not implicitly {@link AICommon.BotAvatarMetadata.verify|verify} messages.
         * @function encode
         * @memberof AICommon.BotAvatarMetadata
         * @static
         * @param {AICommon.IBotAvatarMetadata} message BotAvatarMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotAvatarMetadata.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment"))
                writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.sentiment);
            if (message.behaviorGraph != null && Object.hasOwnProperty.call(message, "behaviorGraph"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.behaviorGraph);
            if (message.action != null && Object.hasOwnProperty.call(message, "action"))
                writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.action);
            if (message.intensity != null && Object.hasOwnProperty.call(message, "intensity"))
                writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.intensity);
            if (message.wordCount != null && Object.hasOwnProperty.call(message, "wordCount"))
                writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.wordCount);
            return writer;
        };

        /**
         * Encodes the specified BotAvatarMetadata message, length delimited. Does not implicitly {@link AICommon.BotAvatarMetadata.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICommon.BotAvatarMetadata
         * @static
         * @param {AICommon.IBotAvatarMetadata} message BotAvatarMetadata message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BotAvatarMetadata.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BotAvatarMetadata message from the specified reader or buffer.
         * @function decode
         * @memberof AICommon.BotAvatarMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICommon.BotAvatarMetadata} BotAvatarMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotAvatarMetadata.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.AICommon.BotAvatarMetadata();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.sentiment = reader.uint32();
                        break;
                    }
                case 2: {
                        message.behaviorGraph = reader.string();
                        break;
                    }
                case 3: {
                        message.action = reader.uint32();
                        break;
                    }
                case 4: {
                        message.intensity = reader.uint32();
                        break;
                    }
                case 5: {
                        message.wordCount = reader.uint32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BotAvatarMetadata message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICommon.BotAvatarMetadata
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICommon.BotAvatarMetadata} BotAvatarMetadata
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BotAvatarMetadata.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BotAvatarMetadata message.
         * @function verify
         * @memberof AICommon.BotAvatarMetadata
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BotAvatarMetadata.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.sentiment != null && message.hasOwnProperty("sentiment")) {
                properties._sentiment = 1;
                if (!$util.isInteger(message.sentiment))
                    return "sentiment: integer expected";
            }
            if (message.behaviorGraph != null && message.hasOwnProperty("behaviorGraph")) {
                properties._behaviorGraph = 1;
                if (!$util.isString(message.behaviorGraph))
                    return "behaviorGraph: string expected";
            }
            if (message.action != null && message.hasOwnProperty("action")) {
                properties._action = 1;
                if (!$util.isInteger(message.action))
                    return "action: integer expected";
            }
            if (message.intensity != null && message.hasOwnProperty("intensity")) {
                properties._intensity = 1;
                if (!$util.isInteger(message.intensity))
                    return "intensity: integer expected";
            }
            if (message.wordCount != null && message.hasOwnProperty("wordCount")) {
                properties._wordCount = 1;
                if (!$util.isInteger(message.wordCount))
                    return "wordCount: integer expected";
            }
            return null;
        };

        /**
         * Creates a BotAvatarMetadata message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICommon.BotAvatarMetadata
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICommon.BotAvatarMetadata} BotAvatarMetadata
         */
        BotAvatarMetadata.fromObject = function fromObject(object) {
            if (object instanceof $root.AICommon.BotAvatarMetadata)
                return object;
            var message = new $root.AICommon.BotAvatarMetadata();
            if (object.sentiment != null)
                message.sentiment = object.sentiment >>> 0;
            if (object.behaviorGraph != null)
                message.behaviorGraph = String(object.behaviorGraph);
            if (object.action != null)
                message.action = object.action >>> 0;
            if (object.intensity != null)
                message.intensity = object.intensity >>> 0;
            if (object.wordCount != null)
                message.wordCount = object.wordCount >>> 0;
            return message;
        };

        /**
         * Creates a plain object from a BotAvatarMetadata message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICommon.BotAvatarMetadata
         * @static
         * @param {AICommon.BotAvatarMetadata} message BotAvatarMetadata
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BotAvatarMetadata.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.sentiment != null && message.hasOwnProperty("sentiment")) {
                object.sentiment = message.sentiment;
                if (options.oneofs)
                    object._sentiment = "sentiment";
            }
            if (message.behaviorGraph != null && message.hasOwnProperty("behaviorGraph")) {
                object.behaviorGraph = message.behaviorGraph;
                if (options.oneofs)
                    object._behaviorGraph = "behaviorGraph";
            }
            if (message.action != null && message.hasOwnProperty("action")) {
                object.action = message.action;
                if (options.oneofs)
                    object._action = "action";
            }
            if (message.intensity != null && message.hasOwnProperty("intensity")) {
                object.intensity = message.intensity;
                if (options.oneofs)
                    object._intensity = "intensity";
            }
            if (message.wordCount != null && message.hasOwnProperty("wordCount")) {
                object.wordCount = message.wordCount;
                if (options.oneofs)
                    object._wordCount = "wordCount";
            }
            return object;
        };

        /**
         * Converts this BotAvatarMetadata to JSON.
         * @function toJSON
         * @memberof AICommon.BotAvatarMetadata
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BotAvatarMetadata.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BotAvatarMetadata
         * @function getTypeUrl
         * @memberof AICommon.BotAvatarMetadata
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BotAvatarMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICommon.BotAvatarMetadata";
        };

        return BotAvatarMetadata;
    })();

    /**
     * SessionTransparencyType enum.
     * @name AICommon.SessionTransparencyType
     * @enum {number}
     * @property {number} UNKNOWN_TYPE=0 UNKNOWN_TYPE value
     * @property {number} NY_AI_SAFETY_DISCLAIMER=1 NY_AI_SAFETY_DISCLAIMER value
     */
    AICommon.SessionTransparencyType = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "UNKNOWN_TYPE"] = 0;
        values[valuesById[1] = "NY_AI_SAFETY_DISCLAIMER"] = 1;
        return values;
    })();

    /**
     * AIRichResponseSubMessageType enum.
     * @name AICommon.AIRichResponseSubMessageType
     * @enum {number}
     * @property {number} AI_RICH_RESPONSE_UNKNOWN=0 AI_RICH_RESPONSE_UNKNOWN value
     * @property {number} AI_RICH_RESPONSE_GRID_IMAGE=1 AI_RICH_RESPONSE_GRID_IMAGE value
     * @property {number} AI_RICH_RESPONSE_TEXT=2 AI_RICH_RESPONSE_TEXT value
     * @property {number} AI_RICH_RESPONSE_INLINE_IMAGE=3 AI_RICH_RESPONSE_INLINE_IMAGE value
     * @property {number} AI_RICH_RESPONSE_TABLE=4 AI_RICH_RESPONSE_TABLE value
     * @property {number} AI_RICH_RESPONSE_CODE=5 AI_RICH_RESPONSE_CODE value
     * @property {number} AI_RICH_RESPONSE_DYNAMIC=6 AI_RICH_RESPONSE_DYNAMIC value
     * @property {number} AI_RICH_RESPONSE_MAP=7 AI_RICH_RESPONSE_MAP value
     * @property {number} AI_RICH_RESPONSE_LATEX=8 AI_RICH_RESPONSE_LATEX value
     * @property {number} AI_RICH_RESPONSE_CONTENT_ITEMS=9 AI_RICH_RESPONSE_CONTENT_ITEMS value
     */
    AICommon.AIRichResponseSubMessageType = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "AI_RICH_RESPONSE_UNKNOWN"] = 0;
        values[valuesById[1] = "AI_RICH_RESPONSE_GRID_IMAGE"] = 1;
        values[valuesById[2] = "AI_RICH_RESPONSE_TEXT"] = 2;
        values[valuesById[3] = "AI_RICH_RESPONSE_INLINE_IMAGE"] = 3;
        values[valuesById[4] = "AI_RICH_RESPONSE_TABLE"] = 4;
        values[valuesById[5] = "AI_RICH_RESPONSE_CODE"] = 5;
        values[valuesById[6] = "AI_RICH_RESPONSE_DYNAMIC"] = 6;
        values[valuesById[7] = "AI_RICH_RESPONSE_MAP"] = 7;
        values[valuesById[8] = "AI_RICH_RESPONSE_LATEX"] = 8;
        values[valuesById[9] = "AI_RICH_RESPONSE_CONTENT_ITEMS"] = 9;
        return values;
    })();

    /**
     * AIRichResponseMessageType enum.
     * @name AICommon.AIRichResponseMessageType
     * @enum {number}
     * @property {number} AI_RICH_RESPONSE_TYPE_UNKNOWN=0 AI_RICH_RESPONSE_TYPE_UNKNOWN value
     * @property {number} AI_RICH_RESPONSE_TYPE_STANDARD=1 AI_RICH_RESPONSE_TYPE_STANDARD value
     */
    AICommon.AIRichResponseMessageType = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "AI_RICH_RESPONSE_TYPE_UNKNOWN"] = 0;
        values[valuesById[1] = "AI_RICH_RESPONSE_TYPE_STANDARD"] = 1;
        return values;
    })();

    /**
     * BotSessionSource enum.
     * @name AICommon.BotSessionSource
     * @enum {number}
     * @property {number} NONE=0 NONE value
     * @property {number} NULL_STATE=1 NULL_STATE value
     * @property {number} TYPEAHEAD=2 TYPEAHEAD value
     * @property {number} USER_INPUT=3 USER_INPUT value
     * @property {number} EMU_FLASH=4 EMU_FLASH value
     * @property {number} EMU_FLASH_FOLLOWUP=5 EMU_FLASH_FOLLOWUP value
     * @property {number} VOICE=6 VOICE value
     */
    AICommon.BotSessionSource = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "NONE"] = 0;
        values[valuesById[1] = "NULL_STATE"] = 1;
        values[valuesById[2] = "TYPEAHEAD"] = 2;
        values[valuesById[3] = "USER_INPUT"] = 3;
        values[valuesById[4] = "EMU_FLASH"] = 4;
        values[valuesById[5] = "EMU_FLASH_FOLLOWUP"] = 5;
        values[valuesById[6] = "VOICE"] = 6;
        return values;
    })();

    /**
     * BotMetricsThreadEntryPoint enum.
     * @name AICommon.BotMetricsThreadEntryPoint
     * @enum {number}
     * @property {number} AI_TAB_THREAD=1 AI_TAB_THREAD value
     * @property {number} AI_HOME_THREAD=2 AI_HOME_THREAD value
     * @property {number} AI_DEEPLINK_IMMERSIVE_THREAD=3 AI_DEEPLINK_IMMERSIVE_THREAD value
     * @property {number} AI_DEEPLINK_THREAD=4 AI_DEEPLINK_THREAD value
     * @property {number} ASK_META_AI_CONTEXT_MENU_THREAD=5 ASK_META_AI_CONTEXT_MENU_THREAD value
     */
    AICommon.BotMetricsThreadEntryPoint = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[1] = "AI_TAB_THREAD"] = 1;
        values[valuesById[2] = "AI_HOME_THREAD"] = 2;
        values[valuesById[3] = "AI_DEEPLINK_IMMERSIVE_THREAD"] = 3;
        values[valuesById[4] = "AI_DEEPLINK_THREAD"] = 4;
        values[valuesById[5] = "ASK_META_AI_CONTEXT_MENU_THREAD"] = 5;
        return values;
    })();

    /**
     * BotMetricsEntryPoint enum.
     * @name AICommon.BotMetricsEntryPoint
     * @enum {number}
     * @property {number} UNDEFINED_ENTRY_POINT=0 UNDEFINED_ENTRY_POINT value
     * @property {number} FAVICON=1 FAVICON value
     * @property {number} CHATLIST=2 CHATLIST value
     * @property {number} AISEARCH_NULL_STATE_PAPER_PLANE=3 AISEARCH_NULL_STATE_PAPER_PLANE value
     * @property {number} AISEARCH_NULL_STATE_SUGGESTION=4 AISEARCH_NULL_STATE_SUGGESTION value
     * @property {number} AISEARCH_TYPE_AHEAD_SUGGESTION=5 AISEARCH_TYPE_AHEAD_SUGGESTION value
     * @property {number} AISEARCH_TYPE_AHEAD_PAPER_PLANE=6 AISEARCH_TYPE_AHEAD_PAPER_PLANE value
     * @property {number} AISEARCH_TYPE_AHEAD_RESULT_CHATLIST=7 AISEARCH_TYPE_AHEAD_RESULT_CHATLIST value
     * @property {number} AISEARCH_TYPE_AHEAD_RESULT_MESSAGES=8 AISEARCH_TYPE_AHEAD_RESULT_MESSAGES value
     * @property {number} AIVOICE_SEARCH_BAR=9 AIVOICE_SEARCH_BAR value
     * @property {number} AIVOICE_FAVICON=10 AIVOICE_FAVICON value
     * @property {number} AISTUDIO=11 AISTUDIO value
     * @property {number} DEEPLINK=12 DEEPLINK value
     * @property {number} NOTIFICATION=13 NOTIFICATION value
     * @property {number} PROFILE_MESSAGE_BUTTON=14 PROFILE_MESSAGE_BUTTON value
     * @property {number} FORWARD=15 FORWARD value
     * @property {number} APP_SHORTCUT=16 APP_SHORTCUT value
     * @property {number} FF_FAMILY=17 FF_FAMILY value
     * @property {number} AI_TAB=18 AI_TAB value
     * @property {number} AI_HOME=19 AI_HOME value
     * @property {number} AI_DEEPLINK_IMMERSIVE=20 AI_DEEPLINK_IMMERSIVE value
     * @property {number} AI_DEEPLINK=21 AI_DEEPLINK value
     * @property {number} META_AI_CHAT_SHORTCUT_AI_STUDIO=22 META_AI_CHAT_SHORTCUT_AI_STUDIO value
     * @property {number} UGC_CHAT_SHORTCUT_AI_STUDIO=23 UGC_CHAT_SHORTCUT_AI_STUDIO value
     * @property {number} NEW_CHAT_AI_STUDIO=24 NEW_CHAT_AI_STUDIO value
     * @property {number} AIVOICE_FAVICON_CALL_HISTORY=25 AIVOICE_FAVICON_CALL_HISTORY value
     * @property {number} ASK_META_AI_CONTEXT_MENU=26 ASK_META_AI_CONTEXT_MENU value
     * @property {number} ASK_META_AI_CONTEXT_MENU_1ON1=27 ASK_META_AI_CONTEXT_MENU_1ON1 value
     * @property {number} ASK_META_AI_CONTEXT_MENU_GROUP=28 ASK_META_AI_CONTEXT_MENU_GROUP value
     * @property {number} INVOKE_META_AI_1ON1=29 INVOKE_META_AI_1ON1 value
     * @property {number} INVOKE_META_AI_GROUP=30 INVOKE_META_AI_GROUP value
     * @property {number} META_AI_FORWARD=31 META_AI_FORWARD value
     * @property {number} NEW_CHAT_AI_CONTACT=32 NEW_CHAT_AI_CONTACT value
     * @property {number} MESSAGE_QUICK_ACTION_1_ON_1_CHAT=33 MESSAGE_QUICK_ACTION_1_ON_1_CHAT value
     * @property {number} MESSAGE_QUICK_ACTION_GROUP_CHAT=34 MESSAGE_QUICK_ACTION_GROUP_CHAT value
     * @property {number} ATTACHMENT_TRAY_1_ON_1_CHAT=35 ATTACHMENT_TRAY_1_ON_1_CHAT value
     * @property {number} ATTACHMENT_TRAY_GROUP_CHAT=36 ATTACHMENT_TRAY_GROUP_CHAT value
     * @property {number} ASK_META_AI_MEDIA_VIEWER_1ON1=37 ASK_META_AI_MEDIA_VIEWER_1ON1 value
     * @property {number} ASK_META_AI_MEDIA_VIEWER_GROUP=38 ASK_META_AI_MEDIA_VIEWER_GROUP value
     */
    AICommon.BotMetricsEntryPoint = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "UNDEFINED_ENTRY_POINT"] = 0;
        values[valuesById[1] = "FAVICON"] = 1;
        values[valuesById[2] = "CHATLIST"] = 2;
        values[valuesById[3] = "AISEARCH_NULL_STATE_PAPER_PLANE"] = 3;
        values[valuesById[4] = "AISEARCH_NULL_STATE_SUGGESTION"] = 4;
        values[valuesById[5] = "AISEARCH_TYPE_AHEAD_SUGGESTION"] = 5;
        values[valuesById[6] = "AISEARCH_TYPE_AHEAD_PAPER_PLANE"] = 6;
        values[valuesById[7] = "AISEARCH_TYPE_AHEAD_RESULT_CHATLIST"] = 7;
        values[valuesById[8] = "AISEARCH_TYPE_AHEAD_RESULT_MESSAGES"] = 8;
        values[valuesById[9] = "AIVOICE_SEARCH_BAR"] = 9;
        values[valuesById[10] = "AIVOICE_FAVICON"] = 10;
        values[valuesById[11] = "AISTUDIO"] = 11;
        values[valuesById[12] = "DEEPLINK"] = 12;
        values[valuesById[13] = "NOTIFICATION"] = 13;
        values[valuesById[14] = "PROFILE_MESSAGE_BUTTON"] = 14;
        values[valuesById[15] = "FORWARD"] = 15;
        values[valuesById[16] = "APP_SHORTCUT"] = 16;
        values[valuesById[17] = "FF_FAMILY"] = 17;
        values[valuesById[18] = "AI_TAB"] = 18;
        values[valuesById[19] = "AI_HOME"] = 19;
        values[valuesById[20] = "AI_DEEPLINK_IMMERSIVE"] = 20;
        values[valuesById[21] = "AI_DEEPLINK"] = 21;
        values[valuesById[22] = "META_AI_CHAT_SHORTCUT_AI_STUDIO"] = 22;
        values[valuesById[23] = "UGC_CHAT_SHORTCUT_AI_STUDIO"] = 23;
        values[valuesById[24] = "NEW_CHAT_AI_STUDIO"] = 24;
        values[valuesById[25] = "AIVOICE_FAVICON_CALL_HISTORY"] = 25;
        values[valuesById[26] = "ASK_META_AI_CONTEXT_MENU"] = 26;
        values[valuesById[27] = "ASK_META_AI_CONTEXT_MENU_1ON1"] = 27;
        values[valuesById[28] = "ASK_META_AI_CONTEXT_MENU_GROUP"] = 28;
        values[valuesById[29] = "INVOKE_META_AI_1ON1"] = 29;
        values[valuesById[30] = "INVOKE_META_AI_GROUP"] = 30;
        values[valuesById[31] = "META_AI_FORWARD"] = 31;
        values[valuesById[32] = "NEW_CHAT_AI_CONTACT"] = 32;
        values[valuesById[33] = "MESSAGE_QUICK_ACTION_1_ON_1_CHAT"] = 33;
        values[valuesById[34] = "MESSAGE_QUICK_ACTION_GROUP_CHAT"] = 34;
        values[valuesById[35] = "ATTACHMENT_TRAY_1_ON_1_CHAT"] = 35;
        values[valuesById[36] = "ATTACHMENT_TRAY_GROUP_CHAT"] = 36;
        values[valuesById[37] = "ASK_META_AI_MEDIA_VIEWER_1ON1"] = 37;
        values[valuesById[38] = "ASK_META_AI_MEDIA_VIEWER_GROUP"] = 38;
        return values;
    })();

    return AICommon;
})();

$root.StatusAttributions = (function() {

    /**
     * Namespace StatusAttributions.
     * @exports StatusAttributions
     * @namespace
     */
    var StatusAttributions = {};

    StatusAttributions.StatusAttribution = (function() {

        /**
         * Properties of a StatusAttribution.
         * @memberof StatusAttributions
         * @interface IStatusAttribution
         * @property {StatusAttributions.StatusAttribution.Type|null} [type] StatusAttribution type
         * @property {string|null} [actionUrl] StatusAttribution actionUrl
         * @property {StatusAttributions.StatusAttribution.IStatusReshare|null} [statusReshare] StatusAttribution statusReshare
         * @property {StatusAttributions.StatusAttribution.IExternalShare|null} [externalShare] StatusAttribution externalShare
         * @property {StatusAttributions.StatusAttribution.IMusic|null} [music] StatusAttribution music
         * @property {StatusAttributions.StatusAttribution.IGroupStatus|null} [groupStatus] StatusAttribution groupStatus
         * @property {StatusAttributions.StatusAttribution.IRLAttribution|null} [rlAttribution] StatusAttribution rlAttribution
         * @property {StatusAttributions.StatusAttribution.IAiCreatedAttribution|null} [aiCreatedAttribution] StatusAttribution aiCreatedAttribution
         */

        /**
         * Constructs a new StatusAttribution.
         * @memberof StatusAttributions
         * @classdesc Represents a StatusAttribution.
         * @implements IStatusAttribution
         * @constructor
         * @param {StatusAttributions.IStatusAttribution=} [properties] Properties to set
         */
        function StatusAttribution(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]];
        }

        /**
         * StatusAttribution type.
         * @member {StatusAttributions.StatusAttribution.Type|null|undefined} type
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        StatusAttribution.prototype.type = null;

        /**
         * StatusAttribution actionUrl.
         * @member {string|null|undefined} actionUrl
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        StatusAttribution.prototype.actionUrl = null;

        /**
         * StatusAttribution statusReshare.
         * @member {StatusAttributions.StatusAttribution.IStatusReshare|null|undefined} statusReshare
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        StatusAttribution.prototype.statusReshare = null;

        /**
         * StatusAttribution externalShare.
         * @member {StatusAttributions.StatusAttribution.IExternalShare|null|undefined} externalShare
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        StatusAttribution.prototype.externalShare = null;

        /**
         * StatusAttribution music.
         * @member {StatusAttributions.StatusAttribution.IMusic|null|undefined} music
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        StatusAttribution.prototype.music = null;

        /**
         * StatusAttribution groupStatus.
         * @member {StatusAttributions.StatusAttribution.IGroupStatus|null|undefined} groupStatus
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        StatusAttribution.prototype.groupStatus = null;

        /**
         * StatusAttribution rlAttribution.
         * @member {StatusAttributions.StatusAttribution.IRLAttribution|null|undefined} rlAttribution
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        StatusAttribution.prototype.rlAttribution = null;

        /**
         * StatusAttribution aiCreatedAttribution.
         * @member {StatusAttributions.StatusAttribution.IAiCreatedAttribution|null|undefined} aiCreatedAttribution
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        StatusAttribution.prototype.aiCreatedAttribution = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * StatusAttribution _type.
         * @member {"type"|undefined} _type
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        Object.defineProperty(StatusAttribution.prototype, "_type", {
            get: $util.oneOfGetter($oneOfFields = ["type"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * StatusAttribution _actionUrl.
         * @member {"actionUrl"|undefined} _actionUrl
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        Object.defineProperty(StatusAttribution.prototype, "_actionUrl", {
            get: $util.oneOfGetter($oneOfFields = ["actionUrl"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * StatusAttribution attributionData.
         * @member {"statusReshare"|"externalShare"|"music"|"groupStatus"|"rlAttribution"|"aiCreatedAttribution"|undefined} attributionData
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         */
        Object.defineProperty(StatusAttribution.prototype, "attributionData", {
            get: $util.oneOfGetter($oneOfFields = ["statusReshare", "externalShare", "music", "groupStatus", "rlAttribution", "aiCreatedAttribution"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new StatusAttribution instance using the specified properties.
         * @function create
         * @memberof StatusAttributions.StatusAttribution
         * @static
         * @param {StatusAttributions.IStatusAttribution=} [properties] Properties to set
         * @returns {StatusAttributions.StatusAttribution} StatusAttribution instance
         */
        StatusAttribution.create = function create(properties) {
            return new StatusAttribution(properties);
        };

        /**
         * Encodes the specified StatusAttribution message. Does not implicitly {@link StatusAttributions.StatusAttribution.verify|verify} messages.
         * @function encode
         * @memberof StatusAttributions.StatusAttribution
         * @static
         * @param {StatusAttributions.IStatusAttribution} message StatusAttribution message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        StatusAttribution.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
            if (message.actionUrl != null && Object.hasOwnProperty.call(message, "actionUrl"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.actionUrl);
            if (message.statusReshare != null && Object.hasOwnProperty.call(message, "statusReshare"))
                $root.StatusAttributions.StatusAttribution.StatusReshare.encode(message.statusReshare, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.externalShare != null && Object.hasOwnProperty.call(message, "externalShare"))
                $root.StatusAttributions.StatusAttribution.ExternalShare.encode(message.externalShare, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
            if (message.music != null && Object.hasOwnProperty.call(message, "music"))
                $root.StatusAttributions.StatusAttribution.Music.encode(message.music, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
            if (message.groupStatus != null && Object.hasOwnProperty.call(message, "groupStatus"))
                $root.StatusAttributions.StatusAttribution.GroupStatus.encode(message.groupStatus, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
            if (message.rlAttribution != null && Object.hasOwnProperty.call(message, "rlAttribution"))
                $root.StatusAttributions.StatusAttribution.RLAttribution.encode(message.rlAttribution, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
            if (message.aiCreatedAttribution != null && Object.hasOwnProperty.call(message, "aiCreatedAttribution"))
                $root.StatusAttributions.StatusAttribution.AiCreatedAttribution.encode(message.aiCreatedAttribution, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified StatusAttribution message, length delimited. Does not implicitly {@link StatusAttributions.StatusAttribution.verify|verify} messages.
         * @function encodeDelimited
         * @memberof StatusAttributions.StatusAttribution
         * @static
         * @param {StatusAttributions.IStatusAttribution} message StatusAttribution message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        StatusAttribution.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a StatusAttribution message from the specified reader or buffer.
         * @function decode
         * @memberof StatusAttributions.StatusAttribution
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {StatusAttributions.StatusAttribution} StatusAttribution
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        StatusAttribution.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.StatusAttributions.StatusAttribution();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.type = reader.int32();
                        break;
                    }
                case 2: {
                        message.actionUrl = reader.string();
                        break;
                    }
                case 3: {
                        message.statusReshare = $root.StatusAttributions.StatusAttribution.StatusReshare.decode(reader, reader.uint32());
                        break;
                    }
                case 4: {
                        message.externalShare = $root.StatusAttributions.StatusAttribution.ExternalShare.decode(reader, reader.uint32());
                        break;
                    }
                case 5: {
                        message.music = $root.StatusAttributions.StatusAttribution.Music.decode(reader, reader.uint32());
                        break;
                    }
                case 6: {
                        message.groupStatus = $root.StatusAttributions.StatusAttribution.GroupStatus.decode(reader, reader.uint32());
                        break;
                    }
                case 7: {
                        message.rlAttribution = $root.StatusAttributions.StatusAttribution.RLAttribution.decode(reader, reader.uint32());
                        break;
                    }
                case 8: {
                        message.aiCreatedAttribution = $root.StatusAttributions.StatusAttribution.AiCreatedAttribution.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a StatusAttribution message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof StatusAttributions.StatusAttribution
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {StatusAttributions.StatusAttribution} StatusAttribution
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        StatusAttribution.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a StatusAttribution message.
         * @function verify
         * @memberof StatusAttributions.StatusAttribution
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        StatusAttribution.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.type != null && message.hasOwnProperty("type")) {
                properties._type = 1;
                switch (message.type) {
                default:
                    return "type: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                case 6:
                case 7:
                case 8:
                    break;
                }
            }
            if (message.actionUrl != null && message.hasOwnProperty("actionUrl")) {
                properties._actionUrl = 1;
                if (!$util.isString(message.actionUrl))
                    return "actionUrl: string expected";
            }
            if (message.statusReshare != null && message.hasOwnProperty("statusReshare")) {
                properties.attributionData = 1;
                {
                    var error = $root.StatusAttributions.StatusAttribution.StatusReshare.verify(message.statusReshare);
                    if (error)
                        return "statusReshare." + error;
                }
            }
            if (message.externalShare != null && message.hasOwnProperty("externalShare")) {
                if (properties.attributionData === 1)
                    return "attributionData: multiple values";
                properties.attributionData = 1;
                {
                    var error = $root.StatusAttributions.StatusAttribution.ExternalShare.verify(message.externalShare);
                    if (error)
                        return "externalShare." + error;
                }
            }
            if (message.music != null && message.hasOwnProperty("music")) {
                if (properties.attributionData === 1)
                    return "attributionData: multiple values";
                properties.attributionData = 1;
                {
                    var error = $root.StatusAttributions.StatusAttribution.Music.verify(message.music);
                    if (error)
                        return "music." + error;
                }
            }
            if (message.groupStatus != null && message.hasOwnProperty("groupStatus")) {
                if (properties.attributionData === 1)
                    return "attributionData: multiple values";
                properties.attributionData = 1;
                {
                    var error = $root.StatusAttributions.StatusAttribution.GroupStatus.verify(message.groupStatus);
                    if (error)
                        return "groupStatus." + error;
                }
            }
            if (message.rlAttribution != null && message.hasOwnProperty("rlAttribution")) {
                if (properties.attributionData === 1)
                    return "attributionData: multiple values";
                properties.attributionData = 1;
                {
                    var error = $root.StatusAttributions.StatusAttribution.RLAttribution.verify(message.rlAttribution);
                    if (error)
                        return "rlAttribution." + error;
                }
            }
            if (message.aiCreatedAttribution != null && message.hasOwnProperty("aiCreatedAttribution")) {
                if (properties.attributionData === 1)
                    return "attributionData: multiple values";
                properties.attributionData = 1;
                {
                    var error = $root.StatusAttributions.StatusAttribution.AiCreatedAttribution.verify(message.aiCreatedAttribution);
                    if (error)
                        return "aiCreatedAttribution." + error;
                }
            }
            return null;
        };

        /**
         * Creates a StatusAttribution message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof StatusAttributions.StatusAttribution
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {StatusAttributions.StatusAttribution} StatusAttribution
         */
        StatusAttribution.fromObject = function fromObject(object) {
            if (object instanceof $root.StatusAttributions.StatusAttribution)
                return object;
            var message = new $root.StatusAttributions.StatusAttribution();
            switch (object.type) {
            default:
                if (typeof object.type === "number") {
                    message.type = object.type;
                    break;
                }
                break;
            case "UNKNOWN":
            case 0:
                message.type = 0;
                break;
            case "RESHARE":
            case 1:
                message.type = 1;
                break;
            case "EXTERNAL_SHARE":
            case 2:
                message.type = 2;
                break;
            case "MUSIC":
            case 3:
                message.type = 3;
                break;
            case "STATUS_MENTION":
            case 4:
                message.type = 4;
                break;
            case "GROUP_STATUS":
            case 5:
                message.type = 5;
                break;
            case "RL_ATTRIBUTION":
            case 6:
                message.type = 6;
                break;
            case "AI_CREATED":
            case 7:
                message.type = 7;
                break;
            case "LAYOUTS":
            case 8:
                message.type = 8;
                break;
            }
            if (object.actionUrl != null)
                message.actionUrl = String(object.actionUrl);
            if (object.statusReshare != null) {
                if (typeof object.statusReshare !== "object")
                    throw TypeError(".StatusAttributions.StatusAttribution.statusReshare: object expected");
                message.statusReshare = $root.StatusAttributions.StatusAttribution.StatusReshare.fromObject(object.statusReshare);
            }
            if (object.externalShare != null) {
                if (typeof object.externalShare !== "object")
                    throw TypeError(".StatusAttributions.StatusAttribution.externalShare: object expected");
                message.externalShare = $root.StatusAttributions.StatusAttribution.ExternalShare.fromObject(object.externalShare);
            }
            if (object.music != null) {
                if (typeof object.music !== "object")
                    throw TypeError(".StatusAttributions.StatusAttribution.music: object expected");
                message.music = $root.StatusAttributions.StatusAttribution.Music.fromObject(object.music);
            }
            if (object.groupStatus != null) {
                if (typeof object.groupStatus !== "object")
                    throw TypeError(".StatusAttributions.StatusAttribution.groupStatus: object expected");
                message.groupStatus = $root.StatusAttributions.StatusAttribution.GroupStatus.fromObject(object.groupStatus);
            }
            if (object.rlAttribution != null) {
                if (typeof object.rlAttribution !== "object")
                    throw TypeError(".StatusAttributions.StatusAttribution.rlAttribution: object expected");
                message.rlAttribution = $root.StatusAttributions.StatusAttribution.RLAttribution.fromObject(object.rlAttribution);
            }
            if (object.aiCreatedAttribution != null) {
                if (typeof object.aiCreatedAttribution !== "object")
                    throw TypeError(".StatusAttributions.StatusAttribution.aiCreatedAttribution: object expected");
                message.aiCreatedAttribution = $root.StatusAttributions.StatusAttribution.AiCreatedAttribution.fromObject(object.aiCreatedAttribution);
            }
            return message;
        };

        /**
         * Creates a plain object from a StatusAttribution message. Also converts values to other types if specified.
         * @function toObject
         * @memberof StatusAttributions.StatusAttribution
         * @static
         * @param {StatusAttributions.StatusAttribution} message StatusAttribution
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        StatusAttribution.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.type != null && message.hasOwnProperty("type")) {
                object.type = options.enums === String ? $root.StatusAttributions.StatusAttribution.Type[message.type] === undefined ? message.type : $root.StatusAttributions.StatusAttribution.Type[message.type] : message.type;
                if (options.oneofs)
                    object._type = "type";
            }
            if (message.actionUrl != null && message.hasOwnProperty("actionUrl")) {
                object.actionUrl = message.actionUrl;
                if (options.oneofs)
                    object._actionUrl = "actionUrl";
            }
            if (message.statusReshare != null && message.hasOwnProperty("statusReshare")) {
                object.statusReshare = $root.StatusAttributions.StatusAttribution.StatusReshare.toObject(message.statusReshare, options);
                if (options.oneofs)
                    object.attributionData = "statusReshare";
            }
            if (message.externalShare != null && message.hasOwnProperty("externalShare")) {
                object.externalShare = $root.StatusAttributions.StatusAttribution.ExternalShare.toObject(message.externalShare, options);
                if (options.oneofs)
                    object.attributionData = "externalShare";
            }
            if (message.music != null && message.hasOwnProperty("music")) {
                object.music = $root.StatusAttributions.StatusAttribution.Music.toObject(message.music, options);
                if (options.oneofs)
                    object.attributionData = "music";
            }
            if (message.groupStatus != null && message.hasOwnProperty("groupStatus")) {
                object.groupStatus = $root.StatusAttributions.StatusAttribution.GroupStatus.toObject(message.groupStatus, options);
                if (options.oneofs)
                    object.attributionData = "groupStatus";
            }
            if (message.rlAttribution != null && message.hasOwnProperty("rlAttribution")) {
                object.rlAttribution = $root.StatusAttributions.StatusAttribution.RLAttribution.toObject(message.rlAttribution, options);
                if (options.oneofs)
                    object.attributionData = "rlAttribution";
            }
            if (message.aiCreatedAttribution != null && message.hasOwnProperty("aiCreatedAttribution")) {
                object.aiCreatedAttribution = $root.StatusAttributions.StatusAttribution.AiCreatedAttribution.toObject(message.aiCreatedAttribution, options);
                if (options.oneofs)
                    object.attributionData = "aiCreatedAttribution";
            }
            return object;
        };

        /**
         * Converts this StatusAttribution to JSON.
         * @function toJSON
         * @memberof StatusAttributions.StatusAttribution
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        StatusAttribution.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for StatusAttribution
         * @function getTypeUrl
         * @memberof StatusAttributions.StatusAttribution
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        StatusAttribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/StatusAttributions.StatusAttribution";
        };

        StatusAttribution.AiCreatedAttribution = (function() {

            /**
             * Properties of an AiCreatedAttribution.
             * @memberof StatusAttributions.StatusAttribution
             * @interface IAiCreatedAttribution
             * @property {StatusAttributions.StatusAttribution.AiCreatedAttribution.Source|null} [source] AiCreatedAttribution source
             */

            /**
             * Constructs a new AiCreatedAttribution.
             * @memberof StatusAttributions.StatusAttribution
             * @classdesc Represents an AiCreatedAttribution.
             * @implements IAiCreatedAttribution
             * @constructor
             * @param {StatusAttributions.StatusAttribution.IAiCreatedAttribution=} [properties] Properties to set
             */
            function AiCreatedAttribution(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]];
            }

            /**
             * AiCreatedAttribution source.
             * @member {StatusAttributions.StatusAttribution.AiCreatedAttribution.Source|null|undefined} source
             * @memberof StatusAttributions.StatusAttribution.AiCreatedAttribution
             * @instance
             */
            AiCreatedAttribution.prototype.source = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * AiCreatedAttribution _source.
             * @member {"source"|undefined} _source
             * @memberof StatusAttributions.StatusAttribution.AiCreatedAttribution
             * @instance
             */
            Object.defineProperty(AiCreatedAttribution.prototype, "_source", {
                get: $util.oneOfGetter($oneOfFields = ["source"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new AiCreatedAttribution instance using the specified properties.
             * @function create
             * @memberof StatusAttributions.StatusAttribution.AiCreatedAttribution
             * @static
             * @param {StatusAttributions.StatusAttribution.IAiCreatedAttribution=} [properties] Properties to set
             * @returns {StatusAttributions.StatusAttribution.AiCreatedAttribution} AiCreatedAttribution instance
             */
            AiCreatedAttribution.create = function create(properties) {
                return new AiCreatedAttribution(properties);
            };

            /**
             * Encodes the specified AiCreatedAttribution message. Does not implicitly {@link StatusAttributions.StatusAttribution.AiCreatedAttribution.verify|verify} messages.
             * @function encode
             * @memberof StatusAttributions.StatusAttribution.AiCreatedAttribution
             * @static
             * @param {StatusAttributions.StatusAttribution.IAiCreatedAttribution} message AiCreatedAttribution message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AiCreatedAttribution.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.source != null && Object.hasOwnProperty.call(message, "source"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.source);
                return writer;
            };

            /**
             * Encodes the specified AiCreatedAttribution message, length delimited. Does not implicitly {@link StatusAttributions.StatusAttribution.AiCreatedAttribution.verify|verify} messages.
             * @function encodeDelimited
             * @memberof StatusAttributions.StatusAttribution.AiCreatedAttribution
             * @static
             * @param {StatusAttributions.StatusAttribution.IAiCreatedAttribution} message AiCreatedAttribution message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AiCreatedAttribution.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AiCreatedAttribution message from the specified reader or buffer.
             * @function decode
             * @memberof StatusAttributions.StatusAttribution.AiCreatedAttribution
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {StatusAttributions.StatusAttribution.AiCreatedAttribution} AiCreatedAttribution
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AiCreatedAttribution.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.StatusAttributions.StatusAttribution.AiCreatedAttribution();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.source = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an AiCreatedAttribution message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof StatusAttributions.StatusAttribution.AiCreatedAttribution
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {StatusAttributions.StatusAttribution.AiCreatedAttribution} AiCreatedAttribution
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AiCreatedAttribution.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AiCreatedAttribution message.
             * @function verify
             * @memberof StatusAttributions.StatusAttribution.AiCreatedAttribution
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AiCreatedAttribution.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.source != null && message.hasOwnProperty("source")) {
                    properties._source = 1;
                    switch (message.source) {
                    default:
                        return "source: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates an AiCreatedAttribution message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof StatusAttributions.StatusAttribution.AiCreatedAttribution
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {StatusAttributions.StatusAttribution.AiCreatedAttribution} AiCreatedAttribution
             */
            AiCreatedAttribution.fromObject = function fromObject(object) {
                if (object instanceof $root.StatusAttributions.StatusAttribution.AiCreatedAttribution)
                    return object;
                var message = new $root.StatusAttributions.StatusAttribution.AiCreatedAttribution();
                switch (object.source) {
                default:
                    if (typeof object.source === "number") {
                        message.source = object.source;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.source = 0;
                    break;
                case "STATUS_MIMICRY":
                case 1:
                    message.source = 1;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from an AiCreatedAttribution message. Also converts values to other types if specified.
             * @function toObject
             * @memberof StatusAttributions.StatusAttribution.AiCreatedAttribution
             * @static
             * @param {StatusAttributions.StatusAttribution.AiCreatedAttribution} message AiCreatedAttribution
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AiCreatedAttribution.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.source != null && message.hasOwnProperty("source")) {
                    object.source = options.enums === String ? $root.StatusAttributions.StatusAttribution.AiCreatedAttribution.Source[message.source] === undefined ? message.source : $root.StatusAttributions.StatusAttribution.AiCreatedAttribution.Source[message.source] : message.source;
                    if (options.oneofs)
                        object._source = "source";
                }
                return object;
            };

            /**
             * Converts this AiCreatedAttribution to JSON.
             * @function toJSON
             * @memberof StatusAttributions.StatusAttribution.AiCreatedAttribution
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AiCreatedAttribution.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AiCreatedAttribution
             * @function getTypeUrl
             * @memberof StatusAttributions.StatusAttribution.AiCreatedAttribution
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AiCreatedAttribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/StatusAttributions.StatusAttribution.AiCreatedAttribution";
            };

            /**
             * Source enum.
             * @name StatusAttributions.StatusAttribution.AiCreatedAttribution.Source
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} STATUS_MIMICRY=1 STATUS_MIMICRY value
             */
            AiCreatedAttribution.Source = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "STATUS_MIMICRY"] = 1;
                return values;
            })();

            return AiCreatedAttribution;
        })();

        StatusAttribution.ExternalShare = (function() {

            /**
             * Properties of an ExternalShare.
             * @memberof StatusAttributions.StatusAttribution
             * @interface IExternalShare
             * @property {string|null} [actionUrl] ExternalShare actionUrl
             * @property {StatusAttributions.StatusAttribution.ExternalShare.Source|null} [source] ExternalShare source
             * @property {number|null} [duration] ExternalShare duration
             * @property {string|null} [actionFallbackUrl] ExternalShare actionFallbackUrl
             */

            /**
             * Constructs a new ExternalShare.
             * @memberof StatusAttributions.StatusAttribution
             * @classdesc Represents an ExternalShare.
             * @implements IExternalShare
             * @constructor
             * @param {StatusAttributions.StatusAttribution.IExternalShare=} [properties] Properties to set
             */
            function ExternalShare(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]];
            }

            /**
             * ExternalShare actionUrl.
             * @member {string|null|undefined} actionUrl
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             */
            ExternalShare.prototype.actionUrl = null;

            /**
             * ExternalShare source.
             * @member {StatusAttributions.StatusAttribution.ExternalShare.Source|null|undefined} source
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             */
            ExternalShare.prototype.source = null;

            /**
             * ExternalShare duration.
             * @member {number|null|undefined} duration
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             */
            ExternalShare.prototype.duration = null;

            /**
             * ExternalShare actionFallbackUrl.
             * @member {string|null|undefined} actionFallbackUrl
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             */
            ExternalShare.prototype.actionFallbackUrl = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * ExternalShare _actionUrl.
             * @member {"actionUrl"|undefined} _actionUrl
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             */
            Object.defineProperty(ExternalShare.prototype, "_actionUrl", {
                get: $util.oneOfGetter($oneOfFields = ["actionUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalShare _source.
             * @member {"source"|undefined} _source
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             */
            Object.defineProperty(ExternalShare.prototype, "_source", {
                get: $util.oneOfGetter($oneOfFields = ["source"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalShare _duration.
             * @member {"duration"|undefined} _duration
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             */
            Object.defineProperty(ExternalShare.prototype, "_duration", {
                get: $util.oneOfGetter($oneOfFields = ["duration"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * ExternalShare _actionFallbackUrl.
             * @member {"actionFallbackUrl"|undefined} _actionFallbackUrl
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             */
            Object.defineProperty(ExternalShare.prototype, "_actionFallbackUrl", {
                get: $util.oneOfGetter($oneOfFields = ["actionFallbackUrl"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new ExternalShare instance using the specified properties.
             * @function create
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @static
             * @param {StatusAttributions.StatusAttribution.IExternalShare=} [properties] Properties to set
             * @returns {StatusAttributions.StatusAttribution.ExternalShare} ExternalShare instance
             */
            ExternalShare.create = function create(properties) {
                return new ExternalShare(properties);
            };

            /**
             * Encodes the specified ExternalShare message. Does not implicitly {@link StatusAttributions.StatusAttribution.ExternalShare.verify|verify} messages.
             * @function encode
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @static
             * @param {StatusAttributions.StatusAttribution.IExternalShare} message ExternalShare message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ExternalShare.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.actionUrl != null && Object.hasOwnProperty.call(message, "actionUrl"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.actionUrl);
                if (message.source != null && Object.hasOwnProperty.call(message, "source"))
                    writer.uint32(/* id 2, wireType 0 =*/16).int32(message.source);
                if (message.duration != null && Object.hasOwnProperty.call(message, "duration"))
                    writer.uint32(/* id 3, wireType 0 =*/24).int32(message.duration);
                if (message.actionFallbackUrl != null && Object.hasOwnProperty.call(message, "actionFallbackUrl"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.actionFallbackUrl);
                return writer;
            };

            /**
             * Encodes the specified ExternalShare message, length delimited. Does not implicitly {@link StatusAttributions.StatusAttribution.ExternalShare.verify|verify} messages.
             * @function encodeDelimited
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @static
             * @param {StatusAttributions.StatusAttribution.IExternalShare} message ExternalShare message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ExternalShare.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an ExternalShare message from the specified reader or buffer.
             * @function decode
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {StatusAttributions.StatusAttribution.ExternalShare} ExternalShare
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ExternalShare.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.StatusAttributions.StatusAttribution.ExternalShare();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.actionUrl = reader.string();
                            break;
                        }
                    case 2: {
                            message.source = reader.int32();
                            break;
                        }
                    case 3: {
                            message.duration = reader.int32();
                            break;
                        }
                    case 4: {
                            message.actionFallbackUrl = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an ExternalShare message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {StatusAttributions.StatusAttribution.ExternalShare} ExternalShare
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ExternalShare.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an ExternalShare message.
             * @function verify
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ExternalShare.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.actionUrl != null && message.hasOwnProperty("actionUrl")) {
                    properties._actionUrl = 1;
                    if (!$util.isString(message.actionUrl))
                        return "actionUrl: string expected";
                }
                if (message.source != null && message.hasOwnProperty("source")) {
                    properties._source = 1;
                    switch (message.source) {
                    default:
                        return "source: 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.duration != null && message.hasOwnProperty("duration")) {
                    properties._duration = 1;
                    if (!$util.isInteger(message.duration))
                        return "duration: integer expected";
                }
                if (message.actionFallbackUrl != null && message.hasOwnProperty("actionFallbackUrl")) {
                    properties._actionFallbackUrl = 1;
                    if (!$util.isString(message.actionFallbackUrl))
                        return "actionFallbackUrl: string expected";
                }
                return null;
            };

            /**
             * Creates an ExternalShare message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {StatusAttributions.StatusAttribution.ExternalShare} ExternalShare
             */
            ExternalShare.fromObject = function fromObject(object) {
                if (object instanceof $root.StatusAttributions.StatusAttribution.ExternalShare)
                    return object;
                var message = new $root.StatusAttributions.StatusAttribution.ExternalShare();
                if (object.actionUrl != null)
                    message.actionUrl = String(object.actionUrl);
                switch (object.source) {
                default:
                    if (typeof object.source === "number") {
                        message.source = object.source;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.source = 0;
                    break;
                case "INSTAGRAM":
                case 1:
                    message.source = 1;
                    break;
                case "FACEBOOK":
                case 2:
                    message.source = 2;
                    break;
                case "MESSENGER":
                case 3:
                    message.source = 3;
                    break;
                case "SPOTIFY":
                case 4:
                    message.source = 4;
                    break;
                case "YOUTUBE":
                case 5:
                    message.source = 5;
                    break;
                case "PINTEREST":
                case 6:
                    message.source = 6;
                    break;
                case "THREADS":
                case 7:
                    message.source = 7;
                    break;
                case "APPLE_MUSIC":
                case 8:
                    message.source = 8;
                    break;
                case "SHARECHAT":
                case 9:
                    message.source = 9;
                    break;
                case "GOOGLE_PHOTOS":
                case 10:
                    message.source = 10;
                    break;
                }
                if (object.duration != null)
                    message.duration = object.duration | 0;
                if (object.actionFallbackUrl != null)
                    message.actionFallbackUrl = String(object.actionFallbackUrl);
                return message;
            };

            /**
             * Creates a plain object from an ExternalShare message. Also converts values to other types if specified.
             * @function toObject
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @static
             * @param {StatusAttributions.StatusAttribution.ExternalShare} message ExternalShare
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ExternalShare.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.actionUrl != null && message.hasOwnProperty("actionUrl")) {
                    object.actionUrl = message.actionUrl;
                    if (options.oneofs)
                        object._actionUrl = "actionUrl";
                }
                if (message.source != null && message.hasOwnProperty("source")) {
                    object.source = options.enums === String ? $root.StatusAttributions.StatusAttribution.ExternalShare.Source[message.source] === undefined ? message.source : $root.StatusAttributions.StatusAttribution.ExternalShare.Source[message.source] : message.source;
                    if (options.oneofs)
                        object._source = "source";
                }
                if (message.duration != null && message.hasOwnProperty("duration")) {
                    object.duration = message.duration;
                    if (options.oneofs)
                        object._duration = "duration";
                }
                if (message.actionFallbackUrl != null && message.hasOwnProperty("actionFallbackUrl")) {
                    object.actionFallbackUrl = message.actionFallbackUrl;
                    if (options.oneofs)
                        object._actionFallbackUrl = "actionFallbackUrl";
                }
                return object;
            };

            /**
             * Converts this ExternalShare to JSON.
             * @function toJSON
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ExternalShare.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for ExternalShare
             * @function getTypeUrl
             * @memberof StatusAttributions.StatusAttribution.ExternalShare
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            ExternalShare.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/StatusAttributions.StatusAttribution.ExternalShare";
            };

            /**
             * Source enum.
             * @name StatusAttributions.StatusAttribution.ExternalShare.Source
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} INSTAGRAM=1 INSTAGRAM value
             * @property {number} FACEBOOK=2 FACEBOOK value
             * @property {number} MESSENGER=3 MESSENGER value
             * @property {number} SPOTIFY=4 SPOTIFY value
             * @property {number} YOUTUBE=5 YOUTUBE value
             * @property {number} PINTEREST=6 PINTEREST value
             * @property {number} THREADS=7 THREADS value
             * @property {number} APPLE_MUSIC=8 APPLE_MUSIC value
             * @property {number} SHARECHAT=9 SHARECHAT value
             * @property {number} GOOGLE_PHOTOS=10 GOOGLE_PHOTOS value
             */
            ExternalShare.Source = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "INSTAGRAM"] = 1;
                values[valuesById[2] = "FACEBOOK"] = 2;
                values[valuesById[3] = "MESSENGER"] = 3;
                values[valuesById[4] = "SPOTIFY"] = 4;
                values[valuesById[5] = "YOUTUBE"] = 5;
                values[valuesById[6] = "PINTEREST"] = 6;
                values[valuesById[7] = "THREADS"] = 7;
                values[valuesById[8] = "APPLE_MUSIC"] = 8;
                values[valuesById[9] = "SHARECHAT"] = 9;
                values[valuesById[10] = "GOOGLE_PHOTOS"] = 10;
                return values;
            })();

            return ExternalShare;
        })();

        StatusAttribution.GroupStatus = (function() {

            /**
             * Properties of a GroupStatus.
             * @memberof StatusAttributions.StatusAttribution
             * @interface IGroupStatus
             * @property {string|null} [authorJid] GroupStatus authorJid
             */

            /**
             * Constructs a new GroupStatus.
             * @memberof StatusAttributions.StatusAttribution
             * @classdesc Represents a GroupStatus.
             * @implements IGroupStatus
             * @constructor
             * @param {StatusAttributions.StatusAttribution.IGroupStatus=} [properties] Properties to set
             */
            function GroupStatus(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]];
            }

            /**
             * GroupStatus authorJid.
             * @member {string|null|undefined} authorJid
             * @memberof StatusAttributions.StatusAttribution.GroupStatus
             * @instance
             */
            GroupStatus.prototype.authorJid = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * GroupStatus _authorJid.
             * @member {"authorJid"|undefined} _authorJid
             * @memberof StatusAttributions.StatusAttribution.GroupStatus
             * @instance
             */
            Object.defineProperty(GroupStatus.prototype, "_authorJid", {
                get: $util.oneOfGetter($oneOfFields = ["authorJid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new GroupStatus instance using the specified properties.
             * @function create
             * @memberof StatusAttributions.StatusAttribution.GroupStatus
             * @static
             * @param {StatusAttributions.StatusAttribution.IGroupStatus=} [properties] Properties to set
             * @returns {StatusAttributions.StatusAttribution.GroupStatus} GroupStatus instance
             */
            GroupStatus.create = function create(properties) {
                return new GroupStatus(properties);
            };

            /**
             * Encodes the specified GroupStatus message. Does not implicitly {@link StatusAttributions.StatusAttribution.GroupStatus.verify|verify} messages.
             * @function encode
             * @memberof StatusAttributions.StatusAttribution.GroupStatus
             * @static
             * @param {StatusAttributions.StatusAttribution.IGroupStatus} message GroupStatus message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GroupStatus.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.authorJid != null && Object.hasOwnProperty.call(message, "authorJid"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.authorJid);
                return writer;
            };

            /**
             * Encodes the specified GroupStatus message, length delimited. Does not implicitly {@link StatusAttributions.StatusAttribution.GroupStatus.verify|verify} messages.
             * @function encodeDelimited
             * @memberof StatusAttributions.StatusAttribution.GroupStatus
             * @static
             * @param {StatusAttributions.StatusAttribution.IGroupStatus} message GroupStatus message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GroupStatus.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a GroupStatus message from the specified reader or buffer.
             * @function decode
             * @memberof StatusAttributions.StatusAttribution.GroupStatus
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {StatusAttributions.StatusAttribution.GroupStatus} GroupStatus
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GroupStatus.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.StatusAttributions.StatusAttribution.GroupStatus();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.authorJid = reader.string();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a GroupStatus message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof StatusAttributions.StatusAttribution.GroupStatus
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {StatusAttributions.StatusAttribution.GroupStatus} GroupStatus
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GroupStatus.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a GroupStatus message.
             * @function verify
             * @memberof StatusAttributions.StatusAttribution.GroupStatus
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            GroupStatus.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.authorJid != null && message.hasOwnProperty("authorJid")) {
                    properties._authorJid = 1;
                    if (!$util.isString(message.authorJid))
                        return "authorJid: string expected";
                }
                return null;
            };

            /**
             * Creates a GroupStatus message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof StatusAttributions.StatusAttribution.GroupStatus
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {StatusAttributions.StatusAttribution.GroupStatus} GroupStatus
             */
            GroupStatus.fromObject = function fromObject(object) {
                if (object instanceof $root.StatusAttributions.StatusAttribution.GroupStatus)
                    return object;
                var message = new $root.StatusAttributions.StatusAttribution.GroupStatus();
                if (object.authorJid != null)
                    message.authorJid = String(object.authorJid);
                return message;
            };

            /**
             * Creates a plain object from a GroupStatus message. Also converts values to other types if specified.
             * @function toObject
             * @memberof StatusAttributions.StatusAttribution.GroupStatus
             * @static
             * @param {StatusAttributions.StatusAttribution.GroupStatus} message GroupStatus
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            GroupStatus.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.authorJid != null && message.hasOwnProperty("authorJid")) {
                    object.authorJid = message.authorJid;
                    if (options.oneofs)
                        object._authorJid = "authorJid";
                }
                return object;
            };

            /**
             * Converts this GroupStatus to JSON.
             * @function toJSON
             * @memberof StatusAttributions.StatusAttribution.GroupStatus
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            GroupStatus.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for GroupStatus
             * @function getTypeUrl
             * @memberof StatusAttributions.StatusAttribution.GroupStatus
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            GroupStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/StatusAttributions.StatusAttribution.GroupStatus";
            };

            return GroupStatus;
        })();

        StatusAttribution.Music = (function() {

            /**
             * Properties of a Music.
             * @memberof StatusAttributions.StatusAttribution
             * @interface IMusic
             * @property {string|null} [authorName] Music authorName
             * @property {string|null} [songId] Music songId
             * @property {string|null} [title] Music title
             * @property {string|null} [author] Music author
             * @property {string|null} [artistAttribution] Music artistAttribution
             * @property {boolean|null} [isExplicit] Music isExplicit
             */

            /**
             * Constructs a new Music.
             * @memberof StatusAttributions.StatusAttribution
             * @classdesc Represents a Music.
             * @implements IMusic
             * @constructor
             * @param {StatusAttributions.StatusAttribution.IMusic=} [properties] Properties to set
             */
            function Music(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]];
            }

            /**
             * Music authorName.
             * @member {string|null|undefined} authorName
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Music.prototype.authorName = null;

            /**
             * Music songId.
             * @member {string|null|undefined} songId
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Music.prototype.songId = null;

            /**
             * Music title.
             * @member {string|null|undefined} title
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Music.prototype.title = null;

            /**
             * Music author.
             * @member {string|null|undefined} author
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Music.prototype.author = null;

            /**
             * Music artistAttribution.
             * @member {string|null|undefined} artistAttribution
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Music.prototype.artistAttribution = null;

            /**
             * Music isExplicit.
             * @member {boolean|null|undefined} isExplicit
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Music.prototype.isExplicit = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * Music _authorName.
             * @member {"authorName"|undefined} _authorName
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Object.defineProperty(Music.prototype, "_authorName", {
                get: $util.oneOfGetter($oneOfFields = ["authorName"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Music _songId.
             * @member {"songId"|undefined} _songId
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Object.defineProperty(Music.prototype, "_songId", {
                get: $util.oneOfGetter($oneOfFields = ["songId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Music _title.
             * @member {"title"|undefined} _title
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Object.defineProperty(Music.prototype, "_title", {
                get: $util.oneOfGetter($oneOfFields = ["title"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Music _author.
             * @member {"author"|undefined} _author
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Object.defineProperty(Music.prototype, "_author", {
                get: $util.oneOfGetter($oneOfFields = ["author"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Music _artistAttribution.
             * @member {"artistAttribution"|undefined} _artistAttribution
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Object.defineProperty(Music.prototype, "_artistAttribution", {
                get: $util.oneOfGetter($oneOfFields = ["artistAttribution"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Music _isExplicit.
             * @member {"isExplicit"|undefined} _isExplicit
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             */
            Object.defineProperty(Music.prototype, "_isExplicit", {
                get: $util.oneOfGetter($oneOfFields = ["isExplicit"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new Music instance using the specified properties.
             * @function create
             * @memberof StatusAttributions.StatusAttribution.Music
             * @static
             * @param {StatusAttributions.StatusAttribution.IMusic=} [properties] Properties to set
             * @returns {StatusAttributions.StatusAttribution.Music} Music instance
             */
            Music.create = function create(properties) {
                return new Music(properties);
            };

            /**
             * Encodes the specified Music message. Does not implicitly {@link StatusAttributions.StatusAttribution.Music.verify|verify} messages.
             * @function encode
             * @memberof StatusAttributions.StatusAttribution.Music
             * @static
             * @param {StatusAttributions.StatusAttribution.IMusic} message Music message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Music.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.authorName != null && Object.hasOwnProperty.call(message, "authorName"))
                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.authorName);
                if (message.songId != null && Object.hasOwnProperty.call(message, "songId"))
                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.songId);
                if (message.title != null && Object.hasOwnProperty.call(message, "title"))
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.title);
                if (message.author != null && Object.hasOwnProperty.call(message, "author"))
                    writer.uint32(/* id 4, wireType 2 =*/34).string(message.author);
                if (message.artistAttribution != null && Object.hasOwnProperty.call(message, "artistAttribution"))
                    writer.uint32(/* id 5, wireType 2 =*/42).string(message.artistAttribution);
                if (message.isExplicit != null && Object.hasOwnProperty.call(message, "isExplicit"))
                    writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isExplicit);
                return writer;
            };

            /**
             * Encodes the specified Music message, length delimited. Does not implicitly {@link StatusAttributions.StatusAttribution.Music.verify|verify} messages.
             * @function encodeDelimited
             * @memberof StatusAttributions.StatusAttribution.Music
             * @static
             * @param {StatusAttributions.StatusAttribution.IMusic} message Music message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Music.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a Music message from the specified reader or buffer.
             * @function decode
             * @memberof StatusAttributions.StatusAttribution.Music
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {StatusAttributions.StatusAttribution.Music} Music
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Music.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.StatusAttributions.StatusAttribution.Music();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.authorName = reader.string();
                            break;
                        }
                    case 2: {
                            message.songId = reader.string();
                            break;
                        }
                    case 3: {
                            message.title = reader.string();
                            break;
                        }
                    case 4: {
                            message.author = reader.string();
                            break;
                        }
                    case 5: {
                            message.artistAttribution = reader.string();
                            break;
                        }
                    case 6: {
                            message.isExplicit = reader.bool();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a Music message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof StatusAttributions.StatusAttribution.Music
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {StatusAttributions.StatusAttribution.Music} Music
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Music.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a Music message.
             * @function verify
             * @memberof StatusAttributions.StatusAttribution.Music
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Music.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.authorName != null && message.hasOwnProperty("authorName")) {
                    properties._authorName = 1;
                    if (!$util.isString(message.authorName))
                        return "authorName: string expected";
                }
                if (message.songId != null && message.hasOwnProperty("songId")) {
                    properties._songId = 1;
                    if (!$util.isString(message.songId))
                        return "songId: string expected";
                }
                if (message.title != null && message.hasOwnProperty("title")) {
                    properties._title = 1;
                    if (!$util.isString(message.title))
                        return "title: string expected";
                }
                if (message.author != null && message.hasOwnProperty("author")) {
                    properties._author = 1;
                    if (!$util.isString(message.author))
                        return "author: string expected";
                }
                if (message.artistAttribution != null && message.hasOwnProperty("artistAttribution")) {
                    properties._artistAttribution = 1;
                    if (!$util.isString(message.artistAttribution))
                        return "artistAttribution: string expected";
                }
                if (message.isExplicit != null && message.hasOwnProperty("isExplicit")) {
                    properties._isExplicit = 1;
                    if (typeof message.isExplicit !== "boolean")
                        return "isExplicit: boolean expected";
                }
                return null;
            };

            /**
             * Creates a Music message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof StatusAttributions.StatusAttribution.Music
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {StatusAttributions.StatusAttribution.Music} Music
             */
            Music.fromObject = function fromObject(object) {
                if (object instanceof $root.StatusAttributions.StatusAttribution.Music)
                    return object;
                var message = new $root.StatusAttributions.StatusAttribution.Music();
                if (object.authorName != null)
                    message.authorName = String(object.authorName);
                if (object.songId != null)
                    message.songId = String(object.songId);
                if (object.title != null)
                    message.title = String(object.title);
                if (object.author != null)
                    message.author = String(object.author);
                if (object.artistAttribution != null)
                    message.artistAttribution = String(object.artistAttribution);
                if (object.isExplicit != null)
                    message.isExplicit = Boolean(object.isExplicit);
                return message;
            };

            /**
             * Creates a plain object from a Music message. Also converts values to other types if specified.
             * @function toObject
             * @memberof StatusAttributions.StatusAttribution.Music
             * @static
             * @param {StatusAttributions.StatusAttribution.Music} message Music
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Music.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.authorName != null && message.hasOwnProperty("authorName")) {
                    object.authorName = message.authorName;
                    if (options.oneofs)
                        object._authorName = "authorName";
                }
                if (message.songId != null && message.hasOwnProperty("songId")) {
                    object.songId = message.songId;
                    if (options.oneofs)
                        object._songId = "songId";
                }
                if (message.title != null && message.hasOwnProperty("title")) {
                    object.title = message.title;
                    if (options.oneofs)
                        object._title = "title";
                }
                if (message.author != null && message.hasOwnProperty("author")) {
                    object.author = message.author;
                    if (options.oneofs)
                        object._author = "author";
                }
                if (message.artistAttribution != null && message.hasOwnProperty("artistAttribution")) {
                    object.artistAttribution = message.artistAttribution;
                    if (options.oneofs)
                        object._artistAttribution = "artistAttribution";
                }
                if (message.isExplicit != null && message.hasOwnProperty("isExplicit")) {
                    object.isExplicit = message.isExplicit;
                    if (options.oneofs)
                        object._isExplicit = "isExplicit";
                }
                return object;
            };

            /**
             * Converts this Music to JSON.
             * @function toJSON
             * @memberof StatusAttributions.StatusAttribution.Music
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Music.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for Music
             * @function getTypeUrl
             * @memberof StatusAttributions.StatusAttribution.Music
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            Music.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/StatusAttributions.StatusAttribution.Music";
            };

            return Music;
        })();

        StatusAttribution.RLAttribution = (function() {

            /**
             * Properties of a RLAttribution.
             * @memberof StatusAttributions.StatusAttribution
             * @interface IRLAttribution
             * @property {StatusAttributions.StatusAttribution.RLAttribution.Source|null} [source] RLAttribution source
             */

            /**
             * Constructs a new RLAttribution.
             * @memberof StatusAttributions.StatusAttribution
             * @classdesc Represents a RLAttribution.
             * @implements IRLAttribution
             * @constructor
             * @param {StatusAttributions.StatusAttribution.IRLAttribution=} [properties] Properties to set
             */
            function RLAttribution(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]];
            }

            /**
             * RLAttribution source.
             * @member {StatusAttributions.StatusAttribution.RLAttribution.Source|null|undefined} source
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @instance
             */
            RLAttribution.prototype.source = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * RLAttribution _source.
             * @member {"source"|undefined} _source
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @instance
             */
            Object.defineProperty(RLAttribution.prototype, "_source", {
                get: $util.oneOfGetter($oneOfFields = ["source"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new RLAttribution instance using the specified properties.
             * @function create
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @static
             * @param {StatusAttributions.StatusAttribution.IRLAttribution=} [properties] Properties to set
             * @returns {StatusAttributions.StatusAttribution.RLAttribution} RLAttribution instance
             */
            RLAttribution.create = function create(properties) {
                return new RLAttribution(properties);
            };

            /**
             * Encodes the specified RLAttribution message. Does not implicitly {@link StatusAttributions.StatusAttribution.RLAttribution.verify|verify} messages.
             * @function encode
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @static
             * @param {StatusAttributions.StatusAttribution.IRLAttribution} message RLAttribution message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RLAttribution.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.source != null && Object.hasOwnProperty.call(message, "source"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.source);
                return writer;
            };

            /**
             * Encodes the specified RLAttribution message, length delimited. Does not implicitly {@link StatusAttributions.StatusAttribution.RLAttribution.verify|verify} messages.
             * @function encodeDelimited
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @static
             * @param {StatusAttributions.StatusAttribution.IRLAttribution} message RLAttribution message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RLAttribution.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a RLAttribution message from the specified reader or buffer.
             * @function decode
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {StatusAttributions.StatusAttribution.RLAttribution} RLAttribution
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RLAttribution.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.StatusAttributions.StatusAttribution.RLAttribution();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.source = reader.int32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a RLAttribution message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {StatusAttributions.StatusAttribution.RLAttribution} RLAttribution
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RLAttribution.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a RLAttribution message.
             * @function verify
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            RLAttribution.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.source != null && message.hasOwnProperty("source")) {
                    properties._source = 1;
                    switch (message.source) {
                    default:
                        return "source: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a RLAttribution message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {StatusAttributions.StatusAttribution.RLAttribution} RLAttribution
             */
            RLAttribution.fromObject = function fromObject(object) {
                if (object instanceof $root.StatusAttributions.StatusAttribution.RLAttribution)
                    return object;
                var message = new $root.StatusAttributions.StatusAttribution.RLAttribution();
                switch (object.source) {
                default:
                    if (typeof object.source === "number") {
                        message.source = object.source;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.source = 0;
                    break;
                case "RAY_BAN_META_GLASSES":
                case 1:
                    message.source = 1;
                    break;
                case "OAKLEY_META_GLASSES":
                case 2:
                    message.source = 2;
                    break;
                case "HYPERNOVA_GLASSES":
                case 3:
                    message.source = 3;
                    break;
                }
                return message;
            };

            /**
             * Creates a plain object from a RLAttribution message. Also converts values to other types if specified.
             * @function toObject
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @static
             * @param {StatusAttributions.StatusAttribution.RLAttribution} message RLAttribution
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            RLAttribution.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.source != null && message.hasOwnProperty("source")) {
                    object.source = options.enums === String ? $root.StatusAttributions.StatusAttribution.RLAttribution.Source[message.source] === undefined ? message.source : $root.StatusAttributions.StatusAttribution.RLAttribution.Source[message.source] : message.source;
                    if (options.oneofs)
                        object._source = "source";
                }
                return object;
            };

            /**
             * Converts this RLAttribution to JSON.
             * @function toJSON
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            RLAttribution.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for RLAttribution
             * @function getTypeUrl
             * @memberof StatusAttributions.StatusAttribution.RLAttribution
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            RLAttribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/StatusAttributions.StatusAttribution.RLAttribution";
            };

            /**
             * Source enum.
             * @name StatusAttributions.StatusAttribution.RLAttribution.Source
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} RAY_BAN_META_GLASSES=1 RAY_BAN_META_GLASSES value
             * @property {number} OAKLEY_META_GLASSES=2 OAKLEY_META_GLASSES value
             * @property {number} HYPERNOVA_GLASSES=3 HYPERNOVA_GLASSES value
             */
            RLAttribution.Source = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "RAY_BAN_META_GLASSES"] = 1;
                values[valuesById[2] = "OAKLEY_META_GLASSES"] = 2;
                values[valuesById[3] = "HYPERNOVA_GLASSES"] = 3;
                return values;
            })();

            return RLAttribution;
        })();

        StatusAttribution.StatusReshare = (function() {

            /**
             * Properties of a StatusReshare.
             * @memberof StatusAttributions.StatusAttribution
             * @interface IStatusReshare
             * @property {StatusAttributions.StatusAttribution.StatusReshare.Source|null} [source] StatusReshare source
             * @property {StatusAttributions.StatusAttribution.StatusReshare.IMetadata|null} [metadata] StatusReshare metadata
             */

            /**
             * Constructs a new StatusReshare.
             * @memberof StatusAttributions.StatusAttribution
             * @classdesc Represents a StatusReshare.
             * @implements IStatusReshare
             * @constructor
             * @param {StatusAttributions.StatusAttribution.IStatusReshare=} [properties] Properties to set
             */
            function StatusReshare(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]];
            }

            /**
             * StatusReshare source.
             * @member {StatusAttributions.StatusAttribution.StatusReshare.Source|null|undefined} source
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @instance
             */
            StatusReshare.prototype.source = null;

            /**
             * StatusReshare metadata.
             * @member {StatusAttributions.StatusAttribution.StatusReshare.IMetadata|null|undefined} metadata
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @instance
             */
            StatusReshare.prototype.metadata = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * StatusReshare _source.
             * @member {"source"|undefined} _source
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @instance
             */
            Object.defineProperty(StatusReshare.prototype, "_source", {
                get: $util.oneOfGetter($oneOfFields = ["source"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * StatusReshare _metadata.
             * @member {"metadata"|undefined} _metadata
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @instance
             */
            Object.defineProperty(StatusReshare.prototype, "_metadata", {
                get: $util.oneOfGetter($oneOfFields = ["metadata"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new StatusReshare instance using the specified properties.
             * @function create
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @static
             * @param {StatusAttributions.StatusAttribution.IStatusReshare=} [properties] Properties to set
             * @returns {StatusAttributions.StatusAttribution.StatusReshare} StatusReshare instance
             */
            StatusReshare.create = function create(properties) {
                return new StatusReshare(properties);
            };

            /**
             * Encodes the specified StatusReshare message. Does not implicitly {@link StatusAttributions.StatusAttribution.StatusReshare.verify|verify} messages.
             * @function encode
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @static
             * @param {StatusAttributions.StatusAttribution.IStatusReshare} message StatusReshare message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatusReshare.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.source != null && Object.hasOwnProperty.call(message, "source"))
                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.source);
                if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
                    $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                return writer;
            };

            /**
             * Encodes the specified StatusReshare message, length delimited. Does not implicitly {@link StatusAttributions.StatusAttribution.StatusReshare.verify|verify} messages.
             * @function encodeDelimited
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @static
             * @param {StatusAttributions.StatusAttribution.IStatusReshare} message StatusReshare message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatusReshare.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StatusReshare message from the specified reader or buffer.
             * @function decode
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {StatusAttributions.StatusAttribution.StatusReshare} StatusReshare
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusReshare.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.StatusAttributions.StatusAttribution.StatusReshare();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.source = reader.int32();
                            break;
                        }
                    case 2: {
                            message.metadata = $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata.decode(reader, reader.uint32());
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a StatusReshare message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {StatusAttributions.StatusAttribution.StatusReshare} StatusReshare
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusReshare.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StatusReshare message.
             * @function verify
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StatusReshare.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.source != null && message.hasOwnProperty("source")) {
                    properties._source = 1;
                    switch (message.source) {
                    default:
                        return "source: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                        break;
                    }
                }
                if (message.metadata != null && message.hasOwnProperty("metadata")) {
                    properties._metadata = 1;
                    {
                        var error = $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata.verify(message.metadata);
                        if (error)
                            return "metadata." + error;
                    }
                }
                return null;
            };

            /**
             * Creates a StatusReshare message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {StatusAttributions.StatusAttribution.StatusReshare} StatusReshare
             */
            StatusReshare.fromObject = function fromObject(object) {
                if (object instanceof $root.StatusAttributions.StatusAttribution.StatusReshare)
                    return object;
                var message = new $root.StatusAttributions.StatusAttribution.StatusReshare();
                switch (object.source) {
                default:
                    if (typeof object.source === "number") {
                        message.source = object.source;
                        break;
                    }
                    break;
                case "UNKNOWN":
                case 0:
                    message.source = 0;
                    break;
                case "INTERNAL_RESHARE":
                case 1:
                    message.source = 1;
                    break;
                case "MENTION_RESHARE":
                case 2:
                    message.source = 2;
                    break;
                case "CHANNEL_RESHARE":
                case 3:
                    message.source = 3;
                    break;
                case "FORWARD":
                case 4:
                    message.source = 4;
                    break;
                }
                if (object.metadata != null) {
                    if (typeof object.metadata !== "object")
                        throw TypeError(".StatusAttributions.StatusAttribution.StatusReshare.metadata: object expected");
                    message.metadata = $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata.fromObject(object.metadata);
                }
                return message;
            };

            /**
             * Creates a plain object from a StatusReshare message. Also converts values to other types if specified.
             * @function toObject
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @static
             * @param {StatusAttributions.StatusAttribution.StatusReshare} message StatusReshare
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StatusReshare.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.source != null && message.hasOwnProperty("source")) {
                    object.source = options.enums === String ? $root.StatusAttributions.StatusAttribution.StatusReshare.Source[message.source] === undefined ? message.source : $root.StatusAttributions.StatusAttribution.StatusReshare.Source[message.source] : message.source;
                    if (options.oneofs)
                        object._source = "source";
                }
                if (message.metadata != null && message.hasOwnProperty("metadata")) {
                    object.metadata = $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata.toObject(message.metadata, options);
                    if (options.oneofs)
                        object._metadata = "metadata";
                }
                return object;
            };

            /**
             * Converts this StatusReshare to JSON.
             * @function toJSON
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StatusReshare.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for StatusReshare
             * @function getTypeUrl
             * @memberof StatusAttributions.StatusAttribution.StatusReshare
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            StatusReshare.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/StatusAttributions.StatusAttribution.StatusReshare";
            };

            StatusReshare.Metadata = (function() {

                /**
                 * Properties of a Metadata.
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare
                 * @interface IMetadata
                 * @property {number|null} [duration] Metadata duration
                 * @property {string|null} [channelJid] Metadata channelJid
                 * @property {number|null} [channelMessageId] Metadata channelMessageId
                 * @property {boolean|null} [hasMultipleReshares] Metadata hasMultipleReshares
                 */

                /**
                 * Constructs a new Metadata.
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare
                 * @classdesc Represents a Metadata.
                 * @implements IMetadata
                 * @constructor
                 * @param {StatusAttributions.StatusAttribution.StatusReshare.IMetadata=} [properties] Properties to set
                 */
                function Metadata(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]];
                }

                /**
                 * Metadata duration.
                 * @member {number|null|undefined} duration
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Metadata.prototype.duration = null;

                /**
                 * Metadata channelJid.
                 * @member {string|null|undefined} channelJid
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Metadata.prototype.channelJid = null;

                /**
                 * Metadata channelMessageId.
                 * @member {number|null|undefined} channelMessageId
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Metadata.prototype.channelMessageId = null;

                /**
                 * Metadata hasMultipleReshares.
                 * @member {boolean|null|undefined} hasMultipleReshares
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Metadata.prototype.hasMultipleReshares = null;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * Metadata _duration.
                 * @member {"duration"|undefined} _duration
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Object.defineProperty(Metadata.prototype, "_duration", {
                    get: $util.oneOfGetter($oneOfFields = ["duration"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Metadata _channelJid.
                 * @member {"channelJid"|undefined} _channelJid
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Object.defineProperty(Metadata.prototype, "_channelJid", {
                    get: $util.oneOfGetter($oneOfFields = ["channelJid"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Metadata _channelMessageId.
                 * @member {"channelMessageId"|undefined} _channelMessageId
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Object.defineProperty(Metadata.prototype, "_channelMessageId", {
                    get: $util.oneOfGetter($oneOfFields = ["channelMessageId"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Metadata _hasMultipleReshares.
                 * @member {"hasMultipleReshares"|undefined} _hasMultipleReshares
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 */
                Object.defineProperty(Metadata.prototype, "_hasMultipleReshares", {
                    get: $util.oneOfGetter($oneOfFields = ["hasMultipleReshares"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new Metadata instance using the specified properties.
                 * @function create
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @static
                 * @param {StatusAttributions.StatusAttribution.StatusReshare.IMetadata=} [properties] Properties to set
                 * @returns {StatusAttributions.StatusAttribution.StatusReshare.Metadata} Metadata instance
                 */
                Metadata.create = function create(properties) {
                    return new Metadata(properties);
                };

                /**
                 * Encodes the specified Metadata message. Does not implicitly {@link StatusAttributions.StatusAttribution.StatusReshare.Metadata.verify|verify} messages.
                 * @function encode
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @static
                 * @param {StatusAttributions.StatusAttribution.StatusReshare.IMetadata} message Metadata message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Metadata.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.duration != null && Object.hasOwnProperty.call(message, "duration"))
                        writer.uint32(/* id 1, wireType 0 =*/8).int32(message.duration);
                    if (message.channelJid != null && Object.hasOwnProperty.call(message, "channelJid"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelJid);
                    if (message.channelMessageId != null && Object.hasOwnProperty.call(message, "channelMessageId"))
                        writer.uint32(/* id 3, wireType 0 =*/24).int32(message.channelMessageId);
                    if (message.hasMultipleReshares != null && Object.hasOwnProperty.call(message, "hasMultipleReshares"))
                        writer.uint32(/* id 4, wireType 0 =*/32).bool(message.hasMultipleReshares);
                    return writer;
                };

                /**
                 * Encodes the specified Metadata message, length delimited. Does not implicitly {@link StatusAttributions.StatusAttribution.StatusReshare.Metadata.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @static
                 * @param {StatusAttributions.StatusAttribution.StatusReshare.IMetadata} message Metadata message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Metadata.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Metadata message from the specified reader or buffer.
                 * @function decode
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {StatusAttributions.StatusAttribution.StatusReshare.Metadata} Metadata
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Metadata.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.StatusAttributions.StatusAttribution.StatusReshare.Metadata();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        if (tag === error)
                            break;
                        switch (tag >>> 3) {
                        case 1: {
                                message.duration = reader.int32();
                                break;
                            }
                        case 2: {
                                message.channelJid = reader.string();
                                break;
                            }
                        case 3: {
                                message.channelMessageId = reader.int32();
                                break;
                            }
                        case 4: {
                                message.hasMultipleReshares = reader.bool();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };

                /**
                 * Decodes a Metadata message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {StatusAttributions.StatusAttribution.StatusReshare.Metadata} Metadata
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Metadata.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Metadata message.
                 * @function verify
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Metadata.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.duration != null && message.hasOwnProperty("duration")) {
                        properties._duration = 1;
                        if (!$util.isInteger(message.duration))
                            return "duration: integer expected";
                    }
                    if (message.channelJid != null && message.hasOwnProperty("channelJid")) {
                        properties._channelJid = 1;
                        if (!$util.isString(message.channelJid))
                            return "channelJid: string expected";
                    }
                    if (message.channelMessageId != null && message.hasOwnProperty("channelMessageId")) {
                        properties._channelMessageId = 1;
                        if (!$util.isInteger(message.channelMessageId))
                            return "channelMessageId: integer expected";
                    }
                    if (message.hasMultipleReshares != null && message.hasOwnProperty("hasMultipleReshares")) {
                        properties._hasMultipleReshares = 1;
                        if (typeof message.hasMultipleReshares !== "boolean")
                            return "hasMultipleReshares: boolean expected";
                    }
                    return null;
                };

                /**
                 * Creates a Metadata message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {StatusAttributions.StatusAttribution.StatusReshare.Metadata} Metadata
                 */
                Metadata.fromObject = function fromObject(object) {
                    if (object instanceof $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata)
                        return object;
                    var message = new $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata();
                    if (object.duration != null)
                        message.duration = object.duration | 0;
                    if (object.channelJid != null)
                        message.channelJid = String(object.channelJid);
                    if (object.channelMessageId != null)
                        message.channelMessageId = object.channelMessageId | 0;
                    if (object.hasMultipleReshares != null)
                        message.hasMultipleReshares = Boolean(object.hasMultipleReshares);
                    return message;
                };

                /**
                 * Creates a plain object from a Metadata message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @static
                 * @param {StatusAttributions.StatusAttribution.StatusReshare.Metadata} message Metadata
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Metadata.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (message.duration != null && message.hasOwnProperty("duration")) {
                        object.duration = message.duration;
                        if (options.oneofs)
                            object._duration = "duration";
                    }
                    if (message.channelJid != null && message.hasOwnProperty("channelJid")) {
                        object.channelJid = message.channelJid;
                        if (options.oneofs)
                            object._channelJid = "channelJid";
                    }
                    if (message.channelMessageId != null && message.hasOwnProperty("channelMessageId")) {
                        object.channelMessageId = message.channelMessageId;
                        if (options.oneofs)
                            object._channelMessageId = "channelMessageId";
                    }
                    if (message.hasMultipleReshares != null && message.hasOwnProperty("hasMultipleReshares")) {
                        object.hasMultipleReshares = message.hasMultipleReshares;
                        if (options.oneofs)
                            object._hasMultipleReshares = "hasMultipleReshares";
                    }
                    return object;
                };

                /**
                 * Converts this Metadata to JSON.
                 * @function toJSON
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Metadata.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };

                /**
                 * Gets the default type url for Metadata
                 * @function getTypeUrl
                 * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/StatusAttributions.StatusAttribution.StatusReshare.Metadata";
                };

                return Metadata;
            })();

            /**
             * Source enum.
             * @name StatusAttributions.StatusAttribution.StatusReshare.Source
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} INTERNAL_RESHARE=1 INTERNAL_RESHARE value
             * @property {number} MENTION_RESHARE=2 MENTION_RESHARE value
             * @property {number} CHANNEL_RESHARE=3 CHANNEL_RESHARE value
             * @property {number} FORWARD=4 FORWARD value
             */
            StatusReshare.Source = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "INTERNAL_RESHARE"] = 1;
                values[valuesById[2] = "MENTION_RESHARE"] = 2;
                values[valuesById[3] = "CHANNEL_RESHARE"] = 3;
                values[valuesById[4] = "FORWARD"] = 4;
                return values;
            })();

            return StatusReshare;
        })();

        /**
         * Type enum.
         * @name StatusAttributions.StatusAttribution.Type
         * @enum {number}
         * @property {number} UNKNOWN=0 UNKNOWN value
         * @property {number} RESHARE=1 RESHARE value
         * @property {number} EXTERNAL_SHARE=2 EXTERNAL_SHARE value
         * @property {number} MUSIC=3 MUSIC value
         * @property {number} STATUS_MENTION=4 STATUS_MENTION value
         * @property {number} GROUP_STATUS=5 GROUP_STATUS value
         * @property {number} RL_ATTRIBUTION=6 RL_ATTRIBUTION value
         * @property {number} AI_CREATED=7 AI_CREATED value
         * @property {number} LAYOUTS=8 LAYOUTS value
         */
        StatusAttribution.Type = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "RESHARE"] = 1;
            values[valuesById[2] = "EXTERNAL_SHARE"] = 2;
            values[valuesById[3] = "MUSIC"] = 3;
            values[valuesById[4] = "STATUS_MENTION"] = 4;
            values[valuesById[5] = "GROUP_STATUS"] = 5;
            values[valuesById[6] = "RL_ATTRIBUTION"] = 6;
            values[valuesById[7] = "AI_CREATED"] = 7;
            values[valuesById[8] = "LAYOUTS"] = 8;
            return values;
        })();

        return StatusAttribution;
    })();

    return StatusAttributions;
})();

$root.Adv = (function() {

    /**
     * Namespace Adv.
     * @exports Adv
     * @namespace
     */
    var Adv = {};

    Adv.ADVSignedDeviceIdentityHMAC = (function() {

        /**
         * Properties of a ADVSignedDeviceIdentityHMAC.
         * @memberof Adv
         * @interface IADVSignedDeviceIdentityHMAC
         * @property {Uint8Array|null} [details] ADVSignedDeviceIdentityHMAC details
         * @property {Uint8Array|null} [hmac] ADVSignedDeviceIdentityHMAC hmac
         * @property {Adv.ADVEncryptionType|null} [accountType] ADVSignedDeviceIdentityHMAC accountType
         */

        /**
         * Constructs a new ADVSignedDeviceIdentityHMAC.
         * @memberof Adv
         * @classdesc Represents a ADVSignedDeviceIdentityHMAC.
         * @implements IADVSignedDeviceIdentityHMAC
         * @constructor
         * @param {Adv.IADVSignedDeviceIdentityHMAC=} [properties] Properties to set
         */
        function ADVSignedDeviceIdentityHMAC(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]];
        }

        /**
         * ADVSignedDeviceIdentityHMAC details.
         * @member {Uint8Array|null|undefined} details
         * @memberof Adv.ADVSignedDeviceIdentityHMAC
         * @instance
         */
        ADVSignedDeviceIdentityHMAC.prototype.details = null;

        /**
         * ADVSignedDeviceIdentityHMAC hmac.
         * @member {Uint8Array|null|undefined} hmac
         * @memberof Adv.ADVSignedDeviceIdentityHMAC
         * @instance
         */
        ADVSignedDeviceIdentityHMAC.prototype.hmac = null;

        /**
         * ADVSignedDeviceIdentityHMAC accountType.
         * @member {Adv.ADVEncryptionType|null|undefined} accountType
         * @memberof Adv.ADVSignedDeviceIdentityHMAC
         * @instance
         */
        ADVSignedDeviceIdentityHMAC.prototype.accountType = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * ADVSignedDeviceIdentityHMAC _details.
         * @member {"details"|undefined} _details
         * @memberof Adv.ADVSignedDeviceIdentityHMAC
         * @instance
         */
        Object.defineProperty(ADVSignedDeviceIdentityHMAC.prototype, "_details", {
            get: $util.oneOfGetter($oneOfFields = ["details"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ADVSignedDeviceIdentityHMAC _hmac.
         * @member {"hmac"|undefined} _hmac
         * @memberof Adv.ADVSignedDeviceIdentityHMAC
         * @instance
         */
        Object.defineProperty(ADVSignedDeviceIdentityHMAC.prototype, "_hmac", {
            get: $util.oneOfGetter($oneOfFields = ["hmac"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ADVSignedDeviceIdentityHMAC _accountType.
         * @member {"accountType"|undefined} _accountType
         * @memberof Adv.ADVSignedDeviceIdentityHMAC
         * @instance
         */
        Object.defineProperty(ADVSignedDeviceIdentityHMAC.prototype, "_accountType", {
            get: $util.oneOfGetter($oneOfFields = ["accountType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new ADVSignedDeviceIdentityHMAC instance using the specified properties.
         * @function create
         * @memberof Adv.ADVSignedDeviceIdentityHMAC
         * @static
         * @param {Adv.IADVSignedDeviceIdentityHMAC=} [properties] Properties to set
         * @returns {Adv.ADVSignedDeviceIdentityHMAC} ADVSignedDeviceIdentityHMAC instance
         */
        ADVSignedDeviceIdentityHMAC.create = function create(properties) {
            return new ADVSignedDeviceIdentityHMAC(properties);
        };

        /**
         * Encodes the specified ADVSignedDeviceIdentityHMAC message. Does not implicitly {@link Adv.ADVSignedDeviceIdentityHMAC.verify|verify} messages.
         * @function encode
         * @memberof Adv.ADVSignedDeviceIdentityHMAC
         * @static
         * @param {Adv.IADVSignedDeviceIdentityHMAC} message ADVSignedDeviceIdentityHMAC message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ADVSignedDeviceIdentityHMAC.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.details != null && Object.hasOwnProperty.call(message, "details"))
                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.details);
            if (message.hmac != null && Object.hasOwnProperty.call(message, "hmac"))
                writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hmac);
            if (message.accountType != null && Object.hasOwnProperty.call(message, "accountType"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.accountType);
            return writer;
        };

        /**
         * Encodes the specified ADVSignedDeviceIdentityHMAC message, length delimited. Does not implicitly {@link Adv.ADVSignedDeviceIdentityHMAC.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Adv.ADVSignedDeviceIdentityHMAC
         * @static
         * @param {Adv.IADVSignedDeviceIdentityHMAC} message ADVSignedDeviceIdentityHMAC message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ADVSignedDeviceIdentityHMAC.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ADVSignedDeviceIdentityHMAC message from the specified reader or buffer.
         * @function decode
         * @memberof Adv.ADVSignedDeviceIdentityHMAC
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Adv.ADVSignedDeviceIdentityHMAC} ADVSignedDeviceIdentityHMAC
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ADVSignedDeviceIdentityHMAC.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.Adv.ADVSignedDeviceIdentityHMAC();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.details = reader.bytes();
                        break;
                    }
                case 2: {
                        message.hmac = reader.bytes();
                        break;
                    }
                case 3: {
                        message.accountType = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ADVSignedDeviceIdentityHMAC message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Adv.ADVSignedDeviceIdentityHMAC
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Adv.ADVSignedDeviceIdentityHMAC} ADVSignedDeviceIdentityHMAC
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ADVSignedDeviceIdentityHMAC.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ADVSignedDeviceIdentityHMAC message.
         * @function verify
         * @memberof Adv.ADVSignedDeviceIdentityHMAC
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ADVSignedDeviceIdentityHMAC.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.details != null && message.hasOwnProperty("details")) {
                properties._details = 1;
                if (!(message.details && typeof message.details.length === "number" || $util.isString(message.details)))
                    return "details: buffer expected";
            }
            if (message.hmac != null && message.hasOwnProperty("hmac")) {
                properties._hmac = 1;
                if (!(message.hmac && typeof message.hmac.length === "number" || $util.isString(message.hmac)))
                    return "hmac: buffer expected";
            }
            if (message.accountType != null && message.hasOwnProperty("accountType")) {
                properties._accountType = 1;
                switch (message.accountType) {
                default:
                    return "accountType: enum value expected";
                case 0:
                case 1:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a ADVSignedDeviceIdentityHMAC message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Adv.ADVSignedDeviceIdentityHMAC
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Adv.ADVSignedDeviceIdentityHMAC} ADVSignedDeviceIdentityHMAC
         */
        ADVSignedDeviceIdentityHMAC.fromObject = function fromObject(object) {
            if (object instanceof $root.Adv.ADVSignedDeviceIdentityHMAC)
                return object;
            var message = new $root.Adv.ADVSignedDeviceIdentityHMAC();
            if (object.details != null)
                if (typeof object.details === "string")
                    $util.base64.decode(object.details, message.details = $util.newBuffer($util.base64.length(object.details)), 0);
                else if (object.details.length >= 0)
                    message.details = object.details;
            if (object.hmac != null)
                if (typeof object.hmac === "string")
                    $util.base64.decode(object.hmac, message.hmac = $util.newBuffer($util.base64.length(object.hmac)), 0);
                else if (object.hmac.length >= 0)
                    message.hmac = object.hmac;
            switch (object.accountType) {
            default:
                if (typeof object.accountType === "number") {
                    message.accountType = object.accountType;
                    break;
                }
                break;
            case "E2EE":
            case 0:
                message.accountType = 0;
                break;
            case "HOSTED":
            case 1:
                message.accountType = 1;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a ADVSignedDeviceIdentityHMAC message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Adv.ADVSignedDeviceIdentityHMAC
         * @static
         * @param {Adv.ADVSignedDeviceIdentityHMAC} message ADVSignedDeviceIdentityHMAC
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        ADVSignedDeviceIdentityHMAC.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.details != null && message.hasOwnProperty("details")) {
                object.details = options.bytes === String ? $util.base64.encode(message.details, 0, message.details.length) : options.bytes === Array ? Array.prototype.slice.call(message.details) : message.details;
                if (options.oneofs)
                    object._details = "details";
            }
            if (message.hmac != null && message.hasOwnProperty("hmac")) {
                object.hmac = options.bytes === String ? $util.base64.encode(message.hmac, 0, message.hmac.length) : options.bytes === Array ? Array.prototype.slice.call(message.hmac) : message.hmac;
                if (options.oneofs)
                    object._hmac = "hmac";
            }
            if (message.accountType != null && message.hasOwnProperty("accountType")) {
                object.accountType = options.enums === String ? $root.Adv.ADVEncryptionType[message.accountType] === undefined ? message.accountType : $root.Adv.ADVEncryptionType[message.accountType] : message.accountType;
                if (options.oneofs)
                    object._accountType = "accountType";
            }
            return object;
        };

        /**
         * Converts this ADVSignedDeviceIdentityHMAC to JSON.
         * @function toJSON
         * @memberof Adv.ADVSignedDeviceIdentityHMAC
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        ADVSignedDeviceIdentityHMAC.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for ADVSignedDeviceIdentityHMAC
         * @function getTypeUrl
         * @memberof Adv.ADVSignedDeviceIdentityHMAC
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        ADVSignedDeviceIdentityHMAC.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Adv.ADVSignedDeviceIdentityHMAC";
        };

        return ADVSignedDeviceIdentityHMAC;
    })();

    Adv.ADVSignedDeviceIdentity = (function() {

        /**
         * Properties of a ADVSignedDeviceIdentity.
         * @memberof Adv
         * @interface IADVSignedDeviceIdentity
         * @property {Uint8Array|null} [details] ADVSignedDeviceIdentity details
         * @property {Uint8Array|null} [accountSignatureKey] ADVSignedDeviceIdentity accountSignatureKey
         * @property {Uint8Array|null} [accountSignature] ADVSignedDeviceIdentity accountSignature
         * @property {Uint8Array|null} [deviceSignature] ADVSignedDeviceIdentity deviceSignature
         */

        /**
         * Constructs a new ADVSignedDeviceIdentity.
         * @memberof Adv
         * @classdesc Represents a ADVSignedDeviceIdentity.
         * @implements IADVSignedDeviceIdentity
         * @constructor
         * @param {Adv.IADVSignedDeviceIdentity=} [properties] Properties to set
         */
        function ADVSignedDeviceIdentity(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]];
        }

        /**
         * ADVSignedDeviceIdentity details.
         * @member {Uint8Array|null|undefined} details
         * @memberof Adv.ADVSignedDeviceIdentity
         * @instance
         */
        ADVSignedDeviceIdentity.prototype.details = null;

        /**
         * ADVSignedDeviceIdentity accountSignatureKey.
         * @member {Uint8Array|null|undefined} accountSignatureKey
         * @memberof Adv.ADVSignedDeviceIdentity
         * @instance
         */
        ADVSignedDeviceIdentity.prototype.accountSignatureKey = null;

        /**
         * ADVSignedDeviceIdentity accountSignature.
         * @member {Uint8Array|null|undefined} accountSignature
         * @memberof Adv.ADVSignedDeviceIdentity
         * @instance
         */
        ADVSignedDeviceIdentity.prototype.accountSignature = null;

        /**
         * ADVSignedDeviceIdentity deviceSignature.
         * @member {Uint8Array|null|undefined} deviceSignature
         * @memberof Adv.ADVSignedDeviceIdentity
         * @instance
         */
        ADVSignedDeviceIdentity.prototype.deviceSignature = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * ADVSignedDeviceIdentity _details.
         * @member {"details"|undefined} _details
         * @memberof Adv.ADVSignedDeviceIdentity
         * @instance
         */
        Object.defineProperty(ADVSignedDeviceIdentity.prototype, "_details", {
            get: $util.oneOfGetter($oneOfFields = ["details"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ADVSignedDeviceIdentity _accountSignatureKey.
         * @member {"accountSignatureKey"|undefined} _accountSignatureKey
         * @memberof Adv.ADVSignedDeviceIdentity
         * @instance
         */
        Object.defineProperty(ADVSignedDeviceIdentity.prototype, "_accountSignatureKey", {
            get: $util.oneOfGetter($oneOfFields = ["accountSignatureKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ADVSignedDeviceIdentity _accountSignature.
         * @member {"accountSignature"|undefined} _accountSignature
         * @memberof Adv.ADVSignedDeviceIdentity
         * @instance
         */
        Object.defineProperty(ADVSignedDeviceIdentity.prototype, "_accountSignature", {
            get: $util.oneOfGetter($oneOfFields = ["accountSignature"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ADVSignedDeviceIdentity _deviceSignature.
         * @member {"deviceSignature"|undefined} _deviceSignature
         * @memberof Adv.ADVSignedDeviceIdentity
         * @instance
         */
        Object.defineProperty(ADVSignedDeviceIdentity.prototype, "_deviceSignature", {
            get: $util.oneOfGetter($oneOfFields = ["deviceSignature"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new ADVSignedDeviceIdentity instance using the specified properties.
         * @function create
         * @memberof Adv.ADVSignedDeviceIdentity
         * @static
         * @param {Adv.IADVSignedDeviceIdentity=} [properties] Properties to set
         * @returns {Adv.ADVSignedDeviceIdentity} ADVSignedDeviceIdentity instance
         */
        ADVSignedDeviceIdentity.create = function create(properties) {
            return new ADVSignedDeviceIdentity(properties);
        };

        /**
         * Encodes the specified ADVSignedDeviceIdentity message. Does not implicitly {@link Adv.ADVSignedDeviceIdentity.verify|verify} messages.
         * @function encode
         * @memberof Adv.ADVSignedDeviceIdentity
         * @static
         * @param {Adv.IADVSignedDeviceIdentity} message ADVSignedDeviceIdentity message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ADVSignedDeviceIdentity.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.details != null && Object.hasOwnProperty.call(message, "details"))
                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.details);
            if (message.accountSignatureKey != null && Object.hasOwnProperty.call(message, "accountSignatureKey"))
                writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.accountSignatureKey);
            if (message.accountSignature != null && Object.hasOwnProperty.call(message, "accountSignature"))
                writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.accountSignature);
            if (message.deviceSignature != null && Object.hasOwnProperty.call(message, "deviceSignature"))
                writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.deviceSignature);
            return writer;
        };

        /**
         * Encodes the specified ADVSignedDeviceIdentity message, length delimited. Does not implicitly {@link Adv.ADVSignedDeviceIdentity.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Adv.ADVSignedDeviceIdentity
         * @static
         * @param {Adv.IADVSignedDeviceIdentity} message ADVSignedDeviceIdentity message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ADVSignedDeviceIdentity.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ADVSignedDeviceIdentity message from the specified reader or buffer.
         * @function decode
         * @memberof Adv.ADVSignedDeviceIdentity
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Adv.ADVSignedDeviceIdentity} ADVSignedDeviceIdentity
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ADVSignedDeviceIdentity.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.Adv.ADVSignedDeviceIdentity();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.details = reader.bytes();
                        break;
                    }
                case 2: {
                        message.accountSignatureKey = reader.bytes();
                        break;
                    }
                case 3: {
                        message.accountSignature = reader.bytes();
                        break;
                    }
                case 4: {
                        message.deviceSignature = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ADVSignedDeviceIdentity message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Adv.ADVSignedDeviceIdentity
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Adv.ADVSignedDeviceIdentity} ADVSignedDeviceIdentity
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ADVSignedDeviceIdentity.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ADVSignedDeviceIdentity message.
         * @function verify
         * @memberof Adv.ADVSignedDeviceIdentity
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ADVSignedDeviceIdentity.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.details != null && message.hasOwnProperty("details")) {
                properties._details = 1;
                if (!(message.details && typeof message.details.length === "number" || $util.isString(message.details)))
                    return "details: buffer expected";
            }
            if (message.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey")) {
                properties._accountSignatureKey = 1;
                if (!(message.accountSignatureKey && typeof message.accountSignatureKey.length === "number" || $util.isString(message.accountSignatureKey)))
                    return "accountSignatureKey: buffer expected";
            }
            if (message.accountSignature != null && message.hasOwnProperty("accountSignature")) {
                properties._accountSignature = 1;
                if (!(message.accountSignature && typeof message.accountSignature.length === "number" || $util.isString(message.accountSignature)))
                    return "accountSignature: buffer expected";
            }
            if (message.deviceSignature != null && message.hasOwnProperty("deviceSignature")) {
                properties._deviceSignature = 1;
                if (!(message.deviceSignature && typeof message.deviceSignature.length === "number" || $util.isString(message.deviceSignature)))
                    return "deviceSignature: buffer expected";
            }
            return null;
        };

        /**
         * Creates a ADVSignedDeviceIdentity message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Adv.ADVSignedDeviceIdentity
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Adv.ADVSignedDeviceIdentity} ADVSignedDeviceIdentity
         */
        ADVSignedDeviceIdentity.fromObject = function fromObject(object) {
            if (object instanceof $root.Adv.ADVSignedDeviceIdentity)
                return object;
            var message = new $root.Adv.ADVSignedDeviceIdentity();
            if (object.details != null)
                if (typeof object.details === "string")
                    $util.base64.decode(object.details, message.details = $util.newBuffer($util.base64.length(object.details)), 0);
                else if (object.details.length >= 0)
                    message.details = object.details;
            if (object.accountSignatureKey != null)
                if (typeof object.accountSignatureKey === "string")
                    $util.base64.decode(object.accountSignatureKey, message.accountSignatureKey = $util.newBuffer($util.base64.length(object.accountSignatureKey)), 0);
                else if (object.accountSignatureKey.length >= 0)
                    message.accountSignatureKey = object.accountSignatureKey;
            if (object.accountSignature != null)
                if (typeof object.accountSignature === "string")
                    $util.base64.decode(object.accountSignature, message.accountSignature = $util.newBuffer($util.base64.length(object.accountSignature)), 0);
                else if (object.accountSignature.length >= 0)
                    message.accountSignature = object.accountSignature;
            if (object.deviceSignature != null)
                if (typeof object.deviceSignature === "string")
                    $util.base64.decode(object.deviceSignature, message.deviceSignature = $util.newBuffer($util.base64.length(object.deviceSignature)), 0);
                else if (object.deviceSignature.length >= 0)
                    message.deviceSignature = object.deviceSignature;
            return message;
        };

        /**
         * Creates a plain object from a ADVSignedDeviceIdentity message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Adv.ADVSignedDeviceIdentity
         * @static
         * @param {Adv.ADVSignedDeviceIdentity} message ADVSignedDeviceIdentity
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        ADVSignedDeviceIdentity.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.details != null && message.hasOwnProperty("details")) {
                object.details = options.bytes === String ? $util.base64.encode(message.details, 0, message.details.length) : options.bytes === Array ? Array.prototype.slice.call(message.details) : message.details;
                if (options.oneofs)
                    object._details = "details";
            }
            if (message.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey")) {
                object.accountSignatureKey = options.bytes === String ? $util.base64.encode(message.accountSignatureKey, 0, message.accountSignatureKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountSignatureKey) : message.accountSignatureKey;
                if (options.oneofs)
                    object._accountSignatureKey = "accountSignatureKey";
            }
            if (message.accountSignature != null && message.hasOwnProperty("accountSignature")) {
                object.accountSignature = options.bytes === String ? $util.base64.encode(message.accountSignature, 0, message.accountSignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountSignature) : message.accountSignature;
                if (options.oneofs)
                    object._accountSignature = "accountSignature";
            }
            if (message.deviceSignature != null && message.hasOwnProperty("deviceSignature")) {
                object.deviceSignature = options.bytes === String ? $util.base64.encode(message.deviceSignature, 0, message.deviceSignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.deviceSignature) : message.deviceSignature;
                if (options.oneofs)
                    object._deviceSignature = "deviceSignature";
            }
            return object;
        };

        /**
         * Converts this ADVSignedDeviceIdentity to JSON.
         * @function toJSON
         * @memberof Adv.ADVSignedDeviceIdentity
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        ADVSignedDeviceIdentity.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for ADVSignedDeviceIdentity
         * @function getTypeUrl
         * @memberof Adv.ADVSignedDeviceIdentity
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        ADVSignedDeviceIdentity.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Adv.ADVSignedDeviceIdentity";
        };

        return ADVSignedDeviceIdentity;
    })();

    Adv.ADVDeviceIdentity = (function() {

        /**
         * Properties of a ADVDeviceIdentity.
         * @memberof Adv
         * @interface IADVDeviceIdentity
         * @property {number|null} [rawId] ADVDeviceIdentity rawId
         * @property {number|Long|null} [timestamp] ADVDeviceIdentity timestamp
         * @property {number|null} [keyIndex] ADVDeviceIdentity keyIndex
         * @property {Adv.ADVEncryptionType|null} [accountType] ADVDeviceIdentity accountType
         * @property {Adv.ADVEncryptionType|null} [deviceType] ADVDeviceIdentity deviceType
         */

        /**
         * Constructs a new ADVDeviceIdentity.
         * @memberof Adv
         * @classdesc Represents a ADVDeviceIdentity.
         * @implements IADVDeviceIdentity
         * @constructor
         * @param {Adv.IADVDeviceIdentity=} [properties] Properties to set
         */
        function ADVDeviceIdentity(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]];
        }

        /**
         * ADVDeviceIdentity rawId.
         * @member {number|null|undefined} rawId
         * @memberof Adv.ADVDeviceIdentity
         * @instance
         */
        ADVDeviceIdentity.prototype.rawId = null;

        /**
         * ADVDeviceIdentity timestamp.
         * @member {number|Long|null|undefined} timestamp
         * @memberof Adv.ADVDeviceIdentity
         * @instance
         */
        ADVDeviceIdentity.prototype.timestamp = null;

        /**
         * ADVDeviceIdentity keyIndex.
         * @member {number|null|undefined} keyIndex
         * @memberof Adv.ADVDeviceIdentity
         * @instance
         */
        ADVDeviceIdentity.prototype.keyIndex = null;

        /**
         * ADVDeviceIdentity accountType.
         * @member {Adv.ADVEncryptionType|null|undefined} accountType
         * @memberof Adv.ADVDeviceIdentity
         * @instance
         */
        ADVDeviceIdentity.prototype.accountType = null;

        /**
         * ADVDeviceIdentity deviceType.
         * @member {Adv.ADVEncryptionType|null|undefined} deviceType
         * @memberof Adv.ADVDeviceIdentity
         * @instance
         */
        ADVDeviceIdentity.prototype.deviceType = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * ADVDeviceIdentity _rawId.
         * @member {"rawId"|undefined} _rawId
         * @memberof Adv.ADVDeviceIdentity
         * @instance
         */
        Object.defineProperty(ADVDeviceIdentity.prototype, "_rawId", {
            get: $util.oneOfGetter($oneOfFields = ["rawId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ADVDeviceIdentity _timestamp.
         * @member {"timestamp"|undefined} _timestamp
         * @memberof Adv.ADVDeviceIdentity
         * @instance
         */
        Object.defineProperty(ADVDeviceIdentity.prototype, "_timestamp", {
            get: $util.oneOfGetter($oneOfFields = ["timestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ADVDeviceIdentity _keyIndex.
         * @member {"keyIndex"|undefined} _keyIndex
         * @memberof Adv.ADVDeviceIdentity
         * @instance
         */
        Object.defineProperty(ADVDeviceIdentity.prototype, "_keyIndex", {
            get: $util.oneOfGetter($oneOfFields = ["keyIndex"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ADVDeviceIdentity _accountType.
         * @member {"accountType"|undefined} _accountType
         * @memberof Adv.ADVDeviceIdentity
         * @instance
         */
        Object.defineProperty(ADVDeviceIdentity.prototype, "_accountType", {
            get: $util.oneOfGetter($oneOfFields = ["accountType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ADVDeviceIdentity _deviceType.
         * @member {"deviceType"|undefined} _deviceType
         * @memberof Adv.ADVDeviceIdentity
         * @instance
         */
        Object.defineProperty(ADVDeviceIdentity.prototype, "_deviceType", {
            get: $util.oneOfGetter($oneOfFields = ["deviceType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new ADVDeviceIdentity instance using the specified properties.
         * @function create
         * @memberof Adv.ADVDeviceIdentity
         * @static
         * @param {Adv.IADVDeviceIdentity=} [properties] Properties to set
         * @returns {Adv.ADVDeviceIdentity} ADVDeviceIdentity instance
         */
        ADVDeviceIdentity.create = function create(properties) {
            return new ADVDeviceIdentity(properties);
        };

        /**
         * Encodes the specified ADVDeviceIdentity message. Does not implicitly {@link Adv.ADVDeviceIdentity.verify|verify} messages.
         * @function encode
         * @memberof Adv.ADVDeviceIdentity
         * @static
         * @param {Adv.IADVDeviceIdentity} message ADVDeviceIdentity message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ADVDeviceIdentity.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.rawId != null && Object.hasOwnProperty.call(message, "rawId"))
                writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.rawId);
            if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
                writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp);
            if (message.keyIndex != null && Object.hasOwnProperty.call(message, "keyIndex"))
                writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.keyIndex);
            if (message.accountType != null && Object.hasOwnProperty.call(message, "accountType"))
                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.accountType);
            if (message.deviceType != null && Object.hasOwnProperty.call(message, "deviceType"))
                writer.uint32(/* id 5, wireType 0 =*/40).int32(message.deviceType);
            return writer;
        };

        /**
         * Encodes the specified ADVDeviceIdentity message, length delimited. Does not implicitly {@link Adv.ADVDeviceIdentity.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Adv.ADVDeviceIdentity
         * @static
         * @param {Adv.IADVDeviceIdentity} message ADVDeviceIdentity message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ADVDeviceIdentity.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ADVDeviceIdentity message from the specified reader or buffer.
         * @function decode
         * @memberof Adv.ADVDeviceIdentity
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Adv.ADVDeviceIdentity} ADVDeviceIdentity
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ADVDeviceIdentity.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.Adv.ADVDeviceIdentity();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.rawId = reader.uint32();
                        break;
                    }
                case 2: {
                        message.timestamp = reader.uint64();
                        break;
                    }
                case 3: {
                        message.keyIndex = reader.uint32();
                        break;
                    }
                case 4: {
                        message.accountType = reader.int32();
                        break;
                    }
                case 5: {
                        message.deviceType = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ADVDeviceIdentity message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Adv.ADVDeviceIdentity
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Adv.ADVDeviceIdentity} ADVDeviceIdentity
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ADVDeviceIdentity.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ADVDeviceIdentity message.
         * @function verify
         * @memberof Adv.ADVDeviceIdentity
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ADVDeviceIdentity.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.rawId != null && message.hasOwnProperty("rawId")) {
                properties._rawId = 1;
                if (!$util.isInteger(message.rawId))
                    return "rawId: integer expected";
            }
            if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
                properties._timestamp = 1;
                if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
                    return "timestamp: integer|Long expected";
            }
            if (message.keyIndex != null && message.hasOwnProperty("keyIndex")) {
                properties._keyIndex = 1;
                if (!$util.isInteger(message.keyIndex))
                    return "keyIndex: integer expected";
            }
            if (message.accountType != null && message.hasOwnProperty("accountType")) {
                properties._accountType = 1;
                switch (message.accountType) {
                default:
                    return "accountType: enum value expected";
                case 0:
                case 1:
                    break;
                }
            }
            if (message.deviceType != null && message.hasOwnProperty("deviceType")) {
                properties._deviceType = 1;
                switch (message.deviceType) {
                default:
                    return "deviceType: enum value expected";
                case 0:
                case 1:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a ADVDeviceIdentity message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Adv.ADVDeviceIdentity
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Adv.ADVDeviceIdentity} ADVDeviceIdentity
         */
        ADVDeviceIdentity.fromObject = function fromObject(object) {
            if (object instanceof $root.Adv.ADVDeviceIdentity)
                return object;
            var message = new $root.Adv.ADVDeviceIdentity();
            if (object.rawId != null)
                message.rawId = object.rawId >>> 0;
            if (object.timestamp != null)
                if ($util.Long)
                    (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
                else if (typeof object.timestamp === "string")
                    message.timestamp = parseInt(object.timestamp, 10);
                else if (typeof object.timestamp === "number")
                    message.timestamp = object.timestamp;
                else if (typeof object.timestamp === "object")
                    message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
            if (object.keyIndex != null)
                message.keyIndex = object.keyIndex >>> 0;
            switch (object.accountType) {
            default:
                if (typeof object.accountType === "number") {
                    message.accountType = object.accountType;
                    break;
                }
                break;
            case "E2EE":
            case 0:
                message.accountType = 0;
                break;
            case "HOSTED":
            case 1:
                message.accountType = 1;
                break;
            }
            switch (object.deviceType) {
            default:
                if (typeof object.deviceType === "number") {
                    message.deviceType = object.deviceType;
                    break;
                }
                break;
            case "E2EE":
            case 0:
                message.deviceType = 0;
                break;
            case "HOSTED":
            case 1:
                message.deviceType = 1;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a ADVDeviceIdentity message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Adv.ADVDeviceIdentity
         * @static
         * @param {Adv.ADVDeviceIdentity} message ADVDeviceIdentity
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        ADVDeviceIdentity.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.rawId != null && message.hasOwnProperty("rawId")) {
                object.rawId = message.rawId;
                if (options.oneofs)
                    object._rawId = "rawId";
            }
            if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
                if (typeof message.timestamp === "number")
                    object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
                else
                    object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp;
                if (options.oneofs)
                    object._timestamp = "timestamp";
            }
            if (message.keyIndex != null && message.hasOwnProperty("keyIndex")) {
                object.keyIndex = message.keyIndex;
                if (options.oneofs)
                    object._keyIndex = "keyIndex";
            }
            if (message.accountType != null && message.hasOwnProperty("accountType")) {
                object.accountType = options.enums === String ? $root.Adv.ADVEncryptionType[message.accountType] === undefined ? message.accountType : $root.Adv.ADVEncryptionType[message.accountType] : message.accountType;
                if (options.oneofs)
                    object._accountType = "accountType";
            }
            if (message.deviceType != null && message.hasOwnProperty("deviceType")) {
                object.deviceType = options.enums === String ? $root.Adv.ADVEncryptionType[message.deviceType] === undefined ? message.deviceType : $root.Adv.ADVEncryptionType[message.deviceType] : message.deviceType;
                if (options.oneofs)
                    object._deviceType = "deviceType";
            }
            return object;
        };

        /**
         * Converts this ADVDeviceIdentity to JSON.
         * @function toJSON
         * @memberof Adv.ADVDeviceIdentity
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        ADVDeviceIdentity.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for ADVDeviceIdentity
         * @function getTypeUrl
         * @memberof Adv.ADVDeviceIdentity
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        ADVDeviceIdentity.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Adv.ADVDeviceIdentity";
        };

        return ADVDeviceIdentity;
    })();

    Adv.ADVSignedKeyIndexList = (function() {

        /**
         * Properties of a ADVSignedKeyIndexList.
         * @memberof Adv
         * @interface IADVSignedKeyIndexList
         * @property {Uint8Array|null} [details] ADVSignedKeyIndexList details
         * @property {Uint8Array|null} [accountSignature] ADVSignedKeyIndexList accountSignature
         * @property {Uint8Array|null} [accountSignatureKey] ADVSignedKeyIndexList accountSignatureKey
         */

        /**
         * Constructs a new ADVSignedKeyIndexList.
         * @memberof Adv
         * @classdesc Represents a ADVSignedKeyIndexList.
         * @implements IADVSignedKeyIndexList
         * @constructor
         * @param {Adv.IADVSignedKeyIndexList=} [properties] Properties to set
         */
        function ADVSignedKeyIndexList(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]];
        }

        /**
         * ADVSignedKeyIndexList details.
         * @member {Uint8Array|null|undefined} details
         * @memberof Adv.ADVSignedKeyIndexList
         * @instance
         */
        ADVSignedKeyIndexList.prototype.details = null;

        /**
         * ADVSignedKeyIndexList accountSignature.
         * @member {Uint8Array|null|undefined} accountSignature
         * @memberof Adv.ADVSignedKeyIndexList
         * @instance
         */
        ADVSignedKeyIndexList.prototype.accountSignature = null;

        /**
         * ADVSignedKeyIndexList accountSignatureKey.
         * @member {Uint8Array|null|undefined} accountSignatureKey
         * @memberof Adv.ADVSignedKeyIndexList
         * @instance
         */
        ADVSignedKeyIndexList.prototype.accountSignatureKey = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * ADVSignedKeyIndexList _details.
         * @member {"details"|undefined} _details
         * @memberof Adv.ADVSignedKeyIndexList
         * @instance
         */
        Object.defineProperty(ADVSignedKeyIndexList.prototype, "_details", {
            get: $util.oneOfGetter($oneOfFields = ["details"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ADVSignedKeyIndexList _accountSignature.
         * @member {"accountSignature"|undefined} _accountSignature
         * @memberof Adv.ADVSignedKeyIndexList
         * @instance
         */
        Object.defineProperty(ADVSignedKeyIndexList.prototype, "_accountSignature", {
            get: $util.oneOfGetter($oneOfFields = ["accountSignature"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ADVSignedKeyIndexList _accountSignatureKey.
         * @member {"accountSignatureKey"|undefined} _accountSignatureKey
         * @memberof Adv.ADVSignedKeyIndexList
         * @instance
         */
        Object.defineProperty(ADVSignedKeyIndexList.prototype, "_accountSignatureKey", {
            get: $util.oneOfGetter($oneOfFields = ["accountSignatureKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new ADVSignedKeyIndexList instance using the specified properties.
         * @function create
         * @memberof Adv.ADVSignedKeyIndexList
         * @static
         * @param {Adv.IADVSignedKeyIndexList=} [properties] Properties to set
         * @returns {Adv.ADVSignedKeyIndexList} ADVSignedKeyIndexList instance
         */
        ADVSignedKeyIndexList.create = function create(properties) {
            return new ADVSignedKeyIndexList(properties);
        };

        /**
         * Encodes the specified ADVSignedKeyIndexList message. Does not implicitly {@link Adv.ADVSignedKeyIndexList.verify|verify} messages.
         * @function encode
         * @memberof Adv.ADVSignedKeyIndexList
         * @static
         * @param {Adv.IADVSignedKeyIndexList} message ADVSignedKeyIndexList message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ADVSignedKeyIndexList.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.details != null && Object.hasOwnProperty.call(message, "details"))
                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.details);
            if (message.accountSignature != null && Object.hasOwnProperty.call(message, "accountSignature"))
                writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.accountSignature);
            if (message.accountSignatureKey != null && Object.hasOwnProperty.call(message, "accountSignatureKey"))
                writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.accountSignatureKey);
            return writer;
        };

        /**
         * Encodes the specified ADVSignedKeyIndexList message, length delimited. Does not implicitly {@link Adv.ADVSignedKeyIndexList.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Adv.ADVSignedKeyIndexList
         * @static
         * @param {Adv.IADVSignedKeyIndexList} message ADVSignedKeyIndexList message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ADVSignedKeyIndexList.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ADVSignedKeyIndexList message from the specified reader or buffer.
         * @function decode
         * @memberof Adv.ADVSignedKeyIndexList
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Adv.ADVSignedKeyIndexList} ADVSignedKeyIndexList
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ADVSignedKeyIndexList.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.Adv.ADVSignedKeyIndexList();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.details = reader.bytes();
                        break;
                    }
                case 2: {
                        message.accountSignature = reader.bytes();
                        break;
                    }
                case 3: {
                        message.accountSignatureKey = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ADVSignedKeyIndexList message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Adv.ADVSignedKeyIndexList
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Adv.ADVSignedKeyIndexList} ADVSignedKeyIndexList
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ADVSignedKeyIndexList.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ADVSignedKeyIndexList message.
         * @function verify
         * @memberof Adv.ADVSignedKeyIndexList
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ADVSignedKeyIndexList.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.details != null && message.hasOwnProperty("details")) {
                properties._details = 1;
                if (!(message.details && typeof message.details.length === "number" || $util.isString(message.details)))
                    return "details: buffer expected";
            }
            if (message.accountSignature != null && message.hasOwnProperty("accountSignature")) {
                properties._accountSignature = 1;
                if (!(message.accountSignature && typeof message.accountSignature.length === "number" || $util.isString(message.accountSignature)))
                    return "accountSignature: buffer expected";
            }
            if (message.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey")) {
                properties._accountSignatureKey = 1;
                if (!(message.accountSignatureKey && typeof message.accountSignatureKey.length === "number" || $util.isString(message.accountSignatureKey)))
                    return "accountSignatureKey: buffer expected";
            }
            return null;
        };

        /**
         * Creates a ADVSignedKeyIndexList message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Adv.ADVSignedKeyIndexList
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Adv.ADVSignedKeyIndexList} ADVSignedKeyIndexList
         */
        ADVSignedKeyIndexList.fromObject = function fromObject(object) {
            if (object instanceof $root.Adv.ADVSignedKeyIndexList)
                return object;
            var message = new $root.Adv.ADVSignedKeyIndexList();
            if (object.details != null)
                if (typeof object.details === "string")
                    $util.base64.decode(object.details, message.details = $util.newBuffer($util.base64.length(object.details)), 0);
                else if (object.details.length >= 0)
                    message.details = object.details;
            if (object.accountSignature != null)
                if (typeof object.accountSignature === "string")
                    $util.base64.decode(object.accountSignature, message.accountSignature = $util.newBuffer($util.base64.length(object.accountSignature)), 0);
                else if (object.accountSignature.length >= 0)
                    message.accountSignature = object.accountSignature;
            if (object.accountSignatureKey != null)
                if (typeof object.accountSignatureKey === "string")
                    $util.base64.decode(object.accountSignatureKey, message.accountSignatureKey = $util.newBuffer($util.base64.length(object.accountSignatureKey)), 0);
                else if (object.accountSignatureKey.length >= 0)
                    message.accountSignatureKey = object.accountSignatureKey;
            return message;
        };

        /**
         * Creates a plain object from a ADVSignedKeyIndexList message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Adv.ADVSignedKeyIndexList
         * @static
         * @param {Adv.ADVSignedKeyIndexList} message ADVSignedKeyIndexList
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        ADVSignedKeyIndexList.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.details != null && message.hasOwnProperty("details")) {
                object.details = options.bytes === String ? $util.base64.encode(message.details, 0, message.details.length) : options.bytes === Array ? Array.prototype.slice.call(message.details) : message.details;
                if (options.oneofs)
                    object._details = "details";
            }
            if (message.accountSignature != null && message.hasOwnProperty("accountSignature")) {
                object.accountSignature = options.bytes === String ? $util.base64.encode(message.accountSignature, 0, message.accountSignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountSignature) : message.accountSignature;
                if (options.oneofs)
                    object._accountSignature = "accountSignature";
            }
            if (message.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey")) {
                object.accountSignatureKey = options.bytes === String ? $util.base64.encode(message.accountSignatureKey, 0, message.accountSignatureKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountSignatureKey) : message.accountSignatureKey;
                if (options.oneofs)
                    object._accountSignatureKey = "accountSignatureKey";
            }
            return object;
        };

        /**
         * Converts this ADVSignedKeyIndexList to JSON.
         * @function toJSON
         * @memberof Adv.ADVSignedKeyIndexList
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        ADVSignedKeyIndexList.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for ADVSignedKeyIndexList
         * @function getTypeUrl
         * @memberof Adv.ADVSignedKeyIndexList
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        ADVSignedKeyIndexList.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Adv.ADVSignedKeyIndexList";
        };

        return ADVSignedKeyIndexList;
    })();

    Adv.ADVKeyIndexList = (function() {

        /**
         * Properties of a ADVKeyIndexList.
         * @memberof Adv
         * @interface IADVKeyIndexList
         * @property {number|null} [rawId] ADVKeyIndexList rawId
         * @property {number|Long|null} [timestamp] ADVKeyIndexList timestamp
         * @property {number|null} [currentIndex] ADVKeyIndexList currentIndex
         * @property {Array.<number>|null} [validIndexes] ADVKeyIndexList validIndexes
         * @property {Adv.ADVEncryptionType|null} [accountType] ADVKeyIndexList accountType
         */

        /**
         * Constructs a new ADVKeyIndexList.
         * @memberof Adv
         * @classdesc Represents a ADVKeyIndexList.
         * @implements IADVKeyIndexList
         * @constructor
         * @param {Adv.IADVKeyIndexList=} [properties] Properties to set
         */
        function ADVKeyIndexList(properties) {
            this.validIndexes = [];
            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]];
        }

        /**
         * ADVKeyIndexList rawId.
         * @member {number|null|undefined} rawId
         * @memberof Adv.ADVKeyIndexList
         * @instance
         */
        ADVKeyIndexList.prototype.rawId = null;

        /**
         * ADVKeyIndexList timestamp.
         * @member {number|Long|null|undefined} timestamp
         * @memberof Adv.ADVKeyIndexList
         * @instance
         */
        ADVKeyIndexList.prototype.timestamp = null;

        /**
         * ADVKeyIndexList currentIndex.
         * @member {number|null|undefined} currentIndex
         * @memberof Adv.ADVKeyIndexList
         * @instance
         */
        ADVKeyIndexList.prototype.currentIndex = null;

        /**
         * ADVKeyIndexList validIndexes.
         * @member {Array.<number>} validIndexes
         * @memberof Adv.ADVKeyIndexList
         * @instance
         */
        ADVKeyIndexList.prototype.validIndexes = $util.emptyArray;

        /**
         * ADVKeyIndexList accountType.
         * @member {Adv.ADVEncryptionType|null|undefined} accountType
         * @memberof Adv.ADVKeyIndexList
         * @instance
         */
        ADVKeyIndexList.prototype.accountType = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * ADVKeyIndexList _rawId.
         * @member {"rawId"|undefined} _rawId
         * @memberof Adv.ADVKeyIndexList
         * @instance
         */
        Object.defineProperty(ADVKeyIndexList.prototype, "_rawId", {
            get: $util.oneOfGetter($oneOfFields = ["rawId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ADVKeyIndexList _timestamp.
         * @member {"timestamp"|undefined} _timestamp
         * @memberof Adv.ADVKeyIndexList
         * @instance
         */
        Object.defineProperty(ADVKeyIndexList.prototype, "_timestamp", {
            get: $util.oneOfGetter($oneOfFields = ["timestamp"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ADVKeyIndexList _currentIndex.
         * @member {"currentIndex"|undefined} _currentIndex
         * @memberof Adv.ADVKeyIndexList
         * @instance
         */
        Object.defineProperty(ADVKeyIndexList.prototype, "_currentIndex", {
            get: $util.oneOfGetter($oneOfFields = ["currentIndex"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ADVKeyIndexList _accountType.
         * @member {"accountType"|undefined} _accountType
         * @memberof Adv.ADVKeyIndexList
         * @instance
         */
        Object.defineProperty(ADVKeyIndexList.prototype, "_accountType", {
            get: $util.oneOfGetter($oneOfFields = ["accountType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new ADVKeyIndexList instance using the specified properties.
         * @function create
         * @memberof Adv.ADVKeyIndexList
         * @static
         * @param {Adv.IADVKeyIndexList=} [properties] Properties to set
         * @returns {Adv.ADVKeyIndexList} ADVKeyIndexList instance
         */
        ADVKeyIndexList.create = function create(properties) {
            return new ADVKeyIndexList(properties);
        };

        /**
         * Encodes the specified ADVKeyIndexList message. Does not implicitly {@link Adv.ADVKeyIndexList.verify|verify} messages.
         * @function encode
         * @memberof Adv.ADVKeyIndexList
         * @static
         * @param {Adv.IADVKeyIndexList} message ADVKeyIndexList message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ADVKeyIndexList.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.rawId != null && Object.hasOwnProperty.call(message, "rawId"))
                writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.rawId);
            if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
                writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp);
            if (message.currentIndex != null && Object.hasOwnProperty.call(message, "currentIndex"))
                writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.currentIndex);
            if (message.validIndexes != null && message.validIndexes.length) {
                writer.uint32(/* id 4, wireType 2 =*/34).fork();
                for (var i = 0; i < message.validIndexes.length; ++i)
                    writer.uint32(message.validIndexes[i]);
                writer.ldelim();
            }
            if (message.accountType != null && Object.hasOwnProperty.call(message, "accountType"))
                writer.uint32(/* id 5, wireType 0 =*/40).int32(message.accountType);
            return writer;
        };

        /**
         * Encodes the specified ADVKeyIndexList message, length delimited. Does not implicitly {@link Adv.ADVKeyIndexList.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Adv.ADVKeyIndexList
         * @static
         * @param {Adv.IADVKeyIndexList} message ADVKeyIndexList message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ADVKeyIndexList.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ADVKeyIndexList message from the specified reader or buffer.
         * @function decode
         * @memberof Adv.ADVKeyIndexList
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Adv.ADVKeyIndexList} ADVKeyIndexList
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ADVKeyIndexList.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.Adv.ADVKeyIndexList();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.rawId = reader.uint32();
                        break;
                    }
                case 2: {
                        message.timestamp = reader.uint64();
                        break;
                    }
                case 3: {
                        message.currentIndex = reader.uint32();
                        break;
                    }
                case 4: {
                        if (!(message.validIndexes && message.validIndexes.length))
                            message.validIndexes = [];
                        if ((tag & 7) === 2) {
                            var end2 = reader.uint32() + reader.pos;
                            while (reader.pos < end2)
                                message.validIndexes.push(reader.uint32());
                        } else
                            message.validIndexes.push(reader.uint32());
                        break;
                    }
                case 5: {
                        message.accountType = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ADVKeyIndexList message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Adv.ADVKeyIndexList
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Adv.ADVKeyIndexList} ADVKeyIndexList
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ADVKeyIndexList.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ADVKeyIndexList message.
         * @function verify
         * @memberof Adv.ADVKeyIndexList
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ADVKeyIndexList.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.rawId != null && message.hasOwnProperty("rawId")) {
                properties._rawId = 1;
                if (!$util.isInteger(message.rawId))
                    return "rawId: integer expected";
            }
            if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
                properties._timestamp = 1;
                if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
                    return "timestamp: integer|Long expected";
            }
            if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) {
                properties._currentIndex = 1;
                if (!$util.isInteger(message.currentIndex))
                    return "currentIndex: integer expected";
            }
            if (message.validIndexes != null && message.hasOwnProperty("validIndexes")) {
                if (!Array.isArray(message.validIndexes))
                    return "validIndexes: array expected";
                for (var i = 0; i < message.validIndexes.length; ++i)
                    if (!$util.isInteger(message.validIndexes[i]))
                        return "validIndexes: integer[] expected";
            }
            if (message.accountType != null && message.hasOwnProperty("accountType")) {
                properties._accountType = 1;
                switch (message.accountType) {
                default:
                    return "accountType: enum value expected";
                case 0:
                case 1:
                    break;
                }
            }
            return null;
        };

        /**
         * Creates a ADVKeyIndexList message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Adv.ADVKeyIndexList
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Adv.ADVKeyIndexList} ADVKeyIndexList
         */
        ADVKeyIndexList.fromObject = function fromObject(object) {
            if (object instanceof $root.Adv.ADVKeyIndexList)
                return object;
            var message = new $root.Adv.ADVKeyIndexList();
            if (object.rawId != null)
                message.rawId = object.rawId >>> 0;
            if (object.timestamp != null)
                if ($util.Long)
                    (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
                else if (typeof object.timestamp === "string")
                    message.timestamp = parseInt(object.timestamp, 10);
                else if (typeof object.timestamp === "number")
                    message.timestamp = object.timestamp;
                else if (typeof object.timestamp === "object")
                    message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
            if (object.currentIndex != null)
                message.currentIndex = object.currentIndex >>> 0;
            if (object.validIndexes) {
                if (!Array.isArray(object.validIndexes))
                    throw TypeError(".Adv.ADVKeyIndexList.validIndexes: array expected");
                message.validIndexes = [];
                for (var i = 0; i < object.validIndexes.length; ++i)
                    message.validIndexes[i] = object.validIndexes[i] >>> 0;
            }
            switch (object.accountType) {
            default:
                if (typeof object.accountType === "number") {
                    message.accountType = object.accountType;
                    break;
                }
                break;
            case "E2EE":
            case 0:
                message.accountType = 0;
                break;
            case "HOSTED":
            case 1:
                message.accountType = 1;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a ADVKeyIndexList message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Adv.ADVKeyIndexList
         * @static
         * @param {Adv.ADVKeyIndexList} message ADVKeyIndexList
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        ADVKeyIndexList.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.validIndexes = [];
            if (message.rawId != null && message.hasOwnProperty("rawId")) {
                object.rawId = message.rawId;
                if (options.oneofs)
                    object._rawId = "rawId";
            }
            if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
                if (typeof message.timestamp === "number")
                    object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
                else
                    object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp;
                if (options.oneofs)
                    object._timestamp = "timestamp";
            }
            if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) {
                object.currentIndex = message.currentIndex;
                if (options.oneofs)
                    object._currentIndex = "currentIndex";
            }
            if (message.validIndexes && message.validIndexes.length) {
                object.validIndexes = [];
                for (var j = 0; j < message.validIndexes.length; ++j)
                    object.validIndexes[j] = message.validIndexes[j];
            }
            if (message.accountType != null && message.hasOwnProperty("accountType")) {
                object.accountType = options.enums === String ? $root.Adv.ADVEncryptionType[message.accountType] === undefined ? message.accountType : $root.Adv.ADVEncryptionType[message.accountType] : message.accountType;
                if (options.oneofs)
                    object._accountType = "accountType";
            }
            return object;
        };

        /**
         * Converts this ADVKeyIndexList to JSON.
         * @function toJSON
         * @memberof Adv.ADVKeyIndexList
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        ADVKeyIndexList.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for ADVKeyIndexList
         * @function getTypeUrl
         * @memberof Adv.ADVKeyIndexList
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        ADVKeyIndexList.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Adv.ADVKeyIndexList";
        };

        return ADVKeyIndexList;
    })();

    /**
     * ADVEncryptionType enum.
     * @name Adv.ADVEncryptionType
     * @enum {number}
     * @property {number} E2EE=0 E2EE value
     * @property {number} HOSTED=1 HOSTED value
     */
    Adv.ADVEncryptionType = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "E2EE"] = 0;
        values[valuesById[1] = "HOSTED"] = 1;
        return values;
    })();

    return Adv;
})();

$root.CompanionReg = (function() {

    /**
     * Namespace CompanionReg.
     * @exports CompanionReg
     * @namespace
     */
    var CompanionReg = {};

    CompanionReg.ClientPairingProps = (function() {

        /**
         * Properties of a ClientPairingProps.
         * @memberof CompanionReg
         * @interface IClientPairingProps
         * @property {boolean|null} [isChatDbLidMigrated] ClientPairingProps isChatDbLidMigrated
         * @property {boolean|null} [isSyncdPureLidSession] ClientPairingProps isSyncdPureLidSession
         * @property {boolean|null} [isSyncdSnapshotRecoveryEnabled] ClientPairingProps isSyncdSnapshotRecoveryEnabled
         * @property {boolean|null} [isHsThumbnailSyncEnabled] ClientPairingProps isHsThumbnailSyncEnabled
         */

        /**
         * Constructs a new ClientPairingProps.
         * @memberof CompanionReg
         * @classdesc Represents a ClientPairingProps.
         * @implements IClientPairingProps
         * @constructor
         * @param {CompanionReg.IClientPairingProps=} [properties] Properties to set
         */
        function ClientPairingProps(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]];
        }

        /**
         * ClientPairingProps isChatDbLidMigrated.
         * @member {boolean|null|undefined} isChatDbLidMigrated
         * @memberof CompanionReg.ClientPairingProps
         * @instance
         */
        ClientPairingProps.prototype.isChatDbLidMigrated = null;

        /**
         * ClientPairingProps isSyncdPureLidSession.
         * @member {boolean|null|undefined} isSyncdPureLidSession
         * @memberof CompanionReg.ClientPairingProps
         * @instance
         */
        ClientPairingProps.prototype.isSyncdPureLidSession = null;

        /**
         * ClientPairingProps isSyncdSnapshotRecoveryEnabled.
         * @member {boolean|null|undefined} isSyncdSnapshotRecoveryEnabled
         * @memberof CompanionReg.ClientPairingProps
         * @instance
         */
        ClientPairingProps.prototype.isSyncdSnapshotRecoveryEnabled = null;

        /**
         * ClientPairingProps isHsThumbnailSyncEnabled.
         * @member {boolean|null|undefined} isHsThumbnailSyncEnabled
         * @memberof CompanionReg.ClientPairingProps
         * @instance
         */
        ClientPairingProps.prototype.isHsThumbnailSyncEnabled = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * ClientPairingProps _isChatDbLidMigrated.
         * @member {"isChatDbLidMigrated"|undefined} _isChatDbLidMigrated
         * @memberof CompanionReg.ClientPairingProps
         * @instance
         */
        Object.defineProperty(ClientPairingProps.prototype, "_isChatDbLidMigrated", {
            get: $util.oneOfGetter($oneOfFields = ["isChatDbLidMigrated"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ClientPairingProps _isSyncdPureLidSession.
         * @member {"isSyncdPureLidSession"|undefined} _isSyncdPureLidSession
         * @memberof CompanionReg.ClientPairingProps
         * @instance
         */
        Object.defineProperty(ClientPairingProps.prototype, "_isSyncdPureLidSession", {
            get: $util.oneOfGetter($oneOfFields = ["isSyncdPureLidSession"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ClientPairingProps _isSyncdSnapshotRecoveryEnabled.
         * @member {"isSyncdSnapshotRecoveryEnabled"|undefined} _isSyncdSnapshotRecoveryEnabled
         * @memberof CompanionReg.ClientPairingProps
         * @instance
         */
        Object.defineProperty(ClientPairingProps.prototype, "_isSyncdSnapshotRecoveryEnabled", {
            get: $util.oneOfGetter($oneOfFields = ["isSyncdSnapshotRecoveryEnabled"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ClientPairingProps _isHsThumbnailSyncEnabled.
         * @member {"isHsThumbnailSyncEnabled"|undefined} _isHsThumbnailSyncEnabled
         * @memberof CompanionReg.ClientPairingProps
         * @instance
         */
        Object.defineProperty(ClientPairingProps.prototype, "_isHsThumbnailSyncEnabled", {
            get: $util.oneOfGetter($oneOfFields = ["isHsThumbnailSyncEnabled"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new ClientPairingProps instance using the specified properties.
         * @function create
         * @memberof CompanionReg.ClientPairingProps
         * @static
         * @param {CompanionReg.IClientPairingProps=} [properties] Properties to set
         * @returns {CompanionReg.ClientPairingProps} ClientPairingProps instance
         */
        ClientPairingProps.create = function create(properties) {
            return new ClientPairingProps(properties);
        };

        /**
         * Encodes the specified ClientPairingProps message. Does not implicitly {@link CompanionReg.ClientPairingProps.verify|verify} messages.
         * @function encode
         * @memberof CompanionReg.ClientPairingProps
         * @static
         * @param {CompanionReg.IClientPairingProps} message ClientPairingProps message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ClientPairingProps.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.isChatDbLidMigrated != null && Object.hasOwnProperty.call(message, "isChatDbLidMigrated"))
                writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isChatDbLidMigrated);
            if (message.isSyncdPureLidSession != null && Object.hasOwnProperty.call(message, "isSyncdPureLidSession"))
                writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isSyncdPureLidSession);
            if (message.isSyncdSnapshotRecoveryEnabled != null && Object.hasOwnProperty.call(message, "isSyncdSnapshotRecoveryEnabled"))
                writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isSyncdSnapshotRecoveryEnabled);
            if (message.isHsThumbnailSyncEnabled != null && Object.hasOwnProperty.call(message, "isHsThumbnailSyncEnabled"))
                writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isHsThumbnailSyncEnabled);
            return writer;
        };

        /**
         * Encodes the specified ClientPairingProps message, length delimited. Does not implicitly {@link CompanionReg.ClientPairingProps.verify|verify} messages.
         * @function encodeDelimited
         * @memberof CompanionReg.ClientPairingProps
         * @static
         * @param {CompanionReg.IClientPairingProps} message ClientPairingProps message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ClientPairingProps.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ClientPairingProps message from the specified reader or buffer.
         * @function decode
         * @memberof CompanionReg.ClientPairingProps
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {CompanionReg.ClientPairingProps} ClientPairingProps
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ClientPairingProps.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.CompanionReg.ClientPairingProps();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.isChatDbLidMigrated = reader.bool();
                        break;
                    }
                case 2: {
                        message.isSyncdPureLidSession = reader.bool();
                        break;
                    }
                case 3: {
                        message.isSyncdSnapshotRecoveryEnabled = reader.bool();
                        break;
                    }
                case 4: {
                        message.isHsThumbnailSyncEnabled = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ClientPairingProps message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof CompanionReg.ClientPairingProps
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {CompanionReg.ClientPairingProps} ClientPairingProps
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ClientPairingProps.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ClientPairingProps message.
         * @function verify
         * @memberof CompanionReg.ClientPairingProps
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ClientPairingProps.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.isChatDbLidMigrated != null && message.hasOwnProperty("isChatDbLidMigrated")) {
                properties._isChatDbLidMigrated = 1;
                if (typeof message.isChatDbLidMigrated !== "boolean")
                    return "isChatDbLidMigrated: boolean expected";
            }
            if (message.isSyncdPureLidSession != null && message.hasOwnProperty("isSyncdPureLidSession")) {
                properties._isSyncdPureLidSession = 1;
                if (typeof message.isSyncdPureLidSession !== "boolean")
                    return "isSyncdPureLidSession: boolean expected";
            }
            if (message.isSyncdSnapshotRecoveryEnabled != null && message.hasOwnProperty("isSyncdSnapshotRecoveryEnabled")) {
                properties._isSyncdSnapshotRecoveryEnabled = 1;
                if (typeof message.isSyncdSnapshotRecoveryEnabled !== "boolean")
                    return "isSyncdSnapshotRecoveryEnabled: boolean expected";
            }
            if (message.isHsThumbnailSyncEnabled != null && message.hasOwnProperty("isHsThumbnailSyncEnabled")) {
                properties._isHsThumbnailSyncEnabled = 1;
                if (typeof message.isHsThumbnailSyncEnabled !== "boolean")
                    return "isHsThumbnailSyncEnabled: boolean expected";
            }
            return null;
        };

        /**
         * Creates a ClientPairingProps message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof CompanionReg.ClientPairingProps
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {CompanionReg.ClientPairingProps} ClientPairingProps
         */
        ClientPairingProps.fromObject = function fromObject(object) {
            if (object instanceof $root.CompanionReg.ClientPairingProps)
                return object;
            var message = new $root.CompanionReg.ClientPairingProps();
            if (object.isChatDbLidMigrated != null)
                message.isChatDbLidMigrated = Boolean(object.isChatDbLidMigrated);
            if (object.isSyncdPureLidSession != null)
                message.isSyncdPureLidSession = Boolean(object.isSyncdPureLidSession);
            if (object.isSyncdSnapshotRecoveryEnabled != null)
                message.isSyncdSnapshotRecoveryEnabled = Boolean(object.isSyncdSnapshotRecoveryEnabled);
            if (object.isHsThumbnailSyncEnabled != null)
                message.isHsThumbnailSyncEnabled = Boolean(object.isHsThumbnailSyncEnabled);
            return message;
        };

        /**
         * Creates a plain object from a ClientPairingProps message. Also converts values to other types if specified.
         * @function toObject
         * @memberof CompanionReg.ClientPairingProps
         * @static
         * @param {CompanionReg.ClientPairingProps} message ClientPairingProps
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        ClientPairingProps.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.isChatDbLidMigrated != null && message.hasOwnProperty("isChatDbLidMigrated")) {
                object.isChatDbLidMigrated = message.isChatDbLidMigrated;
                if (options.oneofs)
                    object._isChatDbLidMigrated = "isChatDbLidMigrated";
            }
            if (message.isSyncdPureLidSession != null && message.hasOwnProperty("isSyncdPureLidSession")) {
                object.isSyncdPureLidSession = message.isSyncdPureLidSession;
                if (options.oneofs)
                    object._isSyncdPureLidSession = "isSyncdPureLidSession";
            }
            if (message.isSyncdSnapshotRecoveryEnabled != null && message.hasOwnProperty("isSyncdSnapshotRecoveryEnabled")) {
                object.isSyncdSnapshotRecoveryEnabled = message.isSyncdSnapshotRecoveryEnabled;
                if (options.oneofs)
                    object._isSyncdSnapshotRecoveryEnabled = "isSyncdSnapshotRecoveryEnabled";
            }
            if (message.isHsThumbnailSyncEnabled != null && message.hasOwnProperty("isHsThumbnailSyncEnabled")) {
                object.isHsThumbnailSyncEnabled = message.isHsThumbnailSyncEnabled;
                if (options.oneofs)
                    object._isHsThumbnailSyncEnabled = "isHsThumbnailSyncEnabled";
            }
            return object;
        };

        /**
         * Converts this ClientPairingProps to JSON.
         * @function toJSON
         * @memberof CompanionReg.ClientPairingProps
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        ClientPairingProps.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for ClientPairingProps
         * @function getTypeUrl
         * @memberof CompanionReg.ClientPairingProps
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        ClientPairingProps.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/CompanionReg.ClientPairingProps";
        };

        return ClientPairingProps;
    })();

    CompanionReg.EncryptedPairingRequest = (function() {

        /**
         * Properties of an EncryptedPairingRequest.
         * @memberof CompanionReg
         * @interface IEncryptedPairingRequest
         * @property {Uint8Array|null} [encryptedPayload] EncryptedPairingRequest encryptedPayload
         * @property {Uint8Array|null} [iv] EncryptedPairingRequest iv
         */

        /**
         * Constructs a new EncryptedPairingRequest.
         * @memberof CompanionReg
         * @classdesc Represents an EncryptedPairingRequest.
         * @implements IEncryptedPairingRequest
         * @constructor
         * @param {CompanionReg.IEncryptedPairingRequest=} [properties] Properties to set
         */
        function EncryptedPairingRequest(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]];
        }

        /**
         * EncryptedPairingRequest encryptedPayload.
         * @member {Uint8Array|null|undefined} encryptedPayload
         * @memberof CompanionReg.EncryptedPairingRequest
         * @instance
         */
        EncryptedPairingRequest.prototype.encryptedPayload = null;

        /**
         * EncryptedPairingRequest iv.
         * @member {Uint8Array|null|undefined} iv
         * @memberof CompanionReg.EncryptedPairingRequest
         * @instance
         */
        EncryptedPairingRequest.prototype.iv = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * EncryptedPairingRequest _encryptedPayload.
         * @member {"encryptedPayload"|undefined} _encryptedPayload
         * @memberof CompanionReg.EncryptedPairingRequest
         * @instance
         */
        Object.defineProperty(EncryptedPairingRequest.prototype, "_encryptedPayload", {
            get: $util.oneOfGetter($oneOfFields = ["encryptedPayload"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * EncryptedPairingRequest _iv.
         * @member {"iv"|undefined} _iv
         * @memberof CompanionReg.EncryptedPairingRequest
         * @instance
         */
        Object.defineProperty(EncryptedPairingRequest.prototype, "_iv", {
            get: $util.oneOfGetter($oneOfFields = ["iv"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new EncryptedPairingRequest instance using the specified properties.
         * @function create
         * @memberof CompanionReg.EncryptedPairingRequest
         * @static
         * @param {CompanionReg.IEncryptedPairingRequest=} [properties] Properties to set
         * @returns {CompanionReg.EncryptedPairingRequest} EncryptedPairingRequest instance
         */
        EncryptedPairingRequest.create = function create(properties) {
            return new EncryptedPairingRequest(properties);
        };

        /**
         * Encodes the specified EncryptedPairingRequest message. Does not implicitly {@link CompanionReg.EncryptedPairingRequest.verify|verify} messages.
         * @function encode
         * @memberof CompanionReg.EncryptedPairingRequest
         * @static
         * @param {CompanionReg.IEncryptedPairingRequest} message EncryptedPairingRequest message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        EncryptedPairingRequest.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.encryptedPayload != null && Object.hasOwnProperty.call(message, "encryptedPayload"))
                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encryptedPayload);
            if (message.iv != null && Object.hasOwnProperty.call(message, "iv"))
                writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.iv);
            return writer;
        };

        /**
         * Encodes the specified EncryptedPairingRequest message, length delimited. Does not implicitly {@link CompanionReg.EncryptedPairingRequest.verify|verify} messages.
         * @function encodeDelimited
         * @memberof CompanionReg.EncryptedPairingRequest
         * @static
         * @param {CompanionReg.IEncryptedPairingRequest} message EncryptedPairingRequest message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        EncryptedPairingRequest.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes an EncryptedPairingRequest message from the specified reader or buffer.
         * @function decode
         * @memberof CompanionReg.EncryptedPairingRequest
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {CompanionReg.EncryptedPairingRequest} EncryptedPairingRequest
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        EncryptedPairingRequest.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.CompanionReg.EncryptedPairingRequest();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.encryptedPayload = reader.bytes();
                        break;
                    }
                case 2: {
                        message.iv = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes an EncryptedPairingRequest message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof CompanionReg.EncryptedPairingRequest
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {CompanionReg.EncryptedPairingRequest} EncryptedPairingRequest
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        EncryptedPairingRequest.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies an EncryptedPairingRequest message.
         * @function verify
         * @memberof CompanionReg.EncryptedPairingRequest
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        EncryptedPairingRequest.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.encryptedPayload != null && message.hasOwnProperty("encryptedPayload")) {
                properties._encryptedPayload = 1;
                if (!(message.encryptedPayload && typeof message.encryptedPayload.length === "number" || $util.isString(message.encryptedPayload)))
                    return "encryptedPayload: buffer expected";
            }
            if (message.iv != null && message.hasOwnProperty("iv")) {
                properties._iv = 1;
                if (!(message.iv && typeof message.iv.length === "number" || $util.isString(message.iv)))
                    return "iv: buffer expected";
            }
            return null;
        };

        /**
         * Creates an EncryptedPairingRequest message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof CompanionReg.EncryptedPairingRequest
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {CompanionReg.EncryptedPairingRequest} EncryptedPairingRequest
         */
        EncryptedPairingRequest.fromObject = function fromObject(object) {
            if (object instanceof $root.CompanionReg.EncryptedPairingRequest)
                return object;
            var message = new $root.CompanionReg.EncryptedPairingRequest();
            if (object.encryptedPayload != null)
                if (typeof object.encryptedPayload === "string")
                    $util.base64.decode(object.encryptedPayload, message.encryptedPayload = $util.newBuffer($util.base64.length(object.encryptedPayload)), 0);
                else if (object.encryptedPayload.length >= 0)
                    message.encryptedPayload = object.encryptedPayload;
            if (object.iv != null)
                if (typeof object.iv === "string")
                    $util.base64.decode(object.iv, message.iv = $util.newBuffer($util.base64.length(object.iv)), 0);
                else if (object.iv.length >= 0)
                    message.iv = object.iv;
            return message;
        };

        /**
         * Creates a plain object from an EncryptedPairingRequest message. Also converts values to other types if specified.
         * @function toObject
         * @memberof CompanionReg.EncryptedPairingRequest
         * @static
         * @param {CompanionReg.EncryptedPairingRequest} message EncryptedPairingRequest
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        EncryptedPairingRequest.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.encryptedPayload != null && message.hasOwnProperty("encryptedPayload")) {
                object.encryptedPayload = options.bytes === String ? $util.base64.encode(message.encryptedPayload, 0, message.encryptedPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedPayload) : message.encryptedPayload;
                if (options.oneofs)
                    object._encryptedPayload = "encryptedPayload";
            }
            if (message.iv != null && message.hasOwnProperty("iv")) {
                object.iv = options.bytes === String ? $util.base64.encode(message.iv, 0, message.iv.length) : options.bytes === Array ? Array.prototype.slice.call(message.iv) : message.iv;
                if (options.oneofs)
                    object._iv = "iv";
            }
            return object;
        };

        /**
         * Converts this EncryptedPairingRequest to JSON.
         * @function toJSON
         * @memberof CompanionReg.EncryptedPairingRequest
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        EncryptedPairingRequest.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for EncryptedPairingRequest
         * @function getTypeUrl
         * @memberof CompanionReg.EncryptedPairingRequest
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        EncryptedPairingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/CompanionReg.EncryptedPairingRequest";
        };

        return EncryptedPairingRequest;
    })();

    CompanionReg.PairingRequest = (function() {

        /**
         * Properties of a PairingRequest.
         * @memberof CompanionReg
         * @interface IPairingRequest
         * @property {Uint8Array|null} [companionPublicKey] PairingRequest companionPublicKey
         * @property {Uint8Array|null} [companionIdentityKey] PairingRequest companionIdentityKey
         * @property {Uint8Array|null} [advSecret] PairingRequest advSecret
         */

        /**
         * Constructs a new PairingRequest.
         * @memberof CompanionReg
         * @classdesc Represents a PairingRequest.
         * @implements IPairingRequest
         * @constructor
         * @param {CompanionReg.IPairingRequest=} [properties] Properties to set
         */
        function PairingRequest(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]];
        }

        /**
         * PairingRequest companionPublicKey.
         * @member {Uint8Array|null|undefined} companionPublicKey
         * @memberof CompanionReg.PairingRequest
         * @instance
         */
        PairingRequest.prototype.companionPublicKey = null;

        /**
         * PairingRequest companionIdentityKey.
         * @member {Uint8Array|null|undefined} companionIdentityKey
         * @memberof CompanionReg.PairingRequest
         * @instance
         */
        PairingRequest.prototype.companionIdentityKey = null;

        /**
         * PairingRequest advSecret.
         * @member {Uint8Array|null|undefined} advSecret
         * @memberof CompanionReg.PairingRequest
         * @instance
         */
        PairingRequest.prototype.advSecret = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * PairingRequest _companionPublicKey.
         * @member {"companionPublicKey"|undefined} _companionPublicKey
         * @memberof CompanionReg.PairingRequest
         * @instance
         */
        Object.defineProperty(PairingRequest.prototype, "_companionPublicKey", {
            get: $util.oneOfGetter($oneOfFields = ["companionPublicKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PairingRequest _companionIdentityKey.
         * @member {"companionIdentityKey"|undefined} _companionIdentityKey
         * @memberof CompanionReg.PairingRequest
         * @instance
         */
        Object.defineProperty(PairingRequest.prototype, "_companionIdentityKey", {
            get: $util.oneOfGetter($oneOfFields = ["companionIdentityKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PairingRequest _advSecret.
         * @member {"advSecret"|undefined} _advSecret
         * @memberof CompanionReg.PairingRequest
         * @instance
         */
        Object.defineProperty(PairingRequest.prototype, "_advSecret", {
            get: $util.oneOfGetter($oneOfFields = ["advSecret"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new PairingRequest instance using the specified properties.
         * @function create
         * @memberof CompanionReg.PairingRequest
         * @static
         * @param {CompanionReg.IPairingRequest=} [properties] Properties to set
         * @returns {CompanionReg.PairingRequest} PairingRequest instance
         */
        PairingRequest.create = function create(properties) {
            return new PairingRequest(properties);
        };

        /**
         * Encodes the specified PairingRequest message. Does not implicitly {@link CompanionReg.PairingRequest.verify|verify} messages.
         * @function encode
         * @memberof CompanionReg.PairingRequest
         * @static
         * @param {CompanionReg.IPairingRequest} message PairingRequest message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PairingRequest.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.companionPublicKey != null && Object.hasOwnProperty.call(message, "companionPublicKey"))
                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.companionPublicKey);
            if (message.companionIdentityKey != null && Object.hasOwnProperty.call(message, "companionIdentityKey"))
                writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.companionIdentityKey);
            if (message.advSecret != null && Object.hasOwnProperty.call(message, "advSecret"))
                writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.advSecret);
            return writer;
        };

        /**
         * Encodes the specified PairingRequest message, length delimited. Does not implicitly {@link CompanionReg.PairingRequest.verify|verify} messages.
         * @function encodeDelimited
         * @memberof CompanionReg.PairingRequest
         * @static
         * @param {CompanionReg.IPairingRequest} message PairingRequest message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PairingRequest.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a PairingRequest message from the specified reader or buffer.
         * @function decode
         * @memberof CompanionReg.PairingRequest
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {CompanionReg.PairingRequest} PairingRequest
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PairingRequest.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.CompanionReg.PairingRequest();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.companionPublicKey = reader.bytes();
                        break;
                    }
                case 2: {
                        message.companionIdentityKey = reader.bytes();
                        break;
                    }
                case 3: {
                        message.advSecret = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a PairingRequest message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof CompanionReg.PairingRequest
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {CompanionReg.PairingRequest} PairingRequest
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PairingRequest.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a PairingRequest message.
         * @function verify
         * @memberof CompanionReg.PairingRequest
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        PairingRequest.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.companionPublicKey != null && message.hasOwnProperty("companionPublicKey")) {
                properties._companionPublicKey = 1;
                if (!(message.companionPublicKey && typeof message.companionPublicKey.length === "number" || $util.isString(message.companionPublicKey)))
                    return "companionPublicKey: buffer expected";
            }
            if (message.companionIdentityKey != null && message.hasOwnProperty("companionIdentityKey")) {
                properties._companionIdentityKey = 1;
                if (!(message.companionIdentityKey && typeof message.companionIdentityKey.length === "number" || $util.isString(message.companionIdentityKey)))
                    return "companionIdentityKey: buffer expected";
            }
            if (message.advSecret != null && message.hasOwnProperty("advSecret")) {
                properties._advSecret = 1;
                if (!(message.advSecret && typeof message.advSecret.length === "number" || $util.isString(message.advSecret)))
                    return "advSecret: buffer expected";
            }
            return null;
        };

        /**
         * Creates a PairingRequest message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof CompanionReg.PairingRequest
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {CompanionReg.PairingRequest} PairingRequest
         */
        PairingRequest.fromObject = function fromObject(object) {
            if (object instanceof $root.CompanionReg.PairingRequest)
                return object;
            var message = new $root.CompanionReg.PairingRequest();
            if (object.companionPublicKey != null)
                if (typeof object.companionPublicKey === "string")
                    $util.base64.decode(object.companionPublicKey, message.companionPublicKey = $util.newBuffer($util.base64.length(object.companionPublicKey)), 0);
                else if (object.companionPublicKey.length >= 0)
                    message.companionPublicKey = object.companionPublicKey;
            if (object.companionIdentityKey != null)
                if (typeof object.companionIdentityKey === "string")
                    $util.base64.decode(object.companionIdentityKey, message.companionIdentityKey = $util.newBuffer($util.base64.length(object.companionIdentityKey)), 0);
                else if (object.companionIdentityKey.length >= 0)
                    message.companionIdentityKey = object.companionIdentityKey;
            if (object.advSecret != null)
                if (typeof object.advSecret === "string")
                    $util.base64.decode(object.advSecret, message.advSecret = $util.newBuffer($util.base64.length(object.advSecret)), 0);
                else if (object.advSecret.length >= 0)
                    message.advSecret = object.advSecret;
            return message;
        };

        /**
         * Creates a plain object from a PairingRequest message. Also converts values to other types if specified.
         * @function toObject
         * @memberof CompanionReg.PairingRequest
         * @static
         * @param {CompanionReg.PairingRequest} message PairingRequest
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        PairingRequest.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.companionPublicKey != null && message.hasOwnProperty("companionPublicKey")) {
                object.companionPublicKey = options.bytes === String ? $util.base64.encode(message.companionPublicKey, 0, message.companionPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.companionPublicKey) : message.companionPublicKey;
                if (options.oneofs)
                    object._companionPublicKey = "companionPublicKey";
            }
            if (message.companionIdentityKey != null && message.hasOwnProperty("companionIdentityKey")) {
                object.companionIdentityKey = options.bytes === String ? $util.base64.encode(message.companionIdentityKey, 0, message.companionIdentityKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.companionIdentityKey) : message.companionIdentityKey;
                if (options.oneofs)
                    object._companionIdentityKey = "companionIdentityKey";
            }
            if (message.advSecret != null && message.hasOwnProperty("advSecret")) {
                object.advSecret = options.bytes === String ? $util.base64.encode(message.advSecret, 0, message.advSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.advSecret) : message.advSecret;
                if (options.oneofs)
                    object._advSecret = "advSecret";
            }
            return object;
        };

        /**
         * Converts this PairingRequest to JSON.
         * @function toJSON
         * @memberof CompanionReg.PairingRequest
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        PairingRequest.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for PairingRequest
         * @function getTypeUrl
         * @memberof CompanionReg.PairingRequest
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        PairingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/CompanionReg.PairingRequest";
        };

        return PairingRequest;
    })();

    CompanionReg.PrimaryEphemeralIdentity = (function() {

        /**
         * Properties of a PrimaryEphemeralIdentity.
         * @memberof CompanionReg
         * @interface IPrimaryEphemeralIdentity
         * @property {Uint8Array|null} [publicKey] PrimaryEphemeralIdentity publicKey
         * @property {Uint8Array|null} [nonce] PrimaryEphemeralIdentity nonce
         */

        /**
         * Constructs a new PrimaryEphemeralIdentity.
         * @memberof CompanionReg
         * @classdesc Represents a PrimaryEphemeralIdentity.
         * @implements IPrimaryEphemeralIdentity
         * @constructor
         * @param {CompanionReg.IPrimaryEphemeralIdentity=} [properties] Properties to set
         */
        function PrimaryEphemeralIdentity(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]];
        }

        /**
         * PrimaryEphemeralIdentity publicKey.
         * @member {Uint8Array|null|undefined} publicKey
         * @memberof CompanionReg.PrimaryEphemeralIdentity
         * @instance
         */
        PrimaryEphemeralIdentity.prototype.publicKey = null;

        /**
         * PrimaryEphemeralIdentity nonce.
         * @member {Uint8Array|null|undefined} nonce
         * @memberof CompanionReg.PrimaryEphemeralIdentity
         * @instance
         */
        PrimaryEphemeralIdentity.prototype.nonce = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * PrimaryEphemeralIdentity _publicKey.
         * @member {"publicKey"|undefined} _publicKey
         * @memberof CompanionReg.PrimaryEphemeralIdentity
         * @instance
         */
        Object.defineProperty(PrimaryEphemeralIdentity.prototype, "_publicKey", {
            get: $util.oneOfGetter($oneOfFields = ["publicKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * PrimaryEphemeralIdentity _nonce.
         * @member {"nonce"|undefined} _nonce
         * @memberof CompanionReg.PrimaryEphemeralIdentity
         * @instance
         */
        Object.defineProperty(PrimaryEphemeralIdentity.prototype, "_nonce", {
            get: $util.oneOfGetter($oneOfFields = ["nonce"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new PrimaryEphemeralIdentity instance using the specified properties.
         * @function create
         * @memberof CompanionReg.PrimaryEphemeralIdentity
         * @static
         * @param {CompanionReg.IPrimaryEphemeralIdentity=} [properties] Properties to set
         * @returns {CompanionReg.PrimaryEphemeralIdentity} PrimaryEphemeralIdentity instance
         */
        PrimaryEphemeralIdentity.create = function create(properties) {
            return new PrimaryEphemeralIdentity(properties);
        };

        /**
         * Encodes the specified PrimaryEphemeralIdentity message. Does not implicitly {@link CompanionReg.PrimaryEphemeralIdentity.verify|verify} messages.
         * @function encode
         * @memberof CompanionReg.PrimaryEphemeralIdentity
         * @static
         * @param {CompanionReg.IPrimaryEphemeralIdentity} message PrimaryEphemeralIdentity message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PrimaryEphemeralIdentity.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey"))
                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKey);
            if (message.nonce != null && Object.hasOwnProperty.call(message, "nonce"))
                writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.nonce);
            return writer;
        };

        /**
         * Encodes the specified PrimaryEphemeralIdentity message, length delimited. Does not implicitly {@link CompanionReg.PrimaryEphemeralIdentity.verify|verify} messages.
         * @function encodeDelimited
         * @memberof CompanionReg.PrimaryEphemeralIdentity
         * @static
         * @param {CompanionReg.IPrimaryEphemeralIdentity} message PrimaryEphemeralIdentity message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        PrimaryEphemeralIdentity.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a PrimaryEphemeralIdentity message from the specified reader or buffer.
         * @function decode
         * @memberof CompanionReg.PrimaryEphemeralIdentity
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {CompanionReg.PrimaryEphemeralIdentity} PrimaryEphemeralIdentity
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PrimaryEphemeralIdentity.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.CompanionReg.PrimaryEphemeralIdentity();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.publicKey = reader.bytes();
                        break;
                    }
                case 2: {
                        message.nonce = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a PrimaryEphemeralIdentity message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof CompanionReg.PrimaryEphemeralIdentity
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {CompanionReg.PrimaryEphemeralIdentity} PrimaryEphemeralIdentity
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        PrimaryEphemeralIdentity.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a PrimaryEphemeralIdentity message.
         * @function verify
         * @memberof CompanionReg.PrimaryEphemeralIdentity
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        PrimaryEphemeralIdentity.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.publicKey != null && message.hasOwnProperty("publicKey")) {
                properties._publicKey = 1;
                if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey)))
                    return "publicKey: buffer expected";
            }
            if (message.nonce != null && message.hasOwnProperty("nonce")) {
                properties._nonce = 1;
                if (!(message.nonce && typeof message.nonce.length === "number" || $util.isString(message.nonce)))
                    return "nonce: buffer expected";
            }
            return null;
        };

        /**
         * Creates a PrimaryEphemeralIdentity message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof CompanionReg.PrimaryEphemeralIdentity
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {CompanionReg.PrimaryEphemeralIdentity} PrimaryEphemeralIdentity
         */
        PrimaryEphemeralIdentity.fromObject = function fromObject(object) {
            if (object instanceof $root.CompanionReg.PrimaryEphemeralIdentity)
                return object;
            var message = new $root.CompanionReg.PrimaryEphemeralIdentity();
            if (object.publicKey != null)
                if (typeof object.publicKey === "string")
                    $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0);
                else if (object.publicKey.length >= 0)
                    message.publicKey = object.publicKey;
            if (object.nonce != null)
                if (typeof object.nonce === "string")
                    $util.base64.decode(object.nonce, message.nonce = $util.newBuffer($util.base64.length(object.nonce)), 0);
                else if (object.nonce.length >= 0)
                    message.nonce = object.nonce;
            return message;
        };

        /**
         * Creates a plain object from a PrimaryEphemeralIdentity message. Also converts values to other types if specified.
         * @function toObject
         * @memberof CompanionReg.PrimaryEphemeralIdentity
         * @static
         * @param {CompanionReg.PrimaryEphemeralIdentity} message PrimaryEphemeralIdentity
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        PrimaryEphemeralIdentity.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.publicKey != null && message.hasOwnProperty("publicKey")) {
                object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey;
                if (options.oneofs)
                    object._publicKey = "publicKey";
            }
            if (message.nonce != null && message.hasOwnProperty("nonce")) {
                object.nonce = options.bytes === String ? $util.base64.encode(message.nonce, 0, message.nonce.length) : options.bytes === Array ? Array.prototype.slice.call(message.nonce) : message.nonce;
                if (options.oneofs)
                    object._nonce = "nonce";
            }
            return object;
        };

        /**
         * Converts this PrimaryEphemeralIdentity to JSON.
         * @function toJSON
         * @memberof CompanionReg.PrimaryEphemeralIdentity
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        PrimaryEphemeralIdentity.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for PrimaryEphemeralIdentity
         * @function getTypeUrl
         * @memberof CompanionReg.PrimaryEphemeralIdentity
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        PrimaryEphemeralIdentity.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/CompanionReg.PrimaryEphemeralIdentity";
        };

        return PrimaryEphemeralIdentity;
    })();

    CompanionReg.ProloguePayload = (function() {

        /**
         * Properties of a ProloguePayload.
         * @memberof CompanionReg
         * @interface IProloguePayload
         * @property {Uint8Array|null} [companionEphemeralIdentity] ProloguePayload companionEphemeralIdentity
         * @property {CompanionReg.ICompanionCommitment|null} [commitment] ProloguePayload commitment
         */

        /**
         * Constructs a new ProloguePayload.
         * @memberof CompanionReg
         * @classdesc Represents a ProloguePayload.
         * @implements IProloguePayload
         * @constructor
         * @param {CompanionReg.IProloguePayload=} [properties] Properties to set
         */
        function ProloguePayload(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]];
        }

        /**
         * ProloguePayload companionEphemeralIdentity.
         * @member {Uint8Array|null|undefined} companionEphemeralIdentity
         * @memberof CompanionReg.ProloguePayload
         * @instance
         */
        ProloguePayload.prototype.companionEphemeralIdentity = null;

        /**
         * ProloguePayload commitment.
         * @member {CompanionReg.ICompanionCommitment|null|undefined} commitment
         * @memberof CompanionReg.ProloguePayload
         * @instance
         */
        ProloguePayload.prototype.commitment = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * ProloguePayload _companionEphemeralIdentity.
         * @member {"companionEphemeralIdentity"|undefined} _companionEphemeralIdentity
         * @memberof CompanionReg.ProloguePayload
         * @instance
         */
        Object.defineProperty(ProloguePayload.prototype, "_companionEphemeralIdentity", {
            get: $util.oneOfGetter($oneOfFields = ["companionEphemeralIdentity"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * ProloguePayload _commitment.
         * @member {"commitment"|undefined} _commitment
         * @memberof CompanionReg.ProloguePayload
         * @instance
         */
        Object.defineProperty(ProloguePayload.prototype, "_commitment", {
            get: $util.oneOfGetter($oneOfFields = ["commitment"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new ProloguePayload instance using the specified properties.
         * @function create
         * @memberof CompanionReg.ProloguePayload
         * @static
         * @param {CompanionReg.IProloguePayload=} [properties] Properties to set
         * @returns {CompanionReg.ProloguePayload} ProloguePayload instance
         */
        ProloguePayload.create = function create(properties) {
            return new ProloguePayload(properties);
        };

        /**
         * Encodes the specified ProloguePayload message. Does not implicitly {@link CompanionReg.ProloguePayload.verify|verify} messages.
         * @function encode
         * @memberof CompanionReg.ProloguePayload
         * @static
         * @param {CompanionReg.IProloguePayload} message ProloguePayload message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ProloguePayload.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.companionEphemeralIdentity != null && Object.hasOwnProperty.call(message, "companionEphemeralIdentity"))
                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.companionEphemeralIdentity);
            if (message.commitment != null && Object.hasOwnProperty.call(message, "commitment"))
                $root.CompanionReg.CompanionCommitment.encode(message.commitment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified ProloguePayload message, length delimited. Does not implicitly {@link CompanionReg.ProloguePayload.verify|verify} messages.
         * @function encodeDelimited
         * @memberof CompanionReg.ProloguePayload
         * @static
         * @param {CompanionReg.IProloguePayload} message ProloguePayload message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ProloguePayload.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ProloguePayload message from the specified reader or buffer.
         * @function decode
         * @memberof CompanionReg.ProloguePayload
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {CompanionReg.ProloguePayload} ProloguePayload
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ProloguePayload.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.CompanionReg.ProloguePayload();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.companionEphemeralIdentity = reader.bytes();
                        break;
                    }
                case 2: {
                        message.commitment = $root.CompanionReg.CompanionCommitment.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ProloguePayload message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof CompanionReg.ProloguePayload
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {CompanionReg.ProloguePayload} ProloguePayload
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ProloguePayload.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ProloguePayload message.
         * @function verify
         * @memberof CompanionReg.ProloguePayload
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ProloguePayload.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.companionEphemeralIdentity != null && message.hasOwnProperty("companionEphemeralIdentity")) {
                properties._companionEphemeralIdentity = 1;
                if (!(message.companionEphemeralIdentity && typeof message.companionEphemeralIdentity.length === "number" || $util.isString(message.companionEphemeralIdentity)))
                    return "companionEphemeralIdentity: buffer expected";
            }
            if (message.commitment != null && message.hasOwnProperty("commitment")) {
                properties._commitment = 1;
                {
                    var error = $root.CompanionReg.CompanionCommitment.verify(message.commitment);
                    if (error)
                        return "commitment." + error;
                }
            }
            return null;
        };

        /**
         * Creates a ProloguePayload message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof CompanionReg.ProloguePayload
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {CompanionReg.ProloguePayload} ProloguePayload
         */
        ProloguePayload.fromObject = function fromObject(object) {
            if (object instanceof $root.CompanionReg.ProloguePayload)
                return object;
            var message = new $root.CompanionReg.ProloguePayload();
            if (object.companionEphemeralIdentity != null)
                if (typeof object.companionEphemeralIdentity === "string")
                    $util.base64.decode(object.companionEphemeralIdentity, message.companionEphemeralIdentity = $util.newBuffer($util.base64.length(object.companionEphemeralIdentity)), 0);
                else if (object.companionEphemeralIdentity.length >= 0)
                    message.companionEphemeralIdentity = object.companionEphemeralIdentity;
            if (object.commitment != null) {
                if (typeof object.commitment !== "object")
                    throw TypeError(".CompanionReg.ProloguePayload.commitment: object expected");
                message.commitment = $root.CompanionReg.CompanionCommitment.fromObject(object.commitment);
            }
            return message;
        };

        /**
         * Creates a plain object from a ProloguePayload message. Also converts values to other types if specified.
         * @function toObject
         * @memberof CompanionReg.ProloguePayload
         * @static
         * @param {CompanionReg.ProloguePayload} message ProloguePayload
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        ProloguePayload.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.companionEphemeralIdentity != null && message.hasOwnProperty("companionEphemeralIdentity")) {
                object.companionEphemeralIdentity = options.bytes === String ? $util.base64.encode(message.companionEphemeralIdentity, 0, message.companionEphemeralIdentity.length) : options.bytes === Array ? Array.prototype.slice.call(message.companionEphemeralIdentity) : message.companionEphemeralIdentity;
                if (options.oneofs)
                    object._companionEphemeralIdentity = "companionEphemeralIdentity";
            }
            if (message.commitment != null && message.hasOwnProperty("commitment")) {
                object.commitment = $root.CompanionReg.CompanionCommitment.toObject(message.commitment, options);
                if (options.oneofs)
                    object._commitment = "commitment";
            }
            return object;
        };

        /**
         * Converts this ProloguePayload to JSON.
         * @function toJSON
         * @memberof CompanionReg.ProloguePayload
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        ProloguePayload.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for ProloguePayload
         * @function getTypeUrl
         * @memberof CompanionReg.ProloguePayload
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        ProloguePayload.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/CompanionReg.ProloguePayload";
        };

        return ProloguePayload;
    })();

    CompanionReg.CompanionCommitment = (function() {

        /**
         * Properties of a CompanionCommitment.
         * @memberof CompanionReg
         * @interface ICompanionCommitment
         * @property {Uint8Array|null} [hash] CompanionCommitment hash
         */

        /**
         * Constructs a new CompanionCommitment.
         * @memberof CompanionReg
         * @classdesc Represents a CompanionCommitment.
         * @implements ICompanionCommitment
         * @constructor
         * @param {CompanionReg.ICompanionCommitment=} [properties] Properties to set
         */
        function CompanionCommitment(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]];
        }

        /**
         * CompanionCommitment hash.
         * @member {Uint8Array|null|undefined} hash
         * @memberof CompanionReg.CompanionCommitment
         * @instance
         */
        CompanionCommitment.prototype.hash = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * CompanionCommitment _hash.
         * @member {"hash"|undefined} _hash
         * @memberof CompanionReg.CompanionCommitment
         * @instance
         */
        Object.defineProperty(CompanionCommitment.prototype, "_hash", {
            get: $util.oneOfGetter($oneOfFields = ["hash"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new CompanionCommitment instance using the specified properties.
         * @function create
         * @memberof CompanionReg.CompanionCommitment
         * @static
         * @param {CompanionReg.ICompanionCommitment=} [properties] Properties to set
         * @returns {CompanionReg.CompanionCommitment} CompanionCommitment instance
         */
        CompanionCommitment.create = function create(properties) {
            return new CompanionCommitment(properties);
        };

        /**
         * Encodes the specified CompanionCommitment message. Does not implicitly {@link CompanionReg.CompanionCommitment.verify|verify} messages.
         * @function encode
         * @memberof CompanionReg.CompanionCommitment
         * @static
         * @param {CompanionReg.ICompanionCommitment} message CompanionCommitment message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CompanionCommitment.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.hash != null && Object.hasOwnProperty.call(message, "hash"))
                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.hash);
            return writer;
        };

        /**
         * Encodes the specified CompanionCommitment message, length delimited. Does not implicitly {@link CompanionReg.CompanionCommitment.verify|verify} messages.
         * @function encodeDelimited
         * @memberof CompanionReg.CompanionCommitment
         * @static
         * @param {CompanionReg.ICompanionCommitment} message CompanionCommitment message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CompanionCommitment.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a CompanionCommitment message from the specified reader or buffer.
         * @function decode
         * @memberof CompanionReg.CompanionCommitment
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {CompanionReg.CompanionCommitment} CompanionCommitment
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CompanionCommitment.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.CompanionReg.CompanionCommitment();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.hash = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a CompanionCommitment message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof CompanionReg.CompanionCommitment
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {CompanionReg.CompanionCommitment} CompanionCommitment
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CompanionCommitment.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a CompanionCommitment message.
         * @function verify
         * @memberof CompanionReg.CompanionCommitment
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        CompanionCommitment.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.hash != null && message.hasOwnProperty("hash")) {
                properties._hash = 1;
                if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash)))
                    return "hash: buffer expected";
            }
            return null;
        };

        /**
         * Creates a CompanionCommitment message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof CompanionReg.CompanionCommitment
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {CompanionReg.CompanionCommitment} CompanionCommitment
         */
        CompanionCommitment.fromObject = function fromObject(object) {
            if (object instanceof $root.CompanionReg.CompanionCommitment)
                return object;
            var message = new $root.CompanionReg.CompanionCommitment();
            if (object.hash != null)
                if (typeof object.hash === "string")
                    $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0);
                else if (object.hash.length >= 0)
                    message.hash = object.hash;
            return message;
        };

        /**
         * Creates a plain object from a CompanionCommitment message. Also converts values to other types if specified.
         * @function toObject
         * @memberof CompanionReg.CompanionCommitment
         * @static
         * @param {CompanionReg.CompanionCommitment} message CompanionCommitment
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        CompanionCommitment.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.hash != null && message.hasOwnProperty("hash")) {
                object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash;
                if (options.oneofs)
                    object._hash = "hash";
            }
            return object;
        };

        /**
         * Converts this CompanionCommitment to JSON.
         * @function toJSON
         * @memberof CompanionReg.CompanionCommitment
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        CompanionCommitment.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for CompanionCommitment
         * @function getTypeUrl
         * @memberof CompanionReg.CompanionCommitment
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        CompanionCommitment.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/CompanionReg.CompanionCommitment";
        };

        return CompanionCommitment;
    })();

    CompanionReg.CompanionEphemeralIdentity = (function() {

        /**
         * Properties of a CompanionEphemeralIdentity.
         * @memberof CompanionReg
         * @interface ICompanionEphemeralIdentity
         * @property {Uint8Array|null} [publicKey] CompanionEphemeralIdentity publicKey
         * @property {CompanionReg.DeviceProps.PlatformType|null} [deviceType] CompanionEphemeralIdentity deviceType
         * @property {string|null} [ref] CompanionEphemeralIdentity ref
         */

        /**
         * Constructs a new CompanionEphemeralIdentity.
         * @memberof CompanionReg
         * @classdesc Represents a CompanionEphemeralIdentity.
         * @implements ICompanionEphemeralIdentity
         * @constructor
         * @param {CompanionReg.ICompanionEphemeralIdentity=} [properties] Properties to set
         */
        function CompanionEphemeralIdentity(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]];
        }

        /**
         * CompanionEphemeralIdentity publicKey.
         * @member {Uint8Array|null|undefined} publicKey
         * @memberof CompanionReg.CompanionEphemeralIdentity
         * @instance
         */
        CompanionEphemeralIdentity.prototype.publicKey = null;

        /**
         * CompanionEphemeralIdentity deviceType.
         * @member {CompanionReg.DeviceProps.PlatformType|null|undefined} deviceType
         * @memberof CompanionReg.CompanionEphemeralIdentity
         * @instance
         */
        CompanionEphemeralIdentity.prototype.deviceType = null;

        /**
         * CompanionEphemeralIdentity ref.
         * @member {string|null|undefined} ref
         * @memberof CompanionReg.CompanionEphemeralIdentity
         * @instance
         */
        CompanionEphemeralIdentity.prototype.ref = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * CompanionEphemeralIdentity _publicKey.
         * @member {"publicKey"|undefined} _publicKey
         * @memberof CompanionReg.CompanionEphemeralIdentity
         * @instance
         */
        Object.defineProperty(CompanionEphemeralIdentity.prototype, "_publicKey", {
            get: $util.oneOfGetter($oneOfFields = ["publicKey"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * CompanionEphemeralIdentity _deviceType.
         * @member {"deviceType"|undefined} _deviceType
         * @memberof CompanionReg.CompanionEphemeralIdentity
         * @instance
         */
        Object.defineProperty(CompanionEphemeralIdentity.prototype, "_deviceType", {
            get: $util.oneOfGetter($oneOfFields = ["deviceType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * CompanionEphemeralIdentity _ref.
         * @member {"ref"|undefined} _ref
         * @memberof CompanionReg.CompanionEphemeralIdentity
         * @instance
         */
        Object.defineProperty(CompanionEphemeralIdentity.prototype, "_ref", {
            get: $util.oneOfGetter($oneOfFields = ["ref"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new CompanionEphemeralIdentity instance using the specified properties.
         * @function create
         * @memberof CompanionReg.CompanionEphemeralIdentity
         * @static
         * @param {CompanionReg.ICompanionEphemeralIdentity=} [properties] Properties to set
         * @returns {CompanionReg.CompanionEphemeralIdentity} CompanionEphemeralIdentity instance
         */
        CompanionEphemeralIdentity.create = function create(properties) {
            return new CompanionEphemeralIdentity(properties);
        };

        /**
         * Encodes the specified CompanionEphemeralIdentity message. Does not implicitly {@link CompanionReg.CompanionEphemeralIdentity.verify|verify} messages.
         * @function encode
         * @memberof CompanionReg.CompanionEphemeralIdentity
         * @static
         * @param {CompanionReg.ICompanionEphemeralIdentity} message CompanionEphemeralIdentity message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CompanionEphemeralIdentity.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey"))
                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKey);
            if (message.deviceType != null && Object.hasOwnProperty.call(message, "deviceType"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.deviceType);
            if (message.ref != null && Object.hasOwnProperty.call(message, "ref"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.ref);
            return writer;
        };

        /**
         * Encodes the specified CompanionEphemeralIdentity message, length delimited. Does not implicitly {@link CompanionReg.CompanionEphemeralIdentity.verify|verify} messages.
         * @function encodeDelimited
         * @memberof CompanionReg.CompanionEphemeralIdentity
         * @static
         * @param {CompanionReg.ICompanionEphemeralIdentity} message CompanionEphemeralIdentity message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CompanionEphemeralIdentity.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a CompanionEphemeralIdentity message from the specified reader or buffer.
         * @function decode
         * @memberof CompanionReg.CompanionEphemeralIdentity
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {CompanionReg.CompanionEphemeralIdentity} CompanionEphemeralIdentity
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CompanionEphemeralIdentity.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.CompanionReg.CompanionEphemeralIdentity();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.publicKey = reader.bytes();
                        break;
                    }
                case 2: {
                        message.deviceType = reader.int32();
                        break;
                    }
                case 3: {
                        message.ref = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a CompanionEphemeralIdentity message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof CompanionReg.CompanionEphemeralIdentity
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {CompanionReg.CompanionEphemeralIdentity} CompanionEphemeralIdentity
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CompanionEphemeralIdentity.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a CompanionEphemeralIdentity message.
         * @function verify
         * @memberof CompanionReg.CompanionEphemeralIdentity
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        CompanionEphemeralIdentity.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.publicKey != null && message.hasOwnProperty("publicKey")) {
                properties._publicKey = 1;
                if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey)))
                    return "publicKey: buffer expected";
            }
            if (message.deviceType != null && message.hasOwnProperty("deviceType")) {
                properties._deviceType = 1;
                switch (message.deviceType) {
                default:
                    return "deviceType: 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:
                case 11:
                case 12:
                case 13:
                case 14:
                case 15:
                case 16:
                case 17:
                case 18:
                case 19:
                case 20:
                case 21:
                case 22:
                case 23:
                case 24:
                    break;
                }
            }
            if (message.ref != null && message.hasOwnProperty("ref")) {
                properties._ref = 1;
                if (!$util.isString(message.ref))
                    return "ref: string expected";
            }
            return null;
        };

        /**
         * Creates a CompanionEphemeralIdentity message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof CompanionReg.CompanionEphemeralIdentity
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {CompanionReg.CompanionEphemeralIdentity} CompanionEphemeralIdentity
         */
        CompanionEphemeralIdentity.fromObject = function fromObject(object) {
            if (object instanceof $root.CompanionReg.CompanionEphemeralIdentity)
                return object;
            var message = new $root.CompanionReg.CompanionEphemeralIdentity();
            if (object.publicKey != null)
                if (typeof object.publicKey === "string")
                    $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0);
                else if (object.publicKey.length >= 0)
                    message.publicKey = object.publicKey;
            switch (object.deviceType) {
            default:
                if (typeof object.deviceType === "number") {
                    message.deviceType = object.deviceType;
                    break;
                }
                break;
            case "UNKNOWN":
            case 0:
                message.deviceType = 0;
                break;
            case "CHROME":
            case 1:
                message.deviceType = 1;
                break;
            case "FIREFOX":
            case 2:
                message.deviceType = 2;
                break;
            case "IE":
            case 3:
                message.deviceType = 3;
                break;
            case "OPERA":
            case 4:
                message.deviceType = 4;
                break;
            case "SAFARI":
            case 5:
                message.deviceType = 5;
                break;
            case "EDGE":
            case 6:
                message.deviceType = 6;
                break;
            case "DESKTOP":
            case 7:
                message.deviceType = 7;
                break;
            case "IPAD":
            case 8:
                message.deviceType = 8;
                break;
            case "ANDROID_TABLET":
            case 9:
                message.deviceType = 9;
                break;
            case "OHANA":
            case 10:
                message.deviceType = 10;
                break;
            case "ALOHA":
            case 11:
                message.deviceType = 11;
                break;
            case "CATALINA":
            case 12:
                message.deviceType = 12;
                break;
            case "TCL_TV":
            case 13:
                message.deviceType = 13;
                break;
            case "IOS_PHONE":
            case 14:
                message.deviceType = 14;
                break;
            case "IOS_CATALYST":
            case 15:
                message.deviceType = 15;
                break;
            case "ANDROID_PHONE":
            case 16:
                message.deviceType = 16;
                break;
            case "ANDROID_AMBIGUOUS":
            case 17:
                message.deviceType = 17;
                break;
            case "WEAR_OS":
            case 18:
                message.deviceType = 18;
                break;
            case "AR_WRIST":
            case 19:
                message.deviceType = 19;
                break;
            case "AR_DEVICE":
            case 20:
                message.deviceType = 20;
                break;
            case "UWP":
            case 21:
                message.deviceType = 21;
                break;
            case "VR":
            case 22:
                message.deviceType = 22;
                break;
            case "CLOUD_API":
            case 23:
                message.deviceType = 23;
                break;
            case "SMARTGLASSES":
            case 24:
                message.deviceType = 24;
                break;
            }
            if (object.ref != null)
                message.ref = String(object.ref);
            return message;
        };

        /**
         * Creates a plain object from a CompanionEphemeralIdentity message. Also converts values to other types if specified.
         * @function toObject
         * @memberof CompanionReg.CompanionEphemeralIdentity
         * @static
         * @param {CompanionReg.CompanionEphemeralIdentity} message CompanionEphemeralIdentity
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        CompanionEphemeralIdentity.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.publicKey != null && message.hasOwnProperty("publicKey")) {
                object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey;
                if (options.oneofs)
                    object._publicKey = "publicKey";
            }
            if (message.deviceType != null && message.hasOwnProperty("deviceType")) {
                object.deviceType = options.enums === String ? $root.CompanionReg.DeviceProps.PlatformType[message.deviceType] === undefined ? message.deviceType : $root.CompanionReg.DeviceProps.PlatformType[message.deviceType] : message.deviceType;
                if (options.oneofs)
                    object._deviceType = "deviceType";
            }
            if (message.ref != null && message.hasOwnProperty("ref")) {
                object.ref = message.ref;
                if (options.oneofs)
                    object._ref = "ref";
            }
            return object;
        };

        /**
         * Converts this CompanionEphemeralIdentity to JSON.
         * @function toJSON
         * @memberof CompanionReg.CompanionEphemeralIdentity
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        CompanionEphemeralIdentity.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for CompanionEphemeralIdentity
         * @function getTypeUrl
         * @memberof CompanionReg.CompanionEphemeralIdentity
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        CompanionEphemeralIdentity.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/CompanionReg.CompanionEphemeralIdentity";
        };

        return CompanionEphemeralIdentity;
    })();

    CompanionReg.DeviceProps = (function() {

        /**
         * Properties of a DeviceProps.
         * @memberof CompanionReg
         * @interface IDeviceProps
         * @property {string|null} [os] DeviceProps os
         * @property {CompanionReg.DeviceProps.IAppVersion|null} [version] DeviceProps version
         * @property {CompanionReg.DeviceProps.PlatformType|null} [platformType] DeviceProps platformType
         * @property {boolean|null} [requireFullSync] DeviceProps requireFullSync
         * @property {CompanionReg.DeviceProps.IHistorySyncConfig|null} [historySyncConfig] DeviceProps historySyncConfig
         */

        /**
         * Constructs a new DeviceProps.
         * @memberof CompanionReg
         * @classdesc Represents a DeviceProps.
         * @implements IDeviceProps
         * @constructor
         * @param {CompanionReg.IDeviceProps=} [properties] Properties to set
         */
        function DeviceProps(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]];
        }

        /**
         * DeviceProps os.
         * @member {string|null|undefined} os
         * @memberof CompanionReg.DeviceProps
         * @instance
         */
        DeviceProps.prototype.os = null;

        /**
         * DeviceProps version.
         * @member {CompanionReg.DeviceProps.IAppVersion|null|undefined} version
         * @memberof CompanionReg.DeviceProps
         * @instance
         */
        DeviceProps.prototype.version = null;

        /**
         * DeviceProps platformType.
         * @member {CompanionReg.DeviceProps.PlatformType|null|undefined} platformType
         * @memberof CompanionReg.DeviceProps
         * @instance
         */
        DeviceProps.prototype.platformType = null;

        /**
         * DeviceProps requireFullSync.
         * @member {boolean|null|undefined} requireFullSync
         * @memberof CompanionReg.DeviceProps
         * @instance
         */
        DeviceProps.prototype.requireFullSync = null;

        /**
         * DeviceProps historySyncConfig.
         * @member {CompanionReg.DeviceProps.IHistorySyncConfig|null|undefined} historySyncConfig
         * @memberof CompanionReg.DeviceProps
         * @instance
         */
        DeviceProps.prototype.historySyncConfig = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * DeviceProps _os.
         * @member {"os"|undefined} _os
         * @memberof CompanionReg.DeviceProps
         * @instance
         */
        Object.defineProperty(DeviceProps.prototype, "_os", {
            get: $util.oneOfGetter($oneOfFields = ["os"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * DeviceProps _version.
         * @member {"version"|undefined} _version
         * @memberof CompanionReg.DeviceProps
         * @instance
         */
        Object.defineProperty(DeviceProps.prototype, "_version", {
            get: $util.oneOfGetter($oneOfFields = ["version"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * DeviceProps _platformType.
         * @member {"platformType"|undefined} _platformType
         * @memberof CompanionReg.DeviceProps
         * @instance
         */
        Object.defineProperty(DeviceProps.prototype, "_platformType", {
            get: $util.oneOfGetter($oneOfFields = ["platformType"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * DeviceProps _requireFullSync.
         * @member {"requireFullSync"|undefined} _requireFullSync
         * @memberof CompanionReg.DeviceProps
         * @instance
         */
        Object.defineProperty(DeviceProps.prototype, "_requireFullSync", {
            get: $util.oneOfGetter($oneOfFields = ["requireFullSync"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * DeviceProps _historySyncConfig.
         * @member {"historySyncConfig"|undefined} _historySyncConfig
         * @memberof CompanionReg.DeviceProps
         * @instance
         */
        Object.defineProperty(DeviceProps.prototype, "_historySyncConfig", {
            get: $util.oneOfGetter($oneOfFields = ["historySyncConfig"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new DeviceProps instance using the specified properties.
         * @function create
         * @memberof CompanionReg.DeviceProps
         * @static
         * @param {CompanionReg.IDeviceProps=} [properties] Properties to set
         * @returns {CompanionReg.DeviceProps} DeviceProps instance
         */
        DeviceProps.create = function create(properties) {
            return new DeviceProps(properties);
        };

        /**
         * Encodes the specified DeviceProps message. Does not implicitly {@link CompanionReg.DeviceProps.verify|verify} messages.
         * @function encode
         * @memberof CompanionReg.DeviceProps
         * @static
         * @param {CompanionReg.IDeviceProps} message DeviceProps message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        DeviceProps.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.os != null && Object.hasOwnProperty.call(message, "os"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.os);
            if (message.version != null && Object.hasOwnProperty.call(message, "version"))
                $root.CompanionReg.DeviceProps.AppVersion.encode(message.version, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            if (message.platformType != null && Object.hasOwnProperty.call(message, "platformType"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.platformType);
            if (message.requireFullSync != null && Object.hasOwnProperty.call(message, "requireFullSync"))
                writer.uint32(/* id 4, wireType 0 =*/32).bool(message.requireFullSync);
            if (message.historySyncConfig != null && Object.hasOwnProperty.call(message, "historySyncConfig"))
                $root.CompanionReg.DeviceProps.HistorySyncConfig.encode(message.historySyncConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified DeviceProps message, length delimited. Does not implicitly {@link CompanionReg.DeviceProps.verify|verify} messages.
         * @function encodeDelimited
         * @memberof CompanionReg.DeviceProps
         * @static
         * @param {CompanionReg.IDeviceProps} message DeviceProps message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        DeviceProps.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a DeviceProps message from the specified reader or buffer.
         * @function decode
         * @memberof CompanionReg.DeviceProps
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {CompanionReg.DeviceProps} DeviceProps
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        DeviceProps.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.CompanionReg.DeviceProps();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.os = reader.string();
                        break;
                    }
                case 2: {
                        message.version = $root.CompanionReg.DeviceProps.AppVersion.decode(reader, reader.uint32());
                        break;
                    }
                case 3: {
                        message.platformType = reader.int32();
                        break;
                    }
                case 4: {
                        message.requireFullSync = reader.bool();
                        break;
                    }
                case 5: {
                        message.historySyncConfig = $root.CompanionReg.DeviceProps.HistorySyncConfig.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a DeviceProps message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof CompanionReg.DeviceProps
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {CompanionReg.DeviceProps} DeviceProps
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        DeviceProps.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a DeviceProps message.
         * @function verify
         * @memberof CompanionReg.DeviceProps
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        DeviceProps.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.os != null && message.hasOwnProperty("os")) {
                properties._os = 1;
                if (!$util.isString(message.os))
                    return "os: string expected";
            }
            if (message.version != null && message.hasOwnProperty("version")) {
                properties._version = 1;
                {
                    var error = $root.CompanionReg.DeviceProps.AppVersion.verify(message.version);
                    if (error)
                        return "version." + error;
                }
            }
            if (message.platformType != null && message.hasOwnProperty("platformType")) {
                properties._platformType = 1;
                switch (message.platformType) {
                default:
                    return "platformType: 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:
                case 11:
                case 12:
                case 13:
                case 14:
                case 15:
                case 16:
                case 17:
                case 18:
                case 19:
                case 20:
                case 21:
                case 22:
                case 23:
                case 24:
                    break;
                }
            }
            if (message.requireFullSync != null && message.hasOwnProperty("requireFullSync")) {
                properties._requireFullSync = 1;
                if (typeof message.requireFullSync !== "boolean")
                    return "requireFullSync: boolean expected";
            }
            if (message.historySyncConfig != null && message.hasOwnProperty("historySyncConfig")) {
                properties._historySyncConfig = 1;
                {
                    var error = $root.CompanionReg.DeviceProps.HistorySyncConfig.verify(message.historySyncConfig);
                    if (error)
                        return "historySyncConfig." + error;
                }
            }
            return null;
        };

        /**
         * Creates a DeviceProps message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof CompanionReg.DeviceProps
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {CompanionReg.DeviceProps} DeviceProps
         */
        DeviceProps.fromObject = function fromObject(object) {
            if (object instanceof $root.CompanionReg.DeviceProps)
                return object;
            var message = new $root.CompanionReg.DeviceProps();
            if (object.os != null)
                message.os = String(object.os);
            if (object.version != null) {
                if (typeof object.version !== "object")
                    throw TypeError(".CompanionReg.DeviceProps.version: object expected");
                message.version = $root.CompanionReg.DeviceProps.AppVersion.fromObject(object.version);
            }
            switch (object.platformType) {
            default:
                if (typeof object.platformType === "number") {
                    message.platformType = object.platformType;
                    break;
                }
                break;
            case "UNKNOWN":
            case 0:
                message.platformType = 0;
                break;
            case "CHROME":
            case 1:
                message.platformType = 1;
                break;
            case "FIREFOX":
            case 2:
                message.platformType = 2;
                break;
            case "IE":
            case 3:
                message.platformType = 3;
                break;
            case "OPERA":
            case 4:
                message.platformType = 4;
                break;
            case "SAFARI":
            case 5:
                message.platformType = 5;
                break;
            case "EDGE":
            case 6:
                message.platformType = 6;
                break;
            case "DESKTOP":
            case 7:
                message.platformType = 7;
                break;
            case "IPAD":
            case 8:
                message.platformType = 8;
                break;
            case "ANDROID_TABLET":
            case 9:
                message.platformType = 9;
                break;
            case "OHANA":
            case 10:
                message.platformType = 10;
                break;
            case "ALOHA":
            case 11:
                message.platformType = 11;
                break;
            case "CATALINA":
            case 12:
                message.platformType = 12;
                break;
            case "TCL_TV":
            case 13:
                message.platformType = 13;
                break;
            case "IOS_PHONE":
            case 14:
                message.platformType = 14;
                break;
            case "IOS_CATALYST":
            case 15:
                message.platformType = 15;
                break;
            case "ANDROID_PHONE":
            case 16:
                message.platformType = 16;
                break;
            case "ANDROID_AMBIGUOUS":
            case 17:
                message.platformType = 17;
                break;
            case "WEAR_OS":
            case 18:
                message.platformType = 18;
                break;
            case "AR_WRIST":
            case 19:
                message.platformType = 19;
                break;
            case "AR_DEVICE":
            case 20:
                message.platformType = 20;
                break;
            case "UWP":
            case 21:
                message.platformType = 21;
                break;
            case "VR":
            case 22:
                message.platformType = 22;
                break;
            case "CLOUD_API":
            case 23:
                message.platformType = 23;
                break;
            case "SMARTGLASSES":
            case 24:
                message.platformType = 24;
                break;
            }
            if (object.requireFullSync != null)
                message.requireFullSync = Boolean(object.requireFullSync);
            if (object.historySyncConfig != null) {
                if (typeof object.historySyncConfig !== "object")
                    throw TypeError(".CompanionReg.DeviceProps.historySyncConfig: object expected");
                message.historySyncConfig = $root.CompanionReg.DeviceProps.HistorySyncConfig.fromObject(object.historySyncConfig);
            }
            return message;
        };

        /**
         * Creates a plain object from a DeviceProps message. Also converts values to other types if specified.
         * @function toObject
         * @memberof CompanionReg.DeviceProps
         * @static
         * @param {CompanionReg.DeviceProps} message DeviceProps
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        DeviceProps.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.os != null && message.hasOwnProperty("os")) {
                object.os = message.os;
                if (options.oneofs)
                    object._os = "os";
            }
            if (message.version != null && message.hasOwnProperty("version")) {
                object.version = $root.CompanionReg.DeviceProps.AppVersion.toObject(message.version, options);
                if (options.oneofs)
                    object._version = "version";
            }
            if (message.platformType != null && message.hasOwnProperty("platformType")) {
                object.platformType = options.enums === String ? $root.CompanionReg.DeviceProps.PlatformType[message.platformType] === undefined ? message.platformType : $root.CompanionReg.DeviceProps.PlatformType[message.platformType] : message.platformType;
                if (options.oneofs)
                    object._platformType = "platformType";
            }
            if (message.requireFullSync != null && message.hasOwnProperty("requireFullSync")) {
                object.requireFullSync = message.requireFullSync;
                if (options.oneofs)
                    object._requireFullSync = "requireFullSync";
            }
            if (message.historySyncConfig != null && message.hasOwnProperty("historySyncConfig")) {
                object.historySyncConfig = $root.CompanionReg.DeviceProps.HistorySyncConfig.toObject(message.historySyncConfig, options);
                if (options.oneofs)
                    object._historySyncConfig = "historySyncConfig";
            }
            return object;
        };

        /**
         * Converts this DeviceProps to JSON.
         * @function toJSON
         * @memberof CompanionReg.DeviceProps
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        DeviceProps.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for DeviceProps
         * @function getTypeUrl
         * @memberof CompanionReg.DeviceProps
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        DeviceProps.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/CompanionReg.DeviceProps";
        };

        DeviceProps.AppVersion = (function() {

            /**
             * Properties of an AppVersion.
             * @memberof CompanionReg.DeviceProps
             * @interface IAppVersion
             * @property {number|null} [primary] AppVersion primary
             * @property {number|null} [secondary] AppVersion secondary
             * @property {number|null} [tertiary] AppVersion tertiary
             * @property {number|null} [quaternary] AppVersion quaternary
             * @property {number|null} [quinary] AppVersion quinary
             */

            /**
             * Constructs a new AppVersion.
             * @memberof CompanionReg.DeviceProps
             * @classdesc Represents an AppVersion.
             * @implements IAppVersion
             * @constructor
             * @param {CompanionReg.DeviceProps.IAppVersion=} [properties] Properties to set
             */
            function AppVersion(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]];
            }

            /**
             * AppVersion primary.
             * @member {number|null|undefined} primary
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @instance
             */
            AppVersion.prototype.primary = null;

            /**
             * AppVersion secondary.
             * @member {number|null|undefined} secondary
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @instance
             */
            AppVersion.prototype.secondary = null;

            /**
             * AppVersion tertiary.
             * @member {number|null|undefined} tertiary
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @instance
             */
            AppVersion.prototype.tertiary = null;

            /**
             * AppVersion quaternary.
             * @member {number|null|undefined} quaternary
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @instance
             */
            AppVersion.prototype.quaternary = null;

            /**
             * AppVersion quinary.
             * @member {number|null|undefined} quinary
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @instance
             */
            AppVersion.prototype.quinary = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * AppVersion _primary.
             * @member {"primary"|undefined} _primary
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @instance
             */
            Object.defineProperty(AppVersion.prototype, "_primary", {
                get: $util.oneOfGetter($oneOfFields = ["primary"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AppVersion _secondary.
             * @member {"secondary"|undefined} _secondary
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @instance
             */
            Object.defineProperty(AppVersion.prototype, "_secondary", {
                get: $util.oneOfGetter($oneOfFields = ["secondary"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AppVersion _tertiary.
             * @member {"tertiary"|undefined} _tertiary
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @instance
             */
            Object.defineProperty(AppVersion.prototype, "_tertiary", {
                get: $util.oneOfGetter($oneOfFields = ["tertiary"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AppVersion _quaternary.
             * @member {"quaternary"|undefined} _quaternary
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @instance
             */
            Object.defineProperty(AppVersion.prototype, "_quaternary", {
                get: $util.oneOfGetter($oneOfFields = ["quaternary"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * AppVersion _quinary.
             * @member {"quinary"|undefined} _quinary
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @instance
             */
            Object.defineProperty(AppVersion.prototype, "_quinary", {
                get: $util.oneOfGetter($oneOfFields = ["quinary"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new AppVersion instance using the specified properties.
             * @function create
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @static
             * @param {CompanionReg.DeviceProps.IAppVersion=} [properties] Properties to set
             * @returns {CompanionReg.DeviceProps.AppVersion} AppVersion instance
             */
            AppVersion.create = function create(properties) {
                return new AppVersion(properties);
            };

            /**
             * Encodes the specified AppVersion message. Does not implicitly {@link CompanionReg.DeviceProps.AppVersion.verify|verify} messages.
             * @function encode
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @static
             * @param {CompanionReg.DeviceProps.IAppVersion} message AppVersion message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AppVersion.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.primary != null && Object.hasOwnProperty.call(message, "primary"))
                    writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.primary);
                if (message.secondary != null && Object.hasOwnProperty.call(message, "secondary"))
                    writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.secondary);
                if (message.tertiary != null && Object.hasOwnProperty.call(message, "tertiary"))
                    writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tertiary);
                if (message.quaternary != null && Object.hasOwnProperty.call(message, "quaternary"))
                    writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.quaternary);
                if (message.quinary != null && Object.hasOwnProperty.call(message, "quinary"))
                    writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.quinary);
                return writer;
            };

            /**
             * Encodes the specified AppVersion message, length delimited. Does not implicitly {@link CompanionReg.DeviceProps.AppVersion.verify|verify} messages.
             * @function encodeDelimited
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @static
             * @param {CompanionReg.DeviceProps.IAppVersion} message AppVersion message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AppVersion.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AppVersion message from the specified reader or buffer.
             * @function decode
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {CompanionReg.DeviceProps.AppVersion} AppVersion
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AppVersion.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.CompanionReg.DeviceProps.AppVersion();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.primary = reader.uint32();
                            break;
                        }
                    case 2: {
                            message.secondary = reader.uint32();
                            break;
                        }
                    case 3: {
                            message.tertiary = reader.uint32();
                            break;
                        }
                    case 4: {
                            message.quaternary = reader.uint32();
                            break;
                        }
                    case 5: {
                            message.quinary = reader.uint32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes an AppVersion message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {CompanionReg.DeviceProps.AppVersion} AppVersion
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AppVersion.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AppVersion message.
             * @function verify
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AppVersion.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.primary != null && message.hasOwnProperty("primary")) {
                    properties._primary = 1;
                    if (!$util.isInteger(message.primary))
                        return "primary: integer expected";
                }
                if (message.secondary != null && message.hasOwnProperty("secondary")) {
                    properties._secondary = 1;
                    if (!$util.isInteger(message.secondary))
                        return "secondary: integer expected";
                }
                if (message.tertiary != null && message.hasOwnProperty("tertiary")) {
                    properties._tertiary = 1;
                    if (!$util.isInteger(message.tertiary))
                        return "tertiary: integer expected";
                }
                if (message.quaternary != null && message.hasOwnProperty("quaternary")) {
                    properties._quaternary = 1;
                    if (!$util.isInteger(message.quaternary))
                        return "quaternary: integer expected";
                }
                if (message.quinary != null && message.hasOwnProperty("quinary")) {
                    properties._quinary = 1;
                    if (!$util.isInteger(message.quinary))
                        return "quinary: integer expected";
                }
                return null;
            };

            /**
             * Creates an AppVersion message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {CompanionReg.DeviceProps.AppVersion} AppVersion
             */
            AppVersion.fromObject = function fromObject(object) {
                if (object instanceof $root.CompanionReg.DeviceProps.AppVersion)
                    return object;
                var message = new $root.CompanionReg.DeviceProps.AppVersion();
                if (object.primary != null)
                    message.primary = object.primary >>> 0;
                if (object.secondary != null)
                    message.secondary = object.secondary >>> 0;
                if (object.tertiary != null)
                    message.tertiary = object.tertiary >>> 0;
                if (object.quaternary != null)
                    message.quaternary = object.quaternary >>> 0;
                if (object.quinary != null)
                    message.quinary = object.quinary >>> 0;
                return message;
            };

            /**
             * Creates a plain object from an AppVersion message. Also converts values to other types if specified.
             * @function toObject
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @static
             * @param {CompanionReg.DeviceProps.AppVersion} message AppVersion
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AppVersion.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.primary != null && message.hasOwnProperty("primary")) {
                    object.primary = message.primary;
                    if (options.oneofs)
                        object._primary = "primary";
                }
                if (message.secondary != null && message.hasOwnProperty("secondary")) {
                    object.secondary = message.secondary;
                    if (options.oneofs)
                        object._secondary = "secondary";
                }
                if (message.tertiary != null && message.hasOwnProperty("tertiary")) {
                    object.tertiary = message.tertiary;
                    if (options.oneofs)
                        object._tertiary = "tertiary";
                }
                if (message.quaternary != null && message.hasOwnProperty("quaternary")) {
                    object.quaternary = message.quaternary;
                    if (options.oneofs)
                        object._quaternary = "quaternary";
                }
                if (message.quinary != null && message.hasOwnProperty("quinary")) {
                    object.quinary = message.quinary;
                    if (options.oneofs)
                        object._quinary = "quinary";
                }
                return object;
            };

            /**
             * Converts this AppVersion to JSON.
             * @function toJSON
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AppVersion.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for AppVersion
             * @function getTypeUrl
             * @memberof CompanionReg.DeviceProps.AppVersion
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            AppVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/CompanionReg.DeviceProps.AppVersion";
            };

            return AppVersion;
        })();

        DeviceProps.HistorySyncConfig = (function() {

            /**
             * Properties of a HistorySyncConfig.
             * @memberof CompanionReg.DeviceProps
             * @interface IHistorySyncConfig
             * @property {number|null} [fullSyncDaysLimit] HistorySyncConfig fullSyncDaysLimit
             * @property {number|null} [fullSyncSizeMbLimit] HistorySyncConfig fullSyncSizeMbLimit
             * @property {number|null} [storageQuotaMb] HistorySyncConfig storageQuotaMb
             * @property {boolean|null} [inlineInitialPayloadInE2EeMsg] HistorySyncConfig inlineInitialPayloadInE2EeMsg
             * @property {number|null} [recentSyncDaysLimit] HistorySyncConfig recentSyncDaysLimit
             * @property {boolean|null} [supportCallLogHistory] HistorySyncConfig supportCallLogHistory
             * @property {boolean|null} [supportBotUserAgentChatHistory] HistorySyncConfig supportBotUserAgentChatHistory
             * @property {boolean|null} [supportCagReactionsAndPolls] HistorySyncConfig supportCagReactionsAndPolls
             * @property {boolean|null} [supportBizHostedMsg] HistorySyncConfig supportBizHostedMsg
             * @property {boolean|null} [supportRecentSyncChunkMessageCountTuning] HistorySyncConfig supportRecentSyncChunkMessageCountTuning
             * @property {boolean|null} [supportHostedGroupMsg] HistorySyncConfig supportHostedGroupMsg
             * @property {boolean|null} [supportFbidBotChatHistory] HistorySyncConfig supportFbidBotChatHistory
             * @property {boolean|null} [supportAddOnHistorySyncMigration] HistorySyncConfig supportAddOnHistorySyncMigration
             * @property {boolean|null} [supportMessageAssociation] HistorySyncConfig supportMessageAssociation
             * @property {boolean|null} [supportGroupHistory] HistorySyncConfig supportGroupHistory
             * @property {boolean|null} [onDemandReady] HistorySyncConfig onDemandReady
             * @property {boolean|null} [supportGuestChat] HistorySyncConfig supportGuestChat
             * @property {boolean|null} [completeOnDemandReady] HistorySyncConfig completeOnDemandReady
             * @property {number|null} [thumbnailSyncDaysLimit] HistorySyncConfig thumbnailSyncDaysLimit
             */

            /**
             * Constructs a new HistorySyncConfig.
             * @memberof CompanionReg.DeviceProps
             * @classdesc Represents a HistorySyncConfig.
             * @implements IHistorySyncConfig
             * @constructor
             * @param {CompanionReg.DeviceProps.IHistorySyncConfig=} [properties] Properties to set
             */
            function HistorySyncConfig(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]];
            }

            /**
             * HistorySyncConfig fullSyncDaysLimit.
             * @member {number|null|undefined} fullSyncDaysLimit
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.fullSyncDaysLimit = null;

            /**
             * HistorySyncConfig fullSyncSizeMbLimit.
             * @member {number|null|undefined} fullSyncSizeMbLimit
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.fullSyncSizeMbLimit = null;

            /**
             * HistorySyncConfig storageQuotaMb.
             * @member {number|null|undefined} storageQuotaMb
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.storageQuotaMb = null;

            /**
             * HistorySyncConfig inlineInitialPayloadInE2EeMsg.
             * @member {boolean|null|undefined} inlineInitialPayloadInE2EeMsg
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.inlineInitialPayloadInE2EeMsg = null;

            /**
             * HistorySyncConfig recentSyncDaysLimit.
             * @member {number|null|undefined} recentSyncDaysLimit
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.recentSyncDaysLimit = null;

            /**
             * HistorySyncConfig supportCallLogHistory.
             * @member {boolean|null|undefined} supportCallLogHistory
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportCallLogHistory = null;

            /**
             * HistorySyncConfig supportBotUserAgentChatHistory.
             * @member {boolean|null|undefined} supportBotUserAgentChatHistory
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportBotUserAgentChatHistory = null;

            /**
             * HistorySyncConfig supportCagReactionsAndPolls.
             * @member {boolean|null|undefined} supportCagReactionsAndPolls
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportCagReactionsAndPolls = null;

            /**
             * HistorySyncConfig supportBizHostedMsg.
             * @member {boolean|null|undefined} supportBizHostedMsg
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportBizHostedMsg = null;

            /**
             * HistorySyncConfig supportRecentSyncChunkMessageCountTuning.
             * @member {boolean|null|undefined} supportRecentSyncChunkMessageCountTuning
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportRecentSyncChunkMessageCountTuning = null;

            /**
             * HistorySyncConfig supportHostedGroupMsg.
             * @member {boolean|null|undefined} supportHostedGroupMsg
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportHostedGroupMsg = null;

            /**
             * HistorySyncConfig supportFbidBotChatHistory.
             * @member {boolean|null|undefined} supportFbidBotChatHistory
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportFbidBotChatHistory = null;

            /**
             * HistorySyncConfig supportAddOnHistorySyncMigration.
             * @member {boolean|null|undefined} supportAddOnHistorySyncMigration
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportAddOnHistorySyncMigration = null;

            /**
             * HistorySyncConfig supportMessageAssociation.
             * @member {boolean|null|undefined} supportMessageAssociation
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportMessageAssociation = null;

            /**
             * HistorySyncConfig supportGroupHistory.
             * @member {boolean|null|undefined} supportGroupHistory
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportGroupHistory = null;

            /**
             * HistorySyncConfig onDemandReady.
             * @member {boolean|null|undefined} onDemandReady
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.onDemandReady = null;

            /**
             * HistorySyncConfig supportGuestChat.
             * @member {boolean|null|undefined} supportGuestChat
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.supportGuestChat = null;

            /**
             * HistorySyncConfig completeOnDemandReady.
             * @member {boolean|null|undefined} completeOnDemandReady
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.completeOnDemandReady = null;

            /**
             * HistorySyncConfig thumbnailSyncDaysLimit.
             * @member {number|null|undefined} thumbnailSyncDaysLimit
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            HistorySyncConfig.prototype.thumbnailSyncDaysLimit = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * HistorySyncConfig _fullSyncDaysLimit.
             * @member {"fullSyncDaysLimit"|undefined} _fullSyncDaysLimit
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            Object.defineProperty(HistorySyncConfig.prototype, "_fullSyncDaysLimit", {
                get: $util.oneOfGetter($oneOfFields = ["fullSyncDaysLimit"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncConfig _fullSyncSizeMbLimit.
             * @member {"fullSyncSizeMbLimit"|undefined} _fullSyncSizeMbLimit
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            Object.defineProperty(HistorySyncConfig.prototype, "_fullSyncSizeMbLimit", {
                get: $util.oneOfGetter($oneOfFields = ["fullSyncSizeMbLimit"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncConfig _storageQuotaMb.
             * @member {"storageQuotaMb"|undefined} _storageQuotaMb
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            Object.defineProperty(HistorySyncConfig.prototype, "_storageQuotaMb", {
                get: $util.oneOfGetter($oneOfFields = ["storageQuotaMb"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncConfig _inlineInitialPayloadInE2EeMsg.
             * @member {"inlineInitialPayloadInE2EeMsg"|undefined} _inlineInitialPayloadInE2EeMsg
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            Object.defineProperty(HistorySyncConfig.prototype, "_inlineInitialPayloadInE2EeMsg", {
                get: $util.oneOfGetter($oneOfFields = ["inlineInitialPayloadInE2EeMsg"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncConfig _recentSyncDaysLimit.
             * @member {"recentSyncDaysLimit"|undefined} _recentSyncDaysLimit
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            Object.defineProperty(HistorySyncConfig.prototype, "_recentSyncDaysLimit", {
                get: $util.oneOfGetter($oneOfFields = ["recentSyncDaysLimit"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncConfig _supportCallLogHistory.
             * @member {"supportCallLogHistory"|undefined} _supportCallLogHistory
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            Object.defineProperty(HistorySyncConfig.prototype, "_supportCallLogHistory", {
                get: $util.oneOfGetter($oneOfFields = ["supportCallLogHistory"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncConfig _supportBotUserAgentChatHistory.
             * @member {"supportBotUserAgentChatHistory"|undefined} _supportBotUserAgentChatHistory
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            Object.defineProperty(HistorySyncConfig.prototype, "_supportBotUserAgentChatHistory", {
                get: $util.oneOfGetter($oneOfFields = ["supportBotUserAgentChatHistory"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncConfig _supportCagReactionsAndPolls.
             * @member {"supportCagReactionsAndPolls"|undefined} _supportCagReactionsAndPolls
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            Object.defineProperty(HistorySyncConfig.prototype, "_supportCagReactionsAndPolls", {
                get: $util.oneOfGetter($oneOfFields = ["supportCagReactionsAndPolls"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncConfig _supportBizHostedMsg.
             * @member {"supportBizHostedMsg"|undefined} _supportBizHostedMsg
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            Object.defineProperty(HistorySyncConfig.prototype, "_supportBizHostedMsg", {
                get: $util.oneOfGetter($oneOfFields = ["supportBizHostedMsg"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncConfig _supportRecentSyncChunkMessageCountTuning.
             * @member {"supportRecentSyncChunkMessageCountTuning"|undefined} _supportRecentSyncChunkMessageCountTuning
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            Object.defineProperty(HistorySyncConfig.prototype, "_supportRecentSyncChunkMessageCountTuning", {
                get: $util.oneOfGetter($oneOfFields = ["supportRecentSyncChunkMessageCountTuning"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncConfig _supportHostedGroupMsg.
             * @member {"supportHostedGroupMsg"|undefined} _supportHostedGroupMsg
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            Object.defineProperty(HistorySyncConfig.prototype, "_supportHostedGroupMsg", {
                get: $util.oneOfGetter($oneOfFields = ["supportHostedGroupMsg"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncConfig _supportFbidBotChatHistory.
             * @member {"supportFbidBotChatHistory"|undefined} _supportFbidBotChatHistory
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            Object.defineProperty(HistorySyncConfig.prototype, "_supportFbidBotChatHistory", {
                get: $util.oneOfGetter($oneOfFields = ["supportFbidBotChatHistory"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncConfig _supportAddOnHistorySyncMigration.
             * @member {"supportAddOnHistorySyncMigration"|undefined} _supportAddOnHistorySyncMigration
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            Object.defineProperty(HistorySyncConfig.prototype, "_supportAddOnHistorySyncMigration", {
                get: $util.oneOfGetter($oneOfFields = ["supportAddOnHistorySyncMigration"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncConfig _supportMessageAssociation.
             * @member {"supportMessageAssociation"|undefined} _supportMessageAssociation
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            Object.defineProperty(HistorySyncConfig.prototype, "_supportMessageAssociation", {
                get: $util.oneOfGetter($oneOfFields = ["supportMessageAssociation"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncConfig _supportGroupHistory.
             * @member {"supportGroupHistory"|undefined} _supportGroupHistory
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            Object.defineProperty(HistorySyncConfig.prototype, "_supportGroupHistory", {
                get: $util.oneOfGetter($oneOfFields = ["supportGroupHistory"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncConfig _onDemandReady.
             * @member {"onDemandReady"|undefined} _onDemandReady
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            Object.defineProperty(HistorySyncConfig.prototype, "_onDemandReady", {
                get: $util.oneOfGetter($oneOfFields = ["onDemandReady"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncConfig _supportGuestChat.
             * @member {"supportGuestChat"|undefined} _supportGuestChat
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            Object.defineProperty(HistorySyncConfig.prototype, "_supportGuestChat", {
                get: $util.oneOfGetter($oneOfFields = ["supportGuestChat"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncConfig _completeOnDemandReady.
             * @member {"completeOnDemandReady"|undefined} _completeOnDemandReady
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            Object.defineProperty(HistorySyncConfig.prototype, "_completeOnDemandReady", {
                get: $util.oneOfGetter($oneOfFields = ["completeOnDemandReady"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * HistorySyncConfig _thumbnailSyncDaysLimit.
             * @member {"thumbnailSyncDaysLimit"|undefined} _thumbnailSyncDaysLimit
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             */
            Object.defineProperty(HistorySyncConfig.prototype, "_thumbnailSyncDaysLimit", {
                get: $util.oneOfGetter($oneOfFields = ["thumbnailSyncDaysLimit"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new HistorySyncConfig instance using the specified properties.
             * @function create
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @static
             * @param {CompanionReg.DeviceProps.IHistorySyncConfig=} [properties] Properties to set
             * @returns {CompanionReg.DeviceProps.HistorySyncConfig} HistorySyncConfig instance
             */
            HistorySyncConfig.create = function create(properties) {
                return new HistorySyncConfig(properties);
            };

            /**
             * Encodes the specified HistorySyncConfig message. Does not implicitly {@link CompanionReg.DeviceProps.HistorySyncConfig.verify|verify} messages.
             * @function encode
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @static
             * @param {CompanionReg.DeviceProps.IHistorySyncConfig} message HistorySyncConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HistorySyncConfig.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.fullSyncDaysLimit != null && Object.hasOwnProperty.call(message, "fullSyncDaysLimit"))
                    writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.fullSyncDaysLimit);
                if (message.fullSyncSizeMbLimit != null && Object.hasOwnProperty.call(message, "fullSyncSizeMbLimit"))
                    writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.fullSyncSizeMbLimit);
                if (message.storageQuotaMb != null && Object.hasOwnProperty.call(message, "storageQuotaMb"))
                    writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.storageQuotaMb);
                if (message.inlineInitialPayloadInE2EeMsg != null && Object.hasOwnProperty.call(message, "inlineInitialPayloadInE2EeMsg"))
                    writer.uint32(/* id 4, wireType 0 =*/32).bool(message.inlineInitialPayloadInE2EeMsg);
                if (message.recentSyncDaysLimit != null && Object.hasOwnProperty.call(message, "recentSyncDaysLimit"))
                    writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.recentSyncDaysLimit);
                if (message.supportCallLogHistory != null && Object.hasOwnProperty.call(message, "supportCallLogHistory"))
                    writer.uint32(/* id 6, wireType 0 =*/48).bool(message.supportCallLogHistory);
                if (message.supportBotUserAgentChatHistory != null && Object.hasOwnProperty.call(message, "supportBotUserAgentChatHistory"))
                    writer.uint32(/* id 7, wireType 0 =*/56).bool(message.supportBotUserAgentChatHistory);
                if (message.supportCagReactionsAndPolls != null && Object.hasOwnProperty.call(message, "supportCagReactionsAndPolls"))
                    writer.uint32(/* id 8, wireType 0 =*/64).bool(message.supportCagReactionsAndPolls);
                if (message.supportBizHostedMsg != null && Object.hasOwnProperty.call(message, "supportBizHostedMsg"))
                    writer.uint32(/* id 9, wireType 0 =*/72).bool(message.supportBizHostedMsg);
                if (message.supportRecentSyncChunkMessageCountTuning != null && Object.hasOwnProperty.call(message, "supportRecentSyncChunkMessageCountTuning"))
                    writer.uint32(/* id 10, wireType 0 =*/80).bool(message.supportRecentSyncChunkMessageCountTuning);
                if (message.supportHostedGroupMsg != null && Object.hasOwnProperty.call(message, "supportHostedGroupMsg"))
                    writer.uint32(/* id 11, wireType 0 =*/88).bool(message.supportHostedGroupMsg);
                if (message.supportFbidBotChatHistory != null && Object.hasOwnProperty.call(message, "supportFbidBotChatHistory"))
                    writer.uint32(/* id 12, wireType 0 =*/96).bool(message.supportFbidBotChatHistory);
                if (message.supportAddOnHistorySyncMigration != null && Object.hasOwnProperty.call(message, "supportAddOnHistorySyncMigration"))
                    writer.uint32(/* id 13, wireType 0 =*/104).bool(message.supportAddOnHistorySyncMigration);
                if (message.supportMessageAssociation != null && Object.hasOwnProperty.call(message, "supportMessageAssociation"))
                    writer.uint32(/* id 14, wireType 0 =*/112).bool(message.supportMessageAssociation);
                if (message.supportGroupHistory != null && Object.hasOwnProperty.call(message, "supportGroupHistory"))
                    writer.uint32(/* id 15, wireType 0 =*/120).bool(message.supportGroupHistory);
                if (message.onDemandReady != null && Object.hasOwnProperty.call(message, "onDemandReady"))
                    writer.uint32(/* id 16, wireType 0 =*/128).bool(message.onDemandReady);
                if (message.supportGuestChat != null && Object.hasOwnProperty.call(message, "supportGuestChat"))
                    writer.uint32(/* id 17, wireType 0 =*/136).bool(message.supportGuestChat);
                if (message.completeOnDemandReady != null && Object.hasOwnProperty.call(message, "completeOnDemandReady"))
                    writer.uint32(/* id 18, wireType 0 =*/144).bool(message.completeOnDemandReady);
                if (message.thumbnailSyncDaysLimit != null && Object.hasOwnProperty.call(message, "thumbnailSyncDaysLimit"))
                    writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.thumbnailSyncDaysLimit);
                return writer;
            };

            /**
             * Encodes the specified HistorySyncConfig message, length delimited. Does not implicitly {@link CompanionReg.DeviceProps.HistorySyncConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @static
             * @param {CompanionReg.DeviceProps.IHistorySyncConfig} message HistorySyncConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HistorySyncConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a HistorySyncConfig message from the specified reader or buffer.
             * @function decode
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {CompanionReg.DeviceProps.HistorySyncConfig} HistorySyncConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HistorySyncConfig.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.CompanionReg.DeviceProps.HistorySyncConfig();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    if (tag === error)
                        break;
                    switch (tag >>> 3) {
                    case 1: {
                            message.fullSyncDaysLimit = reader.uint32();
                            break;
                        }
                    case 2: {
                            message.fullSyncSizeMbLimit = reader.uint32();
                            break;
                        }
                    case 3: {
                            message.storageQuotaMb = reader.uint32();
                            break;
                        }
                    case 4: {
                            message.inlineInitialPayloadInE2EeMsg = reader.bool();
                            break;
                        }
                    case 5: {
                            message.recentSyncDaysLimit = reader.uint32();
                            break;
                        }
                    case 6: {
                            message.supportCallLogHistory = reader.bool();
                            break;
                        }
                    case 7: {
                            message.supportBotUserAgentChatHistory = reader.bool();
                            break;
                        }
                    case 8: {
                            message.supportCagReactionsAndPolls = reader.bool();
                            break;
                        }
                    case 9: {
                            message.supportBizHostedMsg = reader.bool();
                            break;
                        }
                    case 10: {
                            message.supportRecentSyncChunkMessageCountTuning = reader.bool();
                            break;
                        }
                    case 11: {
                            message.supportHostedGroupMsg = reader.bool();
                            break;
                        }
                    case 12: {
                            message.supportFbidBotChatHistory = reader.bool();
                            break;
                        }
                    case 13: {
                            message.supportAddOnHistorySyncMigration = reader.bool();
                            break;
                        }
                    case 14: {
                            message.supportMessageAssociation = reader.bool();
                            break;
                        }
                    case 15: {
                            message.supportGroupHistory = reader.bool();
                            break;
                        }
                    case 16: {
                            message.onDemandReady = reader.bool();
                            break;
                        }
                    case 17: {
                            message.supportGuestChat = reader.bool();
                            break;
                        }
                    case 18: {
                            message.completeOnDemandReady = reader.bool();
                            break;
                        }
                    case 19: {
                            message.thumbnailSyncDaysLimit = reader.uint32();
                            break;
                        }
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a HistorySyncConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {CompanionReg.DeviceProps.HistorySyncConfig} HistorySyncConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HistorySyncConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a HistorySyncConfig message.
             * @function verify
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            HistorySyncConfig.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                var properties = {};
                if (message.fullSyncDaysLimit != null && message.hasOwnProperty("fullSyncDaysLimit")) {
                    properties._fullSyncDaysLimit = 1;
                    if (!$util.isInteger(message.fullSyncDaysLimit))
                        return "fullSyncDaysLimit: integer expected";
                }
                if (message.fullSyncSizeMbLimit != null && message.hasOwnProperty("fullSyncSizeMbLimit")) {
                    properties._fullSyncSizeMbLimit = 1;
                    if (!$util.isInteger(message.fullSyncSizeMbLimit))
                        return "fullSyncSizeMbLimit: integer expected";
                }
                if (message.storageQuotaMb != null && message.hasOwnProperty("storageQuotaMb")) {
                    properties._storageQuotaMb = 1;
                    if (!$util.isInteger(message.storageQuotaMb))
                        return "storageQuotaMb: integer expected";
                }
                if (message.inlineInitialPayloadInE2EeMsg != null && message.hasOwnProperty("inlineInitialPayloadInE2EeMsg")) {
                    properties._inlineInitialPayloadInE2EeMsg = 1;
                    if (typeof message.inlineInitialPayloadInE2EeMsg !== "boolean")
                        return "inlineInitialPayloadInE2EeMsg: boolean expected";
                }
                if (message.recentSyncDaysLimit != null && message.hasOwnProperty("recentSyncDaysLimit")) {
                    properties._recentSyncDaysLimit = 1;
                    if (!$util.isInteger(message.recentSyncDaysLimit))
                        return "recentSyncDaysLimit: integer expected";
                }
                if (message.supportCallLogHistory != null && message.hasOwnProperty("supportCallLogHistory")) {
                    properties._supportCallLogHistory = 1;
                    if (typeof message.supportCallLogHistory !== "boolean")
                        return "supportCallLogHistory: boolean expected";
                }
                if (message.supportBotUserAgentChatHistory != null && message.hasOwnProperty("supportBotUserAgentChatHistory")) {
                    properties._supportBotUserAgentChatHistory = 1;
                    if (typeof message.supportBotUserAgentChatHistory !== "boolean")
                        return "supportBotUserAgentChatHistory: boolean expected";
                }
                if (message.supportCagReactionsAndPolls != null && message.hasOwnProperty("supportCagReactionsAndPolls")) {
                    properties._supportCagReactionsAndPolls = 1;
                    if (typeof message.supportCagReactionsAndPolls !== "boolean")
                        return "supportCagReactionsAndPolls: boolean expected";
                }
                if (message.supportBizHostedMsg != null && message.hasOwnProperty("supportBizHostedMsg")) {
                    properties._supportBizHostedMsg = 1;
                    if (typeof message.supportBizHostedMsg !== "boolean")
                        return "supportBizHostedMsg: boolean expected";
                }
                if (message.supportRecentSyncChunkMessageCountTuning != null && message.hasOwnProperty("supportRecentSyncChunkMessageCountTuning")) {
                    properties._supportRecentSyncChunkMessageCountTuning = 1;
                    if (typeof message.supportRecentSyncChunkMessageCountTuning !== "boolean")
                        return "supportRecentSyncChunkMessageCountTuning: boolean expected";
                }
                if (message.supportHostedGroupMsg != null && message.hasOwnProperty("supportHostedGroupMsg")) {
                    properties._supportHostedGroupMsg = 1;
                    if (typeof message.supportHostedGroupMsg !== "boolean")
                        return "supportHostedGroupMsg: boolean expected";
                }
                if (message.supportFbidBotChatHistory != null && message.hasOwnProperty("supportFbidBotChatHistory")) {
                    properties._supportFbidBotChatHistory = 1;
                    if (typeof message.supportFbidBotChatHistory !== "boolean")
                        return "supportFbidBotChatHistory: boolean expected";
                }
                if (message.supportAddOnHistorySyncMigration != null && message.hasOwnProperty("supportAddOnHistorySyncMigration")) {
                    properties._supportAddOnHistorySyncMigration = 1;
                    if (typeof message.supportAddOnHistorySyncMigration !== "boolean")
                        return "supportAddOnHistorySyncMigration: boolean expected";
                }
                if (message.supportMessageAssociation != null && message.hasOwnProperty("supportMessageAssociation")) {
                    properties._supportMessageAssociation = 1;
                    if (typeof message.supportMessageAssociation !== "boolean")
                        return "supportMessageAssociation: boolean expected";
                }
                if (message.supportGroupHistory != null && message.hasOwnProperty("supportGroupHistory")) {
                    properties._supportGroupHistory = 1;
                    if (typeof message.supportGroupHistory !== "boolean")
                        return "supportGroupHistory: boolean expected";
                }
                if (message.onDemandReady != null && message.hasOwnProperty("onDemandReady")) {
                    properties._onDemandReady = 1;
                    if (typeof message.onDemandReady !== "boolean")
                        return "onDemandReady: boolean expected";
                }
                if (message.supportGuestChat != null && message.hasOwnProperty("supportGuestChat")) {
                    properties._supportGuestChat = 1;
                    if (typeof message.supportGuestChat !== "boolean")
                        return "supportGuestChat: boolean expected";
                }
                if (message.completeOnDemandReady != null && message.hasOwnProperty("completeOnDemandReady")) {
                    properties._completeOnDemandReady = 1;
                    if (typeof message.completeOnDemandReady !== "boolean")
                        return "completeOnDemandReady: boolean expected";
                }
                if (message.thumbnailSyncDaysLimit != null && message.hasOwnProperty("thumbnailSyncDaysLimit")) {
                    properties._thumbnailSyncDaysLimit = 1;
                    if (!$util.isInteger(message.thumbnailSyncDaysLimit))
                        return "thumbnailSyncDaysLimit: integer expected";
                }
                return null;
            };

            /**
             * Creates a HistorySyncConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {CompanionReg.DeviceProps.HistorySyncConfig} HistorySyncConfig
             */
            HistorySyncConfig.fromObject = function fromObject(object) {
                if (object instanceof $root.CompanionReg.DeviceProps.HistorySyncConfig)
                    return object;
                var message = new $root.CompanionReg.DeviceProps.HistorySyncConfig();
                if (object.fullSyncDaysLimit != null)
                    message.fullSyncDaysLimit = object.fullSyncDaysLimit >>> 0;
                if (object.fullSyncSizeMbLimit != null)
                    message.fullSyncSizeMbLimit = object.fullSyncSizeMbLimit >>> 0;
                if (object.storageQuotaMb != null)
                    message.storageQuotaMb = object.storageQuotaMb >>> 0;
                if (object.inlineInitialPayloadInE2EeMsg != null)
                    message.inlineInitialPayloadInE2EeMsg = Boolean(object.inlineInitialPayloadInE2EeMsg);
                if (object.recentSyncDaysLimit != null)
                    message.recentSyncDaysLimit = object.recentSyncDaysLimit >>> 0;
                if (object.supportCallLogHistory != null)
                    message.supportCallLogHistory = Boolean(object.supportCallLogHistory);
                if (object.supportBotUserAgentChatHistory != null)
                    message.supportBotUserAgentChatHistory = Boolean(object.supportBotUserAgentChatHistory);
                if (object.supportCagReactionsAndPolls != null)
                    message.supportCagReactionsAndPolls = Boolean(object.supportCagReactionsAndPolls);
                if (object.supportBizHostedMsg != null)
                    message.supportBizHostedMsg = Boolean(object.supportBizHostedMsg);
                if (object.supportRecentSyncChunkMessageCountTuning != null)
                    message.supportRecentSyncChunkMessageCountTuning = Boolean(object.supportRecentSyncChunkMessageCountTuning);
                if (object.supportHostedGroupMsg != null)
                    message.supportHostedGroupMsg = Boolean(object.supportHostedGroupMsg);
                if (object.supportFbidBotChatHistory != null)
                    message.supportFbidBotChatHistory = Boolean(object.supportFbidBotChatHistory);
                if (object.supportAddOnHistorySyncMigration != null)
                    message.supportAddOnHistorySyncMigration = Boolean(object.supportAddOnHistorySyncMigration);
                if (object.supportMessageAssociation != null)
                    message.supportMessageAssociation = Boolean(object.supportMessageAssociation);
                if (object.supportGroupHistory != null)
                    message.supportGroupHistory = Boolean(object.supportGroupHistory);
                if (object.onDemandReady != null)
                    message.onDemandReady = Boolean(object.onDemandReady);
                if (object.supportGuestChat != null)
                    message.supportGuestChat = Boolean(object.supportGuestChat);
                if (object.completeOnDemandReady != null)
                    message.completeOnDemandReady = Boolean(object.completeOnDemandReady);
                if (object.thumbnailSyncDaysLimit != null)
                    message.thumbnailSyncDaysLimit = object.thumbnailSyncDaysLimit >>> 0;
                return message;
            };

            /**
             * Creates a plain object from a HistorySyncConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @static
             * @param {CompanionReg.DeviceProps.HistorySyncConfig} message HistorySyncConfig
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            HistorySyncConfig.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (message.fullSyncDaysLimit != null && message.hasOwnProperty("fullSyncDaysLimit")) {
                    object.fullSyncDaysLimit = message.fullSyncDaysLimit;
                    if (options.oneofs)
                        object._fullSyncDaysLimit = "fullSyncDaysLimit";
                }
                if (message.fullSyncSizeMbLimit != null && message.hasOwnProperty("fullSyncSizeMbLimit")) {
                    object.fullSyncSizeMbLimit = message.fullSyncSizeMbLimit;
                    if (options.oneofs)
                        object._fullSyncSizeMbLimit = "fullSyncSizeMbLimit";
                }
                if (message.storageQuotaMb != null && message.hasOwnProperty("storageQuotaMb")) {
                    object.storageQuotaMb = message.storageQuotaMb;
                    if (options.oneofs)
                        object._storageQuotaMb = "storageQuotaMb";
                }
                if (message.inlineInitialPayloadInE2EeMsg != null && message.hasOwnProperty("inlineInitialPayloadInE2EeMsg")) {
                    object.inlineInitialPayloadInE2EeMsg = message.inlineInitialPayloadInE2EeMsg;
                    if (options.oneofs)
                        object._inlineInitialPayloadInE2EeMsg = "inlineInitialPayloadInE2EeMsg";
                }
                if (message.recentSyncDaysLimit != null && message.hasOwnProperty("recentSyncDaysLimit")) {
                    object.recentSyncDaysLimit = message.recentSyncDaysLimit;
                    if (options.oneofs)
                        object._recentSyncDaysLimit = "recentSyncDaysLimit";
                }
                if (message.supportCallLogHistory != null && message.hasOwnProperty("supportCallLogHistory")) {
                    object.supportCallLogHistory = message.supportCallLogHistory;
                    if (options.oneofs)
                        object._supportCallLogHistory = "supportCallLogHistory";
                }
                if (message.supportBotUserAgentChatHistory != null && message.hasOwnProperty("supportBotUserAgentChatHistory")) {
                    object.supportBotUserAgentChatHistory = message.supportBotUserAgentChatHistory;
                    if (options.oneofs)
                        object._supportBotUserAgentChatHistory = "supportBotUserAgentChatHistory";
                }
                if (message.supportCagReactionsAndPolls != null && message.hasOwnProperty("supportCagReactionsAndPolls")) {
                    object.supportCagReactionsAndPolls = message.supportCagReactionsAndPolls;
                    if (options.oneofs)
                        object._supportCagReactionsAndPolls = "supportCagReactionsAndPolls";
                }
                if (message.supportBizHostedMsg != null && message.hasOwnProperty("supportBizHostedMsg")) {
                    object.supportBizHostedMsg = message.supportBizHostedMsg;
                    if (options.oneofs)
                        object._supportBizHostedMsg = "supportBizHostedMsg";
                }
                if (message.supportRecentSyncChunkMessageCountTuning != null && message.hasOwnProperty("supportRecentSyncChunkMessageCountTuning")) {
                    object.supportRecentSyncChunkMessageCountTuning = message.supportRecentSyncChunkMessageCountTuning;
                    if (options.oneofs)
                        object._supportRecentSyncChunkMessageCountTuning = "supportRecentSyncChunkMessageCountTuning";
                }
                if (message.supportHostedGroupMsg != null && message.hasOwnProperty("supportHostedGroupMsg")) {
                    object.supportHostedGroupMsg = message.supportHostedGroupMsg;
                    if (options.oneofs)
                        object._supportHostedGroupMsg = "supportHostedGroupMsg";
                }
                if (message.supportFbidBotChatHistory != null && message.hasOwnProperty("supportFbidBotChatHistory")) {
                    object.supportFbidBotChatHistory = message.supportFbidBotChatHistory;
                    if (options.oneofs)
                        object._supportFbidBotChatHistory = "supportFbidBotChatHistory";
                }
                if (message.supportAddOnHistorySyncMigration != null && message.hasOwnProperty("supportAddOnHistorySyncMigration")) {
                    object.supportAddOnHistorySyncMigration = message.supportAddOnHistorySyncMigration;
                    if (options.oneofs)
                        object._supportAddOnHistorySyncMigration = "supportAddOnHistorySyncMigration";
                }
                if (message.supportMessageAssociation != null && message.hasOwnProperty("supportMessageAssociation")) {
                    object.supportMessageAssociation = message.supportMessageAssociation;
                    if (options.oneofs)
                        object._supportMessageAssociation = "supportMessageAssociation";
                }
                if (message.supportGroupHistory != null && message.hasOwnProperty("supportGroupHistory")) {
                    object.supportGroupHistory = message.supportGroupHistory;
                    if (options.oneofs)
                        object._supportGroupHistory = "supportGroupHistory";
                }
                if (message.onDemandReady != null && message.hasOwnProperty("onDemandReady")) {
                    object.onDemandReady = message.onDemandReady;
                    if (options.oneofs)
                        object._onDemandReady = "onDemandReady";
                }
                if (message.supportGuestChat != null && message.hasOwnProperty("supportGuestChat")) {
                    object.supportGuestChat = message.supportGuestChat;
                    if (options.oneofs)
                        object._supportGuestChat = "supportGuestChat";
                }
                if (message.completeOnDemandReady != null && message.hasOwnProperty("completeOnDemandReady")) {
                    object.completeOnDemandReady = message.completeOnDemandReady;
                    if (options.oneofs)
                        object._completeOnDemandReady = "completeOnDemandReady";
                }
                if (message.thumbnailSyncDaysLimit != null && message.hasOwnProperty("thumbnailSyncDaysLimit")) {
                    object.thumbnailSyncDaysLimit = message.thumbnailSyncDaysLimit;
                    if (options.oneofs)
                        object._thumbnailSyncDaysLimit = "thumbnailSyncDaysLimit";
                }
                return object;
            };

            /**
             * Converts this HistorySyncConfig to JSON.
             * @function toJSON
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            HistorySyncConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            /**
             * Gets the default type url for HistorySyncConfig
             * @function getTypeUrl
             * @memberof CompanionReg.DeviceProps.HistorySyncConfig
             * @static
             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
             * @returns {string} The default type url
             */
            HistorySyncConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                if (typeUrlPrefix === undefined) {
                    typeUrlPrefix = "type.googleapis.com";
                }
                return typeUrlPrefix + "/CompanionReg.DeviceProps.HistorySyncConfig";
            };

            return HistorySyncConfig;
        })();

        /**
         * PlatformType enum.
         * @name CompanionReg.DeviceProps.PlatformType
         * @enum {number}
         * @property {number} UNKNOWN=0 UNKNOWN value
         * @property {number} CHROME=1 CHROME value
         * @property {number} FIREFOX=2 FIREFOX value
         * @property {number} IE=3 IE value
         * @property {number} OPERA=4 OPERA value
         * @property {number} SAFARI=5 SAFARI value
         * @property {number} EDGE=6 EDGE value
         * @property {number} DESKTOP=7 DESKTOP value
         * @property {number} IPAD=8 IPAD value
         * @property {number} ANDROID_TABLET=9 ANDROID_TABLET value
         * @property {number} OHANA=10 OHANA value
         * @property {number} ALOHA=11 ALOHA value
         * @property {number} CATALINA=12 CATALINA value
         * @property {number} TCL_TV=13 TCL_TV value
         * @property {number} IOS_PHONE=14 IOS_PHONE value
         * @property {number} IOS_CATALYST=15 IOS_CATALYST value
         * @property {number} ANDROID_PHONE=16 ANDROID_PHONE value
         * @property {number} ANDROID_AMBIGUOUS=17 ANDROID_AMBIGUOUS value
         * @property {number} WEAR_OS=18 WEAR_OS value
         * @property {number} AR_WRIST=19 AR_WRIST value
         * @property {number} AR_DEVICE=20 AR_DEVICE value
         * @property {number} UWP=21 UWP value
         * @property {number} VR=22 VR value
         * @property {number} CLOUD_API=23 CLOUD_API value
         * @property {number} SMARTGLASSES=24 SMARTGLASSES value
         */
        DeviceProps.PlatformType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "UNKNOWN"] = 0;
            values[valuesById[1] = "CHROME"] = 1;
            values[valuesById[2] = "FIREFOX"] = 2;
            values[valuesById[3] = "IE"] = 3;
            values[valuesById[4] = "OPERA"] = 4;
            values[valuesById[5] = "SAFARI"] = 5;
            values[valuesById[6] = "EDGE"] = 6;
            values[valuesById[7] = "DESKTOP"] = 7;
            values[valuesById[8] = "IPAD"] = 8;
            values[valuesById[9] = "ANDROID_TABLET"] = 9;
            values[valuesById[10] = "OHANA"] = 10;
            values[valuesById[11] = "ALOHA"] = 11;
            values[valuesById[12] = "CATALINA"] = 12;
            values[valuesById[13] = "TCL_TV"] = 13;
            values[valuesById[14] = "IOS_PHONE"] = 14;
            values[valuesById[15] = "IOS_CATALYST"] = 15;
            values[valuesById[16] = "ANDROID_PHONE"] = 16;
            values[valuesById[17] = "ANDROID_AMBIGUOUS"] = 17;
            values[valuesById[18] = "WEAR_OS"] = 18;
            values[valuesById[19] = "AR_WRIST"] = 19;
            values[valuesById[20] = "AR_DEVICE"] = 20;
            values[valuesById[21] = "UWP"] = 21;
            values[valuesById[22] = "VR"] = 22;
            values[valuesById[23] = "CLOUD_API"] = 23;
            values[valuesById[24] = "SMARTGLASSES"] = 24;
            return values;
        })();

        return DeviceProps;
    })();

    return CompanionReg;
})();

$root.MmsRetry = (function() {

    /**
     * Namespace MmsRetry.
     * @exports MmsRetry
     * @namespace
     */
    var MmsRetry = {};

    MmsRetry.ServerErrorReceipt = (function() {

        /**
         * Properties of a ServerErrorReceipt.
         * @memberof MmsRetry
         * @interface IServerErrorReceipt
         * @property {string|null} [stanzaId] ServerErrorReceipt stanzaId
         */

        /**
         * Constructs a new ServerErrorReceipt.
         * @memberof MmsRetry
         * @classdesc Represents a ServerErrorReceipt.
         * @implements IServerErrorReceipt
         * @constructor
         * @param {MmsRetry.IServerErrorReceipt=} [properties] Properties to set
         */
        function ServerErrorReceipt(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]];
        }

        /**
         * ServerErrorReceipt stanzaId.
         * @member {string|null|undefined} stanzaId
         * @memberof MmsRetry.ServerErrorReceipt
         * @instance
         */
        ServerErrorReceipt.prototype.stanzaId = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * ServerErrorReceipt _stanzaId.
         * @member {"stanzaId"|undefined} _stanzaId
         * @memberof MmsRetry.ServerErrorReceipt
         * @instance
         */
        Object.defineProperty(ServerErrorReceipt.prototype, "_stanzaId", {
            get: $util.oneOfGetter($oneOfFields = ["stanzaId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new ServerErrorReceipt instance using the specified properties.
         * @function create
         * @memberof MmsRetry.ServerErrorReceipt
         * @static
         * @param {MmsRetry.IServerErrorReceipt=} [properties] Properties to set
         * @returns {MmsRetry.ServerErrorReceipt} ServerErrorReceipt instance
         */
        ServerErrorReceipt.create = function create(properties) {
            return new ServerErrorReceipt(properties);
        };

        /**
         * Encodes the specified ServerErrorReceipt message. Does not implicitly {@link MmsRetry.ServerErrorReceipt.verify|verify} messages.
         * @function encode
         * @memberof MmsRetry.ServerErrorReceipt
         * @static
         * @param {MmsRetry.IServerErrorReceipt} message ServerErrorReceipt message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ServerErrorReceipt.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.stanzaId);
            return writer;
        };

        /**
         * Encodes the specified ServerErrorReceipt message, length delimited. Does not implicitly {@link MmsRetry.ServerErrorReceipt.verify|verify} messages.
         * @function encodeDelimited
         * @memberof MmsRetry.ServerErrorReceipt
         * @static
         * @param {MmsRetry.IServerErrorReceipt} message ServerErrorReceipt message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ServerErrorReceipt.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ServerErrorReceipt message from the specified reader or buffer.
         * @function decode
         * @memberof MmsRetry.ServerErrorReceipt
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {MmsRetry.ServerErrorReceipt} ServerErrorReceipt
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ServerErrorReceipt.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.MmsRetry.ServerErrorReceipt();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.stanzaId = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ServerErrorReceipt message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof MmsRetry.ServerErrorReceipt
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {MmsRetry.ServerErrorReceipt} ServerErrorReceipt
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ServerErrorReceipt.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ServerErrorReceipt message.
         * @function verify
         * @memberof MmsRetry.ServerErrorReceipt
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ServerErrorReceipt.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) {
                properties._stanzaId = 1;
                if (!$util.isString(message.stanzaId))
                    return "stanzaId: string expected";
            }
            return null;
        };

        /**
         * Creates a ServerErrorReceipt message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof MmsRetry.ServerErrorReceipt
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {MmsRetry.ServerErrorReceipt} ServerErrorReceipt
         */
        ServerErrorReceipt.fromObject = function fromObject(object) {
            if (object instanceof $root.MmsRetry.ServerErrorReceipt)
                return object;
            var message = new $root.MmsRetry.ServerErrorReceipt();
            if (object.stanzaId != null)
                message.stanzaId = String(object.stanzaId);
            return message;
        };

        /**
         * Creates a plain object from a ServerErrorReceipt message. Also converts values to other types if specified.
         * @function toObject
         * @memberof MmsRetry.ServerErrorReceipt
         * @static
         * @param {MmsRetry.ServerErrorReceipt} message ServerErrorReceipt
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        ServerErrorReceipt.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) {
                object.stanzaId = message.stanzaId;
                if (options.oneofs)
                    object._stanzaId = "stanzaId";
            }
            return object;
        };

        /**
         * Converts this ServerErrorReceipt to JSON.
         * @function toJSON
         * @memberof MmsRetry.ServerErrorReceipt
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        ServerErrorReceipt.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for ServerErrorReceipt
         * @function getTypeUrl
         * @memberof MmsRetry.ServerErrorReceipt
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        ServerErrorReceipt.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/MmsRetry.ServerErrorReceipt";
        };

        return ServerErrorReceipt;
    })();

    MmsRetry.MediaRetryNotification = (function() {

        /**
         * Properties of a MediaRetryNotification.
         * @memberof MmsRetry
         * @interface IMediaRetryNotification
         * @property {string|null} [stanzaId] MediaRetryNotification stanzaId
         * @property {string|null} [directPath] MediaRetryNotification directPath
         * @property {MmsRetry.MediaRetryNotification.ResultType|null} [result] MediaRetryNotification result
         * @property {Uint8Array|null} [messageSecret] MediaRetryNotification messageSecret
         */

        /**
         * Constructs a new MediaRetryNotification.
         * @memberof MmsRetry
         * @classdesc Represents a MediaRetryNotification.
         * @implements IMediaRetryNotification
         * @constructor
         * @param {MmsRetry.IMediaRetryNotification=} [properties] Properties to set
         */
        function MediaRetryNotification(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]];
        }

        /**
         * MediaRetryNotification stanzaId.
         * @member {string|null|undefined} stanzaId
         * @memberof MmsRetry.MediaRetryNotification
         * @instance
         */
        MediaRetryNotification.prototype.stanzaId = null;

        /**
         * MediaRetryNotification directPath.
         * @member {string|null|undefined} directPath
         * @memberof MmsRetry.MediaRetryNotification
         * @instance
         */
        MediaRetryNotification.prototype.directPath = null;

        /**
         * MediaRetryNotification result.
         * @member {MmsRetry.MediaRetryNotification.ResultType|null|undefined} result
         * @memberof MmsRetry.MediaRetryNotification
         * @instance
         */
        MediaRetryNotification.prototype.result = null;

        /**
         * MediaRetryNotification messageSecret.
         * @member {Uint8Array|null|undefined} messageSecret
         * @memberof MmsRetry.MediaRetryNotification
         * @instance
         */
        MediaRetryNotification.prototype.messageSecret = null;

        // OneOf field names bound to virtual getters and setters
        var $oneOfFields;

        /**
         * MediaRetryNotification _stanzaId.
         * @member {"stanzaId"|undefined} _stanzaId
         * @memberof MmsRetry.MediaRetryNotification
         * @instance
         */
        Object.defineProperty(MediaRetryNotification.prototype, "_stanzaId", {
            get: $util.oneOfGetter($oneOfFields = ["stanzaId"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MediaRetryNotification _directPath.
         * @member {"directPath"|undefined} _directPath
         * @memberof MmsRetry.MediaRetryNotification
         * @instance
         */
        Object.defineProperty(MediaRetryNotification.prototype, "_directPath", {
            get: $util.oneOfGetter($oneOfFields = ["directPath"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MediaRetryNotification _result.
         * @member {"result"|undefined} _result
         * @memberof MmsRetry.MediaRetryNotification
         * @instance
         */
        Object.defineProperty(MediaRetryNotification.prototype, "_result", {
            get: $util.oneOfGetter($oneOfFields = ["result"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * MediaRetryNotification _messageSecret.
         * @member {"messageSecret"|undefined} _messageSecret
         * @memberof MmsRetry.MediaRetryNotification
         * @instance
         */
        Object.defineProperty(MediaRetryNotification.prototype, "_messageSecret", {
            get: $util.oneOfGetter($oneOfFields = ["messageSecret"]),
            set: $util.oneOfSetter($oneOfFields)
        });

        /**
         * Creates a new MediaRetryNotification instance using the specified properties.
         * @function create
         * @memberof MmsRetry.MediaRetryNotification
         * @static
         * @param {MmsRetry.IMediaRetryNotification=} [properties] Properties to set
         * @returns {MmsRetry.MediaRetryNotification} MediaRetryNotification instance
         */
        MediaRetryNotification.create = function create(properties) {
            return new MediaRetryNotification(properties);
        };

        /**
         * Encodes the specified MediaRetryNotification message. Does not implicitly {@link MmsRetry.MediaRetryNotification.verify|verify} messages.
         * @function encode
         * @memberof MmsRetry.MediaRetryNotification
         * @static
         * @param {MmsRetry.IMediaRetryNotification} message MediaRetryNotification message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MediaRetryNotification.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.stanzaId);
            if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.directPath);
            if (message.result != null && Object.hasOwnProperty.call(message, "result"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.result);
            if (message.messageSecret != null && Object.hasOwnProperty.call(message, "messageSecret"))
                writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.messageSecret);
            return writer;
        };

        /**
         * Encodes the specified MediaRetryNotification message, length delimited. Does not implicitly {@link MmsRetry.MediaRetryNotification.verify|verify} messages.
         * @function encodeDelimited
         * @memberof MmsRetry.MediaRetryNotification
         * @static
         * @param {MmsRetry.IMediaRetryNotification} message MediaRetryNotification message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        MediaRetryNotification.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a MediaRetryNotification message from the specified reader or buffer.
         * @function decode
         * @memberof MmsRetry.MediaRetryNotification
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {MmsRetry.MediaRetryNotification} MediaRetryNotification
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MediaRetryNotification.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.MmsRetry.MediaRetryNotification();
            while (reader.pos < end) {
                var tag = reader.uint32();
                if (tag === error)
                    break;
                switch (tag >>> 3) {
                case 1: {
                        message.stanzaId = reader.string();
                        break;
                    }
                case 2: {
                        message.directPath = reader.string();
                        break;
                    }
                case 3: {
                        message.result = reader.int32();
                        break;
                    }
                case 4: {
                        message.messageSecret = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a MediaRetryNotification message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof MmsRetry.MediaRetryNotification
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {MmsRetry.MediaRetryNotification} MediaRetryNotification
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        MediaRetryNotification.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a MediaRetryNotification message.
         * @function verify
         * @memberof MmsRetry.MediaRetryNotification
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        MediaRetryNotification.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            var properties = {};
            if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) {
                properties._stanzaId = 1;
                if (!$util.isString(message.stanzaId))
                    return "stanzaId: string expected";
            }
            if (message.directPath != null && message.hasOwnProperty("directPath")) {
                properties._directPath = 1;
                if (!$util.isString(message.directPath))
                    return "directPath: string expected";
            }
            if (message.result != null && message.hasOwnProperty("result")) {
                properties._result = 1;
                switch (message.result) {
                default:
                    return "result: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            }
            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";
            }
            return null;
        };

        /**
         * Creates a MediaRetryNotification message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof MmsRetry.MediaRetryNotification
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {MmsRetry.MediaRetryNotification} MediaRetryNotification
         */
        MediaRetryNotification.fromObject = function fromObject(object) {
            if (object instanceof $root.MmsRetry.MediaRetryNotification)
                return object;
            var message = new $root.MmsRetry.MediaRetryNotification();
            if (object.stanzaId != null)
                message.stanzaId = String(object.stanzaId);
            if (object.directPath != null)
                message.directPath = String(object.directPath);
            switch (object.result) {
            default:
                if (typeof object.result === "number") {
                    message.result = object.result;
                    break;
                }
                break;
            case "GENERAL_ERROR":
            case 0:
                message.result = 0;
                break;
            case "SUCCESS":
            case 1:
                message.result = 1;
                break;
            case "NOT_FOUND":
            case 2:
                message.result = 2;
                break;
            case "DECRYPTION_ERROR":
            case 3:
                message.result = 3;
                break;
            }
            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;
            return message;
        };

        /**
         * Creates a plain object from a MediaRetryNotification message. Also converts values to other types if specified.
         * @function toObject
         * @memberof MmsRetry.MediaRetryNotification
         * @static
         * @param {MmsRetry.MediaRetryNotification} message MediaRetryNotification
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        MediaRetryNotification.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) {
                object.stanzaId = message.stanzaId;
                if (options.oneofs)
                    object._stanzaId = "stanzaId";
            }
            if (message.directPath != null && message.hasOwnProperty("directPath")) {
                object.directPath = message.directPath;
                if (options.oneofs)
                    object._directPath = "directPath";
            }
            if (message.result != null && message.hasOwnProperty("result")) {
                object.result = options.enums === String ? $root.MmsRetry.MediaRetryNotification.ResultType[message.result] === undefined ? message.result : $root.MmsRetry.MediaRetryNotification.ResultType[message.result] : message.result;
                if (options.oneofs)
                    object._result = "result";
            }
            if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) {
                object.messageSecret = options.bytes === String ? $util.base64.encode(message.messageSecret, 0, message.messageSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSecret) : message.messageSecret;
                if (options.oneofs)
                    object._messageSecret = "messageSecret";
            }
            return object;
        };

        /**
         * Converts this MediaRetryNotification to JSON.
         * @function toJSON
         * @memberof MmsRetry.MediaRetryNotification
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        MediaRetryNotification.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for MediaRetryNotification
         * @function getTypeUrl
         * @memberof MmsRetry.MediaRetryNotification
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        MediaRetryNotification.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/MmsRetry.MediaRetryNotification";
        };

        /**
         * ResultType enum.
         * @name MmsRetry.MediaRetryNotification.ResultType
         * @enum {number}
         * @property {number} GENERAL_ERROR=0 GENERAL_ERROR value
         * @property {number} SUCCESS=1 SUCCESS value
         * @property {number} NOT_FOUND=2 NOT_FOUND value
         * @property {number} DECRYPTION_ERROR=3 DECRYPTION_ERROR value
         */
        MediaRetryNotification.ResultType = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "GENERAL_ERROR"] = 0;
            values[valuesById[1] = "SUCCESS"] = 1;
            values[valuesById[2] = "NOT_FOUND"] = 2;
            values[valuesById[3] = "DECRYPTION_ERROR"] = 3;
            return values;
        })();

        return MediaRetryNotification;
    })();

    return MmsRetry;
})();

module.exports = $root;
